DGENLEH ;ALB/RMO,LBD - Patient Enrollment History - List Manager Screen;12 JUN 1997 10:00 am ; 1/27/11 3:11pm
;;5.3;Registration;**121,838**;08/13/93;Build 5
;
EN(DFN,DGENRIEN) ;Main entry point to invoke the DGEN PATIENT ENROLL HISTORY protocol
; Input -- DFN Patient IEN
; DGENRIEN Enrollment IEN
; Output -- None
D WAIT^DICD
D EN^VALM("DGEN PATIENT ENROLL HISTORY")
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("Prior 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("DGENEHIDX",$J)
;
;Build header
D HDR
;
;Build list area for select enrollment history
D EN^DGENL1("DGENEH",DFN,DGENRIEN,.VALMCNT)
Q
;
HELP ;Help code
S X="?" D DISP^XQORM1 W !!
Q
;
EXIT ;Exit code
D CLEAN^VALM10
D CLEAR^VALM1
K ^TMP("DGENEHIDX",$J)
Q
;
EXPND ;Expand code
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDGENLEH 1390 printed Oct 16, 2024@18:43:28 Page 2
DGENLEH ;ALB/RMO,LBD - Patient Enrollment History - List Manager Screen;12 JUN 1997 10:00 am ; 1/27/11 3:11pm
+1 ;;5.3;Registration;**121,838**;08/13/93;Build 5
+2 ;
EN(DFN,DGENRIEN) ;Main entry point to invoke the DGEN PATIENT ENROLL HISTORY protocol
+1 ; Input -- DFN Patient IEN
+2 ; DGENRIEN Enrollment IEN
+3 ; Output -- None
+4 DO WAIT^DICD
+5 DO EN^VALM("DGEN PATIENT ENROLL HISTORY")
+6 QUIT
+7 ;
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("Prior 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("DGENEHIDX",$JOB)
+3 ;
+4 ;Build header
+5 DO HDR
+6 ;
+7 ;Build list area for select enrollment history
+8 DO EN^DGENL1("DGENEH",DFN,DGENRIEN,.VALMCNT)
+9 QUIT
+10 ;
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("DGENEHIDX",$JOB)
+4 QUIT
+5 ;
EXPND ;Expand code
+1 QUIT
+2 ;