Closed mickohanlon23 closed 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.
The CQL to ELM translation warning was brought up on Zulip. Other than resolving that warning, this PR is ready for review @yunwwang!
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.
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.
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.