source: FOIAVistA/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNPSR05.m@ 1328

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

initial load of FOIAVistA 6/30/08 version

File size: 2.6 KB
Line 
1SPNPSR05 ;HIRMFO/DAD,WAA-HUNT: HOURS OF HELP NEEDED ;8/7/95 12:42
2 ;;2.0;Spinal Cord Dysfunction;;01/02/1997
3 ;
4EN1(D0,BHOUR,EHOUR,BDATE,EDATE) ; *** 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,"BEGINNING # HRS HELP") = Hours ^ Hours
9 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"ENDING # HRS HELP") = Hours ^ Hours
10 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"BEGINNING DATE") = Date ^ Date_(Ext)
11 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"ENDING DATE") = Date ^ Date_(Ext)
12 ; BHOUR = Beginning date
13 ; EHOUR = Ending date
14 ; BDATE.=.Beginning date
15 ; EDATE = Ending date
16 ; Output:
17 ; $S( D0_Meets_Search_Criteria : 1 , 1 : 0 )
18 ;
19 N DFN,HRSHELP,I,MEETSRCH,VA,VADM,VAERR
20 S MEETSRCH=0
21 S SPNFD0=0
22 F S SPNFD0=$O(^SPNL(154.1,"B",D0,SPNFD0)) Q:SPNFD0'>0!MEETSRCH D
23 . S HRSHELP=$P($G(^SPNL(154.1,SPNFD0,2)),U,9) Q:HRSHELP=""
24 . S RECDATE=$P($G(^SPNL(154.1,SPNFD0,0)),U,4) Q:RECDATE=""
25 . I RECDATE'<BDATE,RECDATE'>EDATE D
26 .. I HRSHELP'<BHOUR,HRSHELP'>EHOUR S MEETSRCH=1
27 .. Q
28 . Q
29 Q MEETSRCH
30 ;
31EN2(ACTION,SEQUENCE) ; *** Prompt entry point
32 ; Input:
33 ; ACTION,SEQUENCE = Search ACTION,SEQUENCE number
34 ; Output:
35 ; SPNLEXIT = $S( User_Abort/Timeout : 1 , 1 : 0 )
36 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"BEGINNING # HRS HELP") = Hours ^ Hours
37 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"ENDING # HRS HELP") = Hours ^ Hours
38 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"BEGINNING DATE") = Date ^ Date_(Ext)
39 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,"ENDING DATE") = Date ^ Date_(Ext)
40 ; ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0) =
41 ; $$EN1^SPNPSR05(D0,BHOUR,EHOUR,BDATE,EDATE)
42 ;
43 N DIR,DIRUT,DTOUT,DUOUT,HRSHELP,I
44 K ^TMP($J,"SPNPRT",ACTION,SEQUENCE),DIR
45 S DIR(0)="NOA^0:336"
46 S DIR("A")="Hours of help needed start value: "
47 S DIR("?")="Enter a number from 0 to 336 hours"
48 D ^DIR S (BHOUR,HRSHELP("BEGINNING # HRS HELP"))=Y
49 I '$D(DIRUT) D
50 . K DIR S DIR(0)="NOA^"_HRSHELP("BEGINNING # HRS HELP")_":336"
51 . S DIR("A")="Hours of help needed end value: "
52 . S DIR("?")="Enter a number from "_HRSHELP("BEGINNING # HRS HELP")_" to 336 hours"
53 . D ^DIR S (EHOUR,HRSHELP("ENDING # HRS HELP"))=Y
54 . Q
55 S SPNLEXIT=$S($D(DTOUT):1,$D(DUOUT):1,1:0)
56 I 'SPNLEXIT,Y'="" D
57 . S (BDATE,EDATE)=""
58 . D EN1^SPNPSR00(ACTION,SEQUENCE+.1,.BDATE,.EDATE) Q:SPNLEXIT
59 . F I="BEGINNING # HRS HELP","ENDING # HRS HELP" D
60 .. S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,I)=$G(HRSHELP(I))_U_$G(HRSHELP(I))
61 .. Q
62 . S ^TMP($J,"SPNPRT",ACTION,SEQUENCE,0)="$$EN1^SPNPSR05(D0,"_BHOUR_","_EHOUR_","_BDATE_","_EDATE_")"
63 . Q
64EN2EXIT ;
65 Q
Note: See TracBrowser for help on using the repository browser.