source: FOIAVistA/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNPSR11.m@ 1801

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

initial load of FOIAVistA 6/30/08 version

File size: 2.6 KB
Line 
1SPNPSR11 ;HIRMFO/DAD,WAA-HUNT: IMPAIRMENTS ;8/7/95 15:42
2 ;;2.0;Spinal Cord Dysfunction;**10**;01/02/1997
3 ;
4EN1(D0,INJURY) ; *** 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,"COMPLETENESS OF INJURY") = Internal ^ External
9 ; INJURY= Internal
10 ; Output:
11 ; $S( D0_Meets_Search_Criteria : 1 , 1 : 0 )
12 ;
13 ;N I,INJURNUM,INJURTXT,MEETSRCH,INJURY2 ;**MOD,AB, Added INJURY2 to New List here**
14 ;**MOD,AB, Per NOIS BIR-1098-30014, Change "INJURY=" to "INJURY2=", 10/9/98
15 S INJURY2=INJURY
16 ;**MOD,AB, Per NOIS BIR-1098-30014, Change next line "INJURY=" to "INJURY2=", 10/9/98
17 F I=0:1 S INJURY2=$P($T(EN1DATA+I+1^SPNLUTL0),";",3) Q:INJURY2="" D
18 . S INJURY(INJURY2)=I
19 . Q
20 S MEETSRCH=0
21 S INJURY=","_INJURY_","
22 S INJURTXT=$$EN1^SPNLUTL0(D0)
23 S INJURNUM=$S(INJURTXT]"":$G(INJURY(INJURTXT)),1:"")
24 ;**MOD,AB,Per NOIS BIR-1098-30014, LINE AFTER NEXT LINE, 10/9/98
25 I INJURY[(","_INJURNUM_",") S MEETSRCH=1
26 Q MEETSRCH
27 ;
28EN2(ACTION,SEQUENCE) ; *** Prompt entry point
29 ; Input:
30 ; ACTION,SEQUENCE = Search ACTION,SEQUENCE number
31 ; Output:
32 ; SPNLEXIT = $S( User_Abort/Timeout : 1 , 1 : 0 )
33 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"COMPLETENESS OF INJURY") = Internal ^ External
34 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0) = $$EN1^SPNPSR11(DO,INJURY)
35 ;
36 ;N DIR,DIRUT,DTOUT,DUOUT,I,INJURNUM,INJURTXT,INJURY
37 K ^TMP($J,"SPNPRT",ACTION,SEQUENCE),DIR
38 F INJURNUM=0:1 S INJURTXT=$P($T(EN1DATA+INJURNUM+1^SPNLUTL0),";",3) Q:INJURTXT="" D
39 . S DIR("?",INJURNUM+1)=" "_INJURNUM_" - "_INJURTXT
40 . S INJURY(INJURNUM)=INJURTXT
41 . Q
42 S DIR("?",INJURNUM)=""
43 S DIR("?",INJURNUM+1)="You may enter a range of impairments '1-3',"
44 S DIR("?",INJURNUM+2)="discrete impairments '1,3,5', or any"
45 S DIR("?",INJURNUM+3)="combination of these '1-3,5,7'."
46 S DIR("?")="Choose any combination of impairments by number"
47 S DIR(0)="LOA^0:"_(INJURNUM-1)
48 S DIR("A")="Impairments: "
49 D ^DIR S INJURY=Y
50 S SPNLEXIT=$S($D(DTOUT):1,$D(DUOUT):1,1:0)
51 I 'SPNLEXIT,Y'="" D
52 . I $E(INJURY,$L(INJURY))="," S INJURY=$E(INJURY,1,$L(INJURY)-1)
53 . S INJURY=INJURY_U
54 . F I=1:1:$L(INJURY,",") D
55 .. S INJURY=INJURY_$G(INJURY(+$P(INJURY,",",I)))_";"
56 .. Q
57 . I $E(INJURY,$L(INJURY))=";" S INJURY=$E(INJURY,1,$L(INJURY)-1)
58 . S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"COMPLETENESS OF INJURY")=INJURY
59 .;**MOD,AB-Per NOIS BIR-1098-30014, see line below next line, 10/9/98
60 .; S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0)="$$EN1^SPNPSR11(D0,"_$P(INJURY,U)_")"
61 . S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0)="$$EN1^SPNPSR11(D0,"_""""_$P(INJURY,U)_""""_")"
62 . Q
63 Q
Note: See TracBrowser for help on using the repository browser.