INHPSA2 ; FRW ; 18 Aug 1999 09:49:54; Standard post processing for applications
;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
;COPYRIGHT 1991-2000 SAIC
;
Q
;
POST(INTER,INEXE) ;post-processing logic - called by MESS^INHPSA
;
;If program logic defined execute and quit
I $L($G(INEXE)) X INEXE Q
;Quit if application is not supported
Q:'$$APPL(INTER)
;Display message
D MSG(INTER)
;Execute post-processing module
D @INTER
Q
;
;
MSG(INTER) ;Display post processing message
;
N I,X
;Loop through data (comment lines) for the application
F I=0:1 S X=$P($T(@INTER+(I+1)),";;",2,999) Q:'$L(X) D:'I T^INHMG1 W:'I ! D T^INHMG1 W X
D:I T^INHMG1 W:I !
;
Q
;
BPC(INTER,INDAT,INPAR,INBPCPAR) ; Post-processing for all Background Process Control file entries for one interface (INTER)
; Input:
; INTER - (req) interface application to post-process
; INDAT - (pbr) data array of control file records for application
; INPAR - (pbr) array of parameters
; INBPCPAR - (pbr) array of BPC parameters
;
; Output:
; INERR - flag - 0 = no errors
; 1 = errors encountered
;
N DA,DIC,X,Y,DIE,DR,INFLDNUM,INNAME,INREC
S INREC=0
; Loop thru BPC entries associated w/ this INTERface
F S INREC=$O(INDAT(INTER,4004,INREC)) Q:'INREC D
. S (INNAME,X)=$P($G(INDAT(INTER,4004,INREC)),U,1),DIC=4004,DIC(0)="",Y=$$DIC^INHSYS05(DIC,X,"",DIC(0)),DA=+Y
. I INNAME'=$P(Y,U,2) D T^INHMG1 W "ERROR: Wanted background process ",INNAME," but found ",$P(Y,U,2)," (",+Y,")." S INERR=1 Q
. I DA<0 D T^INHMG1 W "ERROR: Background Process: ",INNAME," not found." S INERR=1 Q
. Q:'$D(INBPCPAR)
.; create DR string, looping thru fields in INBPCPAR
. S (DR,INFLDNUM)=""
. F S INFLDNUM=$O(INBPCPAR(INFLDNUM)) Q:'INFLDNUM D
.. S:$L(DR) DR=DR_";" ; NOT 1st time
.. S DR=DR_INFLDNUM_"///^ S X="_INBPCPAR(INFLDNUM)
. S DIE=4004 D ^DIE
. S INFLDNUM=""
. F S INFLDNUM=$O(INBPCPAR(INFLDNUM)) Q:'INFLDNUM D:$D(INBPCPAR(INFLDNUM,"VER"))
.. X INBPCPAR(INFLDNUM,"VER")
Q
;
APPL(INTER) ;Determine if interface application is supported
;
Q $L($T(@$G(INTER)))
;
AP ;Anatomic Pathology
;;Remember to enter the CLIENT ADDRESS and IP PORT for the
;; ANATOMIC PATHOLOGY RECEIVER and
;; ANATOMIC PATHOLOGY TRANSMITTER background processes.
;;This can be done through the GIS menu. GIS->FTM->BPE
Q
;
BB ;DBSS
;;Remember to enter the CLIENT IP ADDRESS and IP PORT for the
;; DBSS RECEIVER
;; DBSS TRANSMITTER background processes.
;;This can be done through the GIS menu. GIS->FTM->BPE
;;Also, enter destination identifiers in the ROUTE ID multiple of
;; HL DBSS interface destination.
;;This can be done through the GIS menu. GIS->FTM->DE
Q
BCC ;BCC
;;Remember to enter the CLIENT ADDRESS and IP PORT for the
;; BCC TRANSMITTER 1A,
;; BCC TRANSMITTER 1B,
;; BCC QR RECEIVER and
;; BCC QR TRANSMITTER background processes.
;;Remember to enter the:
;; 1) SERVER IP PORT for the BCC LOGON SERVER background process
;; 2) CLIENT IP ADDRESS for the BCC APP SERVER background process
;; (one entry for each PWS remote system).
;;This can be done through the GIS menu. GIS->FTM->BPE
Q
CIW ;CIW
;;Remember to enter the CLIENT ADDRESS and IP PORT for the
;; CIW RECEIVER and
;; CIW TRANSMITTER background processes.
;;Remember to enter the:
;; 1) SERVER IP PORT for the CIW LOGON SERVER background process
;; 2) CLIENT IP ADDRESS for the CIW APP SERVER background process
;; (one entry for each PWS remote system).
;;This can be done through the GIS menu. GIS->FTM->BPE
Q
CLIN ;Clinicomp
;;Remember to enter the CLIENT ADDRESS and IP PORT for the
;; CLINICOMP TRANSMITTER background process.
;;This can be done through the GIS menu. GIS->FTM->BPE
Q
CRSPL ;Regional Scheduling - Local
;;Remember to enter the CLIENT ADDRESS and IP PORT for the
;; CRSP RECEIVER 1A and CRSP RECEIVER 1B
;; CRSP TRANSMITTER 1A CRSP RECEIVER 1B background processes
;;This can be done through the GIS menu. GIS->FTM->BPE
;;Also, enter destination identifiers in the ROUTE ID multiple and
;;the DEFAULT RECEIVING FACILITY field of
;; HL CRSP 1A and HL CRSP 1B interface destination.
;;This can be done through the GIS menu. GIS->FTM->DE
N INBPCPAR
S INBPCPAR(.08)=0 ; open as CLIENT
S INBPCPAR(.08,"VER")="I $P($G(^INTHPC(DA,0)),U,8)'=INBPCPAR(.08) D T^INHMG1 W ""ERROR: Background Process: ""_INNAME_"" not opened as a 'CLIENT'"" S INERR=1 Q"
D BPC(INTER,.INDAT,.INPAR,.INBPCPAR)
Q
CRSPR ;Regional Scheduling - Regional
;;Remember to enter the SERVER PORT for the
;;following background processes:
;; CRSP TRANSMITTERS 1A and 1B
;; CRSP TRANSMITTERS 2A and 2B
;; CRSP TRANSMITTERS 3A and 3B
;; CRSP RECEIVERS 1A and 1B
;; CRSP RECEIVERS 2A and 2B
;; CRSP RECEIVERS 3A and 3B
;;This can be done through the GIS menu. GIS->FTM->BPE
;;Also, enter destination identifiers in the ROUTE ID multiple, the
;;DEFAULT RECEIVING FACILITY and the PRIMARY DESTINATION fields of
;; HL CRSP 1A
;; HL CRSP 1B
;; HL CRSP 2A
;; HL CRSP 2B
;; HL CRSP 3A
;; HL CRSP 3B interface destinations.
;;This can be done through the GIS menu. GIS->FTM->DE
N INBPCPAR
S INBPCPAR(.08)=1 ; open as SERVER
S INBPCPAR(.08,"VER")="I $P($G(^INTHPC(DA,0)),U,8)'=INBPCPAR(.08) D T^INHMG1 W ""ERROR: Background Process: ""_INNAME_"" not opened as a 'SERVER'"" S INERR=1 Q"
D BPC(INTER,.INDAT,.INPAR,.INBPCPAR)
Q
;
DINPACS ;DINPACS
;;Remember to enter the CLIENT ADDRESS and IP PORT for the
;; DINPACS TRANSMITTER (and DINPACS TRANSMITTER 2 if needed)
;;This can be done through the GIS menu. GIS->FTM->BPE
Q
HIV ;VIROMED/HIV ABTS RECEIVER
;;Remember to enter the CLIENT ADDRESS and IP PORT for the
;; HL LA VIROMED/HIV ABTS RECEIVER background process.
;;This can be done through the GIS menu. GIS->FTM->BPE
Q
ITS ;Immunization Tracking System EuroCHCS/DEERS
;;Remember to enter the CLIENT ADDRESS and IP PORT for the
;; HCI ITS TRANSMITTER background process.
;;This can be done through the GIS menu. GIS->FTM->BPE
Q
LSI ;LSI
;;Remember to enter the CLIENT ADDRESS and IP PORT for the
;; LSI INTERFACE RECEIVER and
;; LSI INTERFACE TRANSMITTER background processes.
;;This can be done through the GIS menu. GIS->FTM->BPE
Q
MDIS ;MDIS
;
Q
MHC ;MHCMIS
;;Remember to populate the MHCMIS Site Parameters file.
;;This can be done through the Site Manager's Menu. INT->MHC->EDI
;;Remember to schedule the XXDMM AUTOTRANSMIT option to send the
;;message files to MHCMIS.
;
Q
NMIS ;NMIS
;;Remember to enter the CLIENT IP ADDRESS and IP PORT for the
;; NMIS TRANSMITTER background process.
;;This can be done through the GIS menu. GIS->FTM->BPE
;;Also, enter destination identifiers in the ROUTE ID multiple of
;; HL NMIS - OUT interface destination.
;;This can be done through the GIS menu. GIS->FTM->DE
Q
PDTS ;PDTS
;;Remember to enter the CLIENT IP ADDRESS and IP PORT for the
;; PDTS TRANSCEIVER 1A
;; PDTS TRANSCEIVER 2A background processes.
;;Also, enter the DES KEY encryption parameter for each background
;; process.
;;This can be done through the GIS menu. GIS->FTM->BPE
Q
PMN ;PACMEDNET
;;Remember to enter the CLIENT ADDRESS and IP PORT for the
;; PMN RECEIVER and
;; PMN TRANSMITTER background processes.
;;This can be done through the GIS menu. GIS->FTM->BPE
Q
PWS ;PWS
;;Remember to enter the:
;; 1) SERVER IP PORT for the CHCS LOGON SERVER background process
;; 2) CLIENT IP ADDRESS for the PWS APP SERVER background process
;; (one entry for each PWS remote system).
;;This can be done through the GIS menu. GIS->FTM->BPE
Q
TSC ;TSC
;;Remember to enter the CLIENT ADDRESS and IP PORT for the
;; TSC RECEIVER and
;; TSC TRANSMITTER background processes.
;;This can be done through the GIS menu. GIS->FTM->BPE
Q
TSCL ;TSC Loader
;;Remember to DEACTIVATE the TSC Loader interface when
;; loading is complete.
Q
TRAC ;Traces
;;Remember to enter the CLIENT IP ADDRESS and IP PORT for the
;; TRACES TRANSMITTER background process.
;;This can be done through the GIS menu. GIS->FTM->BPE
Q
TEST ;
PROTO ;
Q
;
INHPSA2 ; FRW ; 18 Aug 1999 09:49:54; Standard post processing for applications
+1 ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
+2 ;COPYRIGHT 1991-2000 SAIC
+3 ;
+4 QUIT
+5 ;
POST(INTER,INEXE) ;post-processing logic - called by MESS^INHPSA
+1 ;
+2 ;If program logic defined execute and quit
+3 IF $LENGTH($GET(INEXE))
XECUTE INEXE
QUIT
+4 ;Quit if application is not supported
+5 IF '$$APPL(INTER)
QUIT
+6 ;Display message
+7 DO MSG(INTER)
+8 ;Execute post-processing module
+9 DO @INTER
+10 QUIT
+11 ;
+12 ;
MSG(INTER) ;Display post processing message
+1 ;
+2 NEW I,X
+3 ;Loop through data (comment lines) for the application
+4 FOR I=0:1
SET X=$PIECE($TEXT(@INTER+(I+1)),";;",2,999)
IF '$LENGTH(X)
QUIT
IF 'I
DO T^INHMG1
IF 'I
WRITE !
DO T^INHMG1
WRITE X
+5 IF I
DO T^INHMG1
IF I
WRITE !
+6 ;
+7 QUIT
+8 ;
BPC(INTER,INDAT,INPAR,INBPCPAR) ; Post-processing for all Background Process Control file entries for one interface (INTER)
+1 ; Input:
+2 ; INTER - (req) interface application to post-process
+3 ; INDAT - (pbr) data array of control file records for application
+4 ; INPAR - (pbr) array of parameters
+5 ; INBPCPAR - (pbr) array of BPC parameters
+6 ;
+7 ; Output:
+8 ; INERR - flag - 0 = no errors
+9 ; 1 = errors encountered
+10 ;
+11 NEW DA,DIC,X,Y,DIE,DR,INFLDNUM,INNAME,INREC
+12 SET INREC=0
+13 ; Loop thru BPC entries associated w/ this INTERface
+14 FOR
SET INREC=$ORDER(INDAT(INTER,4004,INREC))
IF 'INREC
QUIT
Begin DoDot:1
+15 SET (INNAME,X)=$PIECE($GET(INDAT(INTER,4004,INREC)),U,1)
SET DIC=4004
SET DIC(0)=""
SET Y=$$DIC^INHSYS05(DIC,X,"",DIC(0))
SET DA=+Y
+16 IF INNAME'=$PIECE(Y,U,2)
DO T^INHMG1
WRITE "ERROR: Wanted background process ",INNAME," but found ",$PIECE(Y,U,2)," (",+Y,")."
SET INERR=1
QUIT
+17 IF DA<0
DO T^INHMG1
WRITE "ERROR: Background Process: ",INNAME," not found."
SET INERR=1
QUIT
+18 IF '$DATA(INBPCPAR)
QUIT
+19 ; create DR string, looping thru fields in INBPCPAR
+20 SET (DR,INFLDNUM)=""
+21 FOR
SET INFLDNUM=$ORDER(INBPCPAR(INFLDNUM))
IF 'INFLDNUM
QUIT
Begin DoDot:2
+22 ; NOT 1st time
IF $LENGTH(DR)
SET DR=DR_";"
+23 SET DR=DR_INFLDNUM_"///^ S X="_INBPCPAR(INFLDNUM)
End DoDot:2
+24 SET DIE=4004
DO ^DIE
+25 SET INFLDNUM=""
+26 FOR
SET INFLDNUM=$ORDER(INBPCPAR(INFLDNUM))
IF 'INFLDNUM
QUIT
IF $DATA(INBPCPAR(INFLDNUM,"VER"))
Begin DoDot:2
+27 XECUTE INBPCPAR(INFLDNUM,"VER")
End DoDot:2
End DoDot:1
+28 QUIT
+29 ;
APPL(INTER) ;Determine if interface application is supported
+1 ;
+2 QUIT $LENGTH($TEXT(@$GET(INTER)))
+3 ;
AP ;Anatomic Pathology
+1 ;;Remember to enter the CLIENT ADDRESS and IP PORT for the
+2 ;; ANATOMIC PATHOLOGY RECEIVER and
+3 ;; ANATOMIC PATHOLOGY TRANSMITTER background processes.
+4 ;;This can be done through the GIS menu. GIS->FTM->BPE
+5 QUIT
+6 ;
BB ;DBSS
+1 ;;Remember to enter the CLIENT IP ADDRESS and IP PORT for the
+2 ;; DBSS RECEIVER
+3 ;; DBSS TRANSMITTER background processes.
+4 ;;This can be done through the GIS menu. GIS->FTM->BPE
+5 ;;Also, enter destination identifiers in the ROUTE ID multiple of
+6 ;; HL DBSS interface destination.
+7 ;;This can be done through the GIS menu. GIS->FTM->DE
+8 QUIT
BCC ;BCC
+1 ;;Remember to enter the CLIENT ADDRESS and IP PORT for the
+2 ;; BCC TRANSMITTER 1A,
+3 ;; BCC TRANSMITTER 1B,
+4 ;; BCC QR RECEIVER and
+5 ;; BCC QR TRANSMITTER background processes.
+6 ;;Remember to enter the:
+7 ;; 1) SERVER IP PORT for the BCC LOGON SERVER background process
+8 ;; 2) CLIENT IP ADDRESS for the BCC APP SERVER background process
+9 ;; (one entry for each PWS remote system).
+10 ;;This can be done through the GIS menu. GIS->FTM->BPE
+11 QUIT
CIW ;CIW
+1 ;;Remember to enter the CLIENT ADDRESS and IP PORT for the
+2 ;; CIW RECEIVER and
+3 ;; CIW TRANSMITTER background processes.
+4 ;;Remember to enter the:
+5 ;; 1) SERVER IP PORT for the CIW LOGON SERVER background process
+6 ;; 2) CLIENT IP ADDRESS for the CIW APP SERVER background process
+7 ;; (one entry for each PWS remote system).
+8 ;;This can be done through the GIS menu. GIS->FTM->BPE
+9 QUIT
CLIN ;Clinicomp
+1 ;;Remember to enter the CLIENT ADDRESS and IP PORT for the
+2 ;; CLINICOMP TRANSMITTER background process.
+3 ;;This can be done through the GIS menu. GIS->FTM->BPE
+4 QUIT
CRSPL ;Regional Scheduling - Local
+1 ;;Remember to enter the CLIENT ADDRESS and IP PORT for the
+2 ;; CRSP RECEIVER 1A and CRSP RECEIVER 1B
+3 ;; CRSP TRANSMITTER 1A CRSP RECEIVER 1B background processes
+4 ;;This can be done through the GIS menu. GIS->FTM->BPE
+5 ;;Also, enter destination identifiers in the ROUTE ID multiple and
+6 ;;the DEFAULT RECEIVING FACILITY field of
+7 ;; HL CRSP 1A and HL CRSP 1B interface destination.
+8 ;;This can be done through the GIS menu. GIS->FTM->DE
+9 NEW INBPCPAR
+10 ; open as CLIENT
SET INBPCPAR(.08)=0
+11 SET INBPCPAR(.08,"VER")="I $P($G(^INTHPC(DA,0)),U,8)'=INBPCPAR(.08) D T^INHMG1 W ""ERROR: Background Process: ""_INNAME_"" not opened as a 'CLIENT'"" S INERR=1 Q"
+12 DO BPC(INTER,.INDAT,.INPAR,.INBPCPAR)
+13 QUIT
CRSPR ;Regional Scheduling - Regional
+1 ;;Remember to enter the SERVER PORT for the
+2 ;;following background processes:
+3 ;; CRSP TRANSMITTERS 1A and 1B
+4 ;; CRSP TRANSMITTERS 2A and 2B
+5 ;; CRSP TRANSMITTERS 3A and 3B
+6 ;; CRSP RECEIVERS 1A and 1B
+7 ;; CRSP RECEIVERS 2A and 2B
+8 ;; CRSP RECEIVERS 3A and 3B
+9 ;;This can be done through the GIS menu. GIS->FTM->BPE
+10 ;;Also, enter destination identifiers in the ROUTE ID multiple, the
+11 ;;DEFAULT RECEIVING FACILITY and the PRIMARY DESTINATION fields of
+12 ;; HL CRSP 1A
+13 ;; HL CRSP 1B
+14 ;; HL CRSP 2A
+15 ;; HL CRSP 2B
+16 ;; HL CRSP 3A
+17 ;; HL CRSP 3B interface destinations.
+18 ;;This can be done through the GIS menu. GIS->FTM->DE
+19 NEW INBPCPAR
+20 ; open as SERVER
SET INBPCPAR(.08)=1
+21 SET INBPCPAR(.08,"VER")="I $P($G(^INTHPC(DA,0)),U,8)'=INBPCPAR(.08) D T^INHMG1 W ""ERROR: Background Process: ""_INNAME_"" not opened as a 'SERVER'"" S INERR=1 Q"
+22 DO BPC(INTER,.INDAT,.INPAR,.INBPCPAR)
+23 QUIT
+24 ;
DINPACS ;DINPACS
+1 ;;Remember to enter the CLIENT ADDRESS and IP PORT for the
+2 ;; DINPACS TRANSMITTER (and DINPACS TRANSMITTER 2 if needed)
+3 ;;This can be done through the GIS menu. GIS->FTM->BPE
+4 QUIT
HIV ;VIROMED/HIV ABTS RECEIVER
+1 ;;Remember to enter the CLIENT ADDRESS and IP PORT for the
+2 ;; HL LA VIROMED/HIV ABTS RECEIVER background process.
+3 ;;This can be done through the GIS menu. GIS->FTM->BPE
+4 QUIT
ITS ;Immunization Tracking System EuroCHCS/DEERS
+1 ;;Remember to enter the CLIENT ADDRESS and IP PORT for the
+2 ;; HCI ITS TRANSMITTER background process.
+3 ;;This can be done through the GIS menu. GIS->FTM->BPE
+4 QUIT
LSI ;LSI
+1 ;;Remember to enter the CLIENT ADDRESS and IP PORT for the
+2 ;; LSI INTERFACE RECEIVER and
+3 ;; LSI INTERFACE TRANSMITTER background processes.
+4 ;;This can be done through the GIS menu. GIS->FTM->BPE
+5 QUIT
MDIS ;MDIS
+1 ;
+2 QUIT
MHC ;MHCMIS
+1 ;;Remember to populate the MHCMIS Site Parameters file.
+2 ;;This can be done through the Site Manager's Menu. INT->MHC->EDI
+3 ;;Remember to schedule the XXDMM AUTOTRANSMIT option to send the
+4 ;;message files to MHCMIS.
+5 ;
+6 QUIT
NMIS ;NMIS
+1 ;;Remember to enter the CLIENT IP ADDRESS and IP PORT for the
+2 ;; NMIS TRANSMITTER background process.
+3 ;;This can be done through the GIS menu. GIS->FTM->BPE
+4 ;;Also, enter destination identifiers in the ROUTE ID multiple of
+5 ;; HL NMIS - OUT interface destination.
+6 ;;This can be done through the GIS menu. GIS->FTM->DE
+7 QUIT
PDTS ;PDTS
+1 ;;Remember to enter the CLIENT IP ADDRESS and IP PORT for the
+2 ;; PDTS TRANSCEIVER 1A
+3 ;; PDTS TRANSCEIVER 2A background processes.
+4 ;;Also, enter the DES KEY encryption parameter for each background
+5 ;; process.
+6 ;;This can be done through the GIS menu. GIS->FTM->BPE
+7 QUIT
PMN ;PACMEDNET
+1 ;;Remember to enter the CLIENT ADDRESS and IP PORT for the
+2 ;; PMN RECEIVER and
+3 ;; PMN TRANSMITTER background processes.
+4 ;;This can be done through the GIS menu. GIS->FTM->BPE
+5 QUIT
PWS ;PWS
+1 ;;Remember to enter the:
+2 ;; 1) SERVER IP PORT for the CHCS LOGON SERVER background process
+3 ;; 2) CLIENT IP ADDRESS for the PWS APP SERVER background process
+4 ;; (one entry for each PWS remote system).
+5 ;;This can be done through the GIS menu. GIS->FTM->BPE
+6 QUIT
TSC ;TSC
+1 ;;Remember to enter the CLIENT ADDRESS and IP PORT for the
+2 ;; TSC RECEIVER and
+3 ;; TSC TRANSMITTER background processes.
+4 ;;This can be done through the GIS menu. GIS->FTM->BPE
+5 QUIT
TSCL ;TSC Loader
+1 ;;Remember to DEACTIVATE the TSC Loader interface when
+2 ;; loading is complete.
+3 QUIT
TRAC ;Traces
+1 ;;Remember to enter the CLIENT IP ADDRESS and IP PORT for the
+2 ;; TRACES TRANSMITTER background process.
+3 ;;This can be done through the GIS menu. GIS->FTM->BPE
+4 QUIT
TEST ;
PROTO ;
+1 QUIT
+2 ;