BYIMNTEG ;INTEGRITY CHECKER;
;;2.0;BYIM IMMUNIZATION DATA EXCHANGE;**8**;OCT 13, 2017;Build 310
;
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),@("XBINTEG("_I_")=X")
X XBINTEG(1)
Q
;
LINE1 ;;X XBINTEG(2),XBINTEG(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 XBINTEG(4),XBINTEG(3),XBINTEG(5)
LINE3 ;;F I=2:1 S X=$T(+I) Q:X="" X XBINTEG(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(^(RTN),"^",1),C=$P(^(RTN),"^",2) I B'=BYTE!(C'=COUNT) W " has been modified"
LINE6 ;;K XBINTEG,B,C,I,J,R,X,Y
;
LIST ;
;;BYIMD^2235^155945
;;BYIMIMM^13884^912059
;;BYIMIMM1^13276^840755
;;BYIMIMM2^12752^794065
;;BYIMIMM3^12584^784231
;;BYIMIMM4^13832^878165
;;BYIMIMM5^10778^709692
;;BYIMIMM6^12283^780926
;;BYIMMU2^7968^497399
;;BYIMMU21^9839^561593
;;BYIMNTEG^1133^70116
;;BYIMPORT^13129^833370
;;BYIMRT^13249^856999
;;BYIMSEG1^11961^771136
;;BYIMSEGS^13606^834494
;;BYIMXIS^1940^125005
BYIMNTEG ;INTEGRITY CHECKER;
+1 ;;2.0;BYIM IMMUNIZATION DATA EXCHANGE;**8**;OCT 13, 2017;Build 310
+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 @("XBINTEG("_I_")=X")
+5 XECUTE XBINTEG(1)
+6 QUIT
+7 ;
LINE1 ;;X XBINTEG(2),XBINTEG(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 XBINTEG(4),XBINTEG(3),XBINTEG(5)
LINE3 ;;F I=2:1 S X=$T(+I) Q:X="" X XBINTEG(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(^(RTN),"^",1),C=$P(^(RTN),"^",2) I B'=BYTE!(C'=COUNT) W " has been modified"
LINE6 ;;K XBINTEG,B,C,I,J,R,X,Y
+1 ;
LIST ;
+1 ;;BYIMD^2235^155945
+2 ;;BYIMIMM^13884^912059
+3 ;;BYIMIMM1^13276^840755
+4 ;;BYIMIMM2^12752^794065
+5 ;;BYIMIMM3^12584^784231
+6 ;;BYIMIMM4^13832^878165
+7 ;;BYIMIMM5^10778^709692
+8 ;;BYIMIMM6^12283^780926
+9 ;;BYIMMU2^7968^497399
+10 ;;BYIMMU21^9839^561593
+11 ;;BYIMNTEG^1133^70116
+12 ;;BYIMPORT^13129^833370
+13 ;;BYIMRT^13249^856999
+14 ;;BYIMSEG1^11961^771136
+15 ;;BYIMSEGS^13606^834494
+16 ;;BYIMXIS^1940^125005