PRCHCHK ;WISC/DJM/DGL-IFCAP FILE COMPARE UTILITY ; 11/3/99 12:43pm
V ;;5.1;IFCAP;;Oct 20, 2000
;Per VHA Directive 10-93-142, this routine should not be modified.
;
;This routine compares the site's file 442.3 with DATA in PRCHCHK3.
;
;DATA is the information that will be compared with
;the GLOBAL nodes.
;
; All entries in DATA have one ";" in front.
;
; The DATA section is set up with two lines of information.
; The first line is the full NODE of the record.
; The second line is the data entered into the NODE. If there
; is no data for a NODE the second line will be empty. The second
; line will always be entered, even if it has no data.
;
; The terminator of DATA is always ";;END".
;
SETUP ; FLAG STATES
;
; FLAG=0 CONTINUE CHEKING.
; FLAG=1 STOP CHECKING, NODE DOESN'T MATCH DATA.
; FLAG=2 VERIFY THAT NO MORE NODES EXIST IN THE FILE.
; ";;END" FOUND.
;
N DIFROM,FLAG,ROOT,START,LOOP,POINT,ND,SEARCH,NODE,VALUE,DATA,ZZ,X,FN
N XMY,XMDUN,XMSUB,XMDUZ,XMTEXT,COUNT,FILE,CC,Y
S FLAG=0
S ROOT="^PRCD(442.3"
S START=0
;
CHECK ;Site file compared to national DATA
;
S LOOP=START
S POINT=2
S ND=0 ;ND=NODE or DATA
S SEARCH=ROOT_","
F S LOOP=$O(@(SEARCH_LOOP_")")) Q:LOOP="" Q:LOOP="AC" D Q:FLAG>0
. S NODE=$P($T(DATA+POINT+ND^PRCHCHK3),";",2,99)
. I NODE["END" D Q:FLAG>0
. . S NODE=$P(NODE,";",2,99)
. . I NODE=";;END" S FLAG=2 Q
. . I NODE[";" S FLAG=1 Q
. . Q
. I ND=0 D
. . S NODE=$P($T(DATA+POINT+ND^PRCHCHK3),";",2,99)
. . S VALUE=SEARCH_LOOP_",0)"
. . I NODE=VALUE D Q
. . . S ND=ND+1#2
. . . Q
. . S FLAG=1
. . Q
. I ND=1 D
. . S NODE=$P($T(DATA+POINT+ND^PRCHCHK3),";",2,99)
. . S DATA=@(SEARCH_LOOP_",0)")
. . I DATA=NODE D Q
. . . S ND=ND+1#2
. . . S POINT=POINT+2
. . . Q
. . S FLAG=1
. . Q
. Q
;
MESSAGE ;Determine results of comparison
;
I FLAG=2 D
. S LOOP=$O(@(SEARCH_LOOP_")")) Q:LOOP="" D
. . S FLAG=1
. Q
I FLAG=0,LOOP="" S FLAG=1
I FLAG=0,LOOP="AC" S FLAG=2
;
I FLAG=1 D ERROR
I FLAG=2 D OK
Q
;
OK ;Site's file conforms to standard (Modified for MailMan 7.1 *50)
;
K ZZ,XMY
X ^%ZOSF("UCI")
S FN=$P(ROOT,"(",2)
S ZZ(1)="File, "_FN_", has been checked by patch PRC*5*236 and"
S ZZ(2)="has been found to conform to the national standard."
S ZZ(3)=" "
S ZZ(4)="No further action is required by your SITE."
S ZZ(5)=" "
S ZZ(6)="SITE: "_$G(^DD("SITE"))
S ZZ(7)="UCI: "_Y
S XMY("I:G.STATUS UPDATES@DOMAIN.EXT")=""
S XMY("I:G.IRM")=""
S XMY(DUZ)=""
S XMDUN="IFCAP File Checker"
S XMSUB="OK File "_FN_" at "_$G(^DD("SITE"))
S XMDUZ="IFCAP File Checker"
S XMBODY="ZZ"
D SENDMSG^XMXAPI(DUZ,XMSUB,XMBODY,.XMY)
Q
;
ERROR ;Site's file does NOT conform to standard (Modified for MailMan 7.1 *50)
;Send notification of error to IRM and Status Updates
K ZZ,XMY
S FN=$P(ROOT,"(",2)
X ^%ZOSF("UCI")
S ZZ(1)="A discrepancy was noted in your data by patch PRC*5*236 in file "_FN_"."
S ZZ(2)="Both the data and the data dictionary for file "_FN_" were"
S ZZ(3)="sent to 'G.STATUS UPDATES' at FORUM."
S ZZ(4)=" "
S ZZ(5)="The Washington CIOFO will review the data."
S ZZ(6)=" "
S ZZ(7)="There is no action required of your SITE at this time."
S ZZ(8)=" "
S ZZ(9)="SITE: "_$G(^DD("SITE"))
S ZZ(10)="UCI: "_Y
S XMDUN="IFCAP File Checker"
S XMSUB="Problem in File "_FN
S XMDUZ="IFCAP File Checker"
S XMBODY="ZZ"
S XMY(DUZ)=""
S XMY("I:G.STATUS UPDATES@DOMAIN.EXT")=""
S XMY("I:G.IRM")=""
D SENDMSG^XMXAPI(DUZ,XMSUB,XMBODY,.XMY)
;
;Send the 'DD' and the data from FILE 442.3 to 'G.STATUS UPDATES'
K ZZ,XMY
X ^%ZOSF("UCI")
S ZZ(1)="This file, "_FN_", does not match the data sent in patch PRC*5*236."
S ZZ(2)=" "
S ZZ(3)="SITE: "_$G(^DD("SITE"))
S ZZ(4)="UCI: "_Y
S ZZ(5)=" "
S XMDUN="IFCAP File Checker"
S XMSUB="Problem in File "_FN_" "_$G(^DD("SITE"))
S XMDUZ="IFCAP File Checker"
S XMBODY="ZZ"
S XMY("I:G.STATUS UPDATES@DOMAIN.EXT")=""
;
;Load DD for file 442.3 into message array
S COUNT=6
S ZZ(COUNT)="DD FOR FILE 442.3"
S COUNT=COUNT+1
S FILE="^DD(442.3)"
F S FILE=$Q(@FILE) Q:FILE="" Q:$P($P(FILE,"(",2),",",1)>FN D
. S ZZ(COUNT)=FILE_" = "_@FILE
. S COUNT=COUNT+1
. Q
;
;Put space between DD and data
F CC=1:1:3 S ZZ(COUNT)=" ",COUNT=COUNT+1
S ZZ(COUNT)="DATA FROM FILE 442.3"
S COUNT=COUNT+1
;
;Load data from file 442.3 into message array
S FILE="^PRCD(442.3)"
F S FILE=$Q(@FILE) Q:FILE="" Q:$P($P(FILE,"(",2),",",1)>FN D
. S ZZ(COUNT)=FILE_" = "_@FILE
. S COUNT=COUNT+1
. Q
;
;Send completed message
D SENDMSG^XMXAPI(DUZ,XMSUB,XMBODY,.XMY)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRCHCHK 4773 printed Dec 13, 2024@02:06:04 Page 2
PRCHCHK ;WISC/DJM/DGL-IFCAP FILE COMPARE UTILITY ; 11/3/99 12:43pm
V ;;5.1;IFCAP;;Oct 20, 2000
+1 ;Per VHA Directive 10-93-142, this routine should not be modified.
+2 ;
+3 ;This routine compares the site's file 442.3 with DATA in PRCHCHK3.
+4 ;
+5 ;DATA is the information that will be compared with
+6 ;the GLOBAL nodes.
+7 ;
+8 ; All entries in DATA have one ";" in front.
+9 ;
+10 ; The DATA section is set up with two lines of information.
+11 ; The first line is the full NODE of the record.
+12 ; The second line is the data entered into the NODE. If there
+13 ; is no data for a NODE the second line will be empty. The second
+14 ; line will always be entered, even if it has no data.
+15 ;
+16 ; The terminator of DATA is always ";;END".
+17 ;
SETUP ; FLAG STATES
+1 ;
+2 ; FLAG=0 CONTINUE CHEKING.
+3 ; FLAG=1 STOP CHECKING, NODE DOESN'T MATCH DATA.
+4 ; FLAG=2 VERIFY THAT NO MORE NODES EXIST IN THE FILE.
+5 ; ";;END" FOUND.
+6 ;
+7 NEW DIFROM,FLAG,ROOT,START,LOOP,POINT,ND,SEARCH,NODE,VALUE,DATA,ZZ,X,FN
+8 NEW XMY,XMDUN,XMSUB,XMDUZ,XMTEXT,COUNT,FILE,CC,Y
+9 SET FLAG=0
+10 SET ROOT="^PRCD(442.3"
+11 SET START=0
+12 ;
CHECK ;Site file compared to national DATA
+1 ;
+2 SET LOOP=START
+3 SET POINT=2
+4 ;ND=NODE or DATA
SET ND=0
+5 SET SEARCH=ROOT_","
+6 FOR
SET LOOP=$ORDER(@(SEARCH_LOOP_")"))
if LOOP=""
QUIT
if LOOP="AC"
QUIT
Begin DoDot:1
+7 SET NODE=$PIECE($TEXT(DATA+POINT+ND^PRCHCHK3),";",2,99)
+8 IF NODE["END"
Begin DoDot:2
+9 SET NODE=$PIECE(NODE,";",2,99)
+10 IF NODE=";;END"
SET FLAG=2
QUIT
+11 IF NODE[";"
SET FLAG=1
QUIT
+12 QUIT
End DoDot:2
if FLAG>0
QUIT
+13 IF ND=0
Begin DoDot:2
+14 SET NODE=$PIECE($TEXT(DATA+POINT+ND^PRCHCHK3),";",2,99)
+15 SET VALUE=SEARCH_LOOP_",0)"
+16 IF NODE=VALUE
Begin DoDot:3
+17 SET ND=ND+1#2
+18 QUIT
End DoDot:3
QUIT
+19 SET FLAG=1
+20 QUIT
End DoDot:2
+21 IF ND=1
Begin DoDot:2
+22 SET NODE=$PIECE($TEXT(DATA+POINT+ND^PRCHCHK3),";",2,99)
+23 SET DATA=@(SEARCH_LOOP_",0)")
+24 IF DATA=NODE
Begin DoDot:3
+25 SET ND=ND+1#2
+26 SET POINT=POINT+2
+27 QUIT
End DoDot:3
QUIT
+28 SET FLAG=1
+29 QUIT
End DoDot:2
+30 QUIT
End DoDot:1
if FLAG>0
QUIT
+31 ;
MESSAGE ;Determine results of comparison
+1 ;
+2 IF FLAG=2
Begin DoDot:1
+3 SET LOOP=$ORDER(@(SEARCH_LOOP_")"))
if LOOP=""
QUIT
Begin DoDot:2
+4 SET FLAG=1
End DoDot:2
+5 QUIT
End DoDot:1
+6 IF FLAG=0
IF LOOP=""
SET FLAG=1
+7 IF FLAG=0
IF LOOP="AC"
SET FLAG=2
+8 ;
+9 IF FLAG=1
DO ERROR
+10 IF FLAG=2
DO OK
+11 QUIT
+12 ;
OK ;Site's file conforms to standard (Modified for MailMan 7.1 *50)
+1 ;
+2 KILL ZZ,XMY
+3 XECUTE ^%ZOSF("UCI")
+4 SET FN=$PIECE(ROOT,"(",2)
+5 SET ZZ(1)="File, "_FN_", has been checked by patch PRC*5*236 and"
+6 SET ZZ(2)="has been found to conform to the national standard."
+7 SET ZZ(3)=" "
+8 SET ZZ(4)="No further action is required by your SITE."
+9 SET ZZ(5)=" "
+10 SET ZZ(6)="SITE: "_$GET(^DD("SITE"))
+11 SET ZZ(7)="UCI: "_Y
+12 SET XMY("I:G.STATUS UPDATES@DOMAIN.EXT")=""
+13 SET XMY("I:G.IRM")=""
+14 SET XMY(DUZ)=""
+15 SET XMDUN="IFCAP File Checker"
+16 SET XMSUB="OK File "_FN_" at "_$GET(^DD("SITE"))
+17 SET XMDUZ="IFCAP File Checker"
+18 SET XMBODY="ZZ"
+19 DO SENDMSG^XMXAPI(DUZ,XMSUB,XMBODY,.XMY)
+20 QUIT
+21 ;
ERROR ;Site's file does NOT conform to standard (Modified for MailMan 7.1 *50)
+1 ;Send notification of error to IRM and Status Updates
+2 KILL ZZ,XMY
+3 SET FN=$PIECE(ROOT,"(",2)
+4 XECUTE ^%ZOSF("UCI")
+5 SET ZZ(1)="A discrepancy was noted in your data by patch PRC*5*236 in file "_FN_"."
+6 SET ZZ(2)="Both the data and the data dictionary for file "_FN_" were"
+7 SET ZZ(3)="sent to 'G.STATUS UPDATES' at FORUM."
+8 SET ZZ(4)=" "
+9 SET ZZ(5)="The Washington CIOFO will review the data."
+10 SET ZZ(6)=" "
+11 SET ZZ(7)="There is no action required of your SITE at this time."
+12 SET ZZ(8)=" "
+13 SET ZZ(9)="SITE: "_$GET(^DD("SITE"))
+14 SET ZZ(10)="UCI: "_Y
+15 SET XMDUN="IFCAP File Checker"
+16 SET XMSUB="Problem in File "_FN
+17 SET XMDUZ="IFCAP File Checker"
+18 SET XMBODY="ZZ"
+19 SET XMY(DUZ)=""
+20 SET XMY("I:G.STATUS UPDATES@DOMAIN.EXT")=""
+21 SET XMY("I:G.IRM")=""
+22 DO SENDMSG^XMXAPI(DUZ,XMSUB,XMBODY,.XMY)
+23 ;
+24 ;Send the 'DD' and the data from FILE 442.3 to 'G.STATUS UPDATES'
+25 KILL ZZ,XMY
+26 XECUTE ^%ZOSF("UCI")
+27 SET ZZ(1)="This file, "_FN_", does not match the data sent in patch PRC*5*236."
+28 SET ZZ(2)=" "
+29 SET ZZ(3)="SITE: "_$GET(^DD("SITE"))
+30 SET ZZ(4)="UCI: "_Y
+31 SET ZZ(5)=" "
+32 SET XMDUN="IFCAP File Checker"
+33 SET XMSUB="Problem in File "_FN_" "_$GET(^DD("SITE"))
+34 SET XMDUZ="IFCAP File Checker"
+35 SET XMBODY="ZZ"
+36 SET XMY("I:G.STATUS UPDATES@DOMAIN.EXT")=""
+37 ;
+38 ;Load DD for file 442.3 into message array
+39 SET COUNT=6
+40 SET ZZ(COUNT)="DD FOR FILE 442.3"
+41 SET COUNT=COUNT+1
+42 SET FILE="^DD(442.3)"
+43 FOR
SET FILE=$QUERY(@FILE)
if FILE=""
QUIT
if $PIECE($PIECE(FILE,"(",2),",",1)>FN
QUIT
Begin DoDot:1
+44 SET ZZ(COUNT)=FILE_" = "_@FILE
+45 SET COUNT=COUNT+1
+46 QUIT
End DoDot:1
+47 ;
+48 ;Put space between DD and data
+49 FOR CC=1:1:3
SET ZZ(COUNT)=" "
SET COUNT=COUNT+1
+50 SET ZZ(COUNT)="DATA FROM FILE 442.3"
+51 SET COUNT=COUNT+1
+52 ;
+53 ;Load data from file 442.3 into message array
+54 SET FILE="^PRCD(442.3)"
+55 FOR
SET FILE=$QUERY(@FILE)
if FILE=""
QUIT
if $PIECE($PIECE(FILE,"(",2),",",1)>FN
QUIT
Begin DoDot:1
+56 SET ZZ(COUNT)=FILE_" = "_@FILE
+57 SET COUNT=COUNT+1
+58 QUIT
End DoDot:1
+59 ;
+60 ;Send completed message
+61 DO SENDMSG^XMXAPI(DUZ,XMSUB,XMBODY,.XMY)
+62 QUIT