Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Age vs Guard #1481

Open
schowdary55 opened this issue Jul 4, 2024 · 3 comments
Open

Age vs Guard #1481

schowdary55 opened this issue Jul 4, 2024 · 3 comments

Comments

@schowdary55
Copy link

What happened?

Attached a module that I created. The scenario is:

  1. Patient age should be greater than 45 years.
  2. Then he should be subjected to Colonoscopy.
  3. 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.

untitled-3.json

Environment

- OS:
- Java:

Relevant log output

No response

@schowdary55 schowdary55 added the bug label Jul 4, 2024
@jawalonoski
Copy link
Member

The Procedure states (in fact, all states that generate clinical activity) need to be within an Encounter and EncounterEnd. For example:

image

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...

image

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.

@jawalonoski jawalonoski removed the bug label Jul 8, 2024
@schowdary55
Copy link
Author

So, there is no condition which can do this: Year > Last 5 Years?

@jawalonoski
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants