source: WorldVistAEHR/trunk/r/PCE_PATIENT_CARE_ENCOUNTER-AUTN-EFDP-PX-VSIT--PXRM/PXRRLCD.m@ 1154

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

initial load of WorldVistAEHR

File size: 2.0 KB
RevLine 
[613]1PXRRLCD ;ISL/PKR,ALB/Zoltan - PCE Location Encounter reports driver. ;9/22/98
2 ;;1.0;PCE PATIENT CARE ENCOUNTER;**3,10,12,18,61**;Aug 12, 1996
3MAIN ;
4 N PXRRIOD,PXRRLCJB,PXRRLCST,PXRROPT,PXRRQUE,PXRRXTMP
5 S PXRRXTMP=$$PXRRXTMP^PXRRWLD("PXRRLC")
6 S ^XTMP(PXRRXTMP,0)=$$FMADD^XLFDT(DT,7)_U_DT_U_"PXRR Location Encounter Count"
7 ;
8 ;Establish the selection criteria.
9FAC ;Get the facility list.
10 N NFAC,PXRRFAC,PXRRFACN
11 D FACILITY^PXRRLCSC
12 I $D(DTOUT)!$D(DUOUT) G EXIT
13 ;
14LOC ;Get the location list.
15 N NCS,NHL,PXRRCS,PXRRLCHL,PXRRLCSC
16 D LOC^PXRRLCSC("Determine encounter counts for","HA")
17 I $D(DTOUT) G EXIT
18 I $D(DUOUT) G FAC
19 ;
20DR ;Get the date range.
21 N PXRRBDT,PXRREDT
22 D PDR^PXRRADUT(.PXRRBDT,.PXRREDT,"ENCOUNTER")
23 I $D(DTOUT) G EXIT
24 I $D(DUOUT) G LOC
25 ;
26SCAT ;Get the service categories.
27 N PXRRSCAT
28 D SCAT^PXRRECSC
29 I $D(DTOUT) G EXIT
30 I $D(DUOUT) G DR
31 ;
32 ;Determine whether the report should be queued.
33 S %ZIS="QM"
34 W !
35 D ^%ZIS
36 I POP G EXIT
37 S PXRRIOD=ION_";"_IOST_";"_IOM_";"_IOSL
38 S PXRRQUE=$G(IO("Q"))
39 ;
40 I PXRRQUE D
41 . ;Queue the report.
42 . N DESC,IODEV,ROUTINE
43 . S DESC="Location Encounter Count Report - sort"
44 . S IODEV=""
45 . S ROUTINE="SORT^PXRRLCSE"
46 . S ^XTMP(PXRRXTMP,"SORTZTSK")=$$QUE^PXRRQUE(DESC,IODEV,ROUTINE,"SAVE^PXRRLCD")
47 .;
48 . S DESC="Location Encounter Count Report - print"
49 . S IODEV=PXRRIOD
50 . I $P(PXRRLCSC,U,1)["C" S ROUTINE="PXRRLCCP"
51 . E S ROUTINE="PXRRLCHP"
52 . S ZTDTH="@"
53 . S ^XTMP(PXRRXTMP,"PRZTSK")=$$QUE^PXRRQUE(DESC,IODEV,ROUTINE,"SAVE^PXRRLCD")
54 E D SORT^PXRRLCSE
55 Q
56 ;=======================================================================
57 ;
58EXIT ;
59 D EXIT^PXRRGUT
60 Q
61 ;
62 ;=======================================================================
63SAVE ;Save the variables for queing.
64 S ZTSAVE("PXRRBDT")="",ZTSAVE("PXRREDT")=""
65 S ZTSAVE("PXRRCS(")="",ZTSAVE("NCS")=""
66 S ZTSAVE("PXRRFAC(")="",ZTSAVE("NFAC")=""
67 S ZTSAVE("PXRRFACN(")=""
68 S ZTSAVE("PXRRIOD")=""
69 S ZTSAVE("PXRRLCHL(")="",ZTSAVE("NHL")=""
70 S ZTSAVE("PXRRLCSC")=""
71 S ZTSAVE("PXRRQUE")=""
72 S ZTSAVE("PXRRSCAT")=""
73 S ZTSAVE("PXRRXTMP")=""
74 Q
75 ;
Note: See TracBrowser for help on using the repository browser.