HL7 Query messages,
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4. Bed occupation Some PBXes track the location of all patients, this to allow them to use 1 specific telephone extension number irrespective of their physical location. The patients have received a PIN number to enable them to have phone conversations; the associated costs are invoiced after they have been discharged. In these situations the quality of the patient location data in the PBX is often of better quality than the patient location data in the PAS system. 5. Insurance coverage (Eligibility) In circumstances where the insurance coverage of a patient is uncertain, a healthcare provider organisation sends a request for information concerning a person's insurance coverage to public or private healthcare insurers. This request is for validating whether a patient has healthcare benefits coverage in effect for a specified date, i.e. if there is an insurance policy. The purpose of this query is to identify the extent to which a patient has insurance coverage as the outcome may impact what services will be rendered to the patient.
6. Schedule information The information that the querying application receives may be used to create resource-specific working lists, or form the basis for a subsequent appointment request (booking an open slot). 3. Queries and 'Thin clients'The ever-increasing use of internet technologies has lead to relatively simple applications that allow clinical data to be viewed by means of a web browser. The underlying technology could be a simple as a collection of (server generated) HTML pages, or it could be a Java applet.These 'Thin client' applications typically don't have support for the persistent storage of data on the client. Therefore its functionality depends on its ability to retrieve various elements of data components from various systems. If the thin client isn't closely coupled with a specific application it could use an open-standard query interface as offered by the various applications in the healthcare provider organization. These could range from Corba, J2EE, JMS (to name a few candidates) to HL7 query messages. The queries and their associated replies could be formatted as XML messages. These can be easily transformed into HTML using an XSLT. By using a stylesheet to display them in a proper fashion, the XML response to the query can be immediately displayed by the browser. The use of internet technologies and the support for query interfaces is set to increase in healthcare. One of the reasons is the tendency for regional healthcare provider organizations to increase cooperation. This will only be possible if the information owned by an individual healthcare provider organization can be made available to other organisations. |
Queries in SAP IS-HThe IS-H SAP module, like all other SAP modules, supports queries by means of the SAP Exchange Infrastructure. The SAP Exchange Infrastructure is a key component when there is a need to integrate into SAP, allowing SAP customers to instantly participate in collaborative business scenarios and marketplaces. More specifically, it provides SAP customers with the ability to connect to any number of SAP applications and mySAP.com. It also offers integration to non-SAP applications, facilitating business-to-business transaction in an EDI-like manner.An XML document can be sent to SAP via the SAP Exchange Infrastructure, and it responds by sending an XML document, using the HTTP transport protocol. Using the SAP Exchange Infrastructure all APIs provided by IS-H (e.g. BAPIs and RFCs) can be called, provided that the Client application has the rights to do so. In a healthcare setting these XML documents can easily be translated to and from other standards such as HL7. All hospitals that use IS-H should therefore consider installing the SAP Exchange Infrastructure and using its capabilities to allow other applications to send queries to IS-H. |
This section describes the use of record-oriented original mode queries [HL7Query]. In the original mode queries, separate trigger events are used to differentiate between the various queries. In addition, some of the functional chapters define queries and responses with separate trigger events.
| QRY^Q01^QRY_Q01 | Generic Query |
| MSH | Message Header |
| QRD | Query Definition |
| [ QRF ] | Query Filter |
Figure A.1 shows the structure of HL7 query messages. The parameters of an HL7 query are carried by the QRD (Query Details) and QRF (Query Filter) segments. Because these segments are intended to be used by all queries, the content of these segments are only loosely defined in HL7.
The query type is identified by QRD-9 (What subject filter). The key for searching of the query is either stored in QRD-8 ("Who") or QRD-10 ("What"). QRD-8 is used if the subject of the query is a person; QRD-10 is used if it is not.
The structure of the response message consists of a few query-specific segments followed by a sequence of segments as defined by a particular HL7 chapter. This is mostly a segment sequence as it is also used in event-triggered messages defined by the same chapter.
| QRY^A19^QRY_A19 | Patient Query |
| MSH | Message Header |
| QRD | Query Definition |
| [ QRF ] | Query Filter |
Figure A.2 contains the definition of the demographics query. The query type (QRD-9: What subject filter) contains DEM (Query for patient demographics data based on patients' ID), APN (Query for patient demographics data based on patients' name) or any of the query types defined in HL7 chapter 3.
The storyboard for the example message shown in figure A.3 is as follows: "Ms. Anderson is a Registration Staff working at University Medical Center (UMC). She is authorised to admit patients on behalf of the physician who is affiliated with the hospital. Dr. Bowen has notified the Registration Office that his patient, Mr. Bauer, will arrive at a scheduled time, and that the registration office of the hospital has performed a pre-admit on Mr.Doe, assigning him a unique hospital wide patient ID number. As part of the admitting process, Ms. Anderson enters Mr. Bauer's (new) patient ID number into the system, which retrieves back his demographics. She confirms these with Mr. Bauer as part of the admitting procedure."
MSH|^~\&|KIS||CommServer||200811111017||QRY^A19||P|2.2| QRD|200811111016|R|I|Q1004|||1^RD|10000437363|DEM|||Figure A.3 - QRY^A19 message example
The message shown in figure A.3 is a query message (QRY) for a patients' demographics data (DEM) based on the patient ID "10000437363". The query has to be dealt with immediately (I) by the receiving application. The response message may contain a maximum of 1 record (1^RD), the data is to be sent as structured data (R), not in the form of text. An example of a response message is shown in figure A.4.
MSH|^~\&|CommServer||KIS||200811111017||ADR^A19||P|2.2 MSA|AA QRD|200811111016|R|I|Q1004|||1^RD|10000437363|DEM PID|||10000437363|508003|Bauer^Fritz^^^||19631101|M|||Mercedesstr 12^^Bergheim^^68123^D|||||M| NK1|1|Bauer^Karin|Ehefrau PV1||S|CHI1^2W^1^CHI|R||||20 56 344^Antonius^ Markus^^^Dr.med.^^^Königstr. 112^69939^Haarheim/M. ^06146^61011|20 56 344^Antonius^Markus^^^Dr.med.^^^Königstr. 112^69939^Haarheim/M.^06146^ 61011|N|||||||||9800703||K|||||||||||||||||||||||200311110928 DG1|1||355.9^355.9 Neuropathie onA^I9|||EL|||||||||1 DG1|2||386.-^386.- Schwindel^I9|||EL|||||||||2 DG1|3||087.9^087.9 Borreliose^I9|||EL|||||||||3 PR1|1||1-502.6^1-502.6 Biopsie durch Inzision am Unterschenkel^ICPM||20031107|P PR1|2||5-940^5-940 Operationslagerung^ICPM|||P PR1|3||5-900^5-900 Einfache Wiederherstellung der Kontinuität an Haut und Unterhaut^ICPM|||P IN1|1|0||NAK|Innenstr. 52 ^^Hannover^^30014||||||||207714 ||10035|Bauer^Fritz||19631101| Mercedesstr 12^^Bergheim^^68123Figure A.4 - ADR^A19 message example
The definition of the response message is as shown in figure A.5. (Note: some segments have been omitted). The contents of the response messages are structured in the same way as other messages in HL7 chapter 3.
| ADR^A19^ADR_A19 | ADT Response |
| MSH | Message Header |
| MSA | Message Acknowledgment |
| [ERR] | Error |
| [ QAK ] | Query Acknowledgment |
| QRD | Query Definition |
| [ QRF ] | Query Filter |
| { | |
| PID | Patient Identification |
| [{ ROL }] | Role |
| [{ NK1 }] | Next of Kin / Associated Parties |
| PV1 | Patient Visit |
| [ PV2 ] | Patient Visit - Additional Info. |
| [{ ROL }] | Role |
| [{ OBX }] | Observation/Result |
| [{ AL1 }] | Allergy Information |
| [{ DG1 }] | Diagnosis Information |
| [ DRG ] | Diagnosis Related Group |
| [{ | |
| PR1 | Procedures |
| [{ ROL }] | Role |
| }] | |
| [{ GT1 }] | Guarantor |
| [{ | |
| IN1 | Insurance |
| [ IN2 ] | Insurance Additional Info. |
| [{ ROL }] | Role |
| }] | |
| [ ACC ] | Accident Information |
| } |
| QRY^R02^QRY_R02 | Result Query |
| MSH | Message Header |
| QRD | Query Definition |
| [ QRF ] | Query Filter |
Figure A.5 contains the definition of the observation query message. The query type (QRD-9: What subject filter) contains RES (Query for results).
The query shown in figure A.7 is a query of the EKG system for the data for a particular patient number 0123456-1 for reports that have been modified or created since 1/1/2006.
MSH|^~\&|MyEPA||EKG||||QRY^R02|CDB22222|P|2.2 QRD|200804180943|R|I|Q4412|||10^RD|0123456-1|RES QRF|EKG||200801010000Figure A.7 - QRY^R02 message example
This query message (QRY) for results (RES) is based on the patient ID "01234456-1". The query has to be dealt with immediately (I) by the receiving application. The response message may contain a maximum of 10 records (10^RD), the data is to be sent as structured data (R), not in the form of text. A filter specifies that the results should be after a specific date (20030101). An example of a response message is shown in figure A.8 below.
MSH|^~\&|EKG||MyEPA||||ORF^R04|X981672|P
MSA|AA|CDB22222|P
QRD|200804180943|R|I|Q4412|||10|RD|0123456-1|RES
QRF|EKG||200301010000
PID|1||0123456-1||Nordstein^Peter^H|||||||9821111
OBR|1|43215^OE|98765^EKG|93000^EKG REPORT|R|200801111000|200801111330|||RMT||||200801111330|-|
P030||||||200801120930||||||02^126666|A111|Viranyi^Andrew
OBX|1|ST|93000.1^VENTRICULAR RATE(EKG)||91|/MIN|60-100
OBX|2|ST|93000.2^ATRIAL RATE(EKG)||/MIN|60-100
OBX|3|ST|93000.3^PR INTERVAL||0|/MSEC|1.06-.10
OBX|4|ST|93000.4^QRS INTERVAL||.368|/MSEC|.18-.22
...
OBX|8|CE|93000&IMP^EKG DIAGNOSES|1|^ATRIAL FIBRILATION
OBX|9|CE|93000&IMP^EKG DIAGNOSIS|2|^ST DEPRESSION
OBX|10|FT|93000&ADT^EKG COMMENT||\.br\ 1. Ein vergleich mit einem EKG vom 31.10.2002 zeigt,
dass die ventrikulär Frequenz um 30 bpm gestiegen ist.\.br\2. Die Kriterien für einen
Seitenwandinfarkt sind nich länger gegeben.
Figure A.8 - ORF^R04 message example