source: FOIAVistA/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNPSR01.m@ 1607

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

initial load of FOIAVistA 6/30/08 version

File size: 1.8 KB
Line 
1SPNPSR01 ;HIRMFO/DAD,WAA-HUNT: AGE ;8/1/95 14:16
2 ;;2.0;Spinal Cord Dysfunction;**14**;01/02/1997
3 ;
4EN1(D0,BAGE,EAGE) ; *** 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 AGE") = Age ^ Age
9 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"ENDING AGE") = Age ^ Age
10 ; SPNAGE = Patient age
11 ; Output:
12 ; $S( D0_Meets_Search_Criteria : 1 , 1 : 0 )
13 ;
14 N AGE,DFN,I,MEETSRCH,VA,VADM,VAERR
15 S MEETSRCH=0
16 S DFN=+$P($G(^SPNL(154,+D0,0)),U)
17 D DEM^VADPT
18 I 'VAERR D
19 . S AGE=$G(VADM(4))
20 . I AGE'<BAGE,AGE'>EAGE S MEETSRCH=1
21 . Q
22 Q MEETSRCH
23 ;
24EN2(ACTION,SEQUENCE) ; *** Prompt entry point
25 ; Input:
26 ; ACTION,SEQUENCE = Search ACTION,SEQUENCE number
27 ; Output:
28 ; SPNLEXIT = $S( User_Abort/Timeout : 1 , 1 : 0 )
29 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"BEGINNING AGE") = Age ^ Age
30 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"ENDING AGE") = Age ^ Age
31 ;..^TMP($J,"SPNPRT",ACTION,SEQUENCE,0) = $$EN1^SPNPSR01(D0,BAGE,EAGE)
32 ;
33 N AGE,DIR,DIRUT,DTOUT,DUOUT,I
34 K ^TMP($J,"SPNPRT",ACTION,SEQUENCE),DIR
35 S DIR(0)="NOA^1:130"
36 S DIR("A")="Age range start value: "
37 S DIR("?")="Enter a number from 1 to 130"
38 D ^DIR S (AGE("BEGINNING AGE"),BAGE)=Y
39 S SPNLEXIT=$S($D(DTOUT):1,$D(DUOUT):1,1:0)
40 Q:BAGE="" Q:BAGE="^"
41 I 'SPNLEXIT D
42 . K DIR S DIR(0)="NOA^"_$P(AGE("BEGINNING AGE"),U)_":130"
43 . S DIR("A")="Age range end value: "
44 . S DIR("?")="Enter a number from "_$P(AGE("BEGINNING AGE"),U)_" to 130"
45 . D ^DIR S (AGE("ENDING AGE"),EAGE)=Y
46 . Q
47 S SPNLEXIT=$S($D(DTOUT):1,$D(DUOUT):1,1:0)
48 Q:EAGE=""
49 I 'SPNLEXIT F I="BEGINNING AGE","ENDING AGE" D
50 . S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0)="$$EN1^SPNPSR01(D0,"_BAGE_","_EAGE_")"
51 . S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,I)=$G(AGE(I))_U_$G(AGE(I))
52 . Q
53 Q
Note: See TracBrowser for help on using the repository browser.