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

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

initial load of FOIAVistA 6/30/08 version

File size: 4.3 KB
Line 
1DGPFRAB ;ALB/RBS - PRF APPROVED BY REPORT ; 7/26/05 3:22pm
2 ;;5.3;Registration;**554**;Aug 13, 1993
3 ;
4 ;This routine will be used for selecting sort parameters to produce
5 ;the DGPF APPROVED BY REPORT for Patient Record Flags.
6 ;
7 ; Selection options will provide the ability to report by:
8 ; APPROVED BY PERSON
9 ; CATEGORY
10 ; STATUS (ASSIGNMENTS)
11 ; BEGINNING DATE
12 ; ENDING DATE
13 ;
14 ; The following reporting sort array will be built by user prompts:
15 ; DGSORT("DGAPROV") = pointer to NEW PERSON (#200) file^Person Name
16 ; or
17 ; = "A" = All approved by persons
18 ; DGSORT("DGCAT") = CATEGORY
19 ; 1^Category I (National)
20 ; 2^Category II (Local)
21 ; 3^Both
22 ; DGSORT("DGSTATUS") = Assignment Status to report on
23 ; 1^Active
24 ; 2^Inactive
25 ; 3^Both
26 ; DGSORT("DGBEG") = BEGINNING DATE (internal FileMan date)
27 ; DGSORT("DGEND") = ENDING DATE (internal FileMan date)
28 ;
29 ;-- no direct entry
30 QUIT
31 ;
32EN ;Entry point
33 ;-- user prompts for report selection sorts
34 ; Input: none
35 ; Output: Report generated using user selected parameters
36 ;
37 N DGABORT ;abort flag
38 N DGASK ;return value from $$ANSWER^DGPFUT call
39 N DGCAT ;flag category to report on
40 N DGDIRA ;DGDIRA - DIR("A") string
41 N DGDIRB ;DGDIRB - DIR("B") string
42 N DGDIRH ;DGDIRH - DIR("?") string
43 N DGDIRO ;DGDIR0 - DIR(0) string
44 N DGFIRST ;first assignment date
45 N DGQ ;quit flag
46 N DGSEL ;help text var
47 N DGSORT ;array or report parameters
48 N ZTSAVE ;open array reference of input parameters used by tasking
49 ;
50 ;check for database
51 S DGFIRST=$P(+$O(^DGPF(26.14,"D","")),".") ;first assignment date
52 I 'DGFIRST D Q
53 . W !?2,">>> No Patient Record Flag Assignments have been found.",*7
54 . I $$ANSWER^DGPFUT("Enter RETURN to continue","","E") ;pause
55 ;
56 ;-- prompt for selection of an approved by person
57 S DGDIRA="Select to report on a (S)ingle Approved By Person or (A)ll"
58 S DGDIRB="Single"
59 S DGDIRH="Enter one of the selections to report on"
60 S DGDIRO="S^S:Single Approved By Person;A:All Approved By Persons"
61 S DGASK=$$ANSWER^DGPFUT(DGDIRA,DGDIRB,DGDIRO,DGDIRH)
62 Q:DGASK=-1!(DGASK=0)
63 ;
64 S:DGASK="A" DGSORT("DGAPROV")="A"
65 ;
66 D:DGASK="S"
67 . S (DGQ,DGABORT)=0
68 . F D Q:(DGQ!DGABORT)
69 . . S DGASK=$$ANSWER^DGPFUT("Select Approved By Person","","P^200:EMZ","Enter the person approving the record flag assignment","I $D(^DGPF(26.14,""APPRO"",+Y))")
70 . . I DGASK<1 S DGABORT=1 Q
71 . . S DGSORT("DGAPROV")=DGASK_U_$$EXTERNAL^DILFD(26.14,.05,"F",DGASK)
72 . . S DGQ=1
73 ;
74 Q:$G(DGABORT)
75 ;
76 ;-- prompt for selection of a flag category
77 S DGDIRA="Select Flag Category"
78 S DGDIRB="Both"
79 S DGDIRH="Enter one of the category selections to report on"
80 S DGDIRO="S^1:Category I (National);2:Category II (Local);3:Both"
81 S DGASK=$$ANSWER^DGPFUT(DGDIRA,DGDIRB,DGDIRO,DGDIRH)
82 Q:(DGASK<1)
83 S DGCAT=DGASK,DGSORT("DGCAT")=DGASK_U_$S(DGCAT=1:"Category I (National)",DGCAT=2:"Category II (Local)",DGCAT=3:"Both",1:"")
84 ;
85 ;-- prompt for selection of the assignment status to report on
86 S DGDIRA="Select Assignment Status to report on"
87 S DGDIRB="Both"
88 S DGDIRH="Enter one of the status selections to report on"
89 S DGDIRO="S^1:Active;2:Inactive;3:Both"
90 S DGASK=$$ANSWER^DGPFUT(DGDIRA,DGDIRB,DGDIRO,DGDIRH)
91 Q:(DGASK<1)
92 S DGSORT("DGSTATUS")=DGASK_U_$S(DGASK=1:"Active",DGASK=2:"Inactive",DGASK=3:"Both",1:3)
93 ;
94 ;-- prompt for beginning date
95 S DGDIRA="Select Beginning Date"
96 S DGDIRB=""
97 S DGDIRH="^D HELP^DGPFRAB(1)"
98 S DGDIRO="D^"_DGFIRST_":DT:EX"
99 S DGASK=$$ANSWER^DGPFUT(DGDIRA,DGDIRB,DGDIRO,DGDIRH)
100 Q:(DGASK=-1)
101 S DGSORT("DGBEG")=DGASK
102 ;
103 ;-- prompt for ending date
104 S DGDIRA="Select Ending Date"
105 S DGDIRB=""
106 S DGDIRH="^D HELP^DGPFRAB(2)"
107 S DGDIRO="D^"_DGSORT("DGBEG")_":DT:EX"
108 S DGASK=$$ANSWER^DGPFUT(DGDIRA,DGDIRB,DGDIRO,DGDIRH)
109 Q:(DGASK=-1)
110 S DGSORT("DGEND")=DGASK
111 ;
112 K DGCAT,DGDIRA,DGDIRB,DGDIRO,DGDIRH,DGASK,DGQ,DGABORT
113 ;
114 ;-- prompt for device
115 S ZTSAVE("DGSORT(")=""
116 D EN^XUTMDEVQ("START^DGPFRAB1","Assignments Approved By Report",.ZTSAVE)
117 D HOME^%ZIS
118 Q
119 ;
120HELP(DGSEL) ;provide extended DIR("?") help text.
121 ;
122 ; Input: DGSEL - prompt var for help text word selection
123 ; Output: none
124 ;
125 W !," Enter the "_$S(DGSEL=1:"earliest",1:"latest")_" Assignment Date to include in the report."
126 W !," Please enter a date from the specified date range displayed."
127 Q
Note: See TracBrowser for help on using the repository browser.