Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: DGPFRFR

DGPFRFR.m

Go to the documentation of this file.
  1. DGPFRFR ;ALB/RBS - PRF ASSIGNMENTS DUE REVIEW REPORT ; 10/28/03 12:04pm
  1. ;;5.3;Registration;**425,555,1015**;Aug 13, 1993;Build 21
  1. ;
  1. ;This routine will be used for selecting sort parameters to produce
  1. ; the FLAGS DUE FOR REVIEW REPORT for Patient Record Flags.
  1. ;
  1. ;Selection options will provide the user with the ability to report
  1. ; by:
  1. ; CATEGORY:
  1. ; 1 Category I (National)
  1. ; 2 Category II (Local)
  1. ; 3 BOTH
  1. ; FLAG:
  1. ; S Single Flag
  1. ; A All Flags
  1. ; BEGINING DATE: FileMan date
  1. ; ENDING DATE: FileMan date
  1. ;
  1. ;-- no direct entry
  1. QUIT
  1. ;
  1. EN ;Entry point
  1. ;-- user prompts for report selection sorts
  1. ; Input: none
  1. ; Output: Report generated using user selected parameters
  1. ;
  1. N DGASK,DGRSLT,DGDIRA,DGDIRB,DGDIRO,DGDIRH
  1. N DGSORT,DGCAT,DGFIL,DGSEL,DGNOW,DGFIRST,DGBEG,DGEND
  1. N ZTSAVE,DGQ
  1. ;
  1. ;-- prompt for selection of a flag category
  1. S DGDIRA="Select Flag Category",DGDIRB=""
  1. S DGDIRH="Enter one of the category selections to report on"
  1. S DGDIRO="S^1:Category I (National);2:Category II (Local);3:Both"
  1. S DGASK=$$ANSWER^DGPFUT(DGDIRA,DGDIRB,DGDIRO,DGDIRH)
  1. Q:(DGASK<1)
  1. S DGCAT=DGASK,DGSORT("DGCAT")=DGASK_U_$S(DGASK=1:"Category I (National)",DGASK=2:"Category II (Local)",DGASK=3:"Both",1:"")
  1. ;
  1. ;-- prompt for selection of a single flag or all flags
  1. S DGSEL=""
  1. ;default to (A)ll flags if user selects Both Category's
  1. I DGCAT=3 D
  1. . S DGSORT("DGFLAG")="A"
  1. ;
  1. D:DGCAT'=3 ;only prompt if user selects a Category I or II
  1. . S DGDIRA="Select to report on a (S)ingle flag or (A)ll flags"
  1. . S DGDIRB="Single Flag"
  1. . S DGDIRO="S^S:Single Flag;A:All Flags"
  1. . S DGDIRH="Enter one of the flag selections to report on"
  1. . S DGASK=$$ANSWER^DGPFUT(DGDIRA,DGDIRB,DGDIRO,DGDIRH)
  1. . Q:(DGASK=-1)
  1. . S DGSEL=DGASK
  1. . S DGSORT("DGFLAG")=DGASK
  1. Q:(DGASK=-1)
  1. ;
  1. ;-- prompt for selection of a record flag name - only if (S)ingle
  1. D:DGSEL="S"
  1. . S DGQ=0
  1. . S DGDIRA="Select Record Flag Name"
  1. . S DGDIRB=""
  1. . S DGDIRO=$S(DGCAT=1:"P^26.15,.01:EMZ",1:"P^26.11,.01:EMZ")
  1. . F D Q:DGQ
  1. . . S DGASK=$$ANSWER^DGPFUT(DGDIRA,DGDIRB,DGDIRO)
  1. . . I DGASK=-1 S DGQ=1 Q
  1. . . ;set data string = pointer value (5;DGPF(26.11,) ^ external name
  1. . . S DGFIL=DGASK_$S(DGCAT=1:";DGPF(26.15,",1:";DGPF(26.11,")
  1. . . ;if (S)ingle flag selected, check for any flag assignments
  1. . . I '$$ASGNCNT^DGPFLF6(DGFIL) D Q
  1. . . . W !?2,">>> No Patient Record Flag Assignments have been found. Select another flag.",*7
  1. . . ;a good one to report on
  1. . . S DGSORT("DGFLAG")=DGFIL_U_$$EXTERNAL^DILFD(26.13,.02,"F",DGFIL)
  1. . . S DGQ=1
  1. ;
  1. Q:(DGASK=-1)
  1. ;
  1. ;-- prompt for beginning date
  1. S DGNOW=$$DT^XLFDT()
  1. S DGFIRST=$P(+$O(^DGPF(26.13,"AFREV","")),".") ;first review date
  1. I 'DGFIRST D Q
  1. . W !?2,">>> No Patient Record Flag Assignments have been found.",*7
  1. . I $$ANSWER^DGPFUT("Enter RETURN to continue","","E")
  1. ;
  1. S DGDIRA="Select Beginning Date"
  1. S DGDIRB=""
  1. S DGDIRH="Enter the earliest Review Date to include in the report"
  1. S DGDIRO="D^::EX"
  1. S DGASK=$$ANSWER^DGPFUT(DGDIRA,DGDIRB,DGDIRO,DGDIRH)
  1. Q:(DGASK=-1)
  1. S (DGSORT("DGBEG"),DGBEG)=DGASK
  1. ;
  1. ;-- prompt for ending date
  1. S DGDIRA="Select Ending Date"
  1. S DGDIRB=""
  1. S DGDIRH="Enter the latest Review Date to include in the report"
  1. S DGDIRO="D^::EX"
  1. S DGASK=$$ANSWER^DGPFUT(DGDIRA,DGDIRB,DGDIRO,DGDIRH)
  1. Q:(DGASK=-1)
  1. S DGSORT("DGEND")=DGASK
  1. S DGSORT("DGNOW")=DGNOW
  1. ;
  1. K DGCAT,DGFIL,DGSEL,DGDIRA,DGDIRB,DGDIRO
  1. K DGASK,DGRSLT,DGNOW,DGFIRST,DGBEG
  1. ;
  1. ;-- prompt for device
  1. S ZTSAVE("DGSORT(")=""
  1. D EN^XUTMDEVQ("START^DGPFRFR1","Flags Due For Review Report",.ZTSAVE)
  1. D HOME^%ZIS
  1. Q