source: FOIAVistA/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNPSR31.m@ 1540

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

initial load of FOIAVistA 6/30/08 version

File size: 1.4 KB
Line 
1SPNPSR31 ;SD/WDE/ DIVISION search ;04/14/2001
2 ;;2.0;Spinal Cord Dysfunction;**15**;01/02/1997
3 ;
4EN1(D0,SPNFIX) ; *** 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,"DIVISION") = Internal ^ External
9 ; SPNFORG = Internal DIVISIION
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=0
16 F S SPNTEST=$O(^SPNL(154,+D0,4,SPNTEST)) Q:(SPNTEST="")!('+SPNTEST) D
17 .S SPNSUF=0 S SPNSUF=$P($G(^SPNL(154,+D0,4,SPNTEST,0)),U,1)
18 .I SPNSUF=SPNFIX S MEETSRCH=1 Q
19 Q MEETSRCH
20 ;
21EN2(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,"DIVISION") = Internal ^ External
27 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0) = $$EN1^SPNPSR31(D0,SPNTEST)
28 ;
29 N DIR,DIRUT,DTOUT,DUOUT
30 K ^TMP($J,"SPNPRT",ACTION,SEQUENCE),DIR
31 S DIR(0)="POA^40.8:AEMNQZ"
32 S DIR("A")="Division: "
33 S DIR("?")="Enter a Division from the list shown"
34 D ^DIR S SPNFIX=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,"DIVISION")=SPNFIX
38 . S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0)="$$EN1^SPNPSR31(D0,"""_$P(SPNFIX,U)_""")"
39 Q
Note: See TracBrowser for help on using the repository browser.