INHVTMT6 ; DGH,FRW,CHEM,WAB,KAC ; 06 Aug 1999 15:34:58; Multi-threaded TCP/IP socket utilities
;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
;COPYRIGHT 1991-2000 SAIC
Q
;
INITPDTS ; PDTS-specific initialization of constants.
;
; Called by: INHVTMT after INIT^INHUVUT
;
;Input:
; INIP("SOM") - (pbr) Start of msg
; INIP("SOD") - (pbr) Start of data (End of ENP hdr)
; INIP("EOL") - (pbr) End of line (End of segment)
; INIP("FS") - (pbr) Field Separator
; INIP("EOM") - (pbr) End of msg (= End of data)
;
; PDTS-specific constants/defaults
N INDELIM
S INDELIM=$$FIELD^INHUT()
S INIP("SOM")=$S('$L($G(INIP("SOM"))):$C(223)_$C(44)_$C(223),(INIP("SOM")=$C(11)):$C(223)_$C(44)_$C(223),1:INIP("SOM"))
S INIP("EOM")=$S('$L($G(INIP("EOM"))):$C(225),(INIP("EOM")=$C(28)):$C(225),1:INIP("EOM"))
S INIP("EOL")=$S('$L($G(INIP("EOL"))):$C(29),(INIP("EOL")=$C(13)):$C(29),1:INIP("EOL"))
S INIP("SOD")=$C(224)
S INIP("FS")=$C(28)
;
I $L($G(INIP("INIT"))) S INIP("INIT")=$P($G(^INTHPC(INBPN,1)),U,8)
E D
.; create dummy transaction
. S INIP("INIT")="02DQDUMMYTRXSITEPDTSLENG"_INIP("SOD")_"6004263201DD 770306 7703609 11111111111 01 0000000011000000000^C92^CAHAL ^CBTEST ^CP44087 "_INIP("EOL")
. S INIP("INIT")=INIP("INIT")_"12345670000060030000173042800100000{000000000 199904290000000000{^E700060000"
;
S INIP("INIT")=$TR(INIP("INIT"),INDELIM,INIP("FS"))
;Following logic is CHCS specific. Must be re-written if used by IHS
;S $E(INIP("INIT"),13,16)=$$DMISID^DAHPNU ; update unique site id
;
; update length field (unencrypted dummy claim length)
S $E(INIP("INIT"),21,24)=$TR($J($L(INIP("INIT"))-$F(INIP("INIT"),INIP("SOD"))+1,4)," ",0)
Q
;
INHVTMT6 ; DGH,FRW,CHEM,WAB,KAC ; 06 Aug 1999 15:34:58; Multi-threaded TCP/IP socket utilities
+1 ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
+2 ;COPYRIGHT 1991-2000 SAIC
+3 QUIT
+4 ;
INITPDTS ; PDTS-specific initialization of constants.
+1 ;
+2 ; Called by: INHVTMT after INIT^INHUVUT
+3 ;
+4 ;Input:
+5 ; INIP("SOM") - (pbr) Start of msg
+6 ; INIP("SOD") - (pbr) Start of data (End of ENP hdr)
+7 ; INIP("EOL") - (pbr) End of line (End of segment)
+8 ; INIP("FS") - (pbr) Field Separator
+9 ; INIP("EOM") - (pbr) End of msg (= End of data)
+10 ;
+11 ; PDTS-specific constants/defaults
+12 NEW INDELIM
+13 SET INDELIM=$$FIELD^INHUT()
+14 SET INIP("SOM")=$SELECT('$LENGTH($GET(INIP("SOM"))):$CHAR(223)_$CHAR(44)_$CHAR(223),(INIP("SOM")=$CHAR(11)):$CHAR(223)_$CHAR(44)_$CHAR(223),1:INIP("SOM"))
+15 SET INIP("EOM")=$SELECT('$LENGTH($GET(INIP("EOM"))):$CHAR(225),(INIP("EOM")=$CHAR(28)):$CHAR(225),1:INIP("EOM"))
+16 SET INIP("EOL")=$SELECT('$LENGTH($GET(INIP("EOL"))):$CHAR(29),(INIP("EOL")=$CHAR(13)):$CHAR(29),1:INIP("EOL"))
+17 SET INIP("SOD")=$CHAR(224)
+18 SET INIP("FS")=$CHAR(28)
+19 ;
+20 IF $LENGTH($GET(INIP("INIT")))
SET INIP("INIT")=$PIECE($GET(^INTHPC(INBPN,1)),U,8)
+21 IF '$TEST
Begin DoDot:1
+22 ; create dummy transaction
+23 SET INIP("INIT")="02DQDUMMYTRXSITEPDTSLENG"_INIP("SOD")_"6004263201DD 770306 7703609 11111111111 01 0000000011000000000^C92^CAHAL ^CBTEST ^CP44087 "_INIP("EOL")
+24 SET INIP("INIT")=INIP("INIT")_"12345670000060030000173042800100000{000000000 199904290000000000{^E700060000"
End DoDot:1
+25 ;
+26 SET INIP("INIT")=$TRANSLATE(INIP("INIT"),INDELIM,INIP("FS"))
+27 ;Following logic is CHCS specific. Must be re-written if used by IHS
+28 ;S $E(INIP("INIT"),13,16)=$$DMISID^DAHPNU ; update unique site id
+29 ;
+30 ; update length field (unencrypted dummy claim length)
+31 SET $EXTRACT(INIP("INIT"),21,24)=$TRANSLATE($JUSTIFY($LENGTH(INIP("INIT"))-$FIND(INIP("INIT"),INIP("SOD"))+1,4)," ",0)
+32 QUIT
+33 ;