source: FOIAVistA/trunk/r/UTILIZATION_MGMT_ROLLUP_LOCAL-IBQ/IBQLT5.m@ 1683

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

initial load of FOIAVistA 6/30/08 version

File size: 1.7 KB
Line 
1IBQLT5 ;LEB/MRY - TRANSMIT PREVIOUS ROLLUPS;; Oct 5, 1995
2 ;;1.0;UTILIZATION MGMT ROLLUP LOCAL;**2,3**;Oct 01, 1995
3 ;
4 Q
5ASK ;
6 S IBQUIT=0
7 S DIR(0)="Y",DIR("A")="Do you wish to submit a previous rollup from the one above",DIR("B")="No"
8 W ! D ^DIR G:$D(DUOUT)!($D(DTOUT)) END Q:Y<1
9 K DIR
10 ;
11 S DIR(0)="S^1:4/1/94 to 9/30/94;2:10/1/94 to 3/31/95",DIR("A")="Select number"
12 D ^DIR G:$D(DUOUT)!($D(DTOUT)) END
13 ;
14 I Y=1 S IBBDT=2940401,IBEDT=2940930
15 I Y=2 S IBBDT=2941001,IBEDT=2950331
16 Q
17END ; -- Quit, if this request is aborted.
18 S IBQUIT=1 Q
19 ;
20 ;
21 ;
22 ;
23 ;
24RANGE ; Ask user to select a rollup date range.
25 S IBQUIT=0 K IBY
26 D BLD I IBQUIT G QUIT
27 S DIR("A")="Select a roll-up period (by number)",DIR("?")="^D HELP^IBQLT5"
28 D ^DIR K DIR
29 I '$D(IBY(+Y)) S IBQUIT=1 G QUIT
30 ;
31 S IBBDT=$P(IBY(+Y),"^",2),IBEDT=$P(IBY(+Y),"^",3)
32 ;
33QUIT K IBY,Y
34 Q
35 ;
36HELP ; Help text for the rollup period prompt.
37 W !!,"You must transmit your data to the national database for a specific"
38 W !,"rollup period. Please select a roll-up period by number, or type '^'"
39 W !,"to quit this option."
40 Q
41 ;
42 ;
43BLD ; Build IBY array and DIR(0).
44 N I,X,X1,X2
45 S X=DT F I=1:1:2 D BLD1(X) Q:X2<2940401 S IBY(I)=$$DAT(X1)_" to "_$$DAT(X2)_"^"_X1_"^"_X2,X=X1
46 I '$O(IBY(0)) W !!,"There are no Rollup Periods that can be selected for transmission!" S IBQUIT=1 G BLDQ
47 ;
48 S DIR(0)="S^" S I=0 F S I=$O(IBY(I)) Q:'I S DIR(0)=DIR(0)_I_":"_$P(IBY(I),"^")_";"
49 S DIR(0)=$E(DIR(0),1,$L(DIR(0))-1)
50BLDQ Q
51 ;
52 ;
53BLD1(X) ; Create Rollup Begin and End Dates.
54 I +$E(X,4,7)'<930 S X2=$E(X,1,3)_"0930",X1=$E(X,1,3)_"0401" Q
55 I +$E(X,4,7)'<331 S X2=$E(X,1,3)_"0331",X1=$E(X,1,3)-1_"1001" Q
56 S X2=$E(X,1,3)-1_"0930",X1=$E(X,1,3)-1_"0401"
57 Q
58 ;
59DAT(X) ; Format FileMan dates.
60 Q $S(X:+$E(X,4,5)_"/"_+$E(X,6,7)_"/"_$E(X,2,3),1:"")
Note: See TracBrowser for help on using the repository browser.