web stats
Mirth Community - View Single Post - Grouping OBX by multiple OBRs
View Single Post
  #3  
Old 08-05-2019, 06:38 AM
as703 as703 is offline
What's HL7?
 
Join Date: Jul 2019
Posts: 4
as703 is on a distinguished road
Default

Many thanks for getting back to me it's much appreciated.

I replaced my Javascript with what you provided but it didn't seem to split the output.

An example of the HL7 message I'm trying to parse:

Quote:
MSH|^~\&|TDL Messaging|TDL|Receiving App|Receiving facility|201810021212||ORM^O01|20181002121215_ORDE RID|T|2.3.1|||AL|||||
PID|||PATIENT||PATIENT^TEST`^^^||00010101|M|||^^^^ |||||||||||||||||||
PV1|||GRAHAM^Graham Hogan||||||KERMITDAFROG||||||||||||||||||||||||||| ||||||||
ORC|OK|ORDERID|0010T197770||IP>||||201810021212||| ||||||||
OBR|1|ORDERID|0010T197770|^^WinPath||20110924|2011 0924|||||||||KERMITDAFROG^KERMITDAFROG||||||||TDL| I||||||||||||||||||||
OBX|1|NM|HB^HAEMOGLOBIN^WinPath^HAEMATOLOGY^1^0||1 5.9|g/dL|13.0 - 17.0||||F|||||
OBX|2|NM|MCHC^MCHC^WinPath^HAEMATOLOGY^2^5||32.3|g/dL| 30 - 35||||F|||||
OBX|3|NM|RBGF^FASTING BLOOD GLUCOSE^WinPath^BIOCHEMISTRY^3^37||3.0|mmol/L| 3.9 - 5.8|L|||F|||||
OBR|2|ORDERID|0010T197770|FBCX^FULL BLOOD COUNT^WinPath||20110924|20110924|||||||||KERMITDAF ROG^KERMITDAFROG||||||||TDL|I||||||||||||||||||||
OBX|1|NM|HCT^HCT^WinPath^HAEMATOLOGY^1^1||0.492||0 .37 - 0.50||||F|||||
OBX|2|NM|RBC^RED CELL COUNT^WinPath^HAEMATOLOGY^2^2||5.31|x10^12/L|4.40 - 5.80||||F|||||
OBX|3|NM|MCV^MCV^WinPath^HAEMATOLOGY^3^3||92.7|fL| 80 - 99||||F|||||
OBX|4|NM|MCH^MCH^WinPath^HAEMATOLOGY^4^4||29.9|pg| 26.0 - 33.5||||F|||||
OBX|5|NM|RDW^RDW^WinPath^HAEMATOLOGY^5^6||13.1||11 .5 - 15.0||||F|||||
OBX|6|NM|PLTS^PLATELET COUNT^WinPath^HAEMATOLOGY^6^7||174|x10^9/L|150 - 400||||F|||||
OBX|7|NM|MPV^MPV^WinPath^HAEMATOLOGY^7^8||11.1|fL| 7 - 13||||F|||||
OBX|8|NM|WBC^WHITE CELL COUNT^WinPath^HAEMATOLOGY^8^9||6.94|x10^9/L| 3.0 - 10.0||||F|||||
OBX|9|ST|NEUT^ Neutrophils^WinPath^HAEMATOLOGY^9^10||54.6% 3.79|x10^9/L| 2.0 - 7.5||||F|||||
OBX|10|ST|LYMP^ Lymphocytes^WinPath^HAEMATOLOGY^10^11||33.6% 2.33|x10^9/L| 1.2 - 3.65||||F|||||
OBX|11|ST|MONO^ Monocytes^WinPath^HAEMATOLOGY^11^12|| 7.5% 0.52|x10^9/L| 0.2 - 1.0||||F|||||
OBX|12|ST|EOSI^ Eosinophils^WinPath^HAEMATOLOGY^12^13|| 3.9% 0.27|x10^9/L| 0.0 - 0.4||||F|||||
OBX|13|ST|BASO^ Basophils^WinPath^HAEMATOLOGY^13^14|| 0.4% 0.03|x10^9/L| 0.0 - 0.1||||F|||||
NTE|1|All cell populations appear normal.|
OBR|3|ORDERID|0010T197770|ESR^ERYTHROCYTE SEDIMENT RATE^WinPath||20110924|20110924|||||||||KERMITDAFR OG^KERMITDAFROG||||||||TDL|I||||||||||||||||||||
OBX|1|NM|ESR^ESR^WinPath^HAEMATOLOGY^1^15||5|mm/hr| 1 - 20||||F|||||
NTE|1|Note ref range raised in patients over 40|
I'd like to split each OBR, OBX section into separate tables with a new header above each table.

Many thanks again.
Reply With Quote