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

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

initial load of WorldVistAEHR

File size: 3.4 KB
Line 
1PXRRPCE ;HIN/MjK - Clinic Specific Workload Reports ;8/28/96
2 ;;1.0;PCE PATIENT CARE ENCOUNTER;**3,146**;Aug 12, 1996
3EN D CLEAN^PXRRPCEQ K ^TMP($J) I '$D(PXRRDEMG) S VAUTD=1
4CLSTOP ;_._._._._._._._._._._Clinic Vs Stop Code_._._._._._._._._._._.
5 D HDR^PXRRPCR,MEAN^PXRRPCR:$D(PXRRDEMG) S PXRI=1,DIR(0)="SA^H:HOSPITAL LOCATION;S:CLINIC STOP CODE",DIR("A")="Select clinic(s) by (H)OSPITAL LOCATION or CLINIC (S)TOP CODE: " D ^DIR K DIR G:$D(DIRUT) QT G STOP:Y="S" W !
6CLIN ;_._._._._._._._._.Select Clinic for Report_._._._._._._._._.
7 S DIC="^SC(",DIC(0)="QAENMZ",DIC("S")="I $P(^(0),U,3)=""C""!($P(^(0),U,3)=""Z"")",DIC("A")=$S(PXRI=1:"Select HOSPITAL LOCATION name: ",1:"Another HOSPITAL LOCATION name: ")
8 D ^DIC I Y>0 S VAUTC=0 S:'$D(PXRI(+Y)) VAUTC(+Y)=+Y S PXRRCLIN(PXRI)=Y(0,0)_U_+Y,PXRI=PXRI+1,PXRI(+Y)="" G CLIN
9 K DIC G QT:'$D(PXRRCLIN)!($D(DUOUT))
10STOP ;_._._._._._._._._.Select Stop Code for Report_._._._._._._._._.
11 I '$D(PXRRCLIN) W ! S DIC=40.7,DIC(0)="QAENMZ",DIC("A")="Select the CLINIC STOP code: ",DIC("S")="I $P($G(^(0)),U,3)=""""" D ^DIC K DIC G:Y<0 QT S PXRRSC=+Y,PXRSTPNM=Y(0,0)
12DTRANGE ;_._._._._._._._._.Select Date Range For Values_._._._._._._._._.
13 W !! S DIR(0)="DA^2931001:DT:PXEX",DIR("A")="Enter ENCOUNTER BEGINNING DATE: ",DIR("??")="^D BDT^PXRRPCR"
14 D ^DIR K DIR G:Y'>0 QT S (PXRRBDT,SDBD)=Y+.0001,DIR(0)="DA^"_$P(SDBD,".")_":DT:PXEX",DIR("A")="Enter ENCOUNTER ENDING DATE: ",DIR("B")=$$FMTE^XLFDT(DT),DIR("??")="^D EDT^PXRRPCR" D ^DIR K DIR I Y'>0 G QT
15 S (PXRREDT,SDED)=Y+.9999
16ZIS W ! K IOP,IO("Q") S POP=0,%ZIS="QM" D ^%ZIS K %ZIS,IOP G:POP QT
17 I $D(IO("Q")) K IOP S ZTRTN=$S($D(PXRRSC):"ST^PXRRPCE",1:"DEMOGR^PXRRPCE"),ZTDESC="PCE CLINICAL DATA REPORTS",ZTSAVE("PXR*")="",ZTSAVE("SD*")="",ZTSAVE("V*")="" D LOAD G QT
18STOPCL U IO I $D(PXRRSC) D STPVAUTC
19 G:$D(PXRRDEMG) DEMOGR
20 ;_._._._._._._._._Clinic Workload Variables_._._._._._._._._._.
21ST D:$D(PXRRSC)&('$D(PXRRCLIN)) STPVAUTC
22 S VAUTD=1
23 S SDCL="",(SDALL,SDADD,SDPRE)=0,SDF="D",SDRT="E",SDS="C",SDNAM=1
246 S (SDOB,SDPG,SDHR,SD1)=0 F I=0:0 S I=$S(VAUTC:$O(^SC(I)),1:$O(VAUTC(I))) Q:'I D SET^SDCWL3
25 I '$D(^TMP($J,"CL")),'$D(^("SC")) G NONE
26REPORT G QT:'$D(^TMP($J))
27VIS ;_._._._._._._._._._._._.Clinic Workload_._._._._._._._._._._._._
28 I '$D(PXRRCASE)&('$D(PXRRDEMG)) D ^PXRRPCE1,^PXRRPCR1 G QT
29ACTIVTY ;_._._._._._._._._._._._Caseload Activity_._._._._._._._._._._._.
30 I $D(PXRRCASE) D ^PXRRPCE2,^PXRRPCR2 G QT
31DEMOGR ;_._._._._._._._._._._._Caseload Demographics_._._._._._._._._._.
32 I $D(PXRRDEMG) D G QT
33 . S PXRC=0 F S PXRC=$O(PXRRCLIN(PXRC)) Q:'PXRC S PXRRCLIN=$P(PXRRCLIN(PXRC),U,2) D ^PXRRPCE3,CLEAN^PXRRPCEQ
34 . D:$D(^TMP($J,"CLINIC TOTALS")) MEAN^PXRRPCE5
35 . S PXR=0 F S PXR=$O(PXRRCLIN(PXR)) Q:'PXR S PXRRCLIN=$P(PXRRCLIN(PXR),U,2) D ^PXRRPCR3
36QT D ^%ZISC,^PXRRPCEQ Q
37CQT K PXRRCLIN,PXRRBDT,PXRREDT,PXRSTPNM
38NONE D HDR^PXRRPCR W !?5,"o There were no appts for this clinic in this date range",!?5,"o Note: This report is run from patient appts., not clinic enrollment." G QT
39LOAD D ^%ZTLOAD
40 I $D(ZTSK)=0 W !,"Request Cancelled"
41 E W !,"Request queued, task number "_ZTSK
42 S:'$D(ZTSK) X="^" I $D(ZTSK),'$D(ZTQUEUED) N POP D ^%ZISC G QT
43 Q
44STPVAUTC ;_._.Set up VAUTC array for Stop Code_._._.
45 S (VAUTC,X)=0 F S X=$O(^SC("AC","C",X)) Q:'X I $P($G(^SC(X,0)),U,7)=PXRRSC D
46 . I '$D(^SC(X,"I")) S VAUTC(X)=X,PXRRCLIN(PXRI)=$P(^SC(X,0),U)_U_X,PXRI=PXRI+1 Q
47 . S Y=$G(^SC(X,"I")) I $P($G(Y),U,2)>$P($G(Y),U) S VAUTC(X)=X,PXRRCLIN(PXRI)=$P(^SC(X,0),U)_U_X,PXRI=PXRI+1
48 Q
Note: See TracBrowser for help on using the repository browser.