source: WorldVistAEHR/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNPSR03.m@ 1195

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

initial load of WorldVistAEHR

File size: 1.3 KB
Line 
1SPNPSR03 ;HIRMFO/DAD,WAA-HUNT: RACE ;8/7/95 15:29
2 ;;2.0;Spinal Cord Dysfunction;**18**;01/02/1997
3 ;
4EN1(D0,SPNRACE) ; *** 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,"RACE") = Internal ^ External
9 ; SPNRACE = Internal race
10 ; Output:
11 ; $S( D0_Meets_Search_Criteria : 1 , 1 : 0 )
12 ;
13 N DFN,MEETSRCH,RACE,VA,VADM,VAERR
14 S MEETSRCH=0
15 S DFN=+$P($G(^SPNL(154,+D0,0)),U)
16 D DEM^VADPT
17 I 'VAERR D
18 . S RACE=$P($G(VADM(12,1)),U)
19 . I RACE]"",RACE=SPNRACE S MEETSRCH=1
20 . Q
21 Q MEETSRCH
22 ;
23EN2(ACTION,SEQUENCE) ; *** Prompt entry point
24 ; Input:
25 ; ACTION,SEQUENCE = Search ACTION,SEQUENCE number
26 ; Output:
27 ; SPNLEXIT = $S( User_Abort/Timeout : 1 , 1 : 0 )
28 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"RACE") = Internal ^ External
29 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0) = $$EN1^SPNPSR(D0,RACE)
30 ;
31 N DIR,DIRUT,DTOUT,DUOUT,RACE
32 K ^TMP($J,"SPNPRT",ACTION,SEQUENCE),DIR
33 S DIR(0)="POA^10:AEMNQZ"
34 S DIR("A")="Patient race: "
35 S DIR("?")="Enter a race from the list shown"
36 D ^DIR S RACE=Y
37 S SPNLEXIT=$S($D(DTOUT):1,$D(DUOUT):1,1:0)
38 I 'SPNLEXIT,Y'="" D
39 . S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"RACE")=RACE
40 . S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0)="$$EN1^SPNPSR03(D0,"""_$P(RACE,U)_""")"
41 Q
Note: See TracBrowser for help on using the repository browser.