source: WorldVistAEHR/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNPSR06.m@ 629

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

initial load of WorldVistAEHR

File size: 1.7 KB
Line 
1SPNPSR06 ;HIRMFO/DAD,WAA-HUNT: GEOGRAPHICAL AREA ;10/31/97 15:21
2 ;;2.0;Spinal Cord Dysfunction;**3**;01/02/1997
3 ;
4EN1(D0,BZIP,EZIP) ; *** 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 ZIP") = Zip ^ Zip
9 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"ENDING ZIP") = Zip ^ Zip
10 ; BZIP = Beginning ZIP
11 ; EZIP = Ending ZIP
12 ; Output:
13 ; $S( D0_Meets_Search_Criteria : 1 , 1 : 0 )
14 ;
15 N DFN,I,MEETSRCH,VA,VAPA,VAERR,ZIP
16 S MEETSRCH=0
17 S DFN=+$P($G(^SPNL(154,+D0,0)),U)
18 D ADD^VADPT
19 I 'VAERR D
20 . S ZIP=$G(VAPA(6))
21 . I ZIP'<BZIP,ZIP'>EZIP S MEETSRCH=1
22 . Q
23 Q MEETSRCH
24 ;
25EN2(ACTION,SEQUENCE) ; *** Prompt entry point
26 ; Input:
27 ; ACTION,SEQUENCE = Search ACTION,SEQUENCE number
28 ; Output:
29 ; SPNLEXIT = $S( User_Abort/Timeout : 1 , 1 : 0 )
30 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"BEGINNING ZIP") = Zip ^ Zip
31 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"ENDING ZIP") = Zip ^ Zip
32 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0) = $$EN1^SPNPSR(D0,BZIP,EZIP)
33 ;
34 N DIR,DIRUT,DTOUT,DUOUT,I,ZIP
35 K ^TMP($J,"SPNPRT",ACTION,SEQUENCE),DIR
36 S DIR(0)="FOA^5:5^K:X'?5N X"
37 S DIR("A")="Zip code range start value: "
38 S DIR("?")="Enter a 5 digit zip code"
39 D ^DIR S (ZIP("BEGINNING ZIP"),BZIP)=Y
40 I '$D(DIRUT) D
41 . K DIR S DIR(0)="FOA^5:5^K:(X'?5N)!(X<ZIP(""BEGINNING ZIP"")) X"
42 . S DIR("A")="Zip code range end value: "
43 . S DIR("?")="Enter a 5 digit zip code"
44 . D ^DIR S (ZIP("ENDING ZIP"),EZIP)=Y
45 . Q
46 S SPNLEXIT=$S($D(DTOUT):1,$D(DUOUT):1,1:0)
47 I 'SPNLEXIT,Y'="" D
48 . F I="BEGINNING ZIP","ENDING ZIP" S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,I)=$G(ZIP(I))_U_$G(ZIP(I))
49 . S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0)="$$EN1^SPNPSR06(D0,"_BZIP_","_EZIP_")"
50 . Q
51 Q
Note: See TracBrowser for help on using the repository browser.