source: FOIAVistA/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNCMR.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 2.0 KB
Line 
1SPNCMR ;HIRMFO/WAA,RM-LIST Chart/ID Band mark report ; 2/8/93
2 ;;2.0;Spinal Cord Dysfunction;;01/02/1997
3 ;;
4EN1 ;PRIMARY ENTRY POINT
5 S SPNLEXIT=0
6QST K DIR S DIR(0)="LAO^1:4"
7 S DIR(0)=DIR(0)_"^I X[""."" W !,""DO NOT USE DECIMAL VALUES."",$C(7) K X Q"
8 S DIR("A",1)=" 1 Current Inpatients",DIR("A",2)=" 2 Outpatients over Date/Time range",DIR("A",3)=" 3 New Admissions over Date/Time range",DIR("A",4)=" 4 All of the above"
9 S DIR("A")="Enter the number(s) for those groups to be used in this report: (1-4):"
10 S DIR("?",1)=" ENTER THE NUMBER(S) FOR THOSE GROUPS TO BE INCLUDED IN THIS REPORT.",DIR("?")=" THIS RESPONSE MUST BE A LIST OR RANGE, E.G., 1,3 OR 2-3"
11 D ^DIR K DIR
12 I "^^"[Y S SPNLEXIT=1 Q
13 S SPNQST=""
14 S:Y["4" Y="1,2,3"
15 S SPNSEL=Y
16 S:SPNSEL["1" SPNQST=SPNQST_"W"
17 S:SPNSEL["2" SPNQST=SPNQST_"CM"
18 S:SPNSEL["3" SPNQST=SPNQST_"W"
19 D DATE Q:SPNLEXIT
20 ;Select the ward or clinic
21 S Y=$$MDIC^SPNCMR1 I Y<1 S SPNLEXIT=1
22 Q:SPNLEXIT
23 Q
24DATE ;DATE SELECTION
25 ;FROM DATE
26 Q:'(SPNSEL["2"!(SPNSEL["3"))
27 W !," Enter date/time range in which patients were",!,$S(SPNSEL["3":" admitted into the hospital"_$S(SPNSEL["2":" or",1:""),1:""),$S(SPNSEL["2":" seen at an outpatient clinic",1:""),"."
28 W !!,"Enter START Date (time optional): " R X:DTIME S:'$T X="^^" I "^^"[X S SPNLEXIT=1 Q
29 I X?1"?".E D G DATE
30 . S %DT="TEX" D HELP^%DTC
31 . W !!?4,"ENTER THE START DATE/TIME OF RANGE TO SEE PATIENTS THAT WERE",!?3,$S(SPNSEL["3":" ADMITTED TO THE HOSPITAL"_$S(SPNSEL["2":" OR",1:""),1:""),$S(SPNSEL["2":" SEEN AT AN OUTPATIENT CLINIC",1:""),".",!
32 . Q
33 S %DT="TEX" D ^%DT
34 I +Y'>0 G DATE
35 S SPNST=Y K %DT,Y
36END ;
37 W !,"Enter END Date (time optional): T// " R X:DTIME S:'$T X="^^" S:X="" X="T" I "^^"[X S SPNLEXIT=1 Q
38 I X?1"?".E D G END
39 . S %DT="TEX",%DT(0)=SPNST D HELP^%DTC
40 . W !!?4,"ENTER THE END DATE/TIME OF RANGE TO SEE PATIENTS THAT WERE",!?3,$S(SPNSEL["3":" ADMITTED TO THE HOSPITAL"_$S(SPNSEL["2":" OR",1:""),1:""),$S(SPNSEL["2":" SEEN AT AN OUTPATIENT CLINIC",1:""),".",!
41 . Q
42 S %DT(0)=SPNST,%DT="TEX" D ^%DT
43 I +Y'>0 G END
44 S SPNED=Y K %DT,Y
45 Q
Note: See TracBrowser for help on using the repository browser.