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

PXRRPRD.m

Go to the documentation of this file.
  1. PXRRPRD ;ISL/PKR,ALB/Zoltan - PCE Provider Encounter reports driver.;10/13/2017
  1. ;;1.0;PCE PATIENT CARE ENCOUNTER;**3,10,12,18,61,189,211**;Aug 12, 1996;Build 454
  1. MAIN ;
  1. N PXRRIOD,PXRRPRJB,PXRRPRST,PXRROPT,PXRRQUE,PXRRXTMP
  1. S PXRRXTMP=$$XTMPSUB^PXRRGUT("PXRRPR")
  1. S ^XTMP(PXRRXTMP,0)=$$FMADD^XLFDT(DT,7)_U_DT_U_"PXRR Provider Encounter Count"
  1. ;
  1. ;Establish the selection criteria.
  1. FAC ;Get the facility list.
  1. N NFAC,PXRRFAC,PXRRFACN
  1. D FACILITY^PXRRLCSC
  1. I $D(DTOUT)!$D(DUOUT) G EXIT
  1. ;
  1. DR ;Get the date range.
  1. N PXRRBDT,PXRREDT
  1. D PDR^PXRRADUT(.PXRRBDT,.PXRREDT,"ENCOUNTER")
  1. I $D(DTOUT) G EXIT
  1. I $D(DUOUT) G FAC
  1. ;
  1. SCAT ;Get the service categories.
  1. N PXRRSCAT
  1. D SCAT^PXRRECSC
  1. I $D(DTOUT) G EXIT
  1. I $D(DUOUT) G DR
  1. ;
  1. PRV ;Get the provider list.
  1. N NCL,NPL,PXRRPECL,PXRRPRPL,PXRRPRSC
  1. D PRV^PXRRPRSC
  1. I $D(DTOUT) G EXIT
  1. I $D(DUOUT) G SCAT
  1. ;
  1. PRTY ;Get the report type (detailed or summary).
  1. N PXRRPRTY
  1. D PRTYPE^PXRRPRSC
  1. I $D(DTOUT) G EXIT
  1. I $D(DUOUT) G PRV
  1. ;
  1. ;Determine whether the report should be queued.
  1. S %ZIS="QM"
  1. W !
  1. D ^%ZIS
  1. I POP G EXIT
  1. S PXRRIOD=ION_";"_IOST_";"_IOM_";"_IOSL
  1. S PXRRQUE=$G(IO("Q"))
  1. ;
  1. ;Queue the report.
  1. I PXRRQUE D
  1. . N DESC,IODEV,ROUTINE
  1. . S DESC="Provider Encounter Count Report - sort"
  1. . S IODEV=""
  1. . S ROUTINE="SORT^PXRRPRSE"
  1. . S ^XTMP(PXRRXTMP,"SORTZTSK")=$$QUE^PXRRQUE(DESC,IODEV,ROUTINE,"SAVE^PXRRPRD")
  1. .;
  1. . S DESC="Provider Encounter Report - print"
  1. . S IODEV=PXRRIOD
  1. . I $P(PXRRPRTY,U,1)="D" S ROUTINE="PXRRPRDP"
  1. . E S ROUTINE="PXRRPRSP"
  1. . S ZTDTH="@"
  1. . S ^XTMP(PXRRXTMP,"PRZTSK")=$$QUE^PXRRQUE(DESC,IODEV,ROUTINE,"SAVE^PXRRPRD")
  1. E D SORT^PXRRPRSE
  1. Q
  1. ;
  1. ;====================
  1. EXIT ;
  1. D EXIT^PXRRGUT
  1. Q
  1. ;
  1. ;====================
  1. SAVE ;Save the variables.
  1. S ZTSAVE("PXRRBDT")="",ZTSAVE("PXRREDT")=""
  1. S ZTSAVE("PXRRCS(")="",ZTSAVE("NCS")=""
  1. S ZTSAVE("PXRRFAC(")="",ZTSAVE("NFAC")=""
  1. S ZTSAVE("PXRRFACN(")=""
  1. S ZTSAVE("PXRRIOD")=""
  1. S ZTSAVE("PXRRPECL(")="",ZTSAVE("NCL")=""
  1. S ZTSAVE("PXRRPRPL(")="",ZTSAVE("NPL")=""
  1. S ZTSAVE("PXRRPRSC")=""
  1. S ZTSAVE("PXRRPRTY")=""
  1. S ZTSAVE("PXRRQUE")=""
  1. S ZTSAVE("PXRRSCAT")=""
  1. S ZTSAVE("PXRRXTMP")=""
  1. S ZTSAVE("NONVA")=""
  1. Q
  1. ;