source: FOIAVistA/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNPSR07.m@ 1522

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

initial load of FOIAVistA 6/30/08 version

File size: 2.2 KB
Line 
1SPNPSR07 ;HIRMFO/DAD,WAA-HUNT: SERVICE CONNECTION ;8/1/95 14:23
2 ;;2.0;Spinal Cord Dysfunction;**10**;01/02/1997
3 ;
4EN1(D0,SPNCVN,BPRC,EPRC) ; *** 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,"BEGINNING SVC CONNECTED %") = 0 ! 1 ^ %
9 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"ENDING SVC CONNECTED %") = 0 ! 1 ^ %
10 ; SPNCVN = Service Connected
11 ; BPRC, BPRC = Percent age of service connection
12 ; Output:
13 ; $S( D0_Meets_Search_Criteria : 1 , 1 : 0 )
14 ;
15 N DFN,I,MEETSRCH,SERVCONN,VA,VAEL,VAERR
16 S MEETSRCH=0
17 S DFN=+$P($G(^SPNL(154,+D0,0)),U)
18 D ELIG^VADPT
19 I 'VAERR D
20 . S SERVCONN=$P($G(VAEL(3)),U,2)
21 . S SPNCON=$P($G(VAEL(3)),U)
22 . I SPNCON=SPNCVN D
23 .. I SPNCON,SERVCONN'<BPRC,SERVCONN'>EPRC S MEETSRCH=1
24 .. I 'SPNCON S MEETSRCH=1
25 .. Q
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,"BEGINNING SVC CONNECTED %") = 0 ! 1 ^ %
35 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"ENDING SVC CONNECTED %") = 0 ! 1 ^ %
36 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0) = $$EN1^SPNPSR07(D0,SPNCVN,BPRC,EPRC)
37 ;
38 N DIR,DIRUT,DTOUT,DUOUT,I
39 K ^TMP($J,"SPNPRT",ACTION,SEQUENCE),DIR
40 S DIR(0)="NOA^0:100"
41 S DIR("A")="Service connected percentage start value: "
42 S DIR("?")="Enter a service connected percentage: 0-100%."
43 D ^DIR S (SERVCONN("BEGINNING SVC CONNECTED %"),BPRC)=Y
44 S SPNLEXIT=$S($D(DTOUT):1,$D(DUOUT):1,1:0)
45 I 'SPNLEXIT,Y'="" D
46 . K DIR S DIR(0)="NOA^"_SERVCONN("BEGINNING SVC CONNECTED %")_":100"
47 . S DIR("A")="Service connected percentage end value: "
48 . S DIR("?")="Enter a service connected percentage: "_SERVCONN("BEGINNING SVC CONNECTED %")_"-100%."
49 . D ^DIR S (SERVCONN("ENDING SVC CONNECTED %"),EPRC)=Y
50 . Q
51 S SPNLEXIT=$S($D(DTOUT):1,$D(DUOUT):1,1:0)
52 I 'SPNLEXIT,Y'="" D
53 . F I="BEGINNING SVC CONNECTED %","ENDING SVC CONNECTED %" D
54 .. S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,I)=$S(SERVCONN(I):1,1:0)_U_$G(SERVCONN(I))
55 ..Q
56 . S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0)="$$EN1^SPNPSR07(D0,"_"1,"_$P(BPRC,U,1)_","_$P(EPRC,U,1)_")"
57 . Q
58 Q
Note: See TracBrowser for help on using the repository browser.