Age vs Guard
schowdary55 opened this issue · 5 comments
What happened?
Attached a module that I created. The scenario is:
- Patient age should be greater than 45 years.
- Then he should be subjected to Colonoscopy.
- In 50% of cases, he is referred to FIT test.
This is the only module I kept in src/main/resources/modules (I dont want data to be generated for all the pre-existing modules)
But I dont see patient data with colonoscopy details when used this command: ./run_synthea -g M -a 45-70
Should I add a delay instead of Age guard here? If so, why doesn't age work here?
Also, how can I add a check that the FIT test happens within last 5 years? I added a check year guard of > 2020. But I dont want to hardcode the year.
Environment
- OS:
- Java:
Relevant log output
No response
The Procedure
states (in fact, all states that generate clinical activity) need to be within an Encounter
and EncounterEnd
. For example:
Also, the second Guard
named "Check Year" will keep patients in an never-ending encounter until the year 2021... You probably want to try and use a different transition type, for example a Complex
transition...
Finally, regarding this statement:
This is the only module I kept in src/main/resources/modules (I dont want data to be generated for all the pre-existing modules)
This can have undefined behavior and unintended consequences, so I'm not going to debug this.
So, there is no condition which can do this: Year > Last 5 Years?
So, there is no condition which can do this: Year > Last 5 Years?
No. You can check for PriorState
within a time limit, such as 5 years. But that is within 5 years of the patient's history, when they are at that state. It is not within 5 years of the computer system time.
Created the workflow as you suggested. When tried to create 3 patients, only one of them has Colonoscopy and FIT procedure records. The rest 2 doesn't have any. Atleast, they should have got the Colonoscopy record.
Command Used: ./run_synthea -a 45-70 -p 3
Attaching Workflow and patients generated.
colonoscopy and fit check.json
Rey54_Zulauf375_893cecc1-1cef-1be2-026d-24180a174bb0.json
Joanne343_Jacquie940_Olson653_a3102d13-6dfe-46ae-556c-888a8628cd78.json
Nicholas495_Schaden604_db11c5dc-c0ba-1ad7-2838-4e0cb4e36fa9.json
For missing data, please see exporter.years_of_history
under https://github.com/synthetichealth/synthea/wiki/Common-Configuration#other-export-settings
If you are using the default value, generally anything older than 10 years is removed from the patient record.