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

Remaining ORM/OML Updates #16539

Merged
merged 6 commits into from
Nov 21, 2024

Conversation

JFisk42
Copy link
Collaborator

@JFisk42 JFisk42 commented Nov 14, 2024

This PR finishes the mappings and related changes for the new OML and ORM mappings.

Test Steps:

  1. Run the full gamut of tests: ./gradlew test, ./gradlew testSmoke, ./gradlew testIntegration.

Changes

  • The OML and ORM integration tests scenarios now include all supported fields and supported repeated segments/fields.
  • Mappings for OBR -> Specimen are now fully supported (primarily mappings for OBR-15/SPS were added for FHIR->HL7).
    • For ORU and OML these are directly mapped through Specimen.
    • For ORM (and when present in ORU/OML) these are preserved through ServiceRequest.extension
  • Java classes were created for basic OML segment groups to support several mapped fields.

Checklist

Testing

  • Tested locally?
  • Ran ./prime test or ./gradlew testSmoke against local Docker ReportStream container?
  • (For Changes to /frontend-react/...) Ran npm run lint:write?
  • Added tests?

Process

  • Are there licensing issues with any new dependencies introduced?
  • Includes a summary of what a code reviewer should test/verify?
  • Updated the release notes?
  • Database changes are submitted as a separate PR?
  • DevOps team has been notified if PR requires ops support?

Linked Issues

To Be Done

Tickets to log:

  • There is an issue where OBR.15.1 is not correctly mapped for FHIR->HL7
  • Documentation/Investigation around the inability to handle multiple order groups for OML messages.

@JFisk42 JFisk42 added the platform Platform Team label Nov 15, 2024
@JFisk42 JFisk42 force-pushed the platform/josh/16065-final-OML-mappings branch from eb38dcf to 25ea2eb Compare November 15, 2024 22:28
@JFisk42 JFisk42 changed the title Platform/josh/16065 final oml mappings Remaining ORM/OML Updates Nov 15, 2024
@@ -141,12 +140,6 @@ class HL7Reader(private val actionLogger: ActionLogger) : Logging {
)
}
}
"OML" -> {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was removed as it was pointed out on a previous PR that it is an outdated pattern that shouldn't be followed.

@@ -29,21 +29,6 @@ elements:
value: [ '%resource.occurrence.extension(%`rsext-hl7v2-date-time`).value' ]
hl7Spec: [ '%{obrFieldPath}-6' ]

- name: observation-collected-datetime
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These mappings were moved out to both ServiceRequest/OBRExtension and Specimen/OBR for a few different reasons:

  • The mappings you see here look at %resource.specimen to find the values. ORU is not currently populating ServiceRequest.specimen. (This might be incorrect according to the mapping inventory). Moving these mappings out allow ORU and OML to each access these fields differently.
  • ORM does not map to a Specimen resource at all, thus to preserve the fields they need to be in OBRExtension.

Copy link
Collaborator

@arnejduranovic arnejduranovic Nov 21, 2024

Choose a reason for hiding this comment

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

This might be incorrect according to the mapping inventory - can we ticket this?

@@ -67,11 +67,11 @@ SPM|1|0cba76f5-35e0-4a28-803a-2f31308aae9b||258500001^Nasopharyngeal swab^SCT|||

@Suppress("ktlint:standard:max-line-length")
const val cleanHL7RecordConverted =
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These changes were related to OBR.7 appearing in OBR Extensions now.

}
]
}
},
"note" : [
"container": [
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Lots of formatting changes. The meat of the change is new values coming through. This was happened after adding the OML java classes and new data being returned due to OBR.15 getting represented as SPS instead of a String.

import gov.cdc.prime.router.datatests.mappinginventory.verifyHL7ToFHIRToHL7Mapping
import org.junit.jupiter.api.Test

class OBRToSpecimenTests {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm open to different names/locations for these tests. They made sense at the time. These tests specifically test that

  • FHIR->HL7 OBR/Specimen mappings work despite being linked in the FHIR through different paths in ORU/OML.
  • HL7->FHIR->HL7 OBR/Specimen mappings work for ORM despite not having the Specimen resource.

@JFisk42 JFisk42 marked this pull request as ready for review November 15, 2024 23:32
@JFisk42 JFisk42 requested a review from a team as a code owner November 15, 2024 23:32
Copy link
Collaborator

@arnejduranovic arnejduranovic left a comment

Choose a reason for hiding this comment

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

Looks good! Can we also please:

  1. update the PR description to include links or ticket numbers in the TODO section?
  2. remember to open a PR merging this feature branch into main? We're ready for that now, right?

@@ -29,21 +29,6 @@ elements:
value: [ '%resource.occurrence.extension(%`rsext-hl7v2-date-time`).value' ]
hl7Spec: [ '%{obrFieldPath}-6' ]

- name: observation-collected-datetime
Copy link
Collaborator

@arnejduranovic arnejduranovic Nov 21, 2024

Choose a reason for hiding this comment

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

This might be incorrect according to the mapping inventory - can we ticket this?

@JFisk42
Copy link
Collaborator Author

JFisk42 commented Nov 21, 2024

Squashing and merging now to unblock others, will create and link ticket todos asap.

@JFisk42 JFisk42 merged commit 39e79a8 into OML-Updates-Base Nov 21, 2024
9 checks passed
@JFisk42 JFisk42 deleted the platform/josh/16065-final-OML-mappings branch November 21, 2024 21:56
jack-h-wang pushed a commit that referenced this pull request Nov 21, 2024
* Add OML Java Classes

* Updated tests with repeating fields and segments

* OML FHIR->HL7 Updates

* OBR -> Specimen Additions and Updates

* Missed todos

* Populating OBR 7&8 as separate datetime fields when in extension
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform Platform Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants