source: FOIAVistA/trunk/r/NURSING_SERVICE-NUR/NURARWL1.m@ 1757

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

initial load of FOIAVistA 6/30/08 version

File size: 3.9 KB
Line 
1NURARWL1 ;HIRMFO/RM,MD-(CURRENT) MANHOURS WORKLOAD STATISTICS REPORT ;7/29/96
2 ;;4.0;NURSING SERVICE;**17**;Apr 25, 1997
3 S X=$G(^DIC(213.9,1,"OFF")) Q:X=""!(X=1)
4 S (NHOS,NUROUT,NURQUEUE,NURMDSW,NURPLSW)=0 D EN9^NURSAGSP,LOSER^NURARST G QUIT:NUROUT,EN1:SEL=2,EN2:SEL=1
5EN2 ; ENTRY FROM OPTION NURAPR-RES-CWLOC
6 G MAINLINE
7EN1 ; ENTRY FROM OPTION NURAPR-RES-CWLSER
8 S NHOS=1,NWARD=""
9 I NURMDSW D EN12^NURSAGSP G:$G(NUROUT) QUIT W ! S DIC(0)="AEMQZ" D EN8^NURSAGSP I $G(NUROUT) G QUIT
10MAINLINE ;
11 S (NPCT,NURQUIT,NSW1)=0,NURS132=1 D EN1^NURSAUTL G QUIT:NUROUT
12 I '$P($G(^DIC(213.9,1,0)),U,7) D S DIE=213.9,DA=1,DR="8" D ^DIE K DIE,DR G:U[X QUIT
13 .W !,$C(7),?5,"The professional percentage default site parameter, for wards without an",!,?5,"entry in the professional percentage field, in the NURS LOCATION File",!,?5,"entry must be entered: ",!
14 .Q
15 I '$D(^NURSF(211.4,"ABS")) W !!,$C(7),"To generate this report AMIS Bedsections must be associated with MAS locations",!,"Contact the NURSING ADP Coordinator." G QUIT
16 I $S('$D(^DIC(213.9,1,0)):1,'+$P(^(0),U,4):1,'+$P(^(0),U,5):1,'+$P(^(0),U,6):1,1:0) S NUROUT=1 W !!,$C(7),"Missing Site Parameter Cannot continue",! G QUIT
17 I 'NHOS D G:NUROUT QUIT
18 .S DIC("A")="Enter Unit: ",DIC("S")="I $S('$D(^(""I"")):1,$P(^(""I""),U)'=""I"":1,1:0),$S('$D(^(1)):1,$P(^(1),U)=""A"":1,1:0)",DIC(0)="AQEMZ",DIC=211.4 W ! D ^DIC K DIC
19 .I (+Y'>0)!(U[X) S NUROUT=1 Q
20 .S NURSWARD=+Y,NURSWARD(1)=Y(0,0)
21 .Q
22 S NURY(1)=$P(^DIC(213.9,1,0),U,4,6) D NOW^%DTC S NURY(0)=$E($P(%,".",2)_"0001",1,4)
23 S NURY(2)=$S(NURY(0)>+$P(NURY(1),U,2)!(NURY(0)'>+$P(NURY(1),U,3)):"N",NURY(0)>+$P(NURY(1),U,3)&((NURY(0)'>+$P(NURY(1),U))):"D",1:"E")
24 S NURY=-1 F W !!,"Select (N)ight, (D)ay, or (E)vening Shift: "_NURY(2)_"// " R NURY:DTIME S:'$T NURY="^^" Q:"^^"[NURY S NURY=$$UP^XLFSTR(NURY) D Q:NURY'=""
25 .I NURY'="E"&(NURY'="N")&(NURY'="D") W !!,$C(7),"Enter 'D' for Day, 'E' for Evening or 'N' for Night shift" S NURY="" Q
26 .Q
27 S:NURY="" NURY=NURY(2) S NURSHFT=NURY
28 I "^^"[NURY S NUROUT=1 G QUIT
29 W ! S NURS132=1 D QUEUE,EN7^NURSUT0 G:POP!($D(ZTSK)) QUIT
30Q1 ;
31 S X=$S(NURY(2)="D"&(NURY="N"):"T+1",NURY(2)="E"&(NURY="N"!(NURY="D")):"T+1",1:"T"),%DT="" D ^%DT S NRPTDAT=+Y I 'NHOS D CALCULAT
32 I NHOS F NURSWARD=0:0 S NURSWARD=$O(^NURSF(211.4,"D","A",NURSWARD)) Q:NURSWARD'>0 D CALCULAT
33 S K="",K=$O(NURSPC("")) I K="" K K G NODATA
34 K ^TMP($J),^TMP("NURVAR",$J) S (COUNTSW,NWCNT,NFCNT,NPCT,NPCC,NBPCC,NFPCC,NHPCC,NCPCC,NWPCC,NAFTEE,DAFTEE,EAFTEE)=0,NBR=1,$P(NURSY,"-",132)=""
35 F X="DOM","REC","HEM" S COUNT(X)="",MNHRS(X)="" I NURMDSW,NHOS S MFHRS(X)="",FCOUNT(X)=""
36 F X=1:1:5 S $P(NPC,U,X)=0,$P(NBPC,U,X)=0,$P(NWPC,U,X)=0,$P(NFPC,U,X)=0,$P(NHPC,U,X)=0,$P(NCPC,U,X)=0,$P(NHCPC,U,X)=0
37 S (NFTEE,NDFTEE,NWREQ,NWVAR,NWPROD,NWFTEE,NHREQ,NHVAR,NHPROD,NHFTEE,NHCVR,NHCPRD,NHCFT)="" S:NURMDSW&(NHOS) (NFREQ,NFVAR,NFPROD,NFFTEE,NFCVR,NFCPRD,NFCFT)=""
38 U IO D ^NURARWL2 G:NUROUT QUIT I NHOS,'NURMDSW!($G(NURFAC)) D HTOT^NURARWL8
39 D:'$G(NURSUMSW) ENDPG^NURSUT1
40 D VAR^NURARWL9
41 I 'NHOS D ENDPG^NURSUT1
42 I $E(IOST)="C",'NHOS D ^%ZISC K NURSPC W @IOF G MAINLINE
43QUIT ;
44 D CLOSE^NURSUT1,^NURAKILL
45 Q
46NODATA S NPCT=0,NPWARD=$G(NURSWARD(1)),NPFAC=$S($G(NURFAC)=0:NURFAC(1),1:"") D HEADER^NURARWL3 W !,"THERE IS NO DATA FOR "_$S($G(NURSWARD(1))'="":NURSWARD(1),1:"THIS REPORT.")
47 G QUIT
48QUEUE ; QUEUE JOB TO TASKMAN
49 S ZTRTN="Q1^NURARWL1"
50 S:'NHOS ZTSAVE("NURSWARD")=""
51 Q
52CALCULAT ; CALC. PT. CATEGORY TOT.
53 I NURMDSW S NURFAC(2)=$$EN12^NURSUT3($G(NURSWARD)) Q:$G(NURFAC(2))=""
54 E S NURFAC(2)=" BLANK"
55 I NURMDSW,$G(NURFAC(1))'="" Q:$G(NURFAC(1))'=$G(NURFAC(2))
56 W:$E(IOST)="C"&($R(100)) "."
57 S NI=0 F S NI=$O(^NURSF(211.4,"ABS",NI)) Q:NI'>0 I $D(^NURSF(211.4,"ABS",NI,NURSWARD)) D
58 . I $S('$D(^NURSF(211.4,NURSWARD,"I")):1,$P($G(^("I")),U)'="I":1,1:0),$S('$D(^NURSF(211.4,NURSWARD,1)):1,$P($G(^(1)),U)="A":1,1:0) S NZ=0,NZ=NURSWARD F NK=1:1:5 S NURSPC(NURFAC(2),NK,NURSWARD,NI)=0 S NTCEN(NURSWARD)=0
59 . Q
60 F DFN=0:0 S DFN=$O(^NURSF(214,"AF","A",NURSWARD,DFN)) Q:DFN'>0 D:$D(NTCEN(NURSWARD)) ADDTOT^NURARWL2
61 Q
Note: See TracBrowser for help on using the repository browser.