source: WorldVistAEHR/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNPSR04.m@ 1261

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

initial load of WorldVistAEHR

File size: 1.4 KB
Line 
1SPNPSR04 ;HIRMFO/DAD,WAA-HUNT,SD-WDE: VITAL STATUS ;8/7/95 15:29
2 ;;2.0;Spinal Cord Dysfunction;**11**;01/02/1997
3 ;
4EN1(D0,SPNVIT) ; *** 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,"VITAL STATUS") = 0^DEAD ! 1^ALIVE
9 ;..SPNVIT = 0 ! 1
10 ; Output:
11 ; $S( D0_Meets_Search_Criteria : 1 , 1 : 0 )
12 ;
13 N DFN,MEETSRCH,VA,VADM,VAERR,VITLSTAT
14 S MEETSRCH=0
15 S DFN=+$P($G(^SPNL(154,+D0,0)),U)
16 D DEM^VADPT
17 I 'VAERR D
18 . S VITLSTAT=($P($G(VADM(6)),U)>0)
19 . I VITLSTAT=SPNVIT 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,"VITAL STATUS") = 0^DEAD ! 1^ALIVE
29 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"VITAL STATUS") = $$EN1^SPNPSR(D0,VITAL)
30 ;
31 N DIR,DIRUT,DTOUT,DUOUT,VITLSTAT
32 K ^TMP($J,"SPNPRT",ACTION,SEQUENCE),DIR
33 S DIR(0)="SOAM^0:ALIVE;1:DEAD;" ; CM/SD REVERSED ALIVE & DEAD TEXT
34 S DIR("A")="Patient vital status: "
35 S DIR("?")="Enter 0 for alive or 1 for dead patients" ; CM/SD REV TEXT
36 D ^DIR S VITLSTAT=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,"VITAL STATUS")=VITLSTAT
40 .S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0)="$$EN1^SPNPSR04(D0,"_$P(VITLSTAT,U)_")"
41 .Q
42 Q
Note: See TracBrowser for help on using the repository browser.