Skip to content

Commit

Permalink
Update MSH-9 for OML messages to be consistent with the HL7 spec (#1300)
Browse files Browse the repository at this point in the history
* Update MSH-9 for OML messages to be consistent with the HL7 spec
* update unit test to check for correct OML event coding

---------

Co-authored-by: Basilio Bogado <[email protected]>
  • Loading branch information
2 people authored and tjohnson7021 committed Oct 17, 2024
1 parent 2d292ee commit f523a2c
Show file tree
Hide file tree
Showing 23 changed files with 24 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class OrderTest extends Specification {
//test that the MessageHeader's event is now an OML_O21
parsedSentPayload.entry[0].resource.resourceType == "MessageHeader"
parsedSentPayload.entry[0].resource.eventCoding.code == "O21"
parsedSentPayload.entry[0].resource.eventCoding.display.contains("OML")
parsedSentPayload.entry[0].resource.eventCoding.display == "OML^O21^OML_O21"
}

def "return a 400 response when request has unexpected format"() {
Expand Down
2 changes: 1 addition & 1 deletion examples/Other/004_OML_O21.fhir
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"eventCoding": {
"system": "http://terminology.hl7.org/CodeSystem/v2-0003",
"code": "O21",
"display": "OML - Laboratory order"
"display": "OML^O21^OML_O21"
},
"destination": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"eventCoding": {
"system": "http://terminology.hl7.org/CodeSystem/v2-0003",
"code": "O21",
"display": "OML - Laboratory order"
"display": "OML^O21^OML_O21"
},
"destination": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MSH|^~\&|BaptistOracle^2.16.840.1.114222.4.1.000000^ISO|BaptistEast^2.16.840.1.114222.4.1.000001^ISO|ALlabNatus^2.16.840.1.114222.4.1.181960.2^ISO|ALlab^2.16.840.1.114222.4.1.181960^ISO|20240224134009||OML - Laboratory order|Q1960841872T2476960690||2.5.1||||||8859/1
MSH|^~\&|BaptistOracle^2.16.840.1.114222.4.1.000000^ISO|BaptistEast^2.16.840.1.114222.4.1.000001^ISO|ALlabNatus^2.16.840.1.114222.4.1.181960.2^ISO|ALlab^2.16.840.1.114222.4.1.181960^ISO|20240224134009||OML^O21^OML_O21|Q1960841872T2476960690||2.5.1||||||8859/1
PID|1||1300974^^^^MR||ONE^TESTCASE||202402210152-0500|F|||1234 GPCS WAY^^MONTGOMERY^Alabama^36117^USA^^^Montgomery||||||||||||||1
NK1|1||MTH^mother|1234 GPCS WAY^^MONTGOMERY^Alabama^36117^USA^^^Montgomery
ORC|NW|2801690163|||unknown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"eventCoding": {
"system": "http://terminology.hl7.org/CodeSystem/v2-0003",
"code": "O21",
"display": "OML - Laboratory order"
"display": "OML^O21^OML_O21"
},
"destination": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MSH|^~\&|BaptistOracle^2.16.840.1.114222.4.1.000000^ISO|BaptistSouth^2.16.840.1.114222.4.1.000002^ISO|ALlabNatus^2.16.840.1.114222.4.1.181960.2^ISO|ALlab^simulated-lab-id^ISO|202401180152||OML - Laboratory order|Q1960841872T2476960690||2.5.1||||||8859/1
MSH|^~\&|BaptistOracle^2.16.840.1.114222.4.1.000000^ISO|BaptistSouth^2.16.840.1.114222.4.1.000002^ISO|ALlabNatus^2.16.840.1.114222.4.1.181960.2^ISO|ALlab^simulated-lab-id^ISO|202401180152||OML^O21^OML_O21|Q1960841872T2476960690||2.5.1||||||8859/1
PID|1||1256872^^^^MR||TWO^TESTCASE||202401150152-0500|M|||1234 GPCS WAY^^MONTGOMERY^Alabama^36117^USA^^^Montgomery||||||||||||||2
NK1|1||MTH^mother|1234 GPCS WAY^^MONTGOMERY^Alabama^36117^USA^^^Montgomery
ORC|NW|5560411468|||unknown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"eventCoding": {
"system": "http://terminology.hl7.org/CodeSystem/v2-0003",
"code": "O21",
"display": "OML - Laboratory order"
"display": "OML^O21^OML_O21"
},
"destination": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MSH|^~\&|BaptistOracle^2.16.840.1.114222.4.1.000000^ISO|BaptistSouth^2.16.840.1.114222.4.1.000002^ISO|ALlabNatus^2.16.840.1.114222.4.1.181960.2^ISO|ALlab^simulated-lab-id^ISO|202401200152||OML - Laboratory order|Q1960841872T2476960690||2.5.1||||||8859/1
MSH|^~\&|BaptistOracle^2.16.840.1.114222.4.1.000000^ISO|BaptistSouth^2.16.840.1.114222.4.1.000002^ISO|ALlabNatus^2.16.840.1.114222.4.1.181960.2^ISO|ALlab^simulated-lab-id^ISO|202401200152||OML^O21^OML_O21|Q1960841872T2476960690||2.5.1||||||8859/1
PID|1||1256872^^^^MR||THREE^TESTCASE||202401160152-0500|U|||1234 GPCS WAY^^MONTGOMERY^Alabama^36117^USA^^^Montgomery||||||||||||||1
NK1|1||MTH^mother|1234 GPCS WAY^^MONTGOMERY^Alabama^36117^USA^^^Montgomery
ORC|NW|8765411468|||unknown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"eventCoding": {
"system": "http://terminology.hl7.org/CodeSystem/v2-0003",
"code": "O21",
"display": "OML - Laboratory order"
"display": "OML^O21^OML_O21"
},
"destination": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MSH|^~\&|BaptistOracle^2.16.840.1.114222.4.1.000000^ISO|BaptistSouth^2.16.840.1.114222.4.1.000002^ISO|ALlabNatus^2.16.840.1.114222.4.1.181960.2^ISO|ALlab^simulated-lab-id^ISO|202401200152||OML - Laboratory order|Q1960841872T2476960690||2.5.1||||||8859/1
MSH|^~\&|BaptistOracle^2.16.840.1.114222.4.1.000000^ISO|BaptistSouth^2.16.840.1.114222.4.1.000002^ISO|ALlabNatus^2.16.840.1.114222.4.1.181960.2^ISO|ALlab^simulated-lab-id^ISO|202401200152||OML^O21^OML_O21|Q1960841872T2476960690||2.5.1||||||8859/1
PID|1||1256872^^^^MR||FOUR^TESTCASE||202401160152-0500|U|||1234 GPCS WAY^^MONTGOMERY^Alabama^36117^USA^^^Montgomery||||||||||||||1
NK1|1||MTH^mother|1234 GPCS WAY^^MONTGOMERY^Alabama^36117^USA^^^Montgomery
ORC|NW|8765411468|||unknown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"eventCoding": {
"system": "http://terminology.hl7.org/CodeSystem/v2-0003",
"code": "O21",
"display": "OML - Laboratory order"
"display": "OML^O21^OML_O21"
},
"source": {
"_endpoint": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"eventCoding": {
"system": "http://terminology.hl7.org/CodeSystem/v2-0003",
"code": "O21",
"display": "OML - Laboratory order"
"display": "OML^O21^OML_O21"
},
"destination": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MSH|^~\&|BaptistOracle^2.16.840.1.114222.4.1.000000^ISO|BaptistEast^2.16.840.1.114222.4.1.000001^ISO|ALlabNatus^2.16.840.1.114222.4.1.181960.2^ISO|ALlab^simulated-lab-id^ISO|202402240152||OML - Laboratory order|Q1960841872T2476960690||2.5.1||||||8859/1
MSH|^~\&|BaptistOracle^2.16.840.1.114222.4.1.000000^ISO|BaptistEast^2.16.840.1.114222.4.1.000001^ISO|ALlabNatus^2.16.840.1.114222.4.1.181960.2^ISO|ALlab^simulated-lab-id^ISO|202402240152||OML^O21^OML_O21|Q1960841872T2476960690||2.5.1||||||8859/1
PID|1||1300974^^^^MR||SIX^TESTCASE||202402210152-0500|F|||1234 GPCS WAY^^MONTGOMERY^Alabama^36117^USA^^^Montgomery||||||||||||||1
NK1|1||MTH^mother|1234 GPCS WAY^^MONTGOMERY^Alabama^36117^USA^^^Montgomery
ORC|NW|4560411583|||unknown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"eventCoding": {
"system": "http://terminology.hl7.org/CodeSystem/v2-0003",
"code": "O21",
"display": "OML - Laboratory order"
"display": "OML^O21^OML_O21"
},
"destination": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MSH|^~\&|BaptistOracle^2.16.840.1.114222.4.1.000000^ISO|BaptistEast^2.16.840.1.114222.4.1.000001^ISO|ALlabNatus^2.16.840.1.114222.4.1.181960.2^ISO|ALlab^simulated-lab-id^ISO|202402240152||OML - Laboratory order|Q1960841872T2476960690||2.5.1||||||8859/1
MSH|^~\&|BaptistOracle^2.16.840.1.114222.4.1.000000^ISO|BaptistEast^2.16.840.1.114222.4.1.000001^ISO|ALlabNatus^2.16.840.1.114222.4.1.181960.2^ISO|ALlab^simulated-lab-id^ISO|202402240152||OML^O21^OML_O21|Q1960841872T2476960690||2.5.1||||||8859/1
PID|1||1300974^^^^MR||^TESTCASE|||F|||1234 GPCS WAY^^MONTGOMERY^Alabama^36117^USA^^^Montgomery||||||||||||||1
NK1|1||MTH^mother|1234 GPCS WAY^^MONTGOMERY^Alabama^36117^USA^^^Montgomery
ORC|NW|4560411583|||unknown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"eventCoding": {
"system": "http://terminology.hl7.org/CodeSystem/v2-0003",
"code": "O21",
"display": "OML - Laboratory order"
"display": "OML^O21^OML_O21"
},
"destination": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MSH|^~\&|BaptistOracle^2.16.840.1.114222.4.1.000000^ISO|BaptistEast^2.16.840.1.114222.4.1.000001^ISO|ALlabNatus^2.16.840.1.114222.4.1.181960.2^ISO|ALlab^simulated-lab-id^ISO|202402240152||OML - Laboratory order|Q1960841872T2476960690||2.5.1||||||8859/1
MSH|^~\&|BaptistOracle^2.16.840.1.114222.4.1.000000^ISO|BaptistEast^2.16.840.1.114222.4.1.000001^ISO|ALlabNatus^2.16.840.1.114222.4.1.181960.2^ISO|ALlab^simulated-lab-id^ISO|202402240152||OML^O21^OML_O21|Q1960841872T2476960690||2.5.1||||||8859/1
PID|1||1300974^^^^MR||SIX^TESTCASE||202402210152-0500|F|||1234 GPCS WAY^^MONTGOMERY^Alabama^36117^USA^^^Montgomery||||||||||||||1
NK1|1||MTH^mother|1234 GPCS WAY^^MONTGOMERY^Alabama^36117^USA^^^Montgomery
ORC|NW|4560411583|||unknown
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MSH|^~\&|BaptistOracle^2.16.840.1.114222.4.1.000000^ISO|BaptistEast^2.16.840.1.114222.4.1.000001^ISO|ALlabNatus^2.16.840.1.114222.4.1.181960.2^ISO|ALlab^simulated-lab-id^ISO|20240224134009||OML - Laboratory order|Q1960841872T2476960690||2.5.1||||||8859/1
MSH|^~\&|BaptistOracle^2.16.840.1.114222.4.1.000000^ISO|BaptistEast^2.16.840.1.114222.4.1.000001^ISO|ALlabNatus^2.16.840.1.114222.4.1.181960.2^ISO|ALlab^simulated-lab-id^ISO|20240224134009||OML^O21^OML_O21|Q1960841872T2476960690||2.5.1||||||8859/1
PID|1||1300974^^^^MR||ONE^TESTCASE||202402210152-0500|F|||1234 GPCS WAY^^MONTGOMERY^Alabama^36117^USA^^^Montgomery||||||||||||||1
NK1|1||MTH^mother|1234 GPCS WAY^^MONTGOMERY^Alabama^36117^USA^^^Montgomery
ORC|NW|2801690163|||unknown
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MSH|^~\&|BaptistOracle^2.16.840.1.114222.4.1.000000^ISO|BaptistEast^2.16.840.1.114222.4.1.000001^ISO|ALlabNatus^2.16.840.1.114222.4.1.181960.2^ISO|ALlab^simulated-lab-id^ISO|20240224134009||OML - Laboratory order|Q1960841872T2476960690||2.5.1||||||8859/1
MSH|^~\&|BaptistOracle^2.16.840.1.114222.4.1.000000^ISO|BaptistEast^2.16.840.1.114222.4.1.000001^ISO|ALlabNatus^2.16.840.1.114222.4.1.181960.2^ISO|ALlab^simulated-lab-id^ISO|20240224134009||OML^O21^OML_O21|Q1960841872T2476960690||2.5.1||||||8859/1
PID|1||1300974^^^^MR||ONE^TESTCASE||202402210152-0500|F|||1234 GPCS WAY^^MONTGOMERY^Alabama^36117^USA^^^Montgomery||||||||||||||1
NK1|1||MTH^mother|1234 GPCS WAY^^MONTGOMERY^Alabama^36117^USA^^^Montgomery
ORC|NW|2801690163|||unknown
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MSH|^~\&|BaptistOracle^2.16.840.1.114222.4.1.000000^ISO|BaptistEast^2.16.840.1.114222.4.1.000001^ISO|ALlabNatus^2.16.840.1.114222.4.1.181960.2^ISO|ALlab^simulated-lab-id^ISO|20240224134009||OML - Laboratory order|Q1960841872T2476960690||2.5.1||||||8859/1
MSH|^~\&|BaptistOracle^2.16.840.1.114222.4.1.000000^ISO|BaptistEast^2.16.840.1.114222.4.1.000001^ISO|ALlabNatus^2.16.840.1.114222.4.1.181960.2^ISO|ALlab^simulated-lab-id^ISO|20240224134009||OML^O21^OML_O21|Q1960841872T2476960690||2.5.1||||||8859/1
PID|1||1300974^^^^MR||ONE^TESTCASE||202402210152-0500|F|||1234 GPCS WAY^^MONTGOMERY^Alabama^36117^USA^^^Montgomery||||||||||||||1
NK1|1||MTH^mother|1234 GPCS WAY^^MONTGOMERY^Alabama^36117^USA^^^Montgomery
ORC|NW|2801690163|||unknown
Expand Down
4 changes: 2 additions & 2 deletions examples/Test/e2e/orders/001_OML_O21_short.fhir
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"eventCoding": {
"system": "http://terminology.hl7.org/CodeSystem/v2-0003",
"code": "O21",
"display": "OML - Laboratory order"
"display": "OML^O21^OML_O21"
},
"source": {
"name": "CDC Trusted Intermediary",
Expand Down Expand Up @@ -64,7 +64,7 @@
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0003",
"code": "O21",
"display": "OML - Laboratory order"
"display": "OML^O21^OML_O21"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"eventCoding": {
"system": "http://terminology.hl7.org/CodeSystem/v2-0003",
"code": "O21",
"display": "OML - Laboratory order"
"display": "OML^O21^OML_O21"
},
"destination": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,7 @@ private HapiHelper() {}
public static final String EXTENSION_ALT_CODING = "alt-coding";

public static final Coding OML_CODING =
new Coding(
"http://terminology.hl7.org/CodeSystem/v2-0003",
"O21",
"OML - Laboratory order");
new Coding("http://terminology.hl7.org/CodeSystem/v2-0003", "O21", "OML^O21^OML_O21");

public static final String EXTENSION_OBR_URL =
"https://reportstream.cdc.gov/fhir/StructureDefinition/obr-observation-request";
Expand Down

0 comments on commit f523a2c

Please sign in to comment.