source: FOIAVistA/trunk/r/NURSING_SERVICE-NUR/NURSAGSP.m@ 811

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

initial load of FOIAVistA 6/30/08 version

File size: 3.4 KB
Line 
1NURSAGSP ;HIRMFO/MD-GENERIC SORT BY PROMPTS ;7/24/97
2 ;;4.0;NURSING SERVICE;**3**;Apr 25, 1997
3 ; ROUTINE THAT GIVES VARIOUS SORT BY PROMPTS FOR ADMIN REPORTS.
4 ;
5EN1 ; ENTRY FOR WARD SELECTION PROMPT
6 S NURSZ=$$MDIC^NURSAGS0
7 I NURSZ'>0 S NUROUT=1 Q
8 Q
9EN2 ; ENTRY FOR SERVICE POSITION PROMPT
10 S NURSER=0,DIC("A")="Select SERVICE POSITION (Press return for all service positions): " S:$D(NRNS) DIC("S")="I $P(^(0),U,5)=""R"""
11 S DIC="^NURSF(211.3,",DIC(0)="AEMQ" D ^DIC K DIC I '$D(DTOUT),X="" S NURSER=1 Q
12 I $D(DTOUT)!(+Y'>0) S NUROUT=1 Q
13 S NPOS=$P(Y,"^",1)
14 Q
15EN3 ; ENTRY FOR SERVICE CATEGORY PROMPT
16 W ! S NURCAT=0 D EN1^NURSAGP3 I $G(DUOUT)!($G(DTOUT)) S NUROUT=1 Q
17 S ZTSAVE("^TMP(""NURSCAT"",$J,")=""
18 Q
19EN5 ; ENTRY FOR FACILITY/SERVICE SELECTION WITH AUTHORIZATION CHECKS
20 ; IF THE USER HOLDS AN AMIS POSITION OF HEAD NURSE OR LOWER
21 ; THEY CAN ONLY SEE DATA ASSOCIATED WITH THEIR FACILITY(IES)
22 W ! S DIC=213.2,DIC("A")="Select FACILITY"_$S(NURSZAP'>7!('NURSZAP):" (Press return for "_$S(NURSZAP'=7:"all facilities",1:"your facilities")_")",1:"")_": "
23 I NURSZAP S:NURSZAP>6 DIC("S")="S YY=+^NURSA(213.2,Y,0) I $D(NURSZFAC($P(^DIC(4,+YY,0),U)))" I NURSZAP>7 S NURFAC("D")=$O(NURSZFAC("")) K DIC("B") S:NURFAC("D")'="" DIC("B")=NURFAC("D")
24 S NURFAC=0,DIC="^NURSA(213.2,",DIC(0)="AEQZ" D ^DIC K DIC I '$D(DTOUT),$G(X)="" S NURFAC=1 G PRD
25 I '$D(DTOUT),$G(X)="" W:NURSZAP<6 !,$C(7),?5,"PROPER ACCESS REQUIRED TO PRINT ALL LOCATIONS" G:NURSZAP>6 EN5 S NURFAC=1 Q
26 I $D(DTOUT)!(+Y'>0) S NUROUT=1 Q
27 S NURFAC(1)=$G(Y(0,0))
28PRD I $G(NURPLSW) W ! D EN6^NURSAGSP
29 Q
30EN6 ; ENTRY FOR PRODUCT LINE PROMPT
31 S DIC("A")="Select PRODUCT LINE (Press return for all product lines): "
32 S NURPROG=0,DIC="^NURSF(212.7,",DIC(0)="AEMQZ"
33 I "^0^1^"[("^"_$G(NURPLSCR)_"^") S DIC("S")="I $D(^NURSF("_$S(NURPLSCR:211.4,1:211.3)_",""P"",Y))"
34 D ^DIC K DIC I '$D(DTOUT),X="" S NURPROG=1 Q
35 I $D(DTOUT)!(+Y'>0) S NUROUT=1 Q
36 S NURPROG(1)=Y(0,0)
37 Q
38EN8 ; ENTRY FOR BASIC FACILITY SELECTION WITH NO AUTHORIZATION CHECKS
39 Q:$P($G(^DIC(213.9,1,0)),U,9)'="Y"
40 S DIC("A")="Select FACILITY (Press return for all facilities): "
41 S NURFAC=0,DIC="^NURSA(213.2," D ^DIC K DIC I '$D(DTOUT),$G(X)="" S NURFAC=1 Q
42 I $D(DTOUT)!(+Y'>0) S NUROUT=1 Q
43 S NURFAC(1)=$G(Y(0,0))
44 Q
45EN9 ; CONSOLIDATED FACILITY/MULTIPLE PROGRAM OFFICE CHECKS
46 I $D(NURMDSW),$P($G(^DIC(213.9,1,0)),U,9)="Y" S NURMDSW=1
47 I $D(NURPLSW),$P($G(^DIC(213.9,1,0)),U,8)="Y" S NURPLSW=1
48 Q
49EN10 ; STATE FILE LOOK-UP
50 K NSTAT S NSTAT=0,DIC("A")="Select STATE (Press return for all states): ",DIC(0)="AEQMZ",DIC="^DIC(5," D ^DIC K DIC I '$D(DTOUT),X="" S NSTAT=1 Q
51 I $D(DTOUT)!(+Y'>0) S NUROUT=1 Q
52 S NSTAT(1)=+Y
53 Q
54EN11 ; Summary/Full report selection
55 S DIR("A")="Select Reporting Option: ",DIR("A",1)="",DIR("A",2)="1. Summary Report",DIR("A",3)="",DIR("A",4)="2. Full Report.",DIR("A",5)="",DIR(0)="NA^1:2" D ^DIR K DIR I $G(DIRUT) S NUROUT=1 Q
56 I X=1 S NURSUMSW=1
57 Q
58EN12 ; Multi-Divisional Summary/Full report selection
59 S DIR("A")="Select Reporting Option: ",DIR("A",1)="",DIR("A",2)="1. Multi-Divisional Summary Report.",DIR("A",3)="",DIR("A",4)="2. Detailed Multi-Divisional Report.",DIR("A",5)="",DIR(0)="NA^1:2" D ^DIR K DIR I $G(DIRUT) S NUROUT=1 Q
60 I X=1 S NURSUMSW=1
61 Q
62EN13 ; Location/Service Category sort selection
63 S DIR("A")="Sort By: ",DIR("A",1)="",DIR("A",2)="1. Unit",DIR("A",3)="",DIR("A",4)="2. Service Category",DIR("A",5)="",DIR(0)="NA^1:2" D ^DIR K DIR I $G(DIRUT) S NUROUT=1
64 S NURSEL(1)=X
65 Q
Note: See TracBrowser for help on using the repository browser.