source: FOIAVistA/trunk/r/NURSING_SERVICE-NUR/NURARPC1.m@ 1119

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

initial load of FOIAVistA 6/30/08 version

File size: 1.9 KB
Line 
1NURARPC1 ;HIRMFO/RM/MD-PRINT AMIS 1106 ACUITY REPORTS (cont.) ;2/27/98 14:38
2 ;;4.0;NURSING SERVICE;**9,13**;Apr 25, 1997
3SETDAY ; SET DAY IF DAILY REPORT
4 D EN7^NURSAGP1 Q:NUROUT
5 Q
6SETMON ; SET MONTH IF MONTHLY REPORT
7 W !!,"Enter MONTH and CALENDER YEAR: "
8 R X:DTIME
9 I '$T!("^"[X) S NUROUT=1 Q
10 S %DT="E" D ^%DT K %DT
11 G:((X["?")) SETMON
12 S X=Y D H^%DTC I ((%Y'=-1)!($E(Y,6,7)'="00")!($E(Y,4,5)="00")) W $C(7),!!,"Only enter a MONTH and YEAR eg. '3/1998 or MAR, 1998' " G SETMON
13 S NDATED=$E(Y,1,5)_"MT"
14 S:'$D(NURTYPE) NURTYPE=0 S NURSHDR=$S(NURTYPE=0:"AMIS ",1:"Midnight Acuity ")_"Monthly Report for "_$E(NDATED,4,5)_"/"_$E(NDATED,2,3)
15 Q
16SETQUART ; SET QUARTER IF QUARTERLY REPORT
17 W ! S %DT="AE",%DT("A")="Enter FISCAL YEAR: "
18 D ^%DT K %DT
19 I X="^" S NUROUT=1 Q
20 G:((Y<0)!(X["?")) SETQUART
21 S X=Y D H^%DTC I ((%Y'=-1)!($E(Y,4,5)'="00")) W *7,!!,"Only enter a YEAR" G SETQUART
22 K %Y S NDATED=$E(Y,1,3) S:'$D(NURTYPE) NURTYPE=0
23 I NURSWHEN["A" S NURSHDR=$S(NURTYPE=0:"AMIS ",1:"Midnight Acuity ")_"Annual Report for "_(1700+$E(NDATED,1,3)) Q
24SETQUAR1 ;
25 W !!,"Enter QUARTER (Choose a number 1-4): "
26 R X:DTIME
27 I X="^"!'$T S NUROUT=1 Q
28 I ((X'?1N)!(X<1)!(X>4)) W $C(7) G SETQUAR1
29 S NDATED=$S(X=1:NDATED_"12Q1",X=2:NDATED_"03Q2",X=3:NDATED_"06Q3",X=4:NDATED_"09Q4",1:0)
30 I NDATED=0 W *7,!!!,"INVALID ENTRY, TRY AGAIN" G SETQUART
31 S:'$D(NURTYPE) NURTYPE=0 S NURSHDR=$S(NURTYPE=0:"AMIS ",1:"Midnight Acuity ")_"Quarterly Report for "_(1700+$E(NDATED,1,3))_" Qtr. #"_$E(NDATED,7)
32 Q
33NOVALU(NDA) ;
34 ; This function checks inactive units to see if they have acuity
35 ; data for the requested reporting period. If a unit has acuity
36 ; data a one (1) is returned otherwise a zero (0) is returned,
37 N NURX S NURX=1,NUNIT=$E($P($G(^NURSA(213.4,NDA,0)),U),9,99)
38 I $G(^NURSF(211.4,+NUNIT,"I"))="I" D
39 . S D1=0 F S D1=$O(^NURSA(213.4,NDA,1,D1)) Q:D1'>0 D:$G(^NURSA(213.4,NDA,1,D1,0))'=""
40 . . I $P(^NURSA(213.4,NDA,1,D1,0),U,2,6)="0^0^0^0^0" S NURX=0
41 . . Q
42 . Q
43 K NUNIT
44 Q NURX
Note: See TracBrowser for help on using the repository browser.