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

PXRRLCD.m

Go to the documentation of this file.
  1. PXRRLCD ;ISL/PKR,ALB/Zoltan - PCE Location Encounter reports driver. ;9/22/98
  1. ;;1.0;PCE PATIENT CARE ENCOUNTER;**3,10,12,18,61**;Aug 12, 1996
  1. MAIN ;
  1. N PXRRIOD,PXRRLCJB,PXRRLCST,PXRROPT,PXRRQUE,PXRRXTMP
  1. S PXRRXTMP=$$PXRRXTMP^PXRRWLD("PXRRLC")
  1. S ^XTMP(PXRRXTMP,0)=$$FMADD^XLFDT(DT,7)_U_DT_U_"PXRR Location 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. LOC ;Get the location list.
  1. N NCS,NHL,PXRRCS,PXRRLCHL,PXRRLCSC
  1. D LOC^PXRRLCSC("Determine encounter counts for","HA")
  1. I $D(DTOUT) G EXIT
  1. I $D(DUOUT) G FAC
  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 LOC
  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. ;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. I PXRRQUE D
  1. . ;Queue the report.
  1. . N DESC,IODEV,ROUTINE
  1. . S DESC="Location Encounter Count Report - sort"
  1. . S IODEV=""
  1. . S ROUTINE="SORT^PXRRLCSE"
  1. . S ^XTMP(PXRRXTMP,"SORTZTSK")=$$QUE^PXRRQUE(DESC,IODEV,ROUTINE,"SAVE^PXRRLCD")
  1. .;
  1. . S DESC="Location Encounter Count Report - print"
  1. . S IODEV=PXRRIOD
  1. . I $P(PXRRLCSC,U,1)["C" S ROUTINE="PXRRLCCP"
  1. . E S ROUTINE="PXRRLCHP"
  1. . S ZTDTH="@"
  1. . S ^XTMP(PXRRXTMP,"PRZTSK")=$$QUE^PXRRQUE(DESC,IODEV,ROUTINE,"SAVE^PXRRLCD")
  1. E D SORT^PXRRLCSE
  1. Q
  1. ;=======================================================================
  1. ;
  1. EXIT ;
  1. D EXIT^PXRRGUT
  1. Q
  1. ;
  1. ;=======================================================================
  1. SAVE ;Save the variables for queing.
  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("PXRRLCHL(")="",ZTSAVE("NHL")=""
  1. S ZTSAVE("PXRRLCSC")=""
  1. S ZTSAVE("PXRRQUE")=""
  1. S ZTSAVE("PXRRSCAT")=""
  1. S ZTSAVE("PXRRXTMP")=""
  1. Q
  1. ;