1 | SPNPSR27 ;SD/WDE: Primary care search ;04/14/2001
|
---|
2 | ;;2.0;Spinal Cord Dysfunction;**15**;01/02/1997
|
---|
3 | ;
|
---|
4 | EN1(D0,SPNFPRIM) ; *** 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,"PRIMARY CARE VA") = Internal ^ External
|
---|
9 | ; SPNRACE = Internal PRIMARY CARE VA
|
---|
10 | ; Output:
|
---|
11 | ; $S( D0_Meets_Search_Criteria : 1 , 1 : 0 )
|
---|
12 | ;
|
---|
13 | N DFN,MEETSRCH,SPNTEST,VA,VADM,VAERR
|
---|
14 | S MEETSRCH=0
|
---|
15 | ;
|
---|
16 | ;
|
---|
17 | S SPNTEST=$P($G(^SPNL(154,+D0,3)),U,2)
|
---|
18 | I SPNTEST]"",SPNTEST=SPNFPRIM S MEETSRCH=1
|
---|
19 | Q MEETSRCH
|
---|
20 | ;
|
---|
21 | EN2(ACTION,SEQUENCE) ; *** Prompt entry point
|
---|
22 | ; Input:
|
---|
23 | ; ACTION,SEQUENCE = Search ACTION,SEQUENCE number
|
---|
24 | ; Output:
|
---|
25 | ; SPNLEXIT = $S( User_Abort/Timeout : 1 , 1 : 0 )
|
---|
26 | ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"SPNPRIMVA") = Internal ^ External
|
---|
27 | ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0) = $$EN1^SPNPSR(D0,SPNTEST)
|
---|
28 | ;
|
---|
29 | N DIR,DIRUT,DTOUT,DUOUT,RACE
|
---|
30 | K ^TMP($J,"SPNPRT",ACTION,SEQUENCE),DIR
|
---|
31 | S DIR(0)="POA^4:AEMNQZ"
|
---|
32 | S DIR("A")="Primary Care VA: "
|
---|
33 | S DIR("?")="Enter a Facility from the list shown"
|
---|
34 | D ^DIR S SPNFPRIM=Y I Y<1 S SPNLEXIT=1 Q:Y<1
|
---|
35 | S SPNLEXIT=$S($D(DTOUT):1,$D(DUOUT):1,1:0)
|
---|
36 | I 'SPNLEXIT,Y'="" D
|
---|
37 | . S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"PRIMARY CARE VA")=SPNFPRIM
|
---|
38 | . S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0)="$$EN1^SPNPSR27(D0,"""_$P(SPNFPRIM,U)_""")"
|
---|
39 | Q
|
---|