EASEZU4 ;ALB/jap - Utilities for 1010EZ Processing ;10/25/00 08:08
;;1.0;ENROLLMENT APPLICATION SYSTEM;**51,70**;Mar 15, 2001;Build 26
;
PRT1010 ;print 10-10EZ form with data
;
N TASK,REVDATE,PRTDATE,ACTION,DIR
S ACTION="'Print 10-10EZ'"
;no action if closed
I EASPSTAT="CLS" D NOACT^EASEZLM("Inactivated",ACTION) Q
;don't print if not at least reviewed
S REVDATE=$P($G(^EAS(712,EASAPP,2)),U,1)
I 'REVDATE D NOACT^EASEZLM("Unreviewed",ACTION) Q
;just in case
I EASPSTAT="NEW" D NOACT^EASEZLM("New",ACTION) Q
;call to Steve's routine to print 10-10EZ
D FULL^VALM1
S TASK=$$QUE^EASEZPF(EASAPP,EASDFN)
;should return Task # if actually queued to print
;if printed, update processing status if necessary; can be printed multiple times
S PRTDATE=$P(^EAS(712,EASAPP,2),U,3)
I 'PRTDATE,$G(TASK) D
. D SETDATE^EASEZU2(EASAPP,"PRT") S EASPSTAT="PRT"
. ;rebuild selection list since this application is removed from list
. D BLD^EASEZLM,HDR2^EASEZL1
S VALMBCK="R"
D PAUSE^VALM1
Q
;
VERSIG ;verify Applicant signature on 10-10EZ
;
N REVDATE,ACTION,DIR
S ACTION="'Verify Signature'"
;no action if closed
I EASPSTAT="CLS" D NOACT^EASEZLM("Inactivated",ACTION) Q
;can't verify sig if not at least reviewed
S REVDATE=$P($G(^EAS(712,EASAPP,2)),U,1)
I 'REVDATE D NOACT^EASEZLM("Unreviewed",ACTION) Q
;can't sign if already done
I EASPSTAT="SIG" D NOACT^EASEZLM("Previously Signed",ACTION) Q
;just in case
I EASPSTAT="NEW" D NOACT^EASEZLM("New",ACTION) Q
I EASPSTAT="FIL" D NOACT^EASEZLM("Filed",ACTION) Q
;update processing status
D SETDATE^EASEZU2(EASAPP,"SIG")
S EASPSTAT="SIG"
W !,"Applicant signature is verified...",!
;rebuild selection list since this application is removed from list
D BLD^EASEZLM,HDR2^EASEZL1
S VALMBCK="Q"
D PAUSE^VALM1
Q
;
FILE ;file 10-10EZ 'accepted' data to VistA Patient database
;
N SIGDATE,ACTION,SAVE,ZTSK,STAT,DIR
S ACTION="'File 10-10EZ'"
;no action if closed
I EASPSTAT="CLS" D NOACT^EASEZLM("Inactivated",ACTION) Q
;must be signed before filing
S SIGDATE=$P($G(^EAS(712,EASAPP,1)),U,1)
I 'SIGDATE D NOACT^EASEZLM("Unsigned",ACTION) Q
;can't repeat filing
I EASPSTAT="FIL" D NOACT^EASEZLM("Previously Filed",ACTION) Q
S STAT=$$CURRSTAT^EASEZU2(EASAPP) I STAT="FIL" D NOACT^EASEZLM("Previously Filed",ACTION) Q
;just in case
I EASPSTAT="NEW" D NOACT^EASEZLM("New",ACTION) Q
I EASPSTAT="REV" D NOACT^EASEZLM("Unsigned",ACTION) Q
I EASPSTAT="PRT" D NOACT^EASEZLM("Unsigned",ACTION) Q
;
D FILE2
;rebuild selection list since this application is removed from list
S VALMBCK="R"
I $D(ZTSK) D
. D SETDATE^EASEZU2(EASAPP,"FIL")
. S EASPSTAT="FIL"
. S $P(^EAS(712,EASAPP,2),U,11)=ZTSK
. D BLD^EASEZLM S VALMBCK="Q"
Q
;
CLOSE ;close/inactivate the Application
;
N SIGDATE,FILDATE,ACTION
S ACTION="'Inactivate'"
;not allowed if signed or filed
S FILDATE=$P($G(^EAS(712,EASAPP,2)),U,5)
I FILDATE D NOACT^EASEZLM("Filed",ACTION) Q
S SIGDATE=$P($G(^EAS(712,EASAPP,1)),U,1)
I SIGDATE D NOACT^EASEZLM("Signed",ACTION) Q
;no action if already closed
I EASPSTAT="CLS" D NOACT^EASEZLM("Previously Inactivated",ACTION) Q
;clear accept flags and updates
D OKRESET^EASEZU3
;update processing status
D SETDATE^EASEZU2(EASAPP,"CLS")
S EASPSTAT="CLS"
W !,"Application has been closed/inactivated...",!
D PAUSE^VALM1
;rebuild selection list since this application is removed from list
D BLD^EASEZLM
S VALMBCK="Q"
Q
;
FILE2 ;
N VALMDDF,ZTSAVE,ZTDESC,ZTRTN,ZTIO
K ZTSAVE
S ZTDESC="Filing 10-10EZ Data (Appl. #"_EASAPP_") to VistA",ZTRTN="QUE^EASEZFM",ZTIO=""
S ZTSAVE("EASAPP")=""
D ^%ZTLOAD
I $D(ZTSK) D
. ;update processing status
. W !,"10-10EZ data is being filed as a background job."
. W !,"Task #: ",ZTSK,!
. K DIR D PAUSE^VALM1
Q
;
SUPPRESS(EASAPP,DATAKEY,TYPE,VERSION) ;alb/cmf/51
;EASAPP = file 712 ien
;DATAKEY = file 711/.1
;TYPE = 0:display[default], 1:file, 2:accept
;VERSION = version # of an application
;
;RETURN VALUE = 1 if node should not be displayed, filed, or accepted
; 0, otherwise
;
N FLAG,CHKKEY
Q:$G(EASAPP)="" 0
Q:$G(DATAKEY)="" 0
S:$G(VERSION)="" VERSION=$$VERSION(EASAPP)
Q:+VERSION<6 0
S FLAG=0
;EAS*1.0*70 -- added CHKKEY and up-arrows around datakeys below
S CHKKEY="^"_DATAKEY_"^"
S TYPE=$S($G(TYPE)=1:1,$G(TYPE)=2:2,1:0)
I TYPE=0 D Q FLAG
. I "^I;18A.^I;18B.^I;18C.^I;18D.^"[CHKKEY S FLAG=1 Q ;obs
. I "^IIC;1.1^IIC;1.2^IIC;1.3^"[CHKKEY S FLAG=1 Q ;obs
. I "^I;1A.5^IIC;3.^I;14D1.^"[CHKKEY S FLAG=1 Q ;obs
. I "^I;14C.^I;14D.^I;14D2.^I;14H.^"[CHKKEY S FLAG=1 Q ;obs
. I "^IIE;1.^IIE;2.^IIE;3.^"[CHKKEY S FLAG=1 Q ;print only
. ;EAS*1.0*70 - until added to the web form,
. ;only print and file APPLICANT COUNTRY
. I "^I;9H.^"[CHKKEY S FLAG=1 Q
. Q
I TYPE=1 D Q FLAG
. I "^I;14D.^I;14D1.^I;14D2.^"[CHKKEY S FLAG=1 Q ;obs
. I "^IIC;1.1^IIC;1.2^IIC;1.3^"[CHKKEY S FLAG=1 Q ;obs
. I "^IIE;1.^IIE;2.^IIE;3.^"[CHKKEY S FLAG=1 Q ;print only
. I "^IIC;1.6^IIC;2.3^IIC;3.3^"[CHKKEY S FLAG=1 Q ;disp only
. Q
;
Q FLAG
;
VERSION(EASAPP) ;alb/cmf/51
;return the version # of an application
Q:$G(EASAPP)="" -1
Q:'$D(^EAS(712,EASAPP)) -1
Q +$P(^EAS(712,EASAPP,0),U,12)
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HEASEZU4 5347 printed Oct 16, 2024@17:56:03 Page 2
EASEZU4 ;ALB/jap - Utilities for 1010EZ Processing ;10/25/00 08:08
+1 ;;1.0;ENROLLMENT APPLICATION SYSTEM;**51,70**;Mar 15, 2001;Build 26
+2 ;
PRT1010 ;print 10-10EZ form with data
+1 ;
+2 NEW TASK,REVDATE,PRTDATE,ACTION,DIR
+3 SET ACTION="'Print 10-10EZ'"
+4 ;no action if closed
+5 IF EASPSTAT="CLS"
DO NOACT^EASEZLM("Inactivated",ACTION)
QUIT
+6 ;don't print if not at least reviewed
+7 SET REVDATE=$PIECE($GET(^EAS(712,EASAPP,2)),U,1)
+8 IF 'REVDATE
DO NOACT^EASEZLM("Unreviewed",ACTION)
QUIT
+9 ;just in case
+10 IF EASPSTAT="NEW"
DO NOACT^EASEZLM("New",ACTION)
QUIT
+11 ;call to Steve's routine to print 10-10EZ
+12 DO FULL^VALM1
+13 SET TASK=$$QUE^EASEZPF(EASAPP,EASDFN)
+14 ;should return Task # if actually queued to print
+15 ;if printed, update processing status if necessary; can be printed multiple times
+16 SET PRTDATE=$PIECE(^EAS(712,EASAPP,2),U,3)
+17 IF 'PRTDATE
IF $GET(TASK)
Begin DoDot:1
+18 DO SETDATE^EASEZU2(EASAPP,"PRT")
SET EASPSTAT="PRT"
+19 ;rebuild selection list since this application is removed from list
+20 DO BLD^EASEZLM
DO HDR2^EASEZL1
End DoDot:1
+21 SET VALMBCK="R"
+22 DO PAUSE^VALM1
+23 QUIT
+24 ;
VERSIG ;verify Applicant signature on 10-10EZ
+1 ;
+2 NEW REVDATE,ACTION,DIR
+3 SET ACTION="'Verify Signature'"
+4 ;no action if closed
+5 IF EASPSTAT="CLS"
DO NOACT^EASEZLM("Inactivated",ACTION)
QUIT
+6 ;can't verify sig if not at least reviewed
+7 SET REVDATE=$PIECE($GET(^EAS(712,EASAPP,2)),U,1)
+8 IF 'REVDATE
DO NOACT^EASEZLM("Unreviewed",ACTION)
QUIT
+9 ;can't sign if already done
+10 IF EASPSTAT="SIG"
DO NOACT^EASEZLM("Previously Signed",ACTION)
QUIT
+11 ;just in case
+12 IF EASPSTAT="NEW"
DO NOACT^EASEZLM("New",ACTION)
QUIT
+13 IF EASPSTAT="FIL"
DO NOACT^EASEZLM("Filed",ACTION)
QUIT
+14 ;update processing status
+15 DO SETDATE^EASEZU2(EASAPP,"SIG")
+16 SET EASPSTAT="SIG"
+17 WRITE !,"Applicant signature is verified...",!
+18 ;rebuild selection list since this application is removed from list
+19 DO BLD^EASEZLM
DO HDR2^EASEZL1
+20 SET VALMBCK="Q"
+21 DO PAUSE^VALM1
+22 QUIT
+23 ;
FILE ;file 10-10EZ 'accepted' data to VistA Patient database
+1 ;
+2 NEW SIGDATE,ACTION,SAVE,ZTSK,STAT,DIR
+3 SET ACTION="'File 10-10EZ'"
+4 ;no action if closed
+5 IF EASPSTAT="CLS"
DO NOACT^EASEZLM("Inactivated",ACTION)
QUIT
+6 ;must be signed before filing
+7 SET SIGDATE=$PIECE($GET(^EAS(712,EASAPP,1)),U,1)
+8 IF 'SIGDATE
DO NOACT^EASEZLM("Unsigned",ACTION)
QUIT
+9 ;can't repeat filing
+10 IF EASPSTAT="FIL"
DO NOACT^EASEZLM("Previously Filed",ACTION)
QUIT
+11 SET STAT=$$CURRSTAT^EASEZU2(EASAPP)
IF STAT="FIL"
DO NOACT^EASEZLM("Previously Filed",ACTION)
QUIT
+12 ;just in case
+13 IF EASPSTAT="NEW"
DO NOACT^EASEZLM("New",ACTION)
QUIT
+14 IF EASPSTAT="REV"
DO NOACT^EASEZLM("Unsigned",ACTION)
QUIT
+15 IF EASPSTAT="PRT"
DO NOACT^EASEZLM("Unsigned",ACTION)
QUIT
+16 ;
+17 DO FILE2
+18 ;rebuild selection list since this application is removed from list
+19 SET VALMBCK="R"
+20 IF $DATA(ZTSK)
Begin DoDot:1
+21 DO SETDATE^EASEZU2(EASAPP,"FIL")
+22 SET EASPSTAT="FIL"
+23 SET $PIECE(^EAS(712,EASAPP,2),U,11)=ZTSK
+24 DO BLD^EASEZLM
SET VALMBCK="Q"
End DoDot:1
+25 QUIT
+26 ;
CLOSE ;close/inactivate the Application
+1 ;
+2 NEW SIGDATE,FILDATE,ACTION
+3 SET ACTION="'Inactivate'"
+4 ;not allowed if signed or filed
+5 SET FILDATE=$PIECE($GET(^EAS(712,EASAPP,2)),U,5)
+6 IF FILDATE
DO NOACT^EASEZLM("Filed",ACTION)
QUIT
+7 SET SIGDATE=$PIECE($GET(^EAS(712,EASAPP,1)),U,1)
+8 IF SIGDATE
DO NOACT^EASEZLM("Signed",ACTION)
QUIT
+9 ;no action if already closed
+10 IF EASPSTAT="CLS"
DO NOACT^EASEZLM("Previously Inactivated",ACTION)
QUIT
+11 ;clear accept flags and updates
+12 DO OKRESET^EASEZU3
+13 ;update processing status
+14 DO SETDATE^EASEZU2(EASAPP,"CLS")
+15 SET EASPSTAT="CLS"
+16 WRITE !,"Application has been closed/inactivated...",!
+17 DO PAUSE^VALM1
+18 ;rebuild selection list since this application is removed from list
+19 DO BLD^EASEZLM
+20 SET VALMBCK="Q"
+21 QUIT
+22 ;
FILE2 ;
+1 NEW VALMDDF,ZTSAVE,ZTDESC,ZTRTN,ZTIO
+2 KILL ZTSAVE
+3 SET ZTDESC="Filing 10-10EZ Data (Appl. #"_EASAPP_") to VistA"
SET ZTRTN="QUE^EASEZFM"
SET ZTIO=""
+4 SET ZTSAVE("EASAPP")=""
+5 DO ^%ZTLOAD
+6 IF $DATA(ZTSK)
Begin DoDot:1
+7 ;update processing status
+8 WRITE !,"10-10EZ data is being filed as a background job."
+9 WRITE !,"Task #: ",ZTSK,!
+10 KILL DIR
DO PAUSE^VALM1
End DoDot:1
+11 QUIT
+12 ;
SUPPRESS(EASAPP,DATAKEY,TYPE,VERSION) ;alb/cmf/51
+1 ;EASAPP = file 712 ien
+2 ;DATAKEY = file 711/.1
+3 ;TYPE = 0:display[default], 1:file, 2:accept
+4 ;VERSION = version # of an application
+5 ;
+6 ;RETURN VALUE = 1 if node should not be displayed, filed, or accepted
+7 ; 0, otherwise
+8 ;
+9 NEW FLAG,CHKKEY
+10 if $GET(EASAPP)=""
QUIT 0
+11 if $GET(DATAKEY)=""
QUIT 0
+12 if $GET(VERSION)=""
SET VERSION=$$VERSION(EASAPP)
+13 if +VERSION<6
QUIT 0
+14 SET FLAG=0
+15 ;EAS*1.0*70 -- added CHKKEY and up-arrows around datakeys below
+16 SET CHKKEY="^"_DATAKEY_"^"
+17 SET TYPE=$SELECT($GET(TYPE)=1:1,$GET(TYPE)=2:2,1:0)
+18 IF TYPE=0
Begin DoDot:1
+19 ;obs
IF "^I;18A.^I;18B.^I;18C.^I;18D.^"[CHKKEY
SET FLAG=1
QUIT
+20 ;obs
IF "^IIC;1.1^IIC;1.2^IIC;1.3^"[CHKKEY
SET FLAG=1
QUIT
+21 ;obs
IF "^I;1A.5^IIC;3.^I;14D1.^"[CHKKEY
SET FLAG=1
QUIT
+22 ;obs
IF "^I;14C.^I;14D.^I;14D2.^I;14H.^"[CHKKEY
SET FLAG=1
QUIT
+23 ;print only
IF "^IIE;1.^IIE;2.^IIE;3.^"[CHKKEY
SET FLAG=1
QUIT
+24 ;EAS*1.0*70 - until added to the web form,
+25 ;only print and file APPLICANT COUNTRY
+26 IF "^I;9H.^"[CHKKEY
SET FLAG=1
QUIT
+27 QUIT
End DoDot:1
QUIT FLAG
+28 IF TYPE=1
Begin DoDot:1
+29 ;obs
IF "^I;14D.^I;14D1.^I;14D2.^"[CHKKEY
SET FLAG=1
QUIT
+30 ;obs
IF "^IIC;1.1^IIC;1.2^IIC;1.3^"[CHKKEY
SET FLAG=1
QUIT
+31 ;print only
IF "^IIE;1.^IIE;2.^IIE;3.^"[CHKKEY
SET FLAG=1
QUIT
+32 ;disp only
IF "^IIC;1.6^IIC;2.3^IIC;3.3^"[CHKKEY
SET FLAG=1
QUIT
+33 QUIT
End DoDot:1
QUIT FLAG
+34 ;
+35 QUIT FLAG
+36 ;
VERSION(EASAPP) ;alb/cmf/51
+1 ;return the version # of an application
+2 if $GET(EASAPP)=""
QUIT -1
+3 if '$DATA(^EAS(712,EASAPP))
QUIT -1
+4 QUIT +$PIECE(^EAS(712,EASAPP,0),U,12)
+5 ;