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

Cerner: Extract medications from MedicationRequest contained/medicationreference fields #68

Closed
dogversioning opened this issue Jul 5, 2023 · 2 comments

Comments

@dogversioning
Copy link
Contributor

Occasionally, medications will be embedded in a different place in the MedicationRequest resource. Currently, the ETL is not fully extracting the required values. Once it is, we should extract display values for this dataset when building medication tables.

To see the state of the data, run the following query:

with contained_table as(
    SELECT t.contained, medicationreference
    FROM "cumulusdb-rnr2cmuwjxfk"."medicationrequest" as mr, --cerner
    unnest (mr.contained) as t(contained)
    where cardinality(mr.contained ) >0
)
select * from contained_table as ct
where ct.contained.resourcetype='Medication'
@mikix
Copy link
Contributor

mikix commented Jul 5, 2023

The ETL is fixed now - it allows contained Medications through and their IDs should match. So addressing this issue is now unblocked.

In terms of BCH data, I'll have to do a re-run of MedicationRequest now -- I can let you know when that's done.

@dogversioning
Copy link
Contributor Author

resolved via #89 + #91

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