ccsm-cds-tools / ccsm-cds-with-tests

This repository contains clinical decision support (CDS) which provides recommendations for cervical cancer screening and management (CCSM).
Apache License 2.0
7 stars 3 forks source link

pregnancy-episode-of-care #119

Closed mickohanlon23 closed 1 year ago

mickohanlon23 commented 1 year ago

Draft pull request to look for a patient's pregnancy status via the EpisodeOfCare FHIR resource. This PR add's EpisodeOfCare to the Patient History, and also specifically adds logic to the Pregnant expression to consider a patient pregnant if they have an active EpisodeOfCare.

mickohanlon23 commented 1 year ago

CQL to ELM Translation warning:

Warning:[n/a] List-valued expression was demoted to a singleton.

Added tests two tests in https://github.com/ccsm-cds-tools/ccsm-cds-with-tests/pull/119/commits/2462256d42d3a13ffd53bb365a55d8543094388b, one for an active pregnancy, and one for a finished pregnancy.

mickohanlon23 commented 1 year ago

The CQL to ELM translation warning was brought up on Zulip. Other than resolving that warning, this PR is ready for review @yunwwang!

mickohanlon23 commented 1 year ago

Figured out a way to make the EpisodeOfCare retrieve without the warning being thrown: https://github.com/ccsm-cds-tools/ccsm-cds-with-tests/pull/119/commits/b97505e855e9f76d1309067a44f235125545a7df. This should also be a better solution, because a Pregnancy Episode of Care will be identified if the pregnancy code is present at any point within the type array, as opposed to only if it is present in the first element of the array. I will monitor the Zulip thread linked above, to add a more elegant solution if one is proposed.

mickohanlon23 commented 1 year ago

All comments were resolved, so I'm going to go ahead and merge this. We can revisit if we eventually want to make the Episode of Care retrieve more efficient.