source: WorldVistAEHR/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNPSR02.m@ 767

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

initial load of WorldVistAEHR

File size: 1.3 KB
Line 
1SPNPSR02 ;HIRMFO/DAD,WAA-HUNT: SEX ;8/9/95 12:18
2 ;;2.0;Spinal Cord Dysfunction;;01/02/1997
3 ;
4EN1(D0,SPNSEX) ; *** 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,"SEX") = M^MALE ! F^FEMALE
9 ; SPNSEX = M ! F
10 ; Output:
11 ; $S( D0_Meets_Search_Criteria : 1 , 1 : 0 )
12 ;
13 N DFN,MEETSRCH,SEX,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 SEX=$P($G(VADM(5)),U)
19 . I SEX]"",SEX=SPNSEX 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,0)=$$EN1^SPNPSR02(D0,SEX)
29 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"SEX") = M^MALE ! F^FEMALE
30 ;
31 N DIR,DIRUT,DTOUT,DUOUT,SEX
32 K ^TMP($J,"SPNPRT",ACTION,SEQUENCE),DIR
33 S DIR(0)="SOAM^M:MALE;F:FEMALE;"
34 S DIR("A")="Patient sex: "
35 S DIR("?")="Enter M(ale) or F(emale)"
36 D ^DIR S:Y'="" SEX=Y_U_$G(Y(0))
37 S SPNLEXIT=$S($D(DTOUT):1,$D(DUOUT):1,1:0)
38 I 'SPNLEXIT,Y'="" D
39 .S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"SEX")=SEX
40 .S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0)="$$EN1^SPNPSR02(D0,"""_$P(SEX,U)_""")"
41 .Q
42 Q
Note: See TracBrowser for help on using the repository browser.