abl500 [-d]
The abl500
program converts an ASTM message received from a
Radiometer ABL 500 or 600 series acid base laboratory via the standard
input to an HL7 ORU message written as a message file to a spool
directory.
The following mapping is used for the ASTM message:
ASTM RESULT MESSAGE | HL7 OBSERV RESULT/UNSOLICITED ================================|================================== | H.............................+.......MSH {.............................+.......{ P...........................+.........[ . | PID . | [ { NTE } ] . | [ PV1 ] .......................+.........] {...........................+.........{ . | [ ORC ] . O.........................+...........OBR . | [ { NTE } ] . {.........................+...........[ . . | { . .R........................+...............OBX . . | [ { NTE } ] . . | } . }.........................+...........] }...........................+.........} }.............................+.......} L | [ DSC ]
Where the data items are mapped as follows:
ASTM MESSAGE | HL7 ORU MESSAGE DATA ITEM TYP N | DATA ITEM TYP N ============================================================================ H.SENDER(5) ZA 0--1 > MSH.SENDING APPLICATION ST 1 > MSH.SENDING FACILITY ST 1 ZA.BRAND | ZA.ID | | H.DATE/TIME OF MESSAGE(14) TS 0--1 ? MSH.DATE/TIME OF MESSAGE TS 1 | P.SEQUENCE NUMBER(1) SI 0--1 = MSH.SET ID - PATIENT ID SI 1 P.LAB ASSIGNED PATIENT ID(3) ID 0--1 = PID.ALTERNATE PATIENT ID P.PATIENT NAME(5) PN 0--1 | PID.PATIENT NAME patinfo()... P.SEX(8) 0001 ID 0--1 | PID.SEX P.PATIENT AGE(14) CQ 0--1 | -- P.PATIENT HEIGHT(16) CQ 0--1 | -- P.PATIENT WEIGHT(17) CQ 0--1 | -- P.LOCATION(26) ID 0--1 | PV1.ASSIGNED PATIENT LOCATION | O.SEQUENCE NUMBER(1) SI 0--1 = OBR.SET ID OBSERVATION REQUEST O.INSTRUMENT SPECIMEN ID(3) ZI 0--1 = OBR.FILLER ORDER NUMBER CM ZI.TYPE 1005! ID | CM.COM2 ZI.NUMBER SI | CM.COM1 | O.SPECIMEN COLLECTION DATE/TIME TS 0--1 = OBR.OBSERVATION DATE/TIME O.SPECIMEN DESCRIPTOR(15) ZS 0--1 > OBR.SPECIMEN SOURCE ZS.TYPE 1001! ID | ZS.SOURCE 1002! ID | | R.SEQUENCE NUMBER(1) SI 0--1 = OBX.SET ID - OBSERVATIONAL SIMPLE R.UNIVERSAL TEST ID(2) ZT 0--1 | OBX.OBSERVATION IDENTIFIER toloinc() ZT.PARAMETER NAME 1003! ID | ZT.PARAMETER TYPE 1004! ID | | R.MEASUREMENT VALUE(3) ST 0--1 > OBX.OBSERVATION VALUE ...(tounit()) R.UNITS(4) 0003! ID 0--1 > OBX.UNITS tounit() R.ABNORMAL FLAG(6) 0078 ID 0--1 = OBX.ABNORMAL FLAGS R.RESULT STATUS(8) 0085 ID 0--1 = OBX.OBSERV RESULT STATUS R.OPERATOR ID(10) ID 0--1 > OBX.RESPONSIBLE OBSERVER operinfo() R.DATE/TIME TEST STARTED(11) TS 0--1 = OBX.DATE/TIME OF THE OBSERVATION R.INSTRUMENT ID(13) 1006! ID 0--1 = OBX.PRODUCER'S ID | L.SEQUENCE NUMBER(1) SI 0--1 | -- L.TERMINATION CODE(2) 1007! ID 0--1 | -- (check)
The ABL 500 and 600 allows the operator to enter a patient id consisting of digits and colons as well as an operator id consisting of a string of digits. It is assumed, that the patient identifier is the room and bed number where the patient is currently located. This is a reasonably unique number that is not too long in order to prevent errors from being introduced. In order to resolve this identifiers the shell scripts `/usr/hl7/etc/PatByBed' and `/usr/hl7/etc/OperByNum' are called in a reading pipe. These scripts can be configured to make a database access in order to resolve the numbers to real patient or operator data. See section Resolving a Patient ID and section Resolving an Operator ID for how to configure these scripts.
The observation identifiers are coded using the LOINC code (see section The LOINC Code) which had to be substantially extended in order to map ABL results. However, still some results from the ABL 625 are not resolved due to missing entries in the LOINC database table.
Resolved observation identifiers are:
BODY TEMPERATURE, TEMP
BAROMETRIC PRESSURE, PRES
Blood Gases
CARBON DIOXIDE, PPRES
CARBON DIOXIDE^^ADJUSTED TO BODY TEMPERATURE, PPRES
CARBON DIOXIDE.TOTAL, SCNC
CARBON DIOXIDE.TOTAL, PLAS
OXYGEN, PPRES
OXYGEN^^ADJUSTED TO BODY TEMPERATURE, PPRES
OXYGEN^^SATURATION ADJUSTED TO 0.5, PPRES
OXYGEN^^SATURATION ADJUSTED TO 0.5 AND BODY TEMPERATURE, PPRES
OXYGEN^^SATURATION ADJUSTED TO 0.5 STANDARD, PPRES
OXYGEN SATURATION, SFR
OXYGEN.TOTAL, SCNC
Acid Base Status
PH, SCNC
PH^^STANDARD, SCNC
PH^^ADJUSTED TO PATIENT TEMPERATURE, SCNC
BICARBONATE, SCNC
BICARBONATE^^STANDARD, SCNC
BASE EXCESS, SCNC
BASE EXCESS^^STANDARD, SCNC
Electrolytes
SODIUM, SCNC
POTASSIUM, SCNC
CALCIUM.FREE, SCNC
CALCIUM.FREE^^PH ADJUSTED TO 7.4, SCNC
CHLORIDE, SCNC
ANION GAP^^INCLUDING POTASSIUM, SCNC
ANION GAP, SCNC
Metabolism
GLUCOSE, ACNC
LACTATE, SCNC
Hematology
HEMATOCRIT, NFR
HEMOGLOBIN, MCNC
OXYGEN BINDING CAPACITY, SCNC
OXYHEMOGLOBIN.TOTAL, NFR
DEOXYHEMOGLOBIN, SFR
METHEMOGLOBIN, MFR
CARBON MONOXIDE.HEMOGLOBIN, NFR
HEMOGLOBIN F, SFR
SULFHEMOGLOBIN, SFR
Miscellanea
CARBON DIOXIDE, NFR
OXYGEN INHALED, NFR
OXYGEN, NFR
Unresolved observation identifiers are: `pO2(A)', `pO2(A),T', `AaDpO2', `AaDpO2,T', `a/ApO2', `a/ApO2,T', `RI', `RI,T', `DO2', `VO2', `RQ', `Qt', `Qx', `cx', `px', `Shunt', `Shunt,T', `pO2(uv)', and `CQ'.
The LOINC code for specimen is used instead of the HL7 code in order to be consistent with LOINC which is being developed in close relationship to HL7. The HL7 table 70 is anyway hopelessly incomplete. Thus, instead of `ABLD' we keep saying `BLDA' for arterial blood. However, even the LOINC code is not detailed enough in order to distinguish venous blood `BLDV' from mixed venous blood. The latter is therefore encoded by `BLDVM'.
If a test was erroneous, the ABL 500 uses a question mark `?' before the numeric observation value. Currently such observations are simply discarded. Likewise, `<' and `>' characters that designate results beyond absolute limits cause the observation to be discarded. In subsequent versions, however, these will cause abnormal flags to be set and an NTE segment to be added, giving a textual note on the error.
-d
For proper operation, abl500
should be called from the
radiometer
program.
radiometer 625 /usr/hl7/bin/abl500 - /dev/ttyd0
But single abl messages can be converted to HL7 directly:
abl500 < /usr/hl7/var/log/ABL/060_IOP/ABL0123
PG_CODELIB
abl500
program the HL7 ORU message as a message file to a
spool directory whose name is composed of the application and
facility names. The filename is composed of the string `msg'
and the time in seconds since the UNIX epoch with the process id
(pid) of the abl500 process attached to it and the suffix
`.dat'.
The colon in the patient id is transformed into a `-' character while the id itself is always interpreted as `room:bed'. This is definitely too narrow, since one might want to use different numbers. We should not interpret anything here and directly forward the number to PatByBed.
Uncoded observation identifiers: `pO2(A)', `pO2(A),T', `AaDpO2', `AaDpO2,T', `a/ApO2', `a/ApO2,T', `RI', `RI,T', `DO2', `VO2', `RQ', `Qt', `Qx', `cx', `px', `Shunt', `Shunt,T', `pO2(uv)', and `CQ'.
The application name (`ABL') and the facility name (`060_IOP') are chosen at compile time. This is certainly wrong because the abl500 program might well be used for different facilities.
syslog(3), time(3), section Resolving a Patient ID, section Resolving an Operator ID, section Accepting Messages From a Serial Line. section Converting Printer Output to HL7,