EASEZPU ; ALB/SCK - Format VA10-10EZ print output utility ; 10/23/00
;;1.0;ENROLLMENT APPLICATION SYSTEM;;Mar 15, 2001
;
Q
;
PAGE1 ; This function retrieves and formats the page 1 application data from the 1010EZ Holding File, #712,
; for the printed version of the Vista 10-10EZ form. If the hoding file entry has not been
; accepted, and a vista entry is available, the vista entry is printed.
; The ^TMP("EZTEMP") global is built in SETUP^EASEZPF and remains until the printed
; form is complete.
; Variables
; ZDATA - Variable which references the TMP global for the output data.
; EZDATA - Variable which references the available data from the 1010EZ holding file
; EAX - Temporary data variable
; EASTR - Temporary String data variable
;
N ZDATA,EZDATA,EAX,EASTR,X
;
S EZDATA="^TMP(""EZTEMP"",$J,""I"",1)"
S ZDATA="^TMP(""EASEZ"",$J,1)"
K @ZDATA
;
S EASTR="" F EAX="1A.1","1A.2","1A.3","1A.4","1A.5" D
. I $$PROCESS(EAX)="YES" S EASTR=EASTR_$$BENEFIT(EAX)_", "
S @ZDATA@("1A")=EASTR
;
S @ZDATA@("1B")=$$PROCESS("1B.")
S @ZDATA@(2)=$$PROCESS(2.1)
S @ZDATA@(3)=$E($$PROCESS("3."),1,35)
S @ZDATA@(4)=$$PROCESS("4.")
S @ZDATA@(5)=$$PROCESS("5.")
S @ZDATA@(6)=$$PROCESS("6.")
S @ZDATA@(7)=$$PROCESS("7.")
S @ZDATA@(8)=$$PROCESS("8.")
S @ZDATA@("9A")=$E($$PROCESS("9A."),1,35)
S @ZDATA@("9B")=$E($$PROCESS("9B."),1,32)
S @ZDATA@("9C")=$$PROCESS("9C.")
S @ZDATA@("9D")=$$PROCESS("9D.")
S @ZDATA@("9E")=$$PROCESS("9E.")
S @ZDATA@(10)=$$PROCESS("10.1")
S @ZDATA@(11)=$$PROCESS("11.1")
S @ZDATA@(12)=$$PROCESS("12.")
S @ZDATA@("13A")=$$PROCESS("13A.")
S @ZDATA@("13B")=$$PROCESS("13B.")
S @ZDATA@("13C")=$$PROCESS("13C.")
S @ZDATA@("13D")=$$PROCESS("13D.")
S @ZDATA@("13E")=$$PROCESS("13E.")
;
K EAX
F EAX="14A1","14A2","14B","14C","14D","14D1","14D2","14E","14F","14G","14H","14I","14J","14K","14L" D
. S X=$$PROCESS(EAX_".")
. S @ZDATA@(EAX)=$S(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",X="UNKNOWN":"UNK",1:"")
;
S @ZDATA@("14B1")=$$PROCESS("14B1.")
S @ZDATA@("14K1")=$$PROCESS("14K1.")
S @ZDATA@("14L1")=$$PROCESS("14L1.")
S @ZDATA@("14M")=$$PROCESS("14M.")
S @ZDATA@("14N")=$$PROCESS("14N.")
S @ZDATA@("15A")=$$PROCESS("15A.1")_"^"_$$PROCESS("15A.2")
;
K EAX
S EAX=$E($$PROCESS("15B.1"),1,30)
S EAX=EAX_"^"_$E($$PROCESS("15B.2"),1,30)_" "_$E($$PROCESS("15B.3"),1,30)_" "_$$PROCESS("15B.4")_" "_$E($$PROCESS("15B.5"),1,10)_"^"_$$PROCESS("15B.6")
S @ZDATA@("15B")=EAX
;
S @ZDATA@("16A")=$$PROCESS("16A.1")_U_$$PROCESS("16A.2")
;
K EAX
S EAX=$E($$PROCESS("16B.1"),1,30)
S EAX=EAX_"^"_$E($$PROCESS("16B.2"),1,30)_" "_$E($$PROCESS("16B.3"),1,30)_" "_$$PROCESS("16B.4")_" "_$E($$PROCESS("16B.5"),1,10)_"^"_$$PROCESS("16B.6")
S @ZDATA@("16B")=EAX
;
S X=$$PROCESS("17.")
S @ZDATA@(17)=$S(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",X="UNKNOWN":"UNK",1:"")
;
S @ZDATA@("17A")=$$PROCESS("17A.")
S @ZDATA@("17B")=$E($$PROCESS("17B."),1,30)
S @ZDATA@("17C")=$$PROCESS("17C.")
S @ZDATA@("17D")=$$PROCESS("17D.")
;
S X=$$PROCESS("18.")
S @ZDATA@(18)=$S(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",X="UNKNOWN":"UNK",1:"")
;
S @ZDATA@("18A")=$$PROCESS("18A.")
S @ZDATA@("18B")=$E($$PROCESS("18B."),1,30)
S @ZDATA@("18C")=$$PROCESS("18C.")
S @ZDATA@("18D")=$$PROCESS("18D.")
;
S @ZDATA@("19A")=$$PROCESS("19A.1")_"^"_$E($$PROCESS("19A.3"),1,30)_", "_$E($$PROCESS("19A.4"),1,30)_" "_$$PROCESS("19A.5")_" "_$E($$PROCESS("19A.6"),1,10)_"^"_$$PROCESS("19A.7")
S @ZDATA@("19B")=$$PROCESS("19B.1")
S @ZDATA@("19C")=$$PROCESS("19C.1")
;
S @ZDATA@("20A")=$$PROCESS("20A.1")_"^"_$E($$PROCESS("20A.3"),1,30)_", "_$E($$PROCESS("20A.4"),1,30)_" "_$$PROCESS("20A.5")_" "_$E($$PROCESS("20A.6"),1,10)_"^"_$$PROCESS("20A.7")
S @ZDATA@("20B")=$$PROCESS("20B.1")
S @ZDATA@("20C")=$$PROCESS("20C.1")
;
S @ZDATA@("21")=$$PROCESS("21.")
S X=$$PROCESS("22A.")
S @ZDATA@("22A")=$S(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",(X="UNKNOWN"):"UNK",1:"")
;
S X=$$PROCESS("22B.")
S @ZDATA@("22B")=$S(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",(X="UNKNOWN"):"UNK",1:"")
Q
;
PAGE2 ; Retrieve page 2 data and format for output on 10-10EZ form
;
; Variables
; ZDATA, EZDATA, EAX - See above
; EAV, EAS, EAC, X12A, X12B - temporary storage variables
;
N ZDATA,EZDATA,X,EAX,EAV,EAS,EAC,X12A,X12B
;
S ZDATA="^TMP(""EASEZ"",$J,2)"
K @ZDATA
;
; Process Section IIA
S EZDATA="^TMP(""EZTEMP"",$J,""IIA"",1)"
;
S @ZDATA@(1)=$$PROCESS(1.1)
S @ZDATA@(2)=$$PROCESS(2.1)
S @ZDATA@(3)=$$PROCESS("3.")
S @ZDATA@(4)=$$PROCESS("4.")
S @ZDATA@(5)=$$PROCESS("5.")
S @ZDATA@(6)=$$PROCESS(6.1)_"^"_$$PROCESS(6.2)_" "_$$PROCESS(6.3)_" "_$$PROCESS(6.4)
;
S @ZDATA@(7)=$$PROCESS("7.")
S @ZDATA@(8)=$$PROCESS(8.1)
S @ZDATA@(9)=$$PROCESS("9.")
S @ZDATA@(10)=$$PROCESS("10.")
S @ZDATA@(11)=$$PROCESS("11.")
;
S X12A=$$PROCESS(12.1)
S X12B=$$PROCESS(12.2)
S @ZDATA@(12)=X12A_"^"_X12B
;
S @ZDATA@(13)=$$PROCESS("13.")
;
S X=$$PROCESS("14.")
S @ZDATA@(14)=$S(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",X="UNKNOWN":"UNK",1:"")
S X=$$PROCESS("15.")
S @ZDATA@(15)=$S(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",X="UNKNOWN":"UNK",1:"")
;
; Process Section IIC
S EZDATA="^TMP(""EZTEMP"",$J,""IIC"",1)"
;
S EAV=$$PROCESS(1.1),EAS=$$PROCESS(1.2),EAC=$$PROCESS(1.3)
S @ZDATA@("2C1")=EAV_"^"_EAS_"^"_EAC
;
K EAV,EAS,EAC
S EAV=$$PROCESS(2.1),EAS=$$PROCESS(2.2),EAC=$$PROCESS(2.3)
S @ZDATA@("2C2")=EAV_"^"_EAS_"^"_EAC
S X=$$PROCESS("3.")
S @ZDATA@("2C3")=$S(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",X="UNKNOWN":"UNK",1:"")
;
; Process Section IID
S EZDATA="^TMP(""EZTEMP"",$J,""IID"",1)"
;
S X=$$PROCESS("1."),@ZDATA@("2D1")=X
S X=$$PROCESS("2."),@ZDATA@("2D2")=X
S X=$$PROCESS("3."),@ZDATA@("2D3")=X
;
; Process Section IIE
S EZDATA="^TMP(""EZTEMP"",$J,""IIE"",1)"
;
K EAV,EAS
S EAV=$$PROCESS(1.1),EAS=$$PROCESS(1.2)
S @ZDATA@("2E1")=EAV_"^"_EAS
;
K EAV,EAS
S EAV=$$PROCESS(2.1),EAS=$$PROCESS(2.2)
S @ZDATA@("2E2")=EAV_"^"_EAS
;
K EAV,EAS
S EAV=$$PROCESS(3.1),EAS=$$PROCESS(3.2)
S @ZDATA@("2E3")=EAV_"^"_EAS
;
Q
;
PAGEN(EADEP) ; Additional dependent pages. Prints Child data only on page 2 format.
;
N ZDATA,EZDATA,EAX,X
;
S ZDATA="^TMP(""EASEZ"",$J,2)"
K @ZDATA
;
; Process Section IIA
S EZDATA="^TMP(""EZTEMP"",$J,""IIB"",EADEP)"
;
S @ZDATA@(1)=""
S @ZDATA@(2)=$$PROCESS(1.1)
S @ZDATA@(3)=""
S @ZDATA@(4)=""
S @ZDATA@(5)=$$PROCESS("3.")
S @ZDATA@(6)=""
S @ZDATA@(7)=$$PROCESS("2.")
S @ZDATA@(8)=""
S @ZDATA@(9)=$$PROCESS("4.")
S @ZDATA@(10)=""
S @ZDATA@(11)=$$PROCESS("5.")
S X=$$PROCESS("6."),@ZDATA@(12)="^"_X
S X=$$PROCESS("7."),@ZDATA@(13)=X
;
S X=$$PROCESS("8.")
S @ZDATA@(14)=$S(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",X="UNKNOWN":"UNK",1:"")
S X=$$PROCESS("9.")
S @ZDATA@(15)=$S(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",X="UNKNOWN":"UNK",1:"")
;
; Process Section IIB
S @ZDATA@("2B")=-1
;
F EAX="2C1","2C2","2C3","2D1","2D2","2D3","2E1","2E2","2E3" S @ZDATA@(EAX)=""
Q
;
PROCESS(KEY) ; Process data value form EXTEMP array, take #712 value if it's accepted,
; otherwise take the Patient File value
;
N EAV,RSLT
;
I '$D(@EZDATA@(KEY)) G PQ
S EAV=@EZDATA@(KEY)
S RSLT=$S(+$P(EAV,U,3):$P(EAV,U,2),1:$P(EAV,U,5))
;S RSLT=$P(EAV,U,2)
PQ Q $G(RSLT)
;
BENEFIT(X) ; Return External format of benefit applied for for printing on the VA 1010EZ form.
;
Q $S(X="1A.1":"HEALTH SERVICES",X="1A.2":"NURSING HOME",X="1A.3":"DOMICILIARY",X="1A.4":"DENTAL",X="1A.5":"ENROLLMENT",1:"")
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HEASEZPU 7659 printed Oct 16, 2024@17:55:42 Page 2
EASEZPU ; ALB/SCK - Format VA10-10EZ print output utility ; 10/23/00
+1 ;;1.0;ENROLLMENT APPLICATION SYSTEM;;Mar 15, 2001
+2 ;
+3 QUIT
+4 ;
PAGE1 ; This function retrieves and formats the page 1 application data from the 1010EZ Holding File, #712,
+1 ; for the printed version of the Vista 10-10EZ form. If the hoding file entry has not been
+2 ; accepted, and a vista entry is available, the vista entry is printed.
+3 ; The ^TMP("EZTEMP") global is built in SETUP^EASEZPF and remains until the printed
+4 ; form is complete.
+5 ; Variables
+6 ; ZDATA - Variable which references the TMP global for the output data.
+7 ; EZDATA - Variable which references the available data from the 1010EZ holding file
+8 ; EAX - Temporary data variable
+9 ; EASTR - Temporary String data variable
+10 ;
+11 NEW ZDATA,EZDATA,EAX,EASTR,X
+12 ;
+13 SET EZDATA="^TMP(""EZTEMP"",$J,""I"",1)"
+14 SET ZDATA="^TMP(""EASEZ"",$J,1)"
+15 KILL @ZDATA
+16 ;
+17 SET EASTR=""
FOR EAX="1A.1","1A.2","1A.3","1A.4","1A.5"
Begin DoDot:1
+18 IF $$PROCESS(EAX)="YES"
SET EASTR=EASTR_$$BENEFIT(EAX)_", "
End DoDot:1
+19 SET @ZDATA@("1A")=EASTR
+20 ;
+21 SET @ZDATA@("1B")=$$PROCESS("1B.")
+22 SET @ZDATA@(2)=$$PROCESS(2.1)
+23 SET @ZDATA@(3)=$EXTRACT($$PROCESS("3."),1,35)
+24 SET @ZDATA@(4)=$$PROCESS("4.")
+25 SET @ZDATA@(5)=$$PROCESS("5.")
+26 SET @ZDATA@(6)=$$PROCESS("6.")
+27 SET @ZDATA@(7)=$$PROCESS("7.")
+28 SET @ZDATA@(8)=$$PROCESS("8.")
+29 SET @ZDATA@("9A")=$EXTRACT($$PROCESS("9A."),1,35)
+30 SET @ZDATA@("9B")=$EXTRACT($$PROCESS("9B."),1,32)
+31 SET @ZDATA@("9C")=$$PROCESS("9C.")
+32 SET @ZDATA@("9D")=$$PROCESS("9D.")
+33 SET @ZDATA@("9E")=$$PROCESS("9E.")
+34 SET @ZDATA@(10)=$$PROCESS("10.1")
+35 SET @ZDATA@(11)=$$PROCESS("11.1")
+36 SET @ZDATA@(12)=$$PROCESS("12.")
+37 SET @ZDATA@("13A")=$$PROCESS("13A.")
+38 SET @ZDATA@("13B")=$$PROCESS("13B.")
+39 SET @ZDATA@("13C")=$$PROCESS("13C.")
+40 SET @ZDATA@("13D")=$$PROCESS("13D.")
+41 SET @ZDATA@("13E")=$$PROCESS("13E.")
+42 ;
+43 KILL EAX
+44 FOR EAX="14A1","14A2","14B","14C","14D","14D1","14D2","14E","14F","14G","14H","14I","14J","14K","14L"
Begin DoDot:1
+45 SET X=$$PROCESS(EAX_".")
+46 SET @ZDATA@(EAX)=$SELECT(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",X="UNKNOWN":"UNK",1:"")
End DoDot:1
+47 ;
+48 SET @ZDATA@("14B1")=$$PROCESS("14B1.")
+49 SET @ZDATA@("14K1")=$$PROCESS("14K1.")
+50 SET @ZDATA@("14L1")=$$PROCESS("14L1.")
+51 SET @ZDATA@("14M")=$$PROCESS("14M.")
+52 SET @ZDATA@("14N")=$$PROCESS("14N.")
+53 SET @ZDATA@("15A")=$$PROCESS("15A.1")_"^"_$$PROCESS("15A.2")
+54 ;
+55 KILL EAX
+56 SET EAX=$EXTRACT($$PROCESS("15B.1"),1,30)
+57 SET EAX=EAX_"^"_$EXTRACT($$PROCESS("15B.2"),1,30)_" "_$EXTRACT($$PROCESS("15B.3"),1,30)_" "_$$PROCESS("15B.4")_" "_$EXTRACT($$PROCESS("15B.5"),1,10)_"^"_$$PROCESS("15B.6")
+58 SET @ZDATA@("15B")=EAX
+59 ;
+60 SET @ZDATA@("16A")=$$PROCESS("16A.1")_U_$$PROCESS("16A.2")
+61 ;
+62 KILL EAX
+63 SET EAX=$EXTRACT($$PROCESS("16B.1"),1,30)
+64 SET EAX=EAX_"^"_$EXTRACT($$PROCESS("16B.2"),1,30)_" "_$EXTRACT($$PROCESS("16B.3"),1,30)_" "_$$PROCESS("16B.4")_" "_$EXTRACT($$PROCESS("16B.5"),1,10)_"^"_$$PROCESS("16B.6")
+65 SET @ZDATA@("16B")=EAX
+66 ;
+67 SET X=$$PROCESS("17.")
+68 SET @ZDATA@(17)=$SELECT(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",X="UNKNOWN":"UNK",1:"")
+69 ;
+70 SET @ZDATA@("17A")=$$PROCESS("17A.")
+71 SET @ZDATA@("17B")=$EXTRACT($$PROCESS("17B."),1,30)
+72 SET @ZDATA@("17C")=$$PROCESS("17C.")
+73 SET @ZDATA@("17D")=$$PROCESS("17D.")
+74 ;
+75 SET X=$$PROCESS("18.")
+76 SET @ZDATA@(18)=$SELECT(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",X="UNKNOWN":"UNK",1:"")
+77 ;
+78 SET @ZDATA@("18A")=$$PROCESS("18A.")
+79 SET @ZDATA@("18B")=$EXTRACT($$PROCESS("18B."),1,30)
+80 SET @ZDATA@("18C")=$$PROCESS("18C.")
+81 SET @ZDATA@("18D")=$$PROCESS("18D.")
+82 ;
+83 SET @ZDATA@("19A")=$$PROCESS("19A.1")_"^"_$EXTRACT($$PROCESS("19A.3"),1,30)_", "_$EXTRACT($$PROCESS("19A.4"),1,30)_" "_$$PROCESS("19A.5")_" "_$EXTRACT($$PROCESS("19A.6"),1,10)_"^"_$$PROCESS("19A.7")
+84 SET @ZDATA@("19B")=$$PROCESS("19B.1")
+85 SET @ZDATA@("19C")=$$PROCESS("19C.1")
+86 ;
+87 SET @ZDATA@("20A")=$$PROCESS("20A.1")_"^"_$EXTRACT($$PROCESS("20A.3"),1,30)_", "_$EXTRACT($$PROCESS("20A.4"),1,30)_" "_$$PROCESS("20A.5")_" "_$EXTRACT($$PROCESS("20A.6"),1,10)_"^"_$$PROCESS("20A.7")
+88 SET @ZDATA@("20B")=$$PROCESS("20B.1")
+89 SET @ZDATA@("20C")=$$PROCESS("20C.1")
+90 ;
+91 SET @ZDATA@("21")=$$PROCESS("21.")
+92 SET X=$$PROCESS("22A.")
+93 SET @ZDATA@("22A")=$SELECT(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",(X="UNKNOWN"):"UNK",1:"")
+94 ;
+95 SET X=$$PROCESS("22B.")
+96 SET @ZDATA@("22B")=$SELECT(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",(X="UNKNOWN"):"UNK",1:"")
+97 QUIT
+98 ;
PAGE2 ; Retrieve page 2 data and format for output on 10-10EZ form
+1 ;
+2 ; Variables
+3 ; ZDATA, EZDATA, EAX - See above
+4 ; EAV, EAS, EAC, X12A, X12B - temporary storage variables
+5 ;
+6 NEW ZDATA,EZDATA,X,EAX,EAV,EAS,EAC,X12A,X12B
+7 ;
+8 SET ZDATA="^TMP(""EASEZ"",$J,2)"
+9 KILL @ZDATA
+10 ;
+11 ; Process Section IIA
+12 SET EZDATA="^TMP(""EZTEMP"",$J,""IIA"",1)"
+13 ;
+14 SET @ZDATA@(1)=$$PROCESS(1.1)
+15 SET @ZDATA@(2)=$$PROCESS(2.1)
+16 SET @ZDATA@(3)=$$PROCESS("3.")
+17 SET @ZDATA@(4)=$$PROCESS("4.")
+18 SET @ZDATA@(5)=$$PROCESS("5.")
+19 SET @ZDATA@(6)=$$PROCESS(6.1)_"^"_$$PROCESS(6.2)_" "_$$PROCESS(6.3)_" "_$$PROCESS(6.4)
+20 ;
+21 SET @ZDATA@(7)=$$PROCESS("7.")
+22 SET @ZDATA@(8)=$$PROCESS(8.1)
+23 SET @ZDATA@(9)=$$PROCESS("9.")
+24 SET @ZDATA@(10)=$$PROCESS("10.")
+25 SET @ZDATA@(11)=$$PROCESS("11.")
+26 ;
+27 SET X12A=$$PROCESS(12.1)
+28 SET X12B=$$PROCESS(12.2)
+29 SET @ZDATA@(12)=X12A_"^"_X12B
+30 ;
+31 SET @ZDATA@(13)=$$PROCESS("13.")
+32 ;
+33 SET X=$$PROCESS("14.")
+34 SET @ZDATA@(14)=$SELECT(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",X="UNKNOWN":"UNK",1:"")
+35 SET X=$$PROCESS("15.")
+36 SET @ZDATA@(15)=$SELECT(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",X="UNKNOWN":"UNK",1:"")
+37 ;
+38 ; Process Section IIC
+39 SET EZDATA="^TMP(""EZTEMP"",$J,""IIC"",1)"
+40 ;
+41 SET EAV=$$PROCESS(1.1)
SET EAS=$$PROCESS(1.2)
SET EAC=$$PROCESS(1.3)
+42 SET @ZDATA@("2C1")=EAV_"^"_EAS_"^"_EAC
+43 ;
+44 KILL EAV,EAS,EAC
+45 SET EAV=$$PROCESS(2.1)
SET EAS=$$PROCESS(2.2)
SET EAC=$$PROCESS(2.3)
+46 SET @ZDATA@("2C2")=EAV_"^"_EAS_"^"_EAC
+47 SET X=$$PROCESS("3.")
+48 SET @ZDATA@("2C3")=$SELECT(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",X="UNKNOWN":"UNK",1:"")
+49 ;
+50 ; Process Section IID
+51 SET EZDATA="^TMP(""EZTEMP"",$J,""IID"",1)"
+52 ;
+53 SET X=$$PROCESS("1.")
SET @ZDATA@("2D1")=X
+54 SET X=$$PROCESS("2.")
SET @ZDATA@("2D2")=X
+55 SET X=$$PROCESS("3.")
SET @ZDATA@("2D3")=X
+56 ;
+57 ; Process Section IIE
+58 SET EZDATA="^TMP(""EZTEMP"",$J,""IIE"",1)"
+59 ;
+60 KILL EAV,EAS
+61 SET EAV=$$PROCESS(1.1)
SET EAS=$$PROCESS(1.2)
+62 SET @ZDATA@("2E1")=EAV_"^"_EAS
+63 ;
+64 KILL EAV,EAS
+65 SET EAV=$$PROCESS(2.1)
SET EAS=$$PROCESS(2.2)
+66 SET @ZDATA@("2E2")=EAV_"^"_EAS
+67 ;
+68 KILL EAV,EAS
+69 SET EAV=$$PROCESS(3.1)
SET EAS=$$PROCESS(3.2)
+70 SET @ZDATA@("2E3")=EAV_"^"_EAS
+71 ;
+72 QUIT
+73 ;
PAGEN(EADEP) ; Additional dependent pages. Prints Child data only on page 2 format.
+1 ;
+2 NEW ZDATA,EZDATA,EAX,X
+3 ;
+4 SET ZDATA="^TMP(""EASEZ"",$J,2)"
+5 KILL @ZDATA
+6 ;
+7 ; Process Section IIA
+8 SET EZDATA="^TMP(""EZTEMP"",$J,""IIB"",EADEP)"
+9 ;
+10 SET @ZDATA@(1)=""
+11 SET @ZDATA@(2)=$$PROCESS(1.1)
+12 SET @ZDATA@(3)=""
+13 SET @ZDATA@(4)=""
+14 SET @ZDATA@(5)=$$PROCESS("3.")
+15 SET @ZDATA@(6)=""
+16 SET @ZDATA@(7)=$$PROCESS("2.")
+17 SET @ZDATA@(8)=""
+18 SET @ZDATA@(9)=$$PROCESS("4.")
+19 SET @ZDATA@(10)=""
+20 SET @ZDATA@(11)=$$PROCESS("5.")
+21 SET X=$$PROCESS("6.")
SET @ZDATA@(12)="^"_X
+22 SET X=$$PROCESS("7.")
SET @ZDATA@(13)=X
+23 ;
+24 SET X=$$PROCESS("8.")
+25 SET @ZDATA@(14)=$SELECT(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",X="UNKNOWN":"UNK",1:"")
+26 SET X=$$PROCESS("9.")
+27 SET @ZDATA@(15)=$SELECT(X="Y"!(X="YES"):"YES",X="N"!(X="NO"):"NO",X="UNKNOWN":"UNK",1:"")
+28 ;
+29 ; Process Section IIB
+30 SET @ZDATA@("2B")=-1
+31 ;
+32 FOR EAX="2C1","2C2","2C3","2D1","2D2","2D3","2E1","2E2","2E3"
SET @ZDATA@(EAX)=""
+33 QUIT
+34 ;
PROCESS(KEY) ; Process data value form EXTEMP array, take #712 value if it's accepted,
+1 ; otherwise take the Patient File value
+2 ;
+3 NEW EAV,RSLT
+4 ;
+5 IF '$DATA(@EZDATA@(KEY))
GOTO PQ
+6 SET EAV=@EZDATA@(KEY)
+7 SET RSLT=$SELECT(+$PIECE(EAV,U,3):$PIECE(EAV,U,2),1:$PIECE(EAV,U,5))
+8 ;S RSLT=$P(EAV,U,2)
PQ QUIT $GET(RSLT)
+1 ;
BENEFIT(X) ; Return External format of benefit applied for for printing on the VA 1010EZ form.
+1 ;
+2 QUIT $SELECT(X="1A.1":"HEALTH SERVICES",X="1A.2":"NURSING HOME",X="1A.3":"DOMICILIARY",X="1A.4":"DENTAL",X="1A.5":"ENROLLMENT",1:"")