source: FOIAVistA/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGENL.m@ 677

Last change on this file since 677 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.6 KB
Line 
1DGENL ;ALB/RMO - Patient Enrollment - List Manager Screen;12 JUN 1997 10:00 am
2 ;;5.3;Registration;**121,147**;08/13/93
3 ;
4EN(DFN) ;Main entry point to invoke the DGEN PATIENT ENROLLMENT protocol
5 ; Input -- DFN Patient IEN
6 ; Output -- None
7 D WAIT^DICD
8 D EN^VALM("DGEN PATIENT ENROLLMENT")
9 Q
10 ;
11HDR ;Header code
12 N DGPREFNM,X,VA,VAERR
13 D PID^VADPT
14 S VALMHDR(1)=$E("Patient: "_$P($G(^DPT(DFN,0)),U),1,30)_" ("_VA("BID")_")"
15 S X=$S('$D(^DPT(DFN,"TYPE")):"PATIENT TYPE UNKNOWN",$D(^DG(391,+^("TYPE"),0)):$P(^(0),U,1),1:"PATIENT TYPE UNKNOWN")
16 S VALMHDR(1)=$$SETSTR^VALM1(X,VALMHDR(1),60,80)
17 I $$PREF^DGENPTA(DFN,.DGPREFNM)
18 S VALMHDR(2)="Preferred Facility: "_$G(DGPREFNM)
19 S VALMHDR(2)=$$SETSTR^VALM1("Current Enrollment",VALMHDR(2),60,80)
20 Q
21 ;
22INIT ;Init variables and list array
23 D BLD
24 Q
25 ;
26BLD ;Build patient enrollment screen
27 D CLEAN^VALM10
28 K ^TMP("DGENIDX",$J),VALMHDR
29 S VALMBG=1,VALMCNT=0
30 ;
31 ;Build header
32 D HDR
33 ;
34 ;Build list area for current enrollment
35 D EN^DGENL1("DGEN",DFN,$$FINDCUR^DGENA(DFN),.VALMCNT)
36 D MESSAGE(DFN)
37 Q
38 ;
39HELP ;Help code
40 S X="?" D DISP^XQORM1 W !!
41 Q
42 ;
43EXIT ;Exit code
44 D CLEAN^VALM10
45 D CLEAR^VALM1
46 K ^TMP("DGENIDX",$J)
47 Q
48 ;
49EXPND ;Expand code
50 Q
51 ;
52MESSAGE(DFN) ;
53 ;Description: Sets VALMMSG to a custom message for the screen's message
54 ; window that is the status of the last enrollment query
55 ;
56 N DGQRY,STATUS,NOTIFY
57 S DGQRY=$$FINDLAST^DGENQRY(DFN)
58 I $$GET^DGENQRY(DGQRY,.DGQRY)
59 S STATUS=$$EXTERNAL^DILFD(27.12,.03,"F",DGQRY("STATUS"))
60 S NOTIFY=$$EXTERNAL^DILFD(27.12,.08,"F",DGQRY("NOTIFY"))
61 S VALMSG="Query: "_STATUS
62 S $E(VALMSG,28)="Notify: "_NOTIFY
63 Q
Note: See TracBrowser for help on using the repository browser.