source: FOIAVistA/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNPSR16.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 1.5 KB
Line 
1SPNPSR16 ;HIRMFO/DAD,WAA-HUNT: TYPE OF CAUSE ;8/9/95 13:12
2 ;;2.0;Spinal Cord Dysfunction;;01/02/1997
3 ;
4EN1(D0,TYPCAUSE) ; *** 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,"TYPE OF CAUSE") = TC ! NTC ^ External
9 ; TYPCAUSE = Type of Cause TO ! NTC
10 ; Output:
11 ; $S( D0_Meets_Search_Criteria : 1 , 1 : 0 )
12 ;
13 N ETIOLOGY,MEETSRCH,SPNLD1
14 S (MEETSRCH,SPNLD1)=0
15 F S SPNLD1=$O(^SPNL(154,D0,"E",SPNLD1)) Q:SPNLD1'>0!MEETSRCH D
16 . S ETIOLOGY=+$P($G(^SPNL(154,D0,"E",SPNLD1,0)),U,2)
17 . I TYPCAUSE=$P($G(^SPNL(154.03,ETIOLOGY,0)),U,2) S MEETSRCH=1
18 . Q
19 S ETIOLOGY=+$P($G(^SPNL(154,D0,5)),U)
20 I TYPCAUSE=$P($G(^SPNL(154.03,ETIOLOGY,0)),U,2) S MEETSRCH=1
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,"TYPE OF CAUSE") = TC ! NTC ^ External
29 ;
30 N DIR,DIRUT,DTOUT,DUOUT,TYPCAUSE
31 K ^TMP($J,"SPNPRT",ACTION,SEQUENCE),DIR
32 S DIR(0)="SOAM^TC:TRAUMATIC CAUSE;NTC:NON-TRAUMATIC CAUSE;U:UNKNOWN;"
33 S DIR("A")="Type of cause: "
34 S DIR("?")="Enter the type of cause of the patient's condition"
35 D ^DIR S TYPCAUSE=Y_U_$G(Y(0))
36 S SPNLEXIT=$S($D(DIRUT):1,1:0)
37 I 'SPNLEXIT D
38 . S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"TYPE OF CAUSE")=TYPCAUSE
39 . S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0)="$$EN1^SPNPSR16(D0,"""_$P(TYPCAUSE,U)_""")"
40 . Q
41 Q
Note: See TracBrowser for help on using the repository browser.