source: WorldVistAEHR/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNPSR23.m@ 1716

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

initial load of WorldVistAEHR

File size: 1.8 KB
Line 
1SPNPSR23 ;HIRMFO/DAD,WAA-HUNT: SCD REGISTRATION ;8/1/95 14:16
2 ;;2.0;Spinal Cord Dysfunction;**9**;1/02/1997
3 ;
4EN1(D0,REG) ; *** 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,"REGISTRATION",REG) = Registration ^ Status
9 ; REG = REGISTRATION
10 ; Output:
11 ; $S( D0_Meets_Search_Criteria : 1 , 1 : 0 )
12 ;
13 N SPNLREG,SPNLNET,I,MEETSRCH,VA,VADM,VAERR
14 S MEETSRCH=0
15 S SPNLREG=$P($G(^SPNL(154,+D0,0)),U,3)
16 I REG=4 S REG="X"
17 I REG=$P(SPNLREG,U) S MEETSRCH=1
18 E D
19 .I REG=3,((SPNLREG=1)!(SPNLREG=2)) 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,"REGISTRATION",REG) = Registration ^ Status
29 ;
30 ; Select the state
31 N SPNLREG,Y
32 S SPNLEXIT=0 D
33 .N DIR
34 .S DIR(0)="SAO^A:SCD-Currently served;B:SCD-Not Currently served;C:Both A&B;D:Not SCD;E:Expired"
35 .S DIR("A")="Select Registration Status: "
36 .S DIR("A",1)=" Registration Status"
37 .S DIR("A",2)=" A) SCD-Currently served"
38 .S DIR("A",3)=" B) SCD-Not Currently served"
39 .S DIR("A",4)=" C) Both A&B"
40 .S DIR("A",5)=" D) Not SCD"
41 .S DIR("A",6)=" E) Expired"
42 .D ^DIR
43 .I $D(DTOUT)!($D(DUOUT)) S SPNLEXIT=1
44 .I Y'="" S Y=$$UP^XLFSTR(Y)
45 .I "ABCDE"'[Y S SPNLEXIT=1
46 .Q
47 I 'SPNLEXIT,Y'="" D
48 .S SPNLREG=$S(Y="A":"1^SCD-Currently served",Y="B":"2^SCD-Not Currently served",Y="C":"3^Both A&B",Y="D":"0^Not SCD",1:"X^Expired")
49 .I $P(SPNLREG,U)="X" S SPNLREG=4
50 .S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"REGISTRATION",+SPNLREG)=SPNLREG
51 .S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0)="$$EN1^SPNPSR23(D0,"_$P(SPNLREG,U)_")"
52 .Q
53 Q
Note: See TracBrowser for help on using the repository browser.