1 | HLCSHDR2 ;CIOFO-SF/JC Enhanced message headers ;07/28/99 15:02
|
---|
2 | ;;1.6;HEALTH LEVEL SEVEN;**57**;Oct 13, 1995
|
---|
3 | ;OUTBOUND-CALLED BY HLCSHDR1 (TCP ONLY)
|
---|
4 | ; CALLED BY HLCSHDR
|
---|
5 | ;
|
---|
6 | GEN ;If enabled, stuff INSTITUTION and DOMAIN in facility field of header
|
---|
7 | S HLCS=$E(EC,1)
|
---|
8 | ;get site parameters
|
---|
9 | S HLPARAM=$$PARAM^HLCS2,HLDOM=$P(HLPARAM,U,2),HLINST=$P(HLPARAM,U,6),HLPROD=$P(HLPARAM,U,3)
|
---|
10 | Q
|
---|
11 | EP ;Get required sending facility
|
---|
12 | ;get LOCAL SERVER LINK info from Domain entry (HL7 site params)
|
---|
13 | I $G(SERFAC)="" S SERFAC=HLINST_HLCS_HLDOM_HLCS_"DNS"
|
---|
14 | Q
|
---|
15 | S ;update receiving facility with domain pointer in 870
|
---|
16 | I $G(CLNTFAC)="" D
|
---|
17 | .I $G(LOGLINK)]"" S HLOGLINK=LOGLINK
|
---|
18 | .;I no logical link defined, use local site params
|
---|
19 | .I $G(HLOGLINK)="" D Q
|
---|
20 | ..S CLNTFAC=HLINST_HLCS_HLDOM_HLCS_"DNS"
|
---|
21 | .D LINK(HLOGLINK)
|
---|
22 | .S CLNTFAC=HLCINS_HLCS_HLCDOM_HLCS_"DNS"
|
---|
23 | Q
|
---|
24 | LINK(HLLINK) ;Returns HL7 link info from file 870
|
---|
25 | S (HLCSTCP,HLIP,HLCINS,HLCDOM)=""
|
---|
26 | I 'HLLINK,HLLINK]"" D
|
---|
27 | .S HLLINK=$O(^HLCS(870,"B",HLLINK,0))
|
---|
28 | S (HLCINS,HLCDOM)="Unknown"
|
---|
29 | S HLCINS=$P(^HLCS(870,HLLINK,0),U,2)
|
---|
30 | S HLCDOM=$P(^HLCS(870,HLLINK,0),U,7)
|
---|
31 | I HLCINS S HLCINS=$P($G(^DIC(4,HLCINS,99)),U)
|
---|
32 | I HLCDOM S HLCDOM=$P(^DIC(4.2,HLCDOM,0),U)
|
---|
33 | ;
|
---|
34 | Q
|
---|