Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: EASEZPU3

EASEZPU3.m

Go to the documentation of this file.
  1. 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
  1. ;
  1. Q
  1. ;Split from EASEZP6U
  1. ;
  1. 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
  1. ;10-10EZ form. If the holding file entry has not been accepted, and
  1. ;a vista entry is available, the vista entry is printed.
  1. ; Called from EN^EASEZP6F
  1. ;
  1. ;The ^TMP("EZTEMP") global is built in SETUP^EASEZP6F and
  1. ;remains until the printed form is complete.
  1. ; Variables
  1. ; ZDATA - references TMP global for output data
  1. ; EZDATA - references available data from 1010EZ holding file
  1. ; EAX - Temporary data variables
  1. ; EACT - Temporary city variable
  1. ;
  1. N ZDATA,EZDATA,EAX,EACT
  1. ;
  1. S ZDATA=$NA(^TMP("EASEZ",$J,1))
  1. S EZDATA=$NA(^TMP("EZTEMP",$J,"I",1))
  1. ;
  1. S EAX=$$PROCESS("17.") ;Covered by health insurance?
  1. ;EAS*1.0*57 - print full word "UNKNOWN"
  1. S @ZDATA@(17)=$S(EAX="Y"!(EAX="YES"):"YES",EAX="N"!(EAX="NO"):"NO",EAX="UNKNOWN":"UNKNOWN",1:"")
  1. ;
  1. S @ZDATA@("17A")=$$PROCESS("17A.") ;Insurance company's name
  1. S @ZDATA@("17B")=$E($$PROCESS("17B."),1,30) ;Name of policy holder
  1. S @ZDATA@("17C")=$$PROCESS("17C.") ;Policy number
  1. S @ZDATA@("17D")=$$PROCESS("17D.") ;Group code
  1. ;
  1. S @ZDATA@("17E")=$$PROCESS("17E.") ;Insurance company's street
  1. S @ZDATA@("17F")=$$PROCESS("17F.") ;Insurance company's city
  1. S @ZDATA@("17G")=$$PROCESS("17G.") ;Insurance company's state
  1. S @ZDATA@("17H")=$$PROCESS("17H.") ;Insurance company's zip
  1. S @ZDATA@("17J")=$$PROCESS("17J.") ;Insurance company's phone (Changed KEY to 17J - EAS*1*107)
  1. ;
  1. S EACT="",EACT=$E($$PROCESS("19A.4"),1,30) ;Next-of-kin's city
  1. I EACT]"" S EACT=EACT_", " ;if there's a city, add comma & space
  1. ;Next-of-kin's name^street^city, state zip^relationship
  1. 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")
  1. S @ZDATA@("19B")=$$PROCESS("19B.1") ;Next-of-kin's home phone
  1. S @ZDATA@("19C")=$$PROCESS("19C.1") ;Next-of-kin's work phone
  1. ;
  1. S EACT="",EACT=$E($$PROCESS("20A.4"),1,30) ;Emergency contact's city
  1. I EACT]"" S EACT=EACT_", " ;if there's a city, add comma & space
  1. ;Emergency contact's name^street^city, state zip^relationship
  1. 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")
  1. S @ZDATA@("20B")=$$PROCESS("20B.1") ;EC's home phone
  1. S @ZDATA@("20C")=$$PROCESS("20C.1") ;EC's work phone
  1. ;
  1. S @ZDATA@("21")=$$PROCESS("21.") ;Who receives property?
  1. S EAX=$$PROCESS("22A.") ;On-the-job injury?
  1. ;EAS*1.0*57 - print full word "UNKNOWN"
  1. S @ZDATA@("22A")=$S(EAX="Y"!(EAX="YES"):"YES",EAX="N"!(EAX="NO"):"NO",(EAX="UNKNOWN"):"UNKNOWN",1:"")
  1. ;
  1. S EAX=$$PROCESS("22B.") ;Accident?
  1. ;EAS*1.0*57 - print full word "UNKNOWN"
  1. S @ZDATA@("22B")=$S(EAX="Y"!(EAX="YES"):"YES",EAX="N"!(EAX="NO"):"NO",(EAX="UNKNOWN"):"UNKNOWN",1:"")
  1. Q
  1. ;
  1. PAGEI(EAINS) ; Additional Insurance pages
  1. ; Called from EN^EASEZP6F
  1. N ZDATA,EZDATA,EACT
  1. ;
  1. S ZDATA=$NA(^TMP("EASEZ",$J,"I",EAINS))
  1. K @ZDATA
  1. ;
  1. ; Process Section IA
  1. S EZDATA=$NA(^TMP("EZTEMP",$J,"IA",EAINS))
  1. ;
  1. S @ZDATA@("17A")=$$PROCESS("17A.") ;Insurance company's name
  1. S @ZDATA@("17B")=$E($$PROCESS("17B."),1,30) ;Name of policy holder
  1. S @ZDATA@("17C")=$$PROCESS("17C.") ;Policy number
  1. S @ZDATA@("17D")=$$PROCESS("17D.") ;Group code
  1. S @ZDATA@("17E")=$$PROCESS("17E.") ;Insurance company's street
  1. S @ZDATA@("17F")=$$PROCESS("17F.") ;Insurance company's city
  1. S @ZDATA@("17G")=$$PROCESS("17G.") ;Insurance company's state
  1. S @ZDATA@("17H")=$$PROCESS("17H.") ;Insurance company's zip
  1. S @ZDATA@("17J")=$$PROCESS("17J.") ;Insurance company's phone
  1. Q
  1. ;
  1. PAGEN(EADEP) ; Additional dependent page(s)
  1. ; Called from EN^EASEZP6F
  1. N ZDATA,EZDATA,EAX
  1. ;
  1. S ZDATA=$NA(^TMP("EASEZ",$J,"D",EADEP))
  1. K @ZDATA
  1. ;
  1. ; Process Section IIB
  1. S EZDATA=$NA(^TMP("EZTEMP",$J,"IIB",EADEP))
  1. ;
  1. S @ZDATA@(2)=$$PROCESS(1.1) ;Child's name
  1. S @ZDATA@(5)=$$PROCESS("3.") ;Date of birth
  1. S @ZDATA@(7)=$$PROCESS("2.") ;SSN
  1. S @ZDATA@(9)=$$PROCESS("4.") ;Relationship
  1. S @ZDATA@(11)=$$PROCESS("5.") ;Date of dependency
  1. ;Amount contributed
  1. S EAX=$$PROCESS("6."),@ZDATA@(12)=U_$S(EAX="":"",1:$J(EAX,0,2))
  1. ;Education expenses
  1. S EAX=$$PROCESS("7."),@ZDATA@(13)=$S(EAX="":"",1:$J(EAX,0,2))
  1. ;
  1. S EAX=$$PROCESS("8.") ;Permanently disabled?
  1. ;EAS*1.0*57 - print full word "UNKNOWN"
  1. S @ZDATA@(14)=$S(EAX="Y"!(EAX="YES"):"YES",EAX="N"!(EAX="NO"):"NO",EAX="UNKNOWN":"UNKNOWN",1:"")
  1. S EAX=$$PROCESS("9.") ;School last year?
  1. ;EAS*1.0*57 - print full word "UNKNOWN"
  1. S @ZDATA@(15)=$S(EAX="Y"!(EAX="YES"):"YES",EAX="N"!(EAX="NO"):"NO",EAX="UNKNOWN":"UNKNOWN",1:"")
  1. ;
  1. Q
  1. ;
  1. PROCESS(KEY) ; Process data value from ^TMP("EZTEMP" array
  1. ;format = IEN ^ EAS DATA ^ ACCEPT VALUE ^ 712 SUBIEN ^ VISTA DATA
  1. ;Take #712 value from 2nd piece, if it's accepted;
  1. ;otherwise, take the Patient File value from the 5th piece
  1. ;
  1. N EAV,RSLT
  1. ;
  1. I '$D(@EZDATA@(KEY)) G PQ
  1. S EAV=@EZDATA@(KEY)
  1. S RSLT=$S(+$P(EAV,U,3):$P(EAV,U,2),1:$P(EAV,U,5))
  1. PQ Q $G(RSLT)