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

DGPFRAL.m

Go to the documentation of this file.
  1. DGPFRAL ;ALB/RBS - PRF ACTION NOT LINKED REPORT ; 7/26/05 3:18pm
  1. ;;5.3;Registration;**554,1015**;Aug 13, 1993;Build 21
  1. ;
  1. ;This routine will be used for selecting sort parameters to produce
  1. ;the DGPF ACTION NOT LINKED REPORT for Patient Record Flags.
  1. ;
  1. ; Selection options will provide the ability to report by:
  1. ; CATEGORY
  1. ; BEGINNING DATE
  1. ; ENDING DATE
  1. ;
  1. ; The following reporting sort array will be built by user prompts:
  1. ; DGSORT("DGCAT") = CATEGORY
  1. ; 1^Category I (National)
  1. ; 2^Category II (Local)
  1. ; 3^Both
  1. ; DGSORT("DGBEG") = BEGINNING DATE (internal FileMan date)
  1. ; DGSORT("DGEND") = ENDING DATE (internal 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 ;return value from $$ANSWER^DGPFUT call
  1. N DGCAT ;flag category to report on
  1. N DGDIRA ;DGDIRA - DIR("A") string
  1. N DGDIRB ;DGDIRB - DIR("B") string
  1. N DGDIRH ;DGDIRH - DIR("?") string
  1. N DGDIRO ;DGDIR0 - DIR(0) string
  1. N DGFIRST ;first assignment date
  1. N DGSEL ;help text var
  1. N DGSORT ;array or report parameters
  1. N ZTSAVE ;open array reference of input parameters used by tasking
  1. ;
  1. S DGFIRST=$P(+$O(^DGPF(26.14,"D","")),".") ;first assignment 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") ;pause
  1. ;
  1. ;-- prompt for selection of a flag category
  1. S DGDIRA="Select Flag Category"
  1. S 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(DGCAT=1:"Category I (National)",DGCAT=2:"Category II (Local)",DGCAT=3:"Both",1:"")
  1. ;
  1. ;-- prompt for beginning date
  1. S DGDIRA="Select Beginning Date"
  1. S DGDIRB=""
  1. S DGDIRH="^D HELP^DGPFRAL(1)"
  1. S DGDIRO="D^"_DGFIRST_":DT:EX"
  1. S DGASK=$$ANSWER^DGPFUT(DGDIRA,DGDIRB,DGDIRO,DGDIRH)
  1. Q:(DGASK=-1)
  1. S DGSORT("DGBEG")=DGASK
  1. ;
  1. ;-- prompt for ending date
  1. S DGDIRA="Select Ending Date"
  1. S DGDIRB=""
  1. S DGDIRH="^D HELP^DGPFRAL(2)"
  1. S DGDIRO="D^"_DGSORT("DGBEG")_":DT:EX"
  1. S DGASK=$$ANSWER^DGPFUT(DGDIRA,DGDIRB,DGDIRO,DGDIRH)
  1. Q:(DGASK=-1)
  1. S DGSORT("DGEND")=DGASK
  1. ;
  1. K DGCAT,DGDIRA,DGDIRB,DGDIRO,DGDIRH,DGASK,DGFIRST
  1. ;
  1. ;-- prompt for device
  1. S ZTSAVE("DGSORT(")=""
  1. D EN^XUTMDEVQ("START^DGPFRAL1","Assignment Action Not Linked to a Progress Note Report",.ZTSAVE)
  1. D HOME^%ZIS
  1. Q
  1. ;
  1. HELP(DGSEL) ;provide extended DIR("?") help text.
  1. ;
  1. ; Input: DGSEL - prompt var for help text word selection
  1. ; Output: none
  1. ;
  1. W !," Enter the "_$S(DGSEL=1:"earliest",1:"latest")_" Assignment Action Date to include in the report."
  1. W !," Please enter a date from the specified date range displayed."
  1. Q