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

core: add some missing Encounter.class codes #334

Merged
merged 1 commit into from
Jan 7, 2025
Merged

Conversation

mikix
Copy link
Contributor

@mikix mikix commented Jan 7, 2025

These codes were not handled, but now are:

  • OBSENC (v3)
  • I (v2 -> IMP)
  • P (v2 -> PRENC)

Additionally, we verify the code system too now.

Fixes: #333

Checklist

  • Consider if documentation in docs/ needs to be updated
    • If you've changed the structure of a table, you may need to run generate-md
    • If you've added/removed core study fields that not in US Core, update our list of those in core-study-details.md
  • Consider if tests should be added
  • Update template repo if there are changes to study configuration in manifest.toml

These codes were not handled, but now are:
- OBSENC (v3)
- I (v2 -> IMP)
- P (v2 -> PRENC)

Additionally, we verify the code system too now.
Comment on lines +129 to +147
('AMB', 'AMB', 'http://terminology.hl7.org/CodeSystem/v3-ActCode'),
('EMER', 'EMER', 'http://terminology.hl7.org/CodeSystem/v3-ActCode'),
('FLD', 'FLD', 'http://terminology.hl7.org/CodeSystem/v3-ActCode'),
('HH', 'HH', 'http://terminology.hl7.org/CodeSystem/v3-ActCode'),
('IMP', 'IMP', 'http://terminology.hl7.org/CodeSystem/v3-ActCode'),
('ACUTE', 'ACUTE', 'http://terminology.hl7.org/CodeSystem/v3-ActCode'),
('NONAC', 'NONAC', 'http://terminology.hl7.org/CodeSystem/v3-ActCode'),
('OBSENC', 'OBSENC', 'http://terminology.hl7.org/CodeSystem/v3-ActCode'),
('PRENC', 'PRENC', 'http://terminology.hl7.org/CodeSystem/v3-ActCode'),
('SS', 'SS', 'http://terminology.hl7.org/CodeSystem/v3-ActCode'),
('VR', 'VR', 'http://terminology.hl7.org/CodeSystem/v3-ActCode'),
-- http://terminology.hl7.org/CodeSystem/v2-0004
-- This is an older class system, still in active use apparently (at BCH Cerner).
-- Unmapped codes: B (obstetrics), C (commercial), N (not applicable), U (unknown)
('EMER', 'E', 'http://terminology.hl7.org/CodeSystem/v2-0004'),
('IMP', 'I', 'http://terminology.hl7.org/CodeSystem/v2-0004'),
('AMB', 'O', 'http://terminology.hl7.org/CodeSystem/v2-0004'),
('PRENC', 'P', 'http://terminology.hl7.org/CodeSystem/v2-0004'),
('AMB', 'R', 'http://terminology.hl7.org/CodeSystem/v2-0004') -- recurring patient
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have we checked this against a recent-ish epic? just to make sure these codes are actually present in the form we'd expect as opposed to the proprietary format?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the export I have from the Epic sandbox, it's always urn:oid:1.2.840.114350.1.72.1.7.7.10.696784.13260 and codes like 13 or 17

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this field is just a raw coding - so only room for one code & system pair 😦

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use multiple entries in this table? like core/fhir_mapping_tables.sql?

Copy link

github-actions bot commented Jan 7, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
2391 2386 100% 90% 🟢

New Files

No new covered files...

Modified Files

No covered modified files...

updated for commit: 7872628 by action🐍

@mikix mikix merged commit 0d09ad4 into main Jan 7, 2025
3 checks passed
@mikix mikix deleted the mikix/enc-class branch January 7, 2025 16:40
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

Successfully merging this pull request may close these issues.

Encounter.class = OBSENC is being filtered for BCH Cerner
2 participants