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

Add support for code system versions #1434

Merged
merged 1 commit into from
Mar 21, 2024
Merged

Add support for code system versions #1434

merged 1 commit into from
Mar 21, 2024

Conversation

dehall
Copy link
Contributor

@dehall dehall commented Mar 21, 2024

Addresses #1430

For the most part, the SNOMED codes we use come from the International edition, but there are a few that are US-specific. This causes errors when validating generated resources that use these code, because if the resource doesn't specify the version, the validator/tx server will assume the international edition.

This PR adds a version field to our HealthRecord.code model which allows the version to be specified, and updates the codes that currently cause errors. The new version field is optional since it's only really relevant to half a dozen codes. See corresponding PR on the module builder: synthetichealth/module-builder#330

Codes that were changed:
5251000175109 -- the one from the linked issue, added US version flag
784051000000106 -- Depression care management, replaced with an international code that already had the same display
449411000124106 -- Admission to SNF, added US version
449381000124108 -- Discharge from SNF, added US version
457551000124104 -- Acute cerebrovascular accident (disorder), this code is inactive so I replaced it with international Cerebrovascular accident
452331000124102 -- Review of imaging finding, added US version
454711000124102 -- Depression screening PHQ2, added US version
231181000000100 -- delivery of spinal cord injury rehab is UK specific, I just deleted the activity. Not sure it adds anything over the code on the CarePlan

For reference, list of SNOMED edition URIs: https://confluence.ihtsdotools.org/display/DOCEXTPG/4.4.2+Edition+URI+Examples

@dehall dehall marked this pull request as ready for review March 21, 2024 16:44
Copy link

codecov bot commented Mar 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77%. Comparing base (6fa1b4b) to head (b9f8395).

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #1434    +/-   ##
=========================================
  Coverage        76%     77%            
- Complexity     3866    3889    +23     
=========================================
  Files           178     178            
  Lines         25039   25041     +2     
  Branches       3547    3547            
=========================================
+ Hits          19185   19317   +132     
+ Misses         4740    4611   -129     
+ Partials       1114    1113     -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jawalonoski jawalonoski merged commit 94ca67d into master Mar 21, 2024
8 checks passed
@jawalonoski jawalonoski deleted the code_versions branch March 21, 2024 18:18
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.

2 participants