1 | SPNPSR25 ;HIRMFO/DAD,WAA-HUNT: TRAUMATIC/DISABILITY ;8/1/95 14:16
|
---|
2 | ;;2.0;Spinal Cord Dysfunction;;01/02/1997
|
---|
3 | ;
|
---|
4 | EN1(D0,INJURY) ; *** 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,"EXTENT OF INJURY",INJURY) = 1/2/3 ^ Paraplegia/Quadriplegia/Both
|
---|
9 | ; INJURY = 1/2/3
|
---|
10 | ; Output:
|
---|
11 | ; $S( D0_Meets_Search_Criteria : 1 , 1 : 0 )
|
---|
12 | ;
|
---|
13 | N SPNL1,SPNL,MEETSRCH
|
---|
14 | S MEETSRCH=0
|
---|
15 | S SPNL1=$G(^SPNL(154,D0,2))
|
---|
16 | I SPNL1="" Q MEETSRCH
|
---|
17 | S SPNL=$P(SPNL1,U,6)
|
---|
18 | I SPNL'<1 D
|
---|
19 | .I INJURY=3 S MEETSRCH=1 Q
|
---|
20 | .I INJURY=1,SPNL=1!(SPNL=3) S MEETSRCH=1 Q
|
---|
21 | .I INJURY=2,SPNL=2!(SPNL=4) S MEETSRCH=1 Q
|
---|
22 | .Q
|
---|
23 | Q MEETSRCH
|
---|
24 | ;
|
---|
25 | EN2(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,"EXTENT OF INJURY") = 1/2/3 ^ Text
|
---|
31 | ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0) = $$EN1^SPNPSR25(D0,INJURY)
|
---|
32 | ;
|
---|
33 | ; Select the state
|
---|
34 | N SPNLREG,Y
|
---|
35 | S SPNLEXIT=0 D
|
---|
36 | .N DIR
|
---|
37 | .S DIR(0)="SAO^p:Paraplegia;Q:Quadriplegia;B:Both"
|
---|
38 | .S DIR("A")=" Select Injury: "
|
---|
39 | .S DIR("A",1)=" Extent of Injury: "
|
---|
40 | .S DIR("A",2)=" P) Paraplegia"
|
---|
41 | .S DIR("A",3)=" Q) Quadriplegia"
|
---|
42 | .S DIR("A",4)=" B) Both"
|
---|
43 | .D ^DIR
|
---|
44 | .I $D(DTOUT)!($D(DUOUT)) S SPNLEXIT=1
|
---|
45 | .I Y'="" S Y=$$UP^XLFSTR(Y)
|
---|
46 | .I "PQB"'[Y S SPNLEXIT=1
|
---|
47 | .Q
|
---|
48 | I 'SPNLEXIT,Y'="" D
|
---|
49 | .S SPNLREG=$S(Y="P":"1^Paraplegia",Y="Q":"2^Quadriplegia",Y="B":"3^Both",1:"0")
|
---|
50 | .S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"EXTENT OF INJURY",$P(SPNLREG,U))=SPNLREG
|
---|
51 | .S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0)="$$EN1^SPNPSR25(D0,"_$P(SPNLREG,U)_")"
|
---|
52 | .Q
|
---|
53 | Q
|
---|