source: FOIAVistA/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNPSR10.m@ 1203

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

initial load of FOIAVistA 6/30/08 version

File size: 2.2 KB
Line 
1SPNPSR10 ;HIRMFO/DAD,WAA-HUNT: WALK/WHEELCHAIR ;8/7/95 15:09
2 ;;2.0;Spinal Cord Dysfunction;;01/02/1997
3 ;
4EN1(D0,AMBULATE,BDATE,EDATE) ; *** Search entry point
5 ; Input:
6 ; ACTION,SEQUENCE = Search ACTION,SEQUENCE number
7 ; D0 = SCD (SPINAL CORD) REGISTRY file (#154) IEN
8 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"AMBULATION") = Internal ^ External
9 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"BEGINNING DATE") = Date ^ Date_(Ext)
10 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"ENDING DATE") = Date ^ Date_(Ext)
11 ; AMBILATE = Internal
12 ; BDATE = Beginning Date
13 ; EDATE = Ending Date
14 ; Output:
15 ; $S( D0_Meets_Search_Criteria : 1 , 1 : 0 )
16 ;
17 N MEETSRCH,METHOD
18 S MEETSRCH=0
19 S SPNFD0=0
20 F S SPNFD0=$O(^SPNL(154.1,"B",D0,SPNFD0)) Q:SPNFD0'>0!MEETSRCH D
21 . S AMBULATE(2.06)=$P($G(^SPNL(154.1,SPNFD0,2)),U,6)
22 . S AMBULATE(2.07)=$P($G(^SPNL(154.1,SPNFD0,2)),U,7)
23 . S METHOD=$S(AMBULATE(2.07):AMBULATE(2.07)+2,AMBULATE(2.06):AMBULATE(2.06),1:0) Q:METHOD'>0
24 . S RECDATE=$P($G(^SPNL(154.1,SPNFD0,0)),U,4) Q:RECDATE=""
25 . I RECDATE'<BDATE,RECDATE'>EDATE,AMBULATE=METHOD S MEETSRCH=1
26 . Q
27 Q MEETSRCH
28 ;
29EN2(ACTION,SEQUENCE) ; *** Prompt entry point
30 ; Input:
31 ; ACTION,SEQUENCE = Search ACTION,SEQUENCE number
32 ; Output:
33 ; SPNLEXIT = $S( User_Abort/Timeout : 1 , 1 : 0 )
34 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"AMBULATION") = Internal ^ External
35 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"BEGINNINGING DATE") = Date ^ Date_(Ext)
36 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"ENDING DATE") = Date ^ Date_(Ext)
37 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0) = $$EN1^SPNPSR(DO,AMBULATE,BDATE,EDATE)
38 ;
39 N AMBULATE,DIR,DIRUT,DTOUT,DUOUT
40 K ^TMP($J,"SPNPRT",ACTION,SEQUENCE),DIR
41 S DIR(0)="SOAM^1:WALK WITHOUT HELP;2:WALK WITH DEVICE;3:MANUAL WHEELCHAIR;4:MOTORIZED WHEELCHAIR;"
42 S DIR("A")="Method of ambulation: "
43 S DIR("?")="Enter 1 or 2 if the patient can walk, 3 or 4 if the patient uses a wheelchair"
44 D ^DIR S AMBULATE=Y_U_$G(Y(0))
45 S SPNLEXIT=$S($D(DTOUT):1,$D(DUOUT):1,1:0)
46 I 'SPNLEXIT,Y'="" D
47 . N BDATE,EDATE
48 . S (BDATE,EDATE)=""
49 . D EN1^SPNPSR00(ACTION,SEQUENCE+.1,.BDATE,.EDATE) Q:SPNLEXIT
50 . S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"AMBULATION")=AMBULATE
51 . S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0)="$$EN1^SPNPSR10(D0,"_$P(AMBULATE,U)_","_BDATE_","_EDATE_")"
52 . Q
53EN2EXIT ;
54 Q
Note: See TracBrowser for help on using the repository browser.