source: WorldVistAEHR/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGDIST1.m@ 648

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

initial load of WorldVistAEHR

File size: 2.5 KB
Line 
1DGDIST1 ;ALB/MRL - DISPOSITION TIME STUDY, CONTINUED ; 13 MAY 1987
2 ;;5.3;Registration;;Aug 13, 1993
3 S DGPG=0,(DGL,DGL1)="",$P(DGL,"=",131)="",$P(DGL1,"-",131)="",DGF=""
4 F I=0:0 S DGF=$O(^UTILITY($J,"DGT","D",DGF)),DGH="" Q:DGF="" I +^(DGF)>0 D H F I1=0:0 S DGH=$O(^UTILITY($J,"DGT","D",DGF,"H",DGH)) D:DGH="" D Q:DGH="" S DGW=0,DGD=^(DGH) D W
5 G NC:DGDIV S DGW=2,DGF="" D H F I=0:0 S DGF=$O(^UTILITY($J,"DGT","D",DGF)) Q:DGF="" S DGD=^(DGF) D W
6 S DGW=3,DGD=^UTILITY($J,"DGT") W !,DGL1,!,DGL1 D W S DGN=+^UTILITY($J,"DGT","NC") D C
7NC D:$D(^UTILITY($J,"DGT","ND")) LIST G Q^DGDIST
8W Q:'$P(DGD,"^",1) I $Y>$S($D(IOSL):(IOSL-6),1:60) D H
9W1 S X=+$P(DGD,"^",1),X1=$S(X>0:($P(DGD,"^",2)\X),1:0) I X1>0 S X2=X1\60,X3=X1-(X2*60),X3=$E($S(X3<10:"0"_X3,1:X3)_"00",1,2),X1=X2_":"_X3
10 E S X1="00:00"
11 W !,$S('DGW:DGH,DGW=1:"DIVISION SUB-TOTAL",DGW=2:DGF_" DIVISION",1:"MEDICAL CENTER TOTAL"),?35,$J(X,8),?45,$J(X1,9),?57,"|" S DGX=60 F DGY=3:1:11 W ?DGX,$J(+$P(DGD,"^",DGY),6) S DGX=DGX+8
12 S DGN=0 I DGW=1 S DGN=+^UTILITY($J,"DGT","D",DGF,"NC") D C
13 Q
14H S DGPG=DGPG+1 W @IOF,!,$S(DGW=2:"MEDICAL CENTER TOTAL",1:DGF)_", "_DGHD
15 W !,DGL,!?57,"|",?85,"# PATIENTS DISPOSITIONED WITHIN",!?57,"|",?126,"Over",!?34,"Number of",?47,"Average",?57,"|",?69,"2",?77,"8",?85,"24",?93,"48",?101,"72",?118,"30",?126,"30"
16 W !,$S(DGW'=2:"Type of Disposition",1:"Division"),?35,"Patients",?50,"Time",?57,"|",?60,"1 Hour",?69,"Hours",?77,"Hours",?85,"Hours",?93,"Hours",?101,"Hours",?108,"7 days",?118,"days",?126,"Days",!,DGL Q
17D S DGW=$S(DGDIV:2,1:1),DGD=^UTILITY($J,"DGT","D",DGF) W !,DGL1,!,DGL1 D W Q
18C D LF W !,"NOTE(S)",!,"-------",!,"'Average Time per Disposition' is in HOURS:MINUTES format.",!,"NOTE: Applications without examination are not included in this report."
19 W !,"Applications for Nursing Home, Domiciliary and Dental Care are not included in this report."
20 I DGN W !,"There are '",DGN,"' registrations which have not been dispositioned which are not included in the above totals." I 'DGU W " See attached Listing."
21TR W !!,DGL,!,DGPR,?120,"Page: ",DGPG Q
22LF F DGA=$Y:1:$S($D(IOSL):(IOSL-14),1:52) W !
23 Q
24LIST D H1 S DGP="" F I=0:0 S DGP=$O(^UTILITY($J,"DGT","ND",DGP)) Q:DGP="" F I1=0:0 S I1=$O(^UTILITY($J,"DGT","ND",DGP,I1)) Q:'I1 S DGD=^(I1) D LW
25 D LF,TR Q
26LW I $Y>$S($D(IOSL):(IOSL-6),1:60) D LF,TR,H1
27 W !,DGP,?45,$P(DGD,"^",1),?60,$P(DGD,"^",2),?100,$P(DGD,"^",3) Q
28H1 S DGPG=DGPG+1 W @IOF,!,DGHD,", Undispositioned Registrations",!,DGL,!,"Patient Name",?45,"PT ID",?60,"Division",?100,"Registration Date/Time",!,DGL Q
Note: See TracBrowser for help on using the repository browser.