Add support for code system versions #1434
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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#330Codes 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