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

The hl7tocv Program

Synopsis

hl7tocv
hl7tocv batch
ablhl7tocv
ablhl7tocv batch

Description

The hl7tocv program is used in order to process a spool directory of queued HL7 messages waiting to be forwarded to the cvgateway. It can be invoked in two modes, the batch mode and the operator mode. Batch mode is used when this program is called on a regular basis by cron(8), while operator mode is used in order to fix problems and to let an operator watch and intervene to the processing of the message queues. HL7 message files found in the spool directory that do not have a corresponding lock are forwarded to the cvgateway.

If in batch mode the message gets a negative acknowledgment an error report is mailed to the system administrator. In interactive mode, the message delivery is retried after some time of waiting. During this waiting time, the operator can press the interrupt key (usually ^C) in order to get into a menu. This menu allows choosing between the following actions by pressing the respective key:

v
View the request and response messages.
e
Edit the request message.
l
view the CareVue Log file `ml.cis'.
r
write a problem report into a report file.
d
Delete message from queue as if it was successful.
s
Skip this message, but leave it in the queue.
c
Continue retrying to send this message.
x
eXit the hl7tocv program.

If there are more severe errors occuring in batch mode, the program sends a CareVue system message telling that the HL7 system is down and mails any report to the administrator. Moreover an error mark file is written into the spool directory telling any subsequent hl7tocv process that the queue is blocked. The error mark is deleted when the administrator invokes hl7tocv in interactive mode in order to diagnose the problem. All system messaging and mailing is turned off in interactive mode.

Each time the hl7tocv program starts up it tests for a run lock file in the spool directory. If there is no such lock file, the process itself generates one such that no two hl7tocv processes run concurrently on the same message queue. In interactive mode if there is a run lock file detected, the process waits until the lock file vanishes. The operator can forcefully remove the old lock file by pressing the interrupt key in the wait cycle.

Examples

The cron(8) daemon can call hl7tocv every minute:

*/1 * * * * hl7tocv batch

Environment

ADMIN
The e-mail address of a system administrator who gets error and warning messages mailed. This variable need not exist, it is better to let the system look for its value in the file `/usr/hl7/etc/admin'
CAREVUE
The rcp address (`login@host') of the carevue system in order for rcp or rsh to execute CareVue idb, dbload and ptMgrSup commands. The user and host who runs idb_direct must have an `.rhosts' entry in this account. This variable need not exist, it is better to let the system look for its value in the file `/usr/hl7/etc/carevue'.

Files

`/usr/hl7/var/spool'
the area of spool directories
`/usr/hl7/var/log'
the area of log directories, where transactions are logged
`/usr/hl7/var/spool/ABL/060_IOP'
the spool directory for ablhl7tocv
`/usr/hl7/var/log/ABL/060_IOP'
the log directory, where transactions are logged for ablhl7tocv
`/usr/hl7/var/log/ABL/060_IOP/REPORT'
the report file for error reports for ablhl7tocv
`/usr/hl7/var/spool/ANAE_IOP'
the spool directory for hl7tocv
`/usr/hl7/var/log/ANAE_IOP'
the log directory, where transactions are logged for hl7tocv
`/usr/hl7/var/log/ANAE_IOP/REPORT'
the report file for error reports for ablhl7tocv
`/usr/hl7/etc/admin'
The e-mail address of a system administrator who gets error and warning messages mailed.
`/usr/hl7/etc/carevue'
The rcp address (`login@host') of the carevue system in order for rcp or rsh to execute CareVue idb, dbload and ptMgrSup commands. The user and host who runs idb_direct must have an `.rhosts' entry in this account.
`/var/tmp/hl7tocv.log'
the run log file where all stdout and stderror output is written to
`cvuser@cvhost:/usr/M1215A/carevue/data/logs/ml.cis'
The CareVue log file

Bugs

The two programs ablhl7tocv and hl7tocv should be merged into one program which can work multiple message queues whose spool and log areas can be configured dynamically.

The CareVue log file `cvuser@cvhost:/usr/M1215A/carevue/data/logs/ml.cis' is expected to occur at this place. Should be configureable.

The run log file should not be `/var/tmp/hl7tocv.log'

Diagnostics

Read the administrator's mail and see the run log and report files.

See Also

section The HL7 to CareVue Gateway Program


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