BHLV02I ; cmi/sitka/maw - BHL Process Inbound V02 Event ;
;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
;
;
;this routine will process the inbound V02 message and send a bulletin
;regarding the query failure
;
MAIN ;-- file the inbound V02 message
D ^BHLSETI
D MSA,QRD,QRF,BUL
D EOJ^BHLSETI
Q
;
MSA ;EP - get MSA info
S BHLQID=$G(INV("MSA2"))
S BHLQERR=$G(INV("MSA3"))
Q
;
QRD ;EP - get QRD info
S BHLQDTM=$G(INV("QRD1"))
S BHLQID=$G(INV("QRD4"))
S BHLNR=$G(INV("QRD7"))
S BHLWHO=$G(INV("QRD8"))
S BHLQRD2=$G(INV("QRD2"))
S BHLQRD3=$G(INV("QRD3"))
S BHLQRD9=$G(INV("QRD9"))
S BHLQRD12=$G(INV("QRD12"))
D OQRD^BHLV01I
Q
;
QRF ;EP - get QRF info
S BHLSDT=$G(INV("QRF2"))
S BHLEDT=$G(INV("QRF3"))
S BHLWHOM=$G(INV("QRF5"))
S BHLQRF1=$G(INV("QRF1"))
S BHLQRF6=$G(INV("QRF6"))
S BHLQRF7=$G(INV("QRF7"))
S BHLQRF8=$G(INV("QRF8"))
D OQRF^BHLV01I
Q
;
BUL ;EP - send bulletin for query failure
S BHLQHR=$E($P(BHLWHO,U),7,12)
S BHLQFAC=$E($P(BHLWHO,U),1,6)
S BHLQPNM=$P(BHLWHO,U,2)
S XMB="BHL QUERY FAIL",XMB(1)=$G(BHLQID),XMB(2)=$G(BHLQDTM)
S XMB(3)=$G(BHLQPNM),XMB(4)=$G(BHLQHR),XMB(5)=$G(BHLQERR)
D ^XMB
Q
;
BHLV02I ; cmi/sitka/maw - BHL Process Inbound V02 Event ;
+1 ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
+2 ;
+3 ;
+4 ;this routine will process the inbound V02 message and send a bulletin
+5 ;regarding the query failure
+6 ;
MAIN ;-- file the inbound V02 message
+1 DO ^BHLSETI
+2 DO MSA
DO QRD
DO QRF
DO BUL
+3 DO EOJ^BHLSETI
+4 QUIT
+5 ;
MSA ;EP - get MSA info
+1 SET BHLQID=$GET(INV("MSA2"))
+2 SET BHLQERR=$GET(INV("MSA3"))
+3 QUIT
+4 ;
QRD ;EP - get QRD info
+1 SET BHLQDTM=$GET(INV("QRD1"))
+2 SET BHLQID=$GET(INV("QRD4"))
+3 SET BHLNR=$GET(INV("QRD7"))
+4 SET BHLWHO=$GET(INV("QRD8"))
+5 SET BHLQRD2=$GET(INV("QRD2"))
+6 SET BHLQRD3=$GET(INV("QRD3"))
+7 SET BHLQRD9=$GET(INV("QRD9"))
+8 SET BHLQRD12=$GET(INV("QRD12"))
+9 DO OQRD^BHLV01I
+10 QUIT
+11 ;
QRF ;EP - get QRF info
+1 SET BHLSDT=$GET(INV("QRF2"))
+2 SET BHLEDT=$GET(INV("QRF3"))
+3 SET BHLWHOM=$GET(INV("QRF5"))
+4 SET BHLQRF1=$GET(INV("QRF1"))
+5 SET BHLQRF6=$GET(INV("QRF6"))
+6 SET BHLQRF7=$GET(INV("QRF7"))
+7 SET BHLQRF8=$GET(INV("QRF8"))
+8 DO OQRF^BHLV01I
+9 QUIT
+10 ;
BUL ;EP - send bulletin for query failure
+1 SET BHLQHR=$EXTRACT($PIECE(BHLWHO,U),7,12)
+2 SET BHLQFAC=$EXTRACT($PIECE(BHLWHO,U),1,6)
+3 SET BHLQPNM=$PIECE(BHLWHO,U,2)
+4 SET XMB="BHL QUERY FAIL"
SET XMB(1)=$GET(BHLQID)
SET XMB(2)=$GET(BHLQDTM)
+5 SET XMB(3)=$GET(BHLQPNM)
SET XMB(4)=$GET(BHLQHR)
SET XMB(5)=$GET(BHLQERR)
+6 DO ^XMB
+7 QUIT
+8 ;