source: FOIAVistA/trunk/r/NURSING_SERVICE-NUR/NURARPC0.m@ 1742

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

initial load of FOIAVistA 6/30/08 version

File size: 2.7 KB
Line 
1NURARPC0 ;HIRMFO/MD-DRIVER TO PRINT AMIS 1106 ACUITY REPORTS ;2/28/96
2 ;;4.0;NURSING SERVICE;;Apr 25, 1997
3 Q:'$D(^DIC(213.9,1,"OFF")) Q:$P(^DIC(213.9,1,"OFF"),"^",1)=1
4 S (NURQUEUE,NUROUT,NURMDSW,NURMDSW(3))=0 D LOSER^NURARST G QUIT:NUROUT,EN1:SEL=2,EN2:SEL=1
5EN1 ; ENTRY FROM OPTION NURAPR-RES-PCSER
6 S NHOSPSW=1,NURSTYPE="",NURSUMSW=0
7 G HSKEEP
8EN2 ; ENTRY FROM OPTION NURAPR-RES-PCLOC
9 S NHOSPSW=0,NURSTYPE="U"
10HSKEEP ; SET LOCAL VARIABLES
11 S NURPAGE=0,(NURSWARD,NBDSECT,NURSWHEN)="",%DT="",X="T",(NURMDSW(1),NURMDSW(2))=1
12 D ^%DT S NRPTDAT=Y
13 D RPTYPSEL,REPTYPE:NHOSPSW,WARDSEL:'NHOSPSW I $G(NUROUT) G QUIT
14 D @$S(NURSTYPE="U"&(NHOSPSW):"HOSPSEL",1:"BEDSEL") I $G(NUROUT) G QUIT
15 D TIMESEL I NUROUT G QUIT
16 D @$S(NURSWHEN="D":"SETDAY^NURARPC1",NURSWHEN="M":"SETMON^NURARPC1",NURSWHEN="Q"!(NURSWHEN="A"):"SETQUART^NURARPC1",1:"ERROR") W !
17 G:NUROUT QUIT
18 S ZTRTN="START^NURARPC0" D EN7^NURSUT0 G:POP!($D(ZTSK)) QUIT
19START ;
20 K ^TMP($J),^TMP("NURBDSM",$J)
21 D ^NURARPC3
22 I '$D(ZTSK),'NUROUT G HSKEEP
23QUIT ; KILL LOCAL VARIABLES
24 D CLOSE^NURSUT1,^NURAKILL
25 Q
26RPTYPSEL ; SELECT WHETHER REPORT IS BED SECTION OR WARD
27 W !!!!,?21,"Patient Classification Data",!!,?19,"AMIS Report 10-1106 Segment 200"
28 Q
29REPTYPE ;
30 D EN9^NURSAGSP
31 I NURMDSW D:NHOSPSW EN12^NURSAGSP Q:$G(NUROUT) W ! S DIC(0)="AEMQZ" D EN8^NURSAGSP Q:$G(NUROUT)!$G(NURSUMSW)
32 W !!,?13,"Please select whether this report is to show",!,?13,"acuity by unit or bed section"
33 R !!,?13,"Select U for Unit or B for Bed Section: ",NURSTYPE:DTIME
34 I "^"[NURSTYPE!('$T) S NUROUT=1 Q
35 I NURSTYPE?1L S NURSTYPE=$C($A(NURSTYPE)-32)
36 Q:((NURSTYPE="B")!(NURSTYPE="U"))
37 W $C(7) G REPTYPE
38HOSPSEL ; SET UP FOR WHOLE HOSPITAL REPORT
39 S NURSWARD="" Q
40WARDSEL ; SELECT WARD FOR REPORT
41 S DIC("S")="I '($G(^(""I""))=""A""&($P($G(^(1)),U)=""I""))"
42ASK R !!,"Select Nursing Unit: ",X:DTIME I "^"[X!('$T) S NUROUT=1 Q
43 S DIC="^NURSF(211.4,",DIC(0)="EMZQ" D ^DIC K DIC
44 I +Y'>0 G ASK
45 S NURSWARD(0)=Y(0,0),NURSWARD=+Y
46 Q
47BEDSEL ; SELECT BED SECTION FOR REPORT
48 Q:$G(NURSUMSW) W !!,"Select Nursing Bed Section (Press return for all bed sections): "
49 R NBDSECT:DTIME I NBDSECT="^"!'$T S NUROUT=1 Q
50 Q:NBDSECT=""
51 S X=NBDSECT,DIC="^NURSF(213.3,",DIC(0)="QEM" D ^DIC K DIC G:((+Y=-1)!(X["?")) BEDSEL
52 S NBDSECT=+Y
53 Q
54TIMESEL ; SELECT REPORT RANGE (DAILY, MONTHLY, QUARTERLY OR ANNUALLY)
55 W !!,?13,"Select report range: ",!!,?18,"Daily",!,?18,"Monthly",!,?18,"Quarterly",!,?18,"Annually"
56TIME ;
57 R !!,?13,"Enter Selection (D,M,Q or A): ",NURSWHEN:DTIME
58 I "^"[NURSWHEN!('$T) S NUROUT=1 Q
59 I NURSWHEN?1L S NURSWHEN=$C($A(NURSWHEN)-32)
60 Q:((NURSWHEN="A")!(NURSWHEN="D")!(NURSWHEN="M")!(NURSWHEN="Q"))
61 W $C(7) G TIME
62 Q
63ERROR ; ERROR IN SELECTION PROCESS
64 W !!,$C(7),"CANNOT RUN REPORT, PARAMETERS WERE BADLY CHOSEN"
65 S NUROUT=1
66 Q
Note: See TracBrowser for help on using the repository browser.