EASEZPU3 ;ALB/AMA,LBD - Print utility for 10-10EZ, Version 6 or greater; 10/23/00 ; 1/31/13 2:52pm
;;1.0;ENROLLMENT APPLICATION SYSTEM;**57,107**;Mar 15, 2001;Build 32
;
Q
;Split from EASEZP6U
;
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 holding file entry has not been accepted, and
;a vista entry is available, the vista entry is printed.
; Called from EN^EASEZP6F
;
;The ^TMP("EZTEMP") global is built in SETUP^EASEZP6F and
;remains until the printed form is complete.
; Variables
; ZDATA - references TMP global for output data
; EZDATA - references available data from 1010EZ holding file
; EAX - Temporary data variables
; EACT - Temporary city variable
;
N ZDATA,EZDATA,EAX,EACT
;
S ZDATA=$NA(^TMP("EASEZ",$J,1))
S EZDATA=$NA(^TMP("EZTEMP",$J,"I",1))
;
S EAX=$$PROCESS("17.") ;Covered by health insurance?
;EAS*1.0*57 - print full word "UNKNOWN"
S @ZDATA@(17)=$S(EAX="Y"!(EAX="YES"):"YES",EAX="N"!(EAX="NO"):"NO",EAX="UNKNOWN":"UNKNOWN",1:"")
;
S @ZDATA@("17A")=$$PROCESS("17A.") ;Insurance company's name
S @ZDATA@("17B")=$E($$PROCESS("17B."),1,30) ;Name of policy holder
S @ZDATA@("17C")=$$PROCESS("17C.") ;Policy number
S @ZDATA@("17D")=$$PROCESS("17D.") ;Group code
;
S @ZDATA@("17E")=$$PROCESS("17E.") ;Insurance company's street
S @ZDATA@("17F")=$$PROCESS("17F.") ;Insurance company's city
S @ZDATA@("17G")=$$PROCESS("17G.") ;Insurance company's state
S @ZDATA@("17H")=$$PROCESS("17H.") ;Insurance company's zip
S @ZDATA@("17J")=$$PROCESS("17J.") ;Insurance company's phone (Changed KEY to 17J - EAS*1*107)
;
S EACT="",EACT=$E($$PROCESS("19A.4"),1,30) ;Next-of-kin's city
I EACT]"" S EACT=EACT_", " ;if there's a city, add comma & space
;Next-of-kin's name^street^city, state zip^relationship
S @ZDATA@("19A")=$$PROCESS("19A.1")_U_$E($$PROCESS("19A.3"),1,30)_U_EACT_$$PROCESS("19A.5")_" "_$E($$PROCESS("19A.6"),1,10)_U_$$PROCESS("19A.7")
S @ZDATA@("19B")=$$PROCESS("19B.1") ;Next-of-kin's home phone
S @ZDATA@("19C")=$$PROCESS("19C.1") ;Next-of-kin's work phone
;
S EACT="",EACT=$E($$PROCESS("20A.4"),1,30) ;Emergency contact's city
I EACT]"" S EACT=EACT_", " ;if there's a city, add comma & space
;Emergency contact's name^street^city, state zip^relationship
S @ZDATA@("20A")=$$PROCESS("20A.1")_U_$E($$PROCESS("20A.3"),1,30)_U_EACT_$$PROCESS("20A.5")_" "_$E($$PROCESS("20A.6"),1,10)_U_$$PROCESS("20A.7")
S @ZDATA@("20B")=$$PROCESS("20B.1") ;EC's home phone
S @ZDATA@("20C")=$$PROCESS("20C.1") ;EC's work phone
;
S @ZDATA@("21")=$$PROCESS("21.") ;Who receives property?
S EAX=$$PROCESS("22A.") ;On-the-job injury?
;EAS*1.0*57 - print full word "UNKNOWN"
S @ZDATA@("22A")=$S(EAX="Y"!(EAX="YES"):"YES",EAX="N"!(EAX="NO"):"NO",(EAX="UNKNOWN"):"UNKNOWN",1:"")
;
S EAX=$$PROCESS("22B.") ;Accident?
;EAS*1.0*57 - print full word "UNKNOWN"
S @ZDATA@("22B")=$S(EAX="Y"!(EAX="YES"):"YES",EAX="N"!(EAX="NO"):"NO",(EAX="UNKNOWN"):"UNKNOWN",1:"")
Q
;
PAGEI(EAINS) ; Additional Insurance pages
; Called from EN^EASEZP6F
N ZDATA,EZDATA,EACT
;
S ZDATA=$NA(^TMP("EASEZ",$J,"I",EAINS))
K @ZDATA
;
; Process Section IA
S EZDATA=$NA(^TMP("EZTEMP",$J,"IA",EAINS))
;
S @ZDATA@("17A")=$$PROCESS("17A.") ;Insurance company's name
S @ZDATA@("17B")=$E($$PROCESS("17B."),1,30) ;Name of policy holder
S @ZDATA@("17C")=$$PROCESS("17C.") ;Policy number
S @ZDATA@("17D")=$$PROCESS("17D.") ;Group code
S @ZDATA@("17E")=$$PROCESS("17E.") ;Insurance company's street
S @ZDATA@("17F")=$$PROCESS("17F.") ;Insurance company's city
S @ZDATA@("17G")=$$PROCESS("17G.") ;Insurance company's state
S @ZDATA@("17H")=$$PROCESS("17H.") ;Insurance company's zip
S @ZDATA@("17J")=$$PROCESS("17J.") ;Insurance company's phone
Q
;
PAGEN(EADEP) ; Additional dependent page(s)
; Called from EN^EASEZP6F
N ZDATA,EZDATA,EAX
;
S ZDATA=$NA(^TMP("EASEZ",$J,"D",EADEP))
K @ZDATA
;
; Process Section IIB
S EZDATA=$NA(^TMP("EZTEMP",$J,"IIB",EADEP))
;
S @ZDATA@(2)=$$PROCESS(1.1) ;Child's name
S @ZDATA@(5)=$$PROCESS("3.") ;Date of birth
S @ZDATA@(7)=$$PROCESS("2.") ;SSN
S @ZDATA@(9)=$$PROCESS("4.") ;Relationship
S @ZDATA@(11)=$$PROCESS("5.") ;Date of dependency
;Amount contributed
S EAX=$$PROCESS("6."),@ZDATA@(12)=U_$S(EAX="":"",1:$J(EAX,0,2))
;Education expenses
S EAX=$$PROCESS("7."),@ZDATA@(13)=$S(EAX="":"",1:$J(EAX,0,2))
;
S EAX=$$PROCESS("8.") ;Permanently disabled?
;EAS*1.0*57 - print full word "UNKNOWN"
S @ZDATA@(14)=$S(EAX="Y"!(EAX="YES"):"YES",EAX="N"!(EAX="NO"):"NO",EAX="UNKNOWN":"UNKNOWN",1:"")
S EAX=$$PROCESS("9.") ;School last year?
;EAS*1.0*57 - print full word "UNKNOWN"
S @ZDATA@(15)=$S(EAX="Y"!(EAX="YES"):"YES",EAX="N"!(EAX="NO"):"NO",EAX="UNKNOWN":"UNKNOWN",1:"")
;
Q
;
PROCESS(KEY) ; Process data value from ^TMP("EZTEMP" array
;format = IEN ^ EAS DATA ^ ACCEPT VALUE ^ 712 SUBIEN ^ VISTA DATA
;Take #712 value from 2nd piece, if it's accepted;
;otherwise, take the Patient File value from the 5th piece
;
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))
PQ Q $G(RSLT)
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HEASEZPU3 5720 printed Dec 13, 2024@01:54:56 Page 2
EASEZPU3 ;ALB/AMA,LBD - Print utility for 10-10EZ, Version 6 or greater; 10/23/00 ; 1/31/13 2:52pm
+1 ;;1.0;ENROLLMENT APPLICATION SYSTEM;**57,107**;Mar 15, 2001;Build 32
+2 ;
+3 QUIT
+4 ;Split from EASEZP6U
+5 ;
PAGE1 ;This function retrieves and formats the page 1 application data from
+1 ;the 1010EZ Holding File, #712, for the printed version of the VistA
+2 ;10-10EZ form. If the holding file entry has not been accepted, and
+3 ;a vista entry is available, the vista entry is printed.
+4 ; Called from EN^EASEZP6F
+5 ;
+6 ;The ^TMP("EZTEMP") global is built in SETUP^EASEZP6F and
+7 ;remains until the printed form is complete.
+8 ; Variables
+9 ; ZDATA - references TMP global for output data
+10 ; EZDATA - references available data from 1010EZ holding file
+11 ; EAX - Temporary data variables
+12 ; EACT - Temporary city variable
+13 ;
+14 NEW ZDATA,EZDATA,EAX,EACT
+15 ;
+16 SET ZDATA=$NAME(^TMP("EASEZ",$JOB,1))
+17 SET EZDATA=$NAME(^TMP("EZTEMP",$JOB,"I",1))
+18 ;
+19 ;Covered by health insurance?
SET EAX=$$PROCESS("17.")
+20 ;EAS*1.0*57 - print full word "UNKNOWN"
+21 SET @ZDATA@(17)=$SELECT(EAX="Y"!(EAX="YES"):"YES",EAX="N"!(EAX="NO"):"NO",EAX="UNKNOWN":"UNKNOWN",1:"")
+22 ;
+23 ;Insurance company's name
SET @ZDATA@("17A")=$$PROCESS("17A.")
+24 ;Name of policy holder
SET @ZDATA@("17B")=$EXTRACT($$PROCESS("17B."),1,30)
+25 ;Policy number
SET @ZDATA@("17C")=$$PROCESS("17C.")
+26 ;Group code
SET @ZDATA@("17D")=$$PROCESS("17D.")
+27 ;
+28 ;Insurance company's street
SET @ZDATA@("17E")=$$PROCESS("17E.")
+29 ;Insurance company's city
SET @ZDATA@("17F")=$$PROCESS("17F.")
+30 ;Insurance company's state
SET @ZDATA@("17G")=$$PROCESS("17G.")
+31 ;Insurance company's zip
SET @ZDATA@("17H")=$$PROCESS("17H.")
+32 ;Insurance company's phone (Changed KEY to 17J - EAS*1*107)
SET @ZDATA@("17J")=$$PROCESS("17J.")
+33 ;
+34 ;Next-of-kin's city
SET EACT=""
SET EACT=$EXTRACT($$PROCESS("19A.4"),1,30)
+35 ;if there's a city, add comma & space
IF EACT]""
SET EACT=EACT_", "
+36 ;Next-of-kin's name^street^city, state zip^relationship
+37 SET @ZDATA@("19A")=$$PROCESS("19A.1")_U_$EXTRACT($$PROCESS("19A.3"),1,30)_U_EACT_$$PROCESS("19A.5")_" "_$EXTRACT($$PROCESS("19A.6"),1,10)_U_$$PROCESS("19A.7")
+38 ;Next-of-kin's home phone
SET @ZDATA@("19B")=$$PROCESS("19B.1")
+39 ;Next-of-kin's work phone
SET @ZDATA@("19C")=$$PROCESS("19C.1")
+40 ;
+41 ;Emergency contact's city
SET EACT=""
SET EACT=$EXTRACT($$PROCESS("20A.4"),1,30)
+42 ;if there's a city, add comma & space
IF EACT]""
SET EACT=EACT_", "
+43 ;Emergency contact's name^street^city, state zip^relationship
+44 SET @ZDATA@("20A")=$$PROCESS("20A.1")_U_$EXTRACT($$PROCESS("20A.3"),1,30)_U_EACT_$$PROCESS("20A.5")_" "_$EXTRACT($$PROCESS("20A.6"),1,10)_U_$$PROCESS("20A.7")
+45 ;EC's home phone
SET @ZDATA@("20B")=$$PROCESS("20B.1")
+46 ;EC's work phone
SET @ZDATA@("20C")=$$PROCESS("20C.1")
+47 ;
+48 ;Who receives property?
SET @ZDATA@("21")=$$PROCESS("21.")
+49 ;On-the-job injury?
SET EAX=$$PROCESS("22A.")
+50 ;EAS*1.0*57 - print full word "UNKNOWN"
+51 SET @ZDATA@("22A")=$SELECT(EAX="Y"!(EAX="YES"):"YES",EAX="N"!(EAX="NO"):"NO",(EAX="UNKNOWN"):"UNKNOWN",1:"")
+52 ;
+53 ;Accident?
SET EAX=$$PROCESS("22B.")
+54 ;EAS*1.0*57 - print full word "UNKNOWN"
+55 SET @ZDATA@("22B")=$SELECT(EAX="Y"!(EAX="YES"):"YES",EAX="N"!(EAX="NO"):"NO",(EAX="UNKNOWN"):"UNKNOWN",1:"")
+56 QUIT
+57 ;
PAGEI(EAINS) ; Additional Insurance pages
+1 ; Called from EN^EASEZP6F
+2 NEW ZDATA,EZDATA,EACT
+3 ;
+4 SET ZDATA=$NAME(^TMP("EASEZ",$JOB,"I",EAINS))
+5 KILL @ZDATA
+6 ;
+7 ; Process Section IA
+8 SET EZDATA=$NAME(^TMP("EZTEMP",$JOB,"IA",EAINS))
+9 ;
+10 ;Insurance company's name
SET @ZDATA@("17A")=$$PROCESS("17A.")
+11 ;Name of policy holder
SET @ZDATA@("17B")=$EXTRACT($$PROCESS("17B."),1,30)
+12 ;Policy number
SET @ZDATA@("17C")=$$PROCESS("17C.")
+13 ;Group code
SET @ZDATA@("17D")=$$PROCESS("17D.")
+14 ;Insurance company's street
SET @ZDATA@("17E")=$$PROCESS("17E.")
+15 ;Insurance company's city
SET @ZDATA@("17F")=$$PROCESS("17F.")
+16 ;Insurance company's state
SET @ZDATA@("17G")=$$PROCESS("17G.")
+17 ;Insurance company's zip
SET @ZDATA@("17H")=$$PROCESS("17H.")
+18 ;Insurance company's phone
SET @ZDATA@("17J")=$$PROCESS("17J.")
+19 QUIT
+20 ;
PAGEN(EADEP) ; Additional dependent page(s)
+1 ; Called from EN^EASEZP6F
+2 NEW ZDATA,EZDATA,EAX
+3 ;
+4 SET ZDATA=$NAME(^TMP("EASEZ",$JOB,"D",EADEP))
+5 KILL @ZDATA
+6 ;
+7 ; Process Section IIB
+8 SET EZDATA=$NAME(^TMP("EZTEMP",$JOB,"IIB",EADEP))
+9 ;
+10 ;Child's name
SET @ZDATA@(2)=$$PROCESS(1.1)
+11 ;Date of birth
SET @ZDATA@(5)=$$PROCESS("3.")
+12 ;SSN
SET @ZDATA@(7)=$$PROCESS("2.")
+13 ;Relationship
SET @ZDATA@(9)=$$PROCESS("4.")
+14 ;Date of dependency
SET @ZDATA@(11)=$$PROCESS("5.")
+15 ;Amount contributed
+16 SET EAX=$$PROCESS("6.")
SET @ZDATA@(12)=U_$SELECT(EAX="":"",1:$JUSTIFY(EAX,0,2))
+17 ;Education expenses
+18 SET EAX=$$PROCESS("7.")
SET @ZDATA@(13)=$SELECT(EAX="":"",1:$JUSTIFY(EAX,0,2))
+19 ;
+20 ;Permanently disabled?
SET EAX=$$PROCESS("8.")
+21 ;EAS*1.0*57 - print full word "UNKNOWN"
+22 SET @ZDATA@(14)=$SELECT(EAX="Y"!(EAX="YES"):"YES",EAX="N"!(EAX="NO"):"NO",EAX="UNKNOWN":"UNKNOWN",1:"")
+23 ;School last year?
SET EAX=$$PROCESS("9.")
+24 ;EAS*1.0*57 - print full word "UNKNOWN"
+25 SET @ZDATA@(15)=$SELECT(EAX="Y"!(EAX="YES"):"YES",EAX="N"!(EAX="NO"):"NO",EAX="UNKNOWN":"UNKNOWN",1:"")
+26 ;
+27 QUIT
+28 ;
PROCESS(KEY) ; Process data value from ^TMP("EZTEMP" array
+1 ;format = IEN ^ EAS DATA ^ ACCEPT VALUE ^ 712 SUBIEN ^ VISTA DATA
+2 ;Take #712 value from 2nd piece, if it's accepted;
+3 ;otherwise, take the Patient File value from the 5th piece
+4 ;
+5 NEW EAV,RSLT
+6 ;
+7 IF '$DATA(@EZDATA@(KEY))
GOTO PQ
+8 SET EAV=@EZDATA@(KEY)
+9 SET RSLT=$SELECT(+$PIECE(EAV,U,3):$PIECE(EAV,U,2),1:$PIECE(EAV,U,5))
PQ QUIT $GET(RSLT)