BHLINTEG ;INTEGRITY CHECKER;JUL 07, 1997
;;1.0;IHS SUPPORT FOR HL7 INTERFACES;;JUL 07, 1997
;
START ;
NEW BYTE,COUNT,RTN
K ^UTILITY($J)
F I=1:1 S X=$T(LIST+I) Q:X="" S X=$P(X,";;",2),R=$P(X,"^",1),B=$P(X,"^",2),C=$P(X,"^",3),^UTILITY($J,R)=B_"^"_C
F I=1:1:6 S X=$P($T(@("LINE"_I)),";;",2,99),@("XBSUMBLD("_I_")=X")
X XBSUMBLD(1)
Q
;
LINE1 ;;X XBSUMBLD(2),XBSUMBLD(6)
LINE2 ;;S RTN="" F S RTN=$O(^UTILITY($J,RTN)) Q:RTN="" W !,RTN ZL @RTN S (BYTE,COUNT)=0 S X=$T(+1),X=$P(X," [ ",1) X XBSUMBLD(4),XBSUMBLD(3),XBSUMBLD(5)
LINE3 ;;F I=2:1 S X=$T(+I) Q:X="" X XBSUMBLD(4)
LINE4 ;;F J=1:1 S Y=$E(X,J) Q:Y="" S BYTE=BYTE+1,COUNT=COUNT+$A(Y)
LINE5 ;;S B=$P(^UTILITY($J,RTN),"^",1),C=$P(^(RTN),"^",2) I B'=BYTE!(C'=COUNT) W " has been modified"
LINE6 ;;K XBSUMBLD,B,C,I,J,R,X,Y
;
LIST ;
;;BHLBCH^4667^300353
;;BHLBCH1^5486^362487
;;BHLBCH2^3199^208541
;;BHLBPS^8673^597306
;;BHLBPS1^8534^572463
;;BHLIN001^4139^292921
;;BHLINIS^1627^112986
;;BHLINIT^3163^197394
;;BHLINIT1^1824^113488
;;BHLINIT2^1592^97793
;;BHLINIT3^4807^282815
;;BHLINIT4^1237^69923
;;BHLINIT5^219^14056
;;BHLPOST^833^63020
;;BHLRXPS1^1078^74971
;;BHLRXPS2^2820^189898
;;BHLRXPST^3826^267400
BHLINTEG ;INTEGRITY CHECKER;JUL 07, 1997
+1 ;;1.0;IHS SUPPORT FOR HL7 INTERFACES;;JUL 07, 1997
+2 ;
START ;
+1 NEW BYTE,COUNT,RTN
+2 KILL ^UTILITY($JOB)
+3 FOR I=1:1
SET X=$TEXT(LIST+I)
IF X=""
QUIT
SET X=$PIECE(X,";;",2)
SET R=$PIECE(X,"^",1)
SET B=$PIECE(X,"^",2)
SET C=$PIECE(X,"^",3)
SET ^UTILITY($JOB,R)=B_"^"_C
+4 FOR I=1:1:6
SET X=$PIECE($TEXT(@("LINE"_I)),";;",2,99)
SET @("XBSUMBLD("_I_")=X")
+5 XECUTE XBSUMBLD(1)
+6 QUIT
+7 ;
LINE1 ;;X XBSUMBLD(2),XBSUMBLD(6)
LINE2 ;;S RTN="" F S RTN=$O(^UTILITY($J,RTN)) Q:RTN="" W !,RTN ZL @RTN S (BYTE,COUNT)=0 S X=$T(+1),X=$P(X," [ ",1) X XBSUMBLD(4),XBSUMBLD(3),XBSUMBLD(5)
LINE3 ;;F I=2:1 S X=$T(+I) Q:X="" X XBSUMBLD(4)
LINE4 ;;F J=1:1 S Y=$E(X,J) Q:Y="" S BYTE=BYTE+1,COUNT=COUNT+$A(Y)
LINE5 ;;S B=$P(^UTILITY($J,RTN),"^",1),C=$P(^(RTN),"^",2) I B'=BYTE!(C'=COUNT) W " has been modified"
LINE6 ;;K XBSUMBLD,B,C,I,J,R,X,Y
+1 ;
LIST ;
+1 ;;BHLBCH^4667^300353
+2 ;;BHLBCH1^5486^362487
+3 ;;BHLBCH2^3199^208541
+4 ;;BHLBPS^8673^597306
+5 ;;BHLBPS1^8534^572463
+6 ;;BHLIN001^4139^292921
+7 ;;BHLINIS^1627^112986
+8 ;;BHLINIT^3163^197394
+9 ;;BHLINIT1^1824^113488
+10 ;;BHLINIT2^1592^97793
+11 ;;BHLINIT3^4807^282815
+12 ;;BHLINIT4^1237^69923
+13 ;;BHLINIT5^219^14056
+14 ;;BHLPOST^833^63020
+15 ;;BHLRXPS1^1078^74971
+16 ;;BHLRXPS2^2820^189898
+17 ;;BHLRXPST^3826^267400