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

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

initial load of FOIAVistA 6/30/08 version

File size: 2.8 KB
Line 
1DGPFRPA ;ALB/RBS - PRF PATIENT ASSIGNMENTS REPORT ; 5/11/04 3:35pm
2 ;;5.3;Registration;**554**;Aug 13, 1993
3 ;
4 ;This routine will be used for selecting sort parameters to produce
5 ; the DGPF PATIENT ASSIGNMENTS REPORT for Patient Record Flags.
6 ;
7 ; Selection options will provide the ability to report by:
8 ; PATIENT
9 ; STATUS (ASSIGNMENTS)
10 ;
11 ; The following reporting sort array will be built by user prompts:
12 ; DGSORT("DGDFN") = Patient IEN of (#2) file to report on
13 ; DGSORT("DGSTATUS") = Assignment Status to report on
14 ; 1^Active
15 ; 2^Inactive
16 ; 3^Both
17 ;-- no direct entry
18 QUIT
19 ;
20EN ;Entry point
21 ;-- user prompts for report selection sorts
22 ; Input: none
23 ; Output: Report generated using user selected parameters
24 ;
25 N DGASK ;return value from $$ANSWER^DGPFUT call
26 N DGDIRA ;DGDIRA - DIR("A") string
27 N DGDIRB ;DGDIRB - DIR("B") string
28 N DGDIRH ;DGDIRH - DIR("?") string
29 N DGDIRO ;DGDIR0 - DIR(0) string
30 N DGIEN ;assignment ien
31 N DGIENS ;array of ien's of the patients assignment records
32 N DGOK ;ok flag for finding assignments to report on
33 N DGPFA ;assignment array
34 N DGQ ;quit flag
35 N DGSORT ;array or report parameters
36 N SAVEXQY0 ;temp save var
37 N ZTSAVE ;open array reference of input parameters used by tasking
38 ;
39 ;-- prompt for patient to report on
40 ; suppress display of Active Record Flags in DISPPRF^DGPFAPI
41 ; save variable before temporarily deleting it so that the
42 ; code, Q:'$D(XQY0), in DISPPRF^DGPFAPI will suppress the display
43 ;
44 K SAVEXQY0
45 I $D(XQY0) S SAVEXQY0=XQY0 K XQY0 ;save original
46 ;
47 D SELPAT^DGPFUT1(.DGASK)
48 ;
49 I $D(SAVEXQY0) S XQY0=SAVEXQY0 K SAVEXQY0 ;restore original
50 ;
51 Q:(DGASK<1)
52 ; get all assignment ien's for the patient
53 I '$$GETALL^DGPFAA(DGASK,.DGIENS) D Q
54 . W !?2,">>> Selected patient has no record flag assignments on file.",*7
55 ;
56 S DGSORT("DGDFN")=DGASK
57 ;
58 ;-- prompt for selection of the assignment status to report on
59 S DGDIRA="Select Assignment Status to report on"
60 S DGDIRB="Both"
61 S DGDIRH="Enter one of the status selections to report on"
62 S DGDIRO="S^1:Active;2:Inactive;3:Both"
63 S DGASK=$$ANSWER^DGPFUT(DGDIRA,DGDIRB,DGDIRO,DGDIRH)
64 Q:(DGASK<1)
65 S DGQ=0
66 I DGASK'=3 D
67 . S (DGIEN,DGOK)=0
68 . F S DGIEN=$O(DGIENS(DGIEN)) Q:'DGIEN D Q:(DGOK!DGQ)
69 . . ;-get assignment
70 . . K DGPFA
71 . . I $$GETASGN^DGPFAA(DGIEN,.DGPFA),$P(DGPFA("STATUS"),U)=DGASK S DGOK=1 Q
72 . Q:DGOK
73 . S DGQ=1
74 . W !?2,">>> Selected patient has no '"_$S(DGASK=1:"Active",1:"Inactive")_"' record flag assignments on file.",*7
75 ;
76 Q:DGQ
77 S DGSORT("DGSTATUS")=DGASK_U_$S(DGASK=1:"Active",DGASK=2:"Inactive",DGASK=3:"Both",1:3)
78 ;
79 K DGASK,DGOK,DGQ,DGIEN,DGIENS,DGDIRA,DGDIRB,DGDIRO,DGDIRH
80 ;
81 ;-- prompt for device
82 S ZTSAVE("DGSORT(")=""
83 D EN^XUTMDEVQ("START^DGPFRPA1","Patient Assignments Report",.ZTSAVE)
84 D HOME^%ZIS
85 Q
Note: See TracBrowser for help on using the repository browser.