Go to the first, previous, next, last section, table of contents.

The HL7 to CareVue Gateway Program

Synopsis

cvgateway [-x] service fsi_service fsi_host facility

Description

This is a HL7 server application that acts as a gateway for the HP CareVue 9000 Clinical Information System. CareVue comes with a limited HL7 interface, that requires transformation of messages, addtion of a non-standard ZDM segment, removal of other (standard) segments, decomposition of some messages, and change of field contents etc. See section CareVue Interface for more.

The cvgateway process accepts ILLP driven TCP connections (see section The Internal Protocol) on the port service. Messages are forwarded to CareVue via ILLP/TCP connections made to fsi_host at port fsi_service. The facility name used by the cvgateway application its the same as the receiving facility for carevue and specified by the last argument.

The following messages are accepted, if allowed for the requesting connection tag, host, facility and application (see section The Internal Protocol and section Access Control for Networked ProtoGen Applications). The contents of the message is interpreted and changed as explained in section The ADT Application and section The Result Report Application. The messages are then handled as follows:

ADT^A01 (admit patient)
The CareVue census is examined and the following cases are distinguished:
patient is unknown
Forward the message to the ADT application, patient will be admitted.
bed is occupied by other patient
Forward the message to the ADT application, but clear the assigned patient location. The patient will be admitted without bed to the waiting list.
patient is known already
Derive an A08 message to update the patient data.
ADT^A02 (transfer patient)
The CareVue census is examined and the following cases are distinguished:
patient is unknown
Try an admission (A01) with the data that is supplied in the message if the assigned location is within the scope of the CareVue census. If transfer is out of care-unit, an AE is reported.
patient known, new bed occupied by same patient
The patient was transferred already, do nothing.
patient known, new bed occupied by other patient
The transfer action cannot be completed, AE is reported.
patient known, new bed is free
Forward the message to the ADT application, patient will be transfered.
ADT^A03 (discharge patient)
The CareVue census is examined and the following cases are distinguished:
patient is unknown
Return an application error (AE).
patient is known
Forward message to ADT application, patient will be discharged.
ADT^A08 (update patient information)
The CareVue census is examined and the following cases are distinguished:
patient is unknown
Try an admission (A01) with the available data.
patient is known already
Forward the message to the ADT application, the patient information will be updated.
ADT^A11 (cancel admit)
ADT^A12 (cancel transfer)
ADT^A13 (cancel discharge)
Forward the request to the ADT application. The effect of these messages is not controlled. See the CareVue documentation (if you have some more of it than I do).
ADT^A17 (swap patients)
The CareVue census is examined. Since there are two patients there are many cases to distinguish.
some patient is unknown
Do not try an admission
one patient is known
Try to transfer (A02) the known patient
both patients are known
Forward the request to the ADT application, the patients will be transfered to their new locations if these are free or mutually occupied, otherwise the census will be unchanged (CareVue will report AA anyway). The actions that CareVue takes are not controlled in any detail.
ORU (report results)
Forward the message to the CLI application.
NMD (network data)
If the receiving application is the application name of the cvgateway program (`CVGATEWAY'), the reply is generated. Otherwise the message is forwarded to CareVue.

If the type of a message is changed, the handling procedure is repeated as if the original request message was of the new type. For instance, if the request message was A08, and the patient is unknown the type is changed to A01. The A01 message handler then tests the census again and checks for an occupied bed, etc.

Options

-x
Use exact match semantics for interpretation of the access control list (see section Access Control for Networked ProtoGen Applications).

Examples

The cvgateway program is typically started by init(8) using the `/etc/ttys' or
`/etc/inittab'.

`/etc/ttys'

cvgateway -x carevuehl7 carevuefsi localhost 060_IOP

Environment

PG_CODELIB
The location of the external code databases for LOINC, LabEventInfo and units. This is rarely used, since everyone uses the names compiled into the programs.

Files

`/usr/hl7/var/log/CVGATEWAY/060_IOP/REQ####'
The cvgateway program writes a copy of each HL7 message as a file to a directory whose name is composed of the application and facility names. The filename is composed of the string `REQ' and the process id (pid) of the cvgateway process attached to it.
`/usr/hl7/var/log/CVGATEWAY/060_IOP/ACK####'
Likewise the acknowledgment HL7 message is written into the same directory with the same pid number attached to the prefix `ACK'.
`/tmp/cvgateway.log'
The run log file, if syslog(3) is not used instead.

Bugs

The process id is certainly a bad choice for numbering files, because process ids will repeat and thus do not reflect the order in time of the messages.

See Also

section The ADT Application, section The Result Report Application, section Direct Access to CareVue's Database, section The Internal Protocol, section The hl7tocv Program.


Go to the first, previous, next, last section, table of contents.