source: WorldVistAEHR/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNPSR28.m@ 767

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

initial load of WorldVistAEHR

File size: 1.3 KB
Line 
1SPNPSR28 ;SD/WDE/ ADDITIONAL CARE search ;04/14/2001
2 ;;2.0;Spinal Cord Dysfunction;**15**;01/02/1997
3 ;
4EN1(D0,SPNFADVA) ; *** 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,"ADDITIONAL CARE VA") = Internal ^ External
9 ; SPNRACE = Internal ADDITIONAL 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 S SPNTEST=$P($G(^SPNL(154,+D0,3)),U,4)
16 I SPNTEST]"",SPNTEST=SPNFADVA S MEETSRCH=1
17 Q MEETSRCH
18 ;
19EN2(ACTION,SEQUENCE) ; *** Prompt entry point
20 ; Input:
21 ; ACTION,SEQUENCE = Search ACTION,SEQUENCE number
22 ; Output:
23 ; SPNLEXIT = $S( User_Abort/Timeout : 1 , 1 : 0 )
24 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"ADDITIONAL CARE VA") = Internal ^ External
25 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0) = $$EN1^SPNPSR(D0,SPNTEST)
26 ;
27 N DIR,DIRUT,DTOUT,DUOUT,RACE
28 K ^TMP($J,"SPNPRT",ACTION,SEQUENCE),DIR
29 S DIR(0)="POA^4:AEMNQZ"
30 S DIR("A")="Additional Care VA: "
31 S DIR("?")="Enter a Facility from the list shown"
32 D ^DIR S SPNFADVA=Y I Y<1 S SPNLEXIT=1 Q:Y<1
33 S SPNLEXIT=$S($D(DTOUT):1,$D(DUOUT):1,1:0)
34 I 'SPNLEXIT,Y'="" D
35 . S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"ADDITIONAL CARE VA")=SPNFADVA
36 . S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0)="$$EN1^SPNPSR28(D0,"""_$P(SPNFADVA,U)_""")"
37 Q
Note: See TracBrowser for help on using the repository browser.