INLIOIN ;KAC ; 20 Sep 1999 05:51 ; GIS Lab Interoperability - Support Utilities
;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
;COPYRIGHT 1991-2000 SAIC
;
Q
;
DEST ; Determine destination for an inbound response messages
;
; Called by:
; - eXec'd from IN^INHUSEN where the context includes the input vars
; & expects the output vars documented below - called by
; querying system receiver
; Input:
; ING - (req) var name for inbound data array
; INTYP - (req) msg type
; INEVN - (req) event type
; INMSH - (req) MSH segment
; INDELIM - (req) segment delimiter
;
; Variables:
; CPX - scratch
; INBLDST - entry reference to build array of valid inbound
; destinations based on sending application
; INMESSID - message control ID (MSH:10)
; INRECV - receiving app (MSH:5) - Not currently used.
; INSEND - sending app (MSH:3)
;
; Output:
; INDST - INTERFACE DESTINATION name
; INDSTP - INTERFACE DESTINATION ptr
; Undefined if destination determination fails.
; INDEST - array containing valid inbound destinations based
; on sending application
; Format: INDEST(msg-type_event-type)=
; INTERFACE DESTINATION name for inbound msg
; INERR - array containing error msg used to log an error
; unaltered if destination determination succeeds.
;
K INDSTP
N INBLDST,INMESSID,INRECV,INSEND,CPX
S INSEND=$P(INMSH,INDELIM,3),INRECV=$P(INMSH,INDELIM,5),INMESSID=$P(INMSH,INDELIM,10)
;
; Build INDEST array
D LIO
;
S CPX=$G(INTYP)_$G(INEVN)
I $D(INDEST(CPX)) S INDST=INDEST(CPX) I $D(^INRHD("B",INDST)) S INDSTP=$O(^(INDST,0))
Q
;
LIO ; Build array containing valid inbound GIS LIO destinations.
; Output:
; INDEST - array containing valid inbound destinations
; Format: INDEST(msg-type_event-type) = INTERFACE DESTINATION name for inbound msg
Q:$G(INDEST)="LIO" ; array already exists
K INDEST
S INDEST="LIO"
;network
S INDEST("ACKACK")="INCOMING ACK"
S INDEST("ORMO01")="HL LAB LRSL ACCESSION"
S INDEST("ORRO02")="HL LAB LRSL ACK"
S INDEST("ORUR01")="HL LAB INT RESULTS"
Q
;
;
INLIOIN ;KAC ; 20 Sep 1999 05:51 ; GIS Lab Interoperability - Support Utilities
+1 ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
+2 ;COPYRIGHT 1991-2000 SAIC
+3 ;
+4 QUIT
+5 ;
DEST ; Determine destination for an inbound response messages
+1 ;
+2 ; Called by:
+3 ; - eXec'd from IN^INHUSEN where the context includes the input vars
+4 ; & expects the output vars documented below - called by
+5 ; querying system receiver
+6 ; Input:
+7 ; ING - (req) var name for inbound data array
+8 ; INTYP - (req) msg type
+9 ; INEVN - (req) event type
+10 ; INMSH - (req) MSH segment
+11 ; INDELIM - (req) segment delimiter
+12 ;
+13 ; Variables:
+14 ; CPX - scratch
+15 ; INBLDST - entry reference to build array of valid inbound
+16 ; destinations based on sending application
+17 ; INMESSID - message control ID (MSH:10)
+18 ; INRECV - receiving app (MSH:5) - Not currently used.
+19 ; INSEND - sending app (MSH:3)
+20 ;
+21 ; Output:
+22 ; INDST - INTERFACE DESTINATION name
+23 ; INDSTP - INTERFACE DESTINATION ptr
+24 ; Undefined if destination determination fails.
+25 ; INDEST - array containing valid inbound destinations based
+26 ; on sending application
+27 ; Format: INDEST(msg-type_event-type)=
+28 ; INTERFACE DESTINATION name for inbound msg
+29 ; INERR - array containing error msg used to log an error
+30 ; unaltered if destination determination succeeds.
+31 ;
+32 KILL INDSTP
+33 NEW INBLDST,INMESSID,INRECV,INSEND,CPX
+34 SET INSEND=$PIECE(INMSH,INDELIM,3)
SET INRECV=$PIECE(INMSH,INDELIM,5)
SET INMESSID=$PIECE(INMSH,INDELIM,10)
+35 ;
+36 ; Build INDEST array
+37 DO LIO
+38 ;
+39 SET CPX=$GET(INTYP)_$GET(INEVN)
+40 IF $DATA(INDEST(CPX))
SET INDST=INDEST(CPX)
IF $DATA(^INRHD("B",INDST))
SET INDSTP=$ORDER(^(INDST,0))
+41 QUIT
+42 ;
LIO ; Build array containing valid inbound GIS LIO destinations.
+1 ; Output:
+2 ; INDEST - array containing valid inbound destinations
+3 ; Format: INDEST(msg-type_event-type) = INTERFACE DESTINATION name for inbound msg
+4 ; array already exists
IF $GET(INDEST)="LIO"
QUIT
+5 KILL INDEST
+6 SET INDEST="LIO"
+7 ;network
+8 SET INDEST("ACKACK")="INCOMING ACK"
+9 SET INDEST("ORMO01")="HL LAB LRSL ACCESSION"
+10 SET INDEST("ORRO02")="HL LAB LRSL ACK"
+11 SET INDEST("ORUR01")="HL LAB INT RESULTS"
+12 QUIT
+13 ;
+14 ;