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

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

initial load of FOIAVistA 6/30/08 version

File size: 3.7 KB
Line 
1DGPFRFA ;ALB/RBS - PRF FLAG ASSIGNMENT REPORT ; 7/26/05 3:41pm
2 ;;5.3;Registration;**425,555,554**;Aug 13, 1993
3 ;
4 ;This routine will be used for selecting sort parameters to produce
5 ; the FLAG ASSIGNMENT REPORT for Patient Record Flags.
6 ;
7 ;Selection options will provide the user with the ability to report
8 ; by:
9 ; CATEGORY:
10 ; 1 Category I (National)
11 ; 2 Category II (Local)
12 ; 3 BOTH
13 ; FLAG:
14 ; S Single Flag
15 ; A All Flags
16 ; BEGINING DATE: FileMan date
17 ; ENDING DATE: FileMan date
18 ;
19 ;-- no direct entry
20 QUIT
21 ;
22EN ;Entry point
23 ;-- user prompts for report selection sorts
24 ; Input: none
25 ; Output: Report generated using user selected parameters
26 ;
27 N DGASK,DGRSLT,DGDIRA,DGDIRB,DGDIRO,DGDIRH
28 N DGSORT,DGCAT,DGFIL,DGSEL,DGFIRST
29 N ZTSAVE,DGQ
30 ;
31 ;check for database
32 S DGFIRST=$P(+$O(^DGPF(26.14,"D","")),".") ;first assignment date
33 I 'DGFIRST D Q
34 . W !?2,">>> No Patient Record Flag Assignments have been found.",*7
35 . I $$ANSWER^DGPFUT("Enter RETURN to continue","","E") ;pause
36 ;
37 ;-- prompt for selection of a flag category
38 S DGDIRA="Select Flag Category"
39 S DGDIRB=""
40 S DGDIRH="Enter one of the category selections to report on"
41 S DGDIRO="S^1:Category I (National);2:Category II (Local);3:Both"
42 S DGASK=$$ANSWER^DGPFUT(DGDIRA,DGDIRB,DGDIRO,DGDIRH)
43 Q:(DGASK<1)
44 S DGCAT=DGASK,DGSORT("DGCAT")=DGASK_U_$S(DGCAT=1:"Category I (National)",DGCAT=2:"Category II (Local)",DGCAT=3:"Both",1:"")
45 ;
46 ;-- prompt for selection of a single flag or all flags
47 S DGSEL=""
48 ;list (A)ll flags if user selects Both Category's
49 I DGCAT=3 D
50 . S DGSORT("DGFLAG")="A"
51 ;
52 D:DGCAT'=3 ;only prompt if user selects a Category I or II
53 . S DGDIRA="Select to report on a (S)ingle flag or (A)ll flags"
54 . S DGDIRB="Single Flag"
55 . S DGDIRO="S^S:Single Flag;A:All Flags"
56 . S DGDIRH="Enter one of the flag selections to report on"
57 . S DGASK=$$ANSWER^DGPFUT(DGDIRA,DGDIRB,DGDIRO,DGDIRH)
58 . Q:(DGASK=-1)
59 . S DGSEL=DGASK
60 . S DGSORT("DGFLAG")=DGASK
61 Q:(DGASK=-1)
62 ;
63 ;-- prompt for selection of a record flag name - only if (S)ingle
64 D:DGSEL="S"
65 . S DGQ=0
66 . S DGDIRA="Select Record Flag Name",DGDIRB=""
67 . S DGDIRO=$S(DGCAT=1:"P^26.15,.01:EMZ",1:"P^26.11,.01:EMZ")
68 . F D Q:DGQ
69 . . S DGASK=$$ANSWER^DGPFUT(DGDIRA,DGDIRB,DGDIRO)
70 . . I DGASK=-1 S DGQ=1 Q
71 . . ;set data string = pointer value (5;DGPF(26.11,) ^ external name
72 . . S DGFIL=DGASK_$S(DGCAT=1:";DGPF(26.15,",1:";DGPF(26.11,")
73 . . ;if (S)ingle flag selected, check for any flag assignments
74 . . I '$$ASGNCNT^DGPFLF6(DGFIL) D Q
75 . . . W !?2,">>> No Patient Record Flag Assignments have been found. Select another flag.",*7
76 . . ;a good one to report on
77 . . S DGSORT("DGFLAG")=DGFIL_U_$$EXTERNAL^DILFD(26.13,.02,"F",DGFIL)
78 . . S DGQ=1
79 ;
80 Q:(DGASK=-1)
81 ;
82 ;-- prompt for beginning date
83 S DGDIRA="Select Beginning Date"
84 S DGDIRB=""
85 S DGDIRH="^D HELP^DGPFRFA(1)"
86 S DGDIRO="D^"_DGFIRST_":DT:EX"
87 S DGASK=$$ANSWER^DGPFUT(DGDIRA,DGDIRB,DGDIRO,DGDIRH)
88 Q:(DGASK=-1)
89 S DGSORT("DGBEG")=DGASK
90 ;
91 ;-- prompt for ending date
92 S DGDIRA="Select Ending Date"
93 S DGDIRB=""
94 S DGDIRH="^D HELP^DGPFRFA(2)"
95 S DGDIRO="D^"_DGSORT("DGBEG")_":DT:EX"
96 S DGASK=$$ANSWER^DGPFUT(DGDIRA,DGDIRB,DGDIRO,DGDIRH)
97 Q:(DGASK=-1)
98 S DGSORT("DGEND")=DGASK
99 ;
100 K DGCAT,DGFIL,DGSEL,DGDIRA,DGDIRB,DGDIRO,DGDIRH
101 K DGASK,DGRSLT,DGFIRST
102 ;
103 ;-- prompt for device
104 S ZTSAVE("DGSORT(")=""
105 D EN^XUTMDEVQ("START^DGPFRFA1","Patient Record Flag Assignment Report",.ZTSAVE)
106 D HOME^%ZIS
107 Q
108 ;
109HELP(DGSEL) ;provide extended DIR("?") help text.
110 ;
111 ; Input: DGSEL - prompt var for help text word selection
112 ; Output: none
113 ;
114 W !," Enter the "_$S(DGSEL=1:"earliest",1:"latest")_" Assignment Date to include in the report."
115 W !," Please enter a date from the specified date range displayed."
116 Q
Note: See TracBrowser for help on using the repository browser.