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

EASEZL1.m

Go to the documentation of this file.
EASEZL1 ;ALB/jap - 1010EZ List Manager Processing Screens (cont.) ;10/12/00  13:07
 ;;1.0;ENROLLMENT APPLICATION SYSTEM;;Mar 15, 2001
 ;
EN ;Entry point to build list area for EAS EZ Applications processing
 ;
 D EN^VALM("EAS EZ 1010EZ INITIAL SCREEN")
 Q
 ;
EXPND ;
 N V
 K EASDFN,EASEZNEW,EASAPP,EASLOCK,EASLN
 K ^TMP("EASEXP",$J)
 S EASARY="EASEXP"
 S VALMBCK=""
 D SEL^EASEZLM
 Q:$G(EASERR)
 Q:'$G(EASSEL)
 S EASAPP=$O(^TMP("EASEZ",$J,"IDX",EASSEL,0))
 S EASLOCK=1 L +^EAS(712,EASAPP,0):5 I '$T S EASLOCK=0
 I 'EASLOCK D  Q
 .W !,"Another user is processing that Application... try later.",!
 .D PAUSE^VALM1
 .S VALMBCK="R"
 S V=EASVIEW,EASPSTAT=$S(V=1:"NEW",V=2:"REV",V=3:"PRT",V=4:"SIG",V=5:"FIL",V=6:"CLS",1:"")
 I EASVIEW=1 W ! D WAIT^DICD,EN^VALM("EAS EZ 1010EZ REVIEW1")
 I EASVIEW=2 W ! D WAIT^DICD,EN^VALM("EAS EZ 1010EZ REVIEW2")
 I EASVIEW=3 W ! D WAIT^DICD,EN^VALM("EAS EZ 1010EZ REVIEW3")
 I EASVIEW=4 W ! D WAIT^DICD,EN^VALM("EAS EZ 1010EZ REVIEW4")
 I EASVIEW=5 W ! D WAIT^DICD,EN^VALM("EAS EZ 1010EZ REVIEW5")
 I EASVIEW=6 W ! D WAIT^DICD,EN^VALM("EAS EZ 1010EZ REVIEW6")
 ;revision of 01/09/01 -- 'filed' separated from 'signed' so
 ; EASVIEW=4 --> signed
 ; EASVIEW=5 --> filed
 ; EASVIEW=6 --> closed/inactivated
 Q
 ;
INIT2 ;
 ;generate ^TMP("EZDISP",$J, in order to build display
 S EASDFN=+$P(^EAS(712,EASAPP,0),U,10)
 D EN^EASEZC1(EASAPP,EASDFN)
 D HDR2
 D BLD2
 I '$G(VALMCNT) D NOLINES^EASEZLM
 Q
 ;
HDR2 ;
 N H,V,X,XX,SEL,FAC,JNAME,EDATE,WEBID,WILLSEND
 S SEL=^TMP("EASEZIDX",$J,EASAPP)
 S JNAME=$P(SEL,U,1),EDATE=$P(SEL,U,2),WEBID=$P(SEL,U,3),WILLSEND=$P(SEL,U,4),FAC=$P(SEL,U,5)
 S WILLSEND=$S(WILLSEND:"YES",1:"NO")
 S V=EASPSTAT
 S H=$S(V="NEW":"NEW",V="REV":"IN REVIEW",V="PRT":"PRINTED,PENDING SIG.",V="SIG":"SIGNED",V="FIL":"FILED",V="CLS":"INACTIVATED",1:"")
 I H="FILED",$P($G(^EAS(712,EASAPP,2)),U,11)'="" S H="Still filing..."
 S X="Application #:",X=$$SETSTR^VALM1(X,"",1,14)
 S X=$$SETSTR^VALM1(EASAPP,X,16,6)
 S FAC="("_FAC_")",X=$$SETSTR^VALM1(FAC,X,27,8)
 S XX="Status:",X=$$SETSTR^VALM1(XX,X,46,12)
 S X=$$SETSTR^VALM1(H,X,59,21)
 S VALMHDR(1)=X
 S X="Applicant:",X=$$SETSTR^VALM1(X,"",1,14)
 S X=$$SETSTR^VALM1(JNAME,X,16,28)
 S XX="Date Rec'd:",X=$$SETSTR^VALM1(XX,X,46,12)
 S X=$$SETSTR^VALM1(EDATE,X,59,21)
 S VALMHDR(2)=X
 S X="Web ID #:",X=$$SETSTR^VALM1(X,"",1,14)
 S X=$$SETSTR^VALM1(WEBID,X,16,28)
 S XX="Vet Sending Signed Form?: "_WILLSEND,X=$$SETSTR^VALM1(XX,X,46,30)
 S VALMHDR(3)=X
 Q
 ;
BLD2 ;
 N S,C,IT,JJ,ACCEPT,MULTIPLE,OLDM,QUES,Q1,QX,KEYIEN,DISPNM,EZDATA,PTDATA,X,FARRAY,WARRAY,WOUT,DA,DR,DIC,DIQ,X,Y
 D CLEAR^VALM1
 K ^TMP("EASEXPSRT",$J),^TMP("EASEXPIDX",$J)
 S VALMBG=1,VALMCNT=0
 S IT="" F  S IT=$O(VALMDDF(IT)) Q:IT=""  S X=VALMDDF(IT),EASCOL(IT)=$P(X,U,2),EASWID(IT)=$P(X,U,3)
 S EASLN=0,EASNUM=0
 ;build ^TMP("EASEXP", array which creates screen listing
 S S="" F  S S=$O(^TMP("EZDISP",$J,S)) Q:S=""  D
 .S MULTIPLE=0 F  S MULTIPLE=$O(^TMP("EZDISP",$J,S,MULTIPLE)) Q:'MULTIPLE  D
 ..S Q1="" F  S Q1=$O(^TMP("EZDISP",$J,S,MULTIPLE,Q1)) Q:Q1=""  S QX="" F  S QX=$O(^TMP("EZDISP",$J,S,MULTIPLE,Q1,QX)) Q:QX=""  D
 ...S X=^TMP("EZDISP",$J,S,MULTIPLE,Q1,QX)
 ...S KEYIEN=$P(X,U,1),EZDATA=$P(X,U,2),ACCEPT=$P(X,U,3),SUBIEN=$P(X,U,4),PTDATA=$P(X,U,5),DISPNM=$P(X,U,6)
 ...S EASLN=EASLN+1,EASNUM=EASNUM+1
 ...S X=$$SETSTR^VALM1(EASLN,"",EASCOL("NUMBER"),EASWID("NUMBER"))
 ...S X=$$SETSTR^VALM1(DISPNM,X,EASCOL("DATA ITEM"),EASWID("DATA ITEM"))
 ...;S X=$$SETSTR^VALM1(ACCEPT,X,EASCOL("ACCEPT"),EASWID("ACCEPT"))
 ...S X=$$SETSTR^VALM1(EZDATA,X,EASCOL("EZDATA"),EASWID("EZDATA"))
 ...S X=$$SETSTR^VALM1(PTDATA,X,EASCOL("PTDATA"),EASWID("PTDATA"))
 ...D SET^VALM10(EASLN,X)
 ...I ACCEPT>0 D FLDCTRL^VALM10(EASLN,"EZDATA",IORVON,IORVOFF)
 ...S ^TMP("EASEXP",$J,"IDX",EASLN)=SUBIEN_U_MULTIPLE_U_KEYIEN
 ;add info from Section of 1010EZ
 K FARRAY
 S DA=EASAPP,DIC="^EAS(712,",DR="4.3;4.4;12",DIQ="FARRAY",DIQ(0)="E"
 D EN^DIQ1
 S DR=13,DIQ="WARRAY"
 D EN^DIQ1
 ;
 S EASLN=EASLN+1
 S X=$$SETSTR^VALM1("  ","",1,2) D SET^VALM10(EASLN,X)
 S EASLN=EASLN+1
 S X=$$SETSTR^VALM1("  ","",1,2) D SET^VALM10(EASLN,X)
 S EASLN=EASLN+1
 S X=$$SETSTR^VALM1("Appointment Requested: ","",1,24),X=$$SETSTR^VALM1($G(FARRAY(712,EASAPP,4.4,"E")),X,25,30)
 D SET^VALM10(EASLN,X)
 ;
 S EASLN=EASLN+1
 S X=$$SETSTR^VALM1("  ","",1,2) D SET^VALM10(EASLN,X)
 S EASLN=EASLN+1
 S X=$$SETSTR^VALM1("Services Requested: ","",1,24) D SET^VALM10(EASLN,X)
 S EASLN=EASLN+1
 S X=$$SETSTR^VALM1($G(FARRAY(712,EASAPP,12,"E")),"",3,78) D SET^VALM10(EASLN,X)
 ;
 S EASLN=EASLN+1
 S X=$$SETSTR^VALM1("  ","",1,2) D SET^VALM10(EASLN,X)
 S EASLN=EASLN+1
 S X=$$SETSTR^VALM1("Comments: ","",1,12) D SET^VALM10(EASLN,X)
 I $D(WARRAY)>1 S WOUT=0,JJ=0 F  D  Q:WOUT
 .S JJ=JJ+1,C=$G(WARRAY(712,EASAPP,13,JJ))
 .I C="" S WOUT=1 Q
 .S EASLN=EASLN+1
 .S X=$$SETSTR^VALM1(C,"",3,78) D SET^VALM10(EASLN,X)
 ;
 S EASLN=EASLN+1
 S X=$$SETSTR^VALM1("  ","",1,2) D SET^VALM10(EASLN,X)
 S EASLN=EASLN+1
 S X=$$SETSTR^VALM1("E-mail: ","",1,9),X=$$SETSTR^VALM1($G(FARRAY(712,EASAPP,4.3,"E")),X,10,60)
 D SET^VALM10(EASLN,X)
 ;
 S VALMCNT=EASLN,$P(^TMP("EASEXP",$J,0),U,4)=VALMCNT
 Q
 ;
EXIT2 ;
 D CLEAN^VALM10
 L -^EAS(712,EASAPP,0)
 K ^TMP("EASEXP",$J),^TMP("EASEZPSRT",$J),^TMP("EASEZPIDX",$J)
 K ^TMP("EZDATA",$J),^TMP("EZINDEX",$J),^TMP("EZTEMP",$J),^TMP("EZDISP",$J)
 Q