source: FOIAVistA/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNLR1.m@ 674

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

initial load of FOIAVistA 6/30/08 version

File size: 2.5 KB
Line 
1SPNLR1 ;ISC-SF/GB-SCD SETUP FOR REPORTS ;6/23/95 11:52
2 ;;2.0;Spinal Cord Dysfunction;;01/02/1997
3 ; This subroutine asks the user questions concerning the report.
4 ; It should be called using the ENTRY entry point. RPTID and ABORT
5 ; must be supplied by the calling program. All parms except RPTID
6 ; should be "call by reference".
7 ; ABORT must be tested by calling program upon return.
8ASK(RPTID,FDATE,TDATE,QLIST,HIUSERS,ABORT) ;
9 I "ABCDEF"[RPTID D
10 . D ASK1
11 E D ASK2
12 K SPNLTRAM,SPNLTRM1,SPNTD,SPNCAUSE,SPND1,SPNETIOL
13 Q
14ASK1 ;
15 D @("ASK^SPNLR"_RPTID_"(.QLIST,.ABORT)") Q:ABORT
16 I RPTID'="F" D EN^SPNLRU1 Q:ABORT
17 I $G(QLIST("WINDOW"))=1 D Q:ABORT
18 . D GETWIN
19 E S (FDATE,TDATE)=""
20 S HIUSERS=0
21 Q
22ASK2 ;
23 ; FDATE,TDATE: Get report period (window)
24 D GETWIN Q:ABORT
25 ;
26 ; Call the report routine to let it ask its specific questions
27 D @("ASK^SPNLR"_RPTID_"(.QLIST,.ABORT)") Q:ABORT
28 ;
29 D EN^SPNLRU1 Q:ABORT
30 I "QRS"[RPTID D
31 . D SEEUSE ; HIUSERS: Do you want to see the users?
32 E D HIUSE Q:ABORT ; HIUSERS: How many highest users do you want identified?
33 Q
34GETWIN ; Ask the user for the period (window)
35 N DIR,DIRUT,Y
36 ; Enter a Date; Optional; no minimum; today is maximum; Exact date
37 S DIR(0)="DO^:DT:EX"
38 S DIR("A")="Start date for period"
39 S DIR("?")="^D HELP^%DTC"
40 D ^DIR I $D(DIRUT) S ABORT=1 Q
41 S FDATE=Y
42 S DIR(0)="DO^"_FDATE_":DT:EX"
43 S DIR("B")="TODAY"
44 S DIR("A")=" End date for period"
45 S DIR("?")="^D HELP^%DTC"
46 D ^DIR I $D(DIRUT) S ABORT=1 Q
47 S TDATE=Y
48 Q
49HIUSE ;
50 N DIR,DIRUT,Y
51 S DIR(0)="NO^0:100" ; Optional number from 0 to 100
52 S DIR("B")=0 ; Default answer
53 I $D(^XUSEC("SPNL SCD PTS",DUZ)) D
54 . S DIR("A")="Number of highest users to identify"
55 . S DIR("?")="Enter the number of patients you want identified who have used the most resources"
56 E D
57 . S DIR("A")="Number of highest users (data only) to identify"
58 . S DIR("?")="Only patient resource utilization data is displayed, as you are not authorized to see patient names and SSNs"
59 D ^DIR I $D(DIRUT) S ABORT=1 Q
60 S HIUSERS=Y
61 Q
62SEEUSE ; For the "specific" reports, should we show the patients or not?
63 N DIR,DIRUT,Y
64 I $D(^XUSEC("SPNL SCD PTS",DUZ)) D
65 . S DIR(0)="YAO" ; Answer yes or no
66 . S DIR("B")="YES" ; Default answer
67 . S DIR("A")="Do you want to see patient usage data? "
68 . S DIR("?")="Answer YES to list resource utilization data broken out by patient. Answer NO to list only the totals for each selection."
69 . D ^DIR I $D(DIRUT) S ABORT=1 Q
70 . S HIUSERS=Y
71 E S HIUSERS=0 ; don't show patients
72 Q
Note: See TracBrowser for help on using the repository browser.