(patient._ageinmonths > 600 AND OBSPREV("COLONOSCOPY") == ""
OR DURATIONDAYS(LAST_SIGNED_OBS_DATE("COLONOSCOPY"), STR(._TODAYSDATE))>=3650)
This is the code currenlty in my visibility region. It only allows the field to display if the patient is over 50 and the obs term colonoscopy is blank or more than 10 year ago.
I want to add a command for
OR the obs term hemoccult is blank or more than 1 year ago
OR the obs term sigmoid is blank or more than 5 years ago
Is that possible?..........to have multiple OR statements?
YES. You need to make sure that you separate each unique condition with OR statements, with each condition enclosed in a set of parentheses.
(condition set 1) OR (condition set 2) OR (condition set 3)
where condition set # is any number of conditions that you want to be a unique selection criteria, i.e., the original condition you listed in your post would be condition set 1.
Your condition set 2 would be: (obs term hemoccult is blank or more than 1 year ago) and condition set 3 would be: (obs term sigmoid is blank or more than 5 years ago). Obviously, the exact syntax would need to be developed -- (OBSNOW("hemocult") <> "" or DURATIONDAYS(LAST_SIGNED_OBS_DATE("HEMOCULT")) > 365) or something like this.
This would give you 3 unique selection criterias, all separated by OR statements, grouped by parentheses.
(patient._ageinmonths > 600 AND (OBSPREV("COLONOSCOPY") == ""
OR DURATIONDAYS(LAST_SIGNED_OBS_DATE("COLONOSCOPY"), STR(._TODAYSDATE))>=3650) OR (OBSPREV("HEMOCCULT") == ""
OR DURATIONDAYS(LAST_SIGNED_OBS_DATE("HEMOCCULT"), STR(._TODAYSDATE))>=365) OR (OBSPREV("SIGMOID") == ""
OR DURATIONDAYS(LAST_SIGNED_OBS_DATE("SIGMOID"), STR(._TODAYSDATE))>=1825)
Does this look like I have all of the paraenthesis right?