EASEZP6U ;ALB/AMA,LBD - Print utility for 10-10EZ, Version 6 or greater; 10/23/00 ; 9/19/12 11:40am
;;1.0;ENROLLMENT APPLICATION SYSTEM;**51,60,57,70,107**;Mar 15, 2001;Build 32
;
Q
;Parts of this routine were copied from EASEZPU (the other parts are
;in EASEZPU2); if the version # of the 1010EZ application is 6.0 or
;greater, then this routine will be executed.
;
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
; EASTR - Temporary String data variable
; EAX,EAY - Temporary data variables
; EACT - Temporary city variable
;
N ZDATA,EZDATA,EASTR,EAX,EAY,EACT
;
S ZDATA=$NA(^TMP("EASEZ",$J,1))
S EZDATA=$NA(^TMP("EZTEMP",$J,"I",1))
K @ZDATA
;
;Type Of Benefits Applied For
S EASTR="" F EAX="1A.1","1A.2","1A.3","1A.4","1A.5" D
. I $$PROCESS(EAX)="UNKNOWN" S EASTR="UNKNOWN, ",EAX="1A.5" Q
. I $$PROCESS(EAX)="YES" S EASTR=EASTR_$$BENEFIT(EAX)_", "
S @ZDATA@("1A")=$E(EASTR,1,($L(EASTR)-2)) ;remove last comma & space
;
S @ZDATA@("1B")=$$PROCESS("1B.") ;Which facility?
S @ZDATA@(2)=$$PROCESS(2.1) ;Vet's name
S @ZDATA@(3)=$E($$PROCESS("3."),1,35) ;Other names used
S EAX=$E($$PROCESS("3A."),1,30) ;Mother's maiden name
I $E(EAX,$L(EAX))="," S EAX=$E(EAX,1,$L(EAX)-1)
S @ZDATA@("3A")=EAX
S @ZDATA@(4)=$$PROCESS("4.") ;Gender
;
S EAX=$$PROCESS("4A.") ;Are You Spanish, Hispanic, or Latino?
;EAS*1.0*57 - print full word "UNKNOWN"
S @ZDATA@("4A")=$S($E(EAX)="Y"!($E(EAX,1,3)="YES"):"YES",$E(EAX)="N"!($E(EAX,1,3)="NO"):"NO",$E(EAX,1,7)="UNKNOWN":"UNKNOWN",1:"")
;
F EAX="4B","4C","4D","4E","4F","4G" D ;Race
. I $E($$PROCESS(EAX_"."),1,3)="YES" S @ZDATA@(EAX)=" X " I 1
. E S @ZDATA@(EAX)="___"
;
S @ZDATA@(5)=$$PROCESS("5.") ;SSN
S @ZDATA@(6)=$$PROCESS("6.") ;Claim number
S @ZDATA@(7)=$$PROCESS("7.") ;Date of birth
S @ZDATA@(8)=$$PROCESS("8.") ;Religion
S EAX=$$PROCESS("8A."),EAY=$$PROCESS("8B.") ;Birth place city & state
I (EAX]""),(EAY]"") S @ZDATA@("8A")=EAX_", "_EAY
E S @ZDATA@("8A")=$S(EAX]"":EAX,EAY]"":EAY,1:"")
S @ZDATA@("9A")=$E($$PROCESS("9A."),1,35) ;Address
S @ZDATA@("9B")=$E($$PROCESS("9B."),1,32) ;City
S @ZDATA@("9C")=$$PROCESS("9C.") ;State
S @ZDATA@("9D")=$$PROCESS("9D.") ;Zip
S @ZDATA@("9E")=$$PROCESS("9E.") ;County
S @ZDATA@("9F")=$$PROCESS("9F.") ;Province - EAS*1.0*70
S @ZDATA@("9G")=$$PROCESS("9G.") ;Postal Code - EAS*1.0*70
S @ZDATA@("9H")=$$PROCESS("9H.") ;Country - EAS*1.0*70
S @ZDATA@(10)=$$PROCESS("10.1") ;Home phone
S @ZDATA@(11)=$$PROCESS("11.1") ;Work phone
S @ZDATA@("11A")=$$PROCESS("11A.") ;E-mail
S @ZDATA@("11B")=$$PROCESS("11B.") ;Want an appt?
S @ZDATA@("11C")=$$PROCESS("11C.") ;Been seen before?
S @ZDATA@("11D")=$$PROCESS("11D.") ;Location seen before
;
;EAS*1.0*60 -- add cell phone and pager
S @ZDATA@("11G")=$$PROCESS("11A1.") ;Cell phone number
S @ZDATA@("11H")=$$PROCESS("11A3.") ;Pager number
;
S @ZDATA@(12)=$$PROCESS("12.") ;Marital status
S @ZDATA@("13A")=$$PROCESS("13A.") ;Last branch of service
S @ZDATA@("13B")=$$PROCESS("13B.") ;Last entry date
S @ZDATA@("13C")=$$PROCESS("13C.") ;Last discharge date
S @ZDATA@("13D")=$$PROCESS("13D.") ;Discharge type
S @ZDATA@("13E")=$$PROCESS("13E.") ;Military service number
;
F EAX="14A1","14A2","14B","14B2","14D3","14D4","14E","14F","14G","14G1","14I","14J","14K","14L" D
. S EAY=$$PROCESS(EAX_".")
. ;EAS*1.0*57 - no room on form here to print full word "UNKNOWN"
. S @ZDATA@(EAX)=$S(EAY="Y"!(EAY="YES"):"YES",EAY="N"!(EAY="NO"):"NO",EAY="UNKNOWN":"UNK",1:"")
;
S @ZDATA@("14B1")=$$PROCESS("14B1.") ;Rated percentage
S @ZDATA@("14K1")=$$PROCESS("14K1.") ;Medicare Part A effective date
S @ZDATA@("14L1")=$$PROCESS("14L1.") ;Medicare Part B effective date
S @ZDATA@("14M")=$$PROCESS("14M.") ;Medicare claim number
S @ZDATA@("14N")=$$PROCESS("14N.") ;Name on Medicare card
;Vet's employment status^Date of retirement
S @ZDATA@("15A")=$$PROCESS("15A.1")_U_$$PROCESS("15A.2")
;
S EAX=$E($$PROCESS("15B.1"),1,30) ;Company's name
S EACT="",EACT=$E($$PROCESS("15B.3"),1,30) ;Company's city
I EACT]"" S EACT=EACT_", " ;if there's a city, add comma & space
;Company's name^Street^City, State Zip^Phone
S EAX=EAX_U_$E($$PROCESS("15B.2"),1,30)_U_EACT_$$PROCESS("15B.4")_" "_$E($$PROCESS("15B.5"),1,10)_U_$$PROCESS("15B.6")
S @ZDATA@("15B")=EAX
;
;Spouse's employment status^Date of retirement
S @ZDATA@("16A")=$$PROCESS("16A.1")_U_$$PROCESS("16A.2")
;
S EAX=$E($$PROCESS("16B.1"),1,30) ;Spouse's company's name
S EACT="",EACT=$E($$PROCESS("16B.3"),1,30) ;Spouse's company's city
I EACT]"" S EACT=EACT_", " ;if there's a city, add comma & space
;Spouse's company's name^Street^City, State Zip^Phone
S EAX=EAX_U_$E($$PROCESS("16B.2"),1,30)_U_EACT_$$PROCESS("16B.4")_" "_$E($$PROCESS("16B.5"),1,10)_U_$$PROCESS("16B.6")
S @ZDATA@("16B")=EAX
;
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)
;
BENEFIT(X) ; Return External format of benefit applied for
;
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[HEASEZP6U 6328 printed Oct 16, 2024@17:55:35 Page 2
EASEZP6U ;ALB/AMA,LBD - Print utility for 10-10EZ, Version 6 or greater; 10/23/00 ; 9/19/12 11:40am
+1 ;;1.0;ENROLLMENT APPLICATION SYSTEM;**51,60,57,70,107**;Mar 15, 2001;Build 32
+2 ;
+3 QUIT
+4 ;Parts of this routine were copied from EASEZPU (the other parts are
+5 ;in EASEZPU2); if the version # of the 1010EZ application is 6.0 or
+6 ;greater, then this routine will be executed.
+7 ;
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 ; EASTR - Temporary String data variable
+12 ; EAX,EAY - Temporary data variables
+13 ; EACT - Temporary city variable
+14 ;
+15 NEW ZDATA,EZDATA,EASTR,EAX,EAY,EACT
+16 ;
+17 SET ZDATA=$NAME(^TMP("EASEZ",$JOB,1))
+18 SET EZDATA=$NAME(^TMP("EZTEMP",$JOB,"I",1))
+19 KILL @ZDATA
+20 ;
+21 ;Type Of Benefits Applied For
+22 SET EASTR=""
FOR EAX="1A.1","1A.2","1A.3","1A.4","1A.5"
Begin DoDot:1
+23 IF $$PROCESS(EAX)="UNKNOWN"
SET EASTR="UNKNOWN, "
SET EAX="1A.5"
QUIT
+24 IF $$PROCESS(EAX)="YES"
SET EASTR=EASTR_$$BENEFIT(EAX)_", "
End DoDot:1
+25 ;remove last comma & space
SET @ZDATA@("1A")=$EXTRACT(EASTR,1,($LENGTH(EASTR)-2))
+26 ;
+27 ;Which facility?
SET @ZDATA@("1B")=$$PROCESS("1B.")
+28 ;Vet's name
SET @ZDATA@(2)=$$PROCESS(2.1)
+29 ;Other names used
SET @ZDATA@(3)=$EXTRACT($$PROCESS("3."),1,35)
+30 ;Mother's maiden name
SET EAX=$EXTRACT($$PROCESS("3A."),1,30)
+31 IF $EXTRACT(EAX,$LENGTH(EAX))=","
SET EAX=$EXTRACT(EAX,1,$LENGTH(EAX)-1)
+32 SET @ZDATA@("3A")=EAX
+33 ;Gender
SET @ZDATA@(4)=$$PROCESS("4.")
+34 ;
+35 ;Are You Spanish, Hispanic, or Latino?
SET EAX=$$PROCESS("4A.")
+36 ;EAS*1.0*57 - print full word "UNKNOWN"
+37 SET @ZDATA@("4A")=$SELECT($EXTRACT(EAX)="Y"!($EXTRACT(EAX,1,3)="YES"):"YES",$EXTRACT(EAX)="N"!($EXTRACT(EAX,1,3)="NO"):"NO",$EXTRACT(EAX,1,7)="UNKNOWN":"UNKNOWN",1:"")
+38 ;
+39 ;Race
FOR EAX="4B","4C","4D","4E","4F","4G"
Begin DoDot:1
+40 IF $EXTRACT($$PROCESS(EAX_"."),1,3)="YES"
SET @ZDATA@(EAX)=" X "
IF 1
+41 IF '$TEST
SET @ZDATA@(EAX)="___"
End DoDot:1
+42 ;
+43 ;SSN
SET @ZDATA@(5)=$$PROCESS("5.")
+44 ;Claim number
SET @ZDATA@(6)=$$PROCESS("6.")
+45 ;Date of birth
SET @ZDATA@(7)=$$PROCESS("7.")
+46 ;Religion
SET @ZDATA@(8)=$$PROCESS("8.")
+47 ;Birth place city & state
SET EAX=$$PROCESS("8A.")
SET EAY=$$PROCESS("8B.")
+48 IF (EAX]"")
IF (EAY]"")
SET @ZDATA@("8A")=EAX_", "_EAY
+49 IF '$TEST
SET @ZDATA@("8A")=$SELECT(EAX]"":EAX,EAY]"":EAY,1:"")
+50 ;Address
SET @ZDATA@("9A")=$EXTRACT($$PROCESS("9A."),1,35)
+51 ;City
SET @ZDATA@("9B")=$EXTRACT($$PROCESS("9B."),1,32)
+52 ;State
SET @ZDATA@("9C")=$$PROCESS("9C.")
+53 ;Zip
SET @ZDATA@("9D")=$$PROCESS("9D.")
+54 ;County
SET @ZDATA@("9E")=$$PROCESS("9E.")
+55 ;Province - EAS*1.0*70
SET @ZDATA@("9F")=$$PROCESS("9F.")
+56 ;Postal Code - EAS*1.0*70
SET @ZDATA@("9G")=$$PROCESS("9G.")
+57 ;Country - EAS*1.0*70
SET @ZDATA@("9H")=$$PROCESS("9H.")
+58 ;Home phone
SET @ZDATA@(10)=$$PROCESS("10.1")
+59 ;Work phone
SET @ZDATA@(11)=$$PROCESS("11.1")
+60 ;E-mail
SET @ZDATA@("11A")=$$PROCESS("11A.")
+61 ;Want an appt?
SET @ZDATA@("11B")=$$PROCESS("11B.")
+62 ;Been seen before?
SET @ZDATA@("11C")=$$PROCESS("11C.")
+63 ;Location seen before
SET @ZDATA@("11D")=$$PROCESS("11D.")
+64 ;
+65 ;EAS*1.0*60 -- add cell phone and pager
+66 ;Cell phone number
SET @ZDATA@("11G")=$$PROCESS("11A1.")
+67 ;Pager number
SET @ZDATA@("11H")=$$PROCESS("11A3.")
+68 ;
+69 ;Marital status
SET @ZDATA@(12)=$$PROCESS("12.")
+70 ;Last branch of service
SET @ZDATA@("13A")=$$PROCESS("13A.")
+71 ;Last entry date
SET @ZDATA@("13B")=$$PROCESS("13B.")
+72 ;Last discharge date
SET @ZDATA@("13C")=$$PROCESS("13C.")
+73 ;Discharge type
SET @ZDATA@("13D")=$$PROCESS("13D.")
+74 ;Military service number
SET @ZDATA@("13E")=$$PROCESS("13E.")
+75 ;
+76 FOR EAX="14A1","14A2","14B","14B2","14D3","14D4","14E","14F","14G","14G1","14I","14J","14K","14L"
Begin DoDot:1
+77 SET EAY=$$PROCESS(EAX_".")
+78 ;EAS*1.0*57 - no room on form here to print full word "UNKNOWN"
+79 SET @ZDATA@(EAX)=$SELECT(EAY="Y"!(EAY="YES"):"YES",EAY="N"!(EAY="NO"):"NO",EAY="UNKNOWN":"UNK",1:"")
End DoDot:1
+80 ;
+81 ;Rated percentage
SET @ZDATA@("14B1")=$$PROCESS("14B1.")
+82 ;Medicare Part A effective date
SET @ZDATA@("14K1")=$$PROCESS("14K1.")
+83 ;Medicare Part B effective date
SET @ZDATA@("14L1")=$$PROCESS("14L1.")
+84 ;Medicare claim number
SET @ZDATA@("14M")=$$PROCESS("14M.")
+85 ;Name on Medicare card
SET @ZDATA@("14N")=$$PROCESS("14N.")
+86 ;Vet's employment status^Date of retirement
+87 SET @ZDATA@("15A")=$$PROCESS("15A.1")_U_$$PROCESS("15A.2")
+88 ;
+89 ;Company's name
SET EAX=$EXTRACT($$PROCESS("15B.1"),1,30)
+90 ;Company's city
SET EACT=""
SET EACT=$EXTRACT($$PROCESS("15B.3"),1,30)
+91 ;if there's a city, add comma & space
IF EACT]""
SET EACT=EACT_", "
+92 ;Company's name^Street^City, State Zip^Phone
+93 SET EAX=EAX_U_$EXTRACT($$PROCESS("15B.2"),1,30)_U_EACT_$$PROCESS("15B.4")_" "_$EXTRACT($$PROCESS("15B.5"),1,10)_U_$$PROCESS("15B.6")
+94 SET @ZDATA@("15B")=EAX
+95 ;
+96 ;Spouse's employment status^Date of retirement
+97 SET @ZDATA@("16A")=$$PROCESS("16A.1")_U_$$PROCESS("16A.2")
+98 ;
+99 ;Spouse's company's name
SET EAX=$EXTRACT($$PROCESS("16B.1"),1,30)
+100 ;Spouse's company's city
SET EACT=""
SET EACT=$EXTRACT($$PROCESS("16B.3"),1,30)
+101 ;if there's a city, add comma & space
IF EACT]""
SET EACT=EACT_", "
+102 ;Spouse's company's name^Street^City, State Zip^Phone
+103 SET EAX=EAX_U_$EXTRACT($$PROCESS("16B.2"),1,30)_U_EACT_$$PROCESS("16B.4")_" "_$EXTRACT($$PROCESS("16B.5"),1,10)_U_$$PROCESS("16B.6")
+104 SET @ZDATA@("16B")=EAX
+105 ;
+106 QUIT
+107 ;
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)
+1 ;
BENEFIT(X) ; Return External format of benefit applied for
+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:"")