source: WorldVistAEHR/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNPSR24.m@ 1482

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

initial load of WorldVistAEHR

File size: 1.6 KB
Line 
1SPNPSR24 ;HIRMFO/DAD,WAA-HUNT,CM: TRAUMATIC/DISABILITY ;8/1/95 14:16
2 ;;2.0;Spinal Cord Dysfunction;**12**;01/02/1997
3 ;
4EN1(D0,TRAMA) ; *** 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,"TRAMDIS",TRAMA) = TC/NTC/B/U^Text
9 ; TRAMA = TRAUMATIC
10 ; Output:
11 ; $S( D0_Meets_Search_Criteria : 1 , 1 : 0 )
12 ;
13 N SPNLNET,I,MEETSRCH,VA,VADM,VAERR
14 S MEETSRCH=0
15 I $$EN4^SPNLUTL1(D0,TRAMA) S MEETSRCH=1
16 Q MEETSRCH
17 ;
18EN2(ACTION,SEQUENCE) ; *** Prompt entry point
19 ; Input:
20 ; ACTION,SEQUENCE = Search ACTION,SEQUENCE number
21 ; Output:
22 ; SPNLEXIT = $S( User_Abort/Timeout : 1 , 1 : 0 )
23 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"TRAUMATIC CAUSE") = TC/NTC/B/U^Text
24 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0) = $$EN1^SPNPSR24(D0,TC/NTC/B/U)
25 ;
26 ; Select the state
27 N SPNLREG,Y
28 S SPNLEXIT=0 D
29 .N DIR
30 .S DIR(0)="SAO^T:Traumatic;N:Non-traumatic;B:Both Traumatic and Non-traumatic;U:Unknown"
31 .S DIR("A")=" Select Cause: "
32 .S DIR("A",1)=" Cause of Injury: "
33 .S DIR("A",2)=" T) Traumatic"
34 .S DIR("A",3)=" N) Non-traumatic"
35 .S DIR("A",4)=" B) Both Traumatic and Non-traumatic"
36 .S DIR("A",5)=" U) Unknown"
37 .D ^DIR
38 .I $D(DTOUT)!($D(DUOUT)) S SPNLEXIT=1
39 .I Y'="" S Y=$$UP^XLFSTR(Y)
40 .I "TNBU"'[Y S SPNLEXIT=1
41 .Q
42 I 'SPNLEXIT,Y'="" D
43 .S SPNLREG=$S(Y="T":"TC^Traumatic",Y="N":"NTC^Non-traumatic ",Y="B":"B^Both",Y="U":"U^Unknown",1:"0")
44 .S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"TRAUMATIC CAUSE",$P(SPNLREG,U))=SPNLREG
45 .S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0)="$$EN1^SPNPSR24(D0,"""_$P(SPNLREG,U)_""")"
46 .Q
47 Q
Note: See TracBrowser for help on using the repository browser.