DGENL ;ALB/RMO,LBD - Patient Enrollment - List Manager Screen;12 JUN 1997 10:00 am ; 1/27/11 2:51pm
;;5.3;Registration;**121,147,838**;08/13/93;Build 5
;
EN(DFN) ;Main entry point to invoke the DGEN PATIENT ENROLLMENT protocol
; Input -- DFN Patient IEN
; Output -- None
D WAIT^DICD
D EN^VALM("DGEN PATIENT ENROLLMENT")
Q
;
HDR ;Header code
N DGPREFNM,X,VA,VAERR
D PID^VADPT
S VALMHDR(1)=$E("Patient: "_$P($G(^DPT(DFN,0)),U),1,30)_" ("_VA("BID")_")"
S X=$S('$D(^DPT(DFN,"TYPE")):"PATIENT TYPE UNKNOWN",$D(^DG(391,+^("TYPE"),0)):$P(^(0),U,1),1:"PATIENT TYPE UNKNOWN")
S VALMHDR(1)=$$SETSTR^VALM1(X,VALMHDR(1),60,80)
I $$PREF^DGENPTA(DFN,.DGPREFNM)
S VALMHDR(2)="Preferred Facility: "_$G(DGPREFNM)
S VALMHDR(2)=$$SETSTR^VALM1("Current Enrollment",VALMHDR(2),60,80)
S VALMHDR(3)="Preferred Facility Source: "_$$GET1^DIQ(2,DFN_",",27.03) ;DG*5.3*838
Q
;
INIT ;Init variables and list array
D BLD
Q
;
BLD ;Build patient enrollment screen
D CLEAN^VALM10
K ^TMP("DGENIDX",$J),VALMHDR
S VALMBG=1,VALMCNT=0
;
;Build header
D HDR
;
;Build list area for current enrollment
D EN^DGENL1("DGEN",DFN,$$FINDCUR^DGENA(DFN),.VALMCNT)
D MESSAGE(DFN)
Q
;
HELP ;Help code
S X="?" D DISP^XQORM1 W !!
Q
;
EXIT ;Exit code
D CLEAN^VALM10
D CLEAR^VALM1
K ^TMP("DGENIDX",$J)
Q
;
EXPND ;Expand code
Q
;
MESSAGE(DFN) ;
;Description: Sets VALMMSG to a custom message for the screen's message
; window that is the status of the last enrollment query
;
N DGQRY,STATUS,NOTIFY
S DGQRY=$$FINDLAST^DGENQRY(DFN)
I $$GET^DGENQRY(DGQRY,.DGQRY)
S STATUS=$$EXTERNAL^DILFD(27.12,.03,"F",DGQRY("STATUS"))
S NOTIFY=$$EXTERNAL^DILFD(27.12,.08,"F",DGQRY("NOTIFY"))
S VALMSG="Query: "_STATUS
S $E(VALMSG,28)="Notify: "_NOTIFY
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDGENL 1807 printed Dec 13, 2024@02:42:45 Page 2
DGENL ;ALB/RMO,LBD - Patient Enrollment - List Manager Screen;12 JUN 1997 10:00 am ; 1/27/11 2:51pm
+1 ;;5.3;Registration;**121,147,838**;08/13/93;Build 5
+2 ;
EN(DFN) ;Main entry point to invoke the DGEN PATIENT ENROLLMENT protocol
+1 ; Input -- DFN Patient IEN
+2 ; Output -- None
+3 DO WAIT^DICD
+4 DO EN^VALM("DGEN PATIENT ENROLLMENT")
+5 QUIT
+6 ;
HDR ;Header code
+1 NEW DGPREFNM,X,VA,VAERR
+2 DO PID^VADPT
+3 SET VALMHDR(1)=$EXTRACT("Patient: "_$PIECE($GET(^DPT(DFN,0)),U),1,30)_" ("_VA("BID")_")"
+4 SET X=$SELECT('$DATA(^DPT(DFN,"TYPE")):"PATIENT TYPE UNKNOWN",$DATA(^DG(391,+^("TYPE"),0)):$PIECE(^(0),U,1),1:"PATIENT TYPE UNKNOWN")
+5 SET VALMHDR(1)=$$SETSTR^VALM1(X,VALMHDR(1),60,80)
+6 IF $$PREF^DGENPTA(DFN,.DGPREFNM)
+7 SET VALMHDR(2)="Preferred Facility: "_$GET(DGPREFNM)
+8 SET VALMHDR(2)=$$SETSTR^VALM1("Current Enrollment",VALMHDR(2),60,80)
+9 ;DG*5.3*838
SET VALMHDR(3)="Preferred Facility Source: "_$$GET1^DIQ(2,DFN_",",27.03)
+10 QUIT
+11 ;
INIT ;Init variables and list array
+1 DO BLD
+2 QUIT
+3 ;
BLD ;Build patient enrollment screen
+1 DO CLEAN^VALM10
+2 KILL ^TMP("DGENIDX",$JOB),VALMHDR
+3 SET VALMBG=1
SET VALMCNT=0
+4 ;
+5 ;Build header
+6 DO HDR
+7 ;
+8 ;Build list area for current enrollment
+9 DO EN^DGENL1("DGEN",DFN,$$FINDCUR^DGENA(DFN),.VALMCNT)
+10 DO MESSAGE(DFN)
+11 QUIT
+12 ;
HELP ;Help code
+1 SET X="?"
DO DISP^XQORM1
WRITE !!
+2 QUIT
+3 ;
EXIT ;Exit code
+1 DO CLEAN^VALM10
+2 DO CLEAR^VALM1
+3 KILL ^TMP("DGENIDX",$JOB)
+4 QUIT
+5 ;
EXPND ;Expand code
+1 QUIT
+2 ;
MESSAGE(DFN) ;
+1 ;Description: Sets VALMMSG to a custom message for the screen's message
+2 ; window that is the status of the last enrollment query
+3 ;
+4 NEW DGQRY,STATUS,NOTIFY
+5 SET DGQRY=$$FINDLAST^DGENQRY(DFN)
+6 IF $$GET^DGENQRY(DGQRY,.DGQRY)
+7 SET STATUS=$$EXTERNAL^DILFD(27.12,.03,"F",DGQRY("STATUS"))
+8 SET NOTIFY=$$EXTERNAL^DILFD(27.12,.08,"F",DGQRY("NOTIFY"))
+9 SET VALMSG="Query: "_STATUS
+10 SET $EXTRACT(VALMSG,28)="Notify: "_NOTIFY
+11 QUIT