source: WorldVistAEHR/trunk/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBOTR.m@ 1459

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

initial load of WorldVistAEHR

File size: 3.9 KB
Line 
1IBOTR ;ALB/CPM - INSURANCE PAYMENT TREND REPORT - USER INTERFACE; 5-JUN-91
2 ;;2.0;INTEGRATED BILLING;**42,100,118,128**;21-MAR-94
3 ;
4 ;MAP TO DGCROTR
5 ;
6 ;***
7 ;S XRTL=$ZU(0),XRTN="IBOTR-1" D T0^%ZOSV ;start rt clock
8 D DT^DICRW,HOME^%ZIS
9 ;
10 ; - Sort by division.
11 S DIR(0)="Y",DIR("B")="NO"
12 S DIR("A")="Do you wish to sort this report by division"
13 S DIR("?")="^S IBOFF=1 W ! D HELP^IBOTR"
14 D ^DIR K DIR I $D(DIRUT)!$D(DTOUT)!$D(DUOUT)!$D(DIROUT) G END
15 S IBSDIV=+Y K DIROUT,DTOUT,DUOUT,DIRUT
16 ;
17 ; - Issue prompt for division.
18 I IBSDIV D PSDR^IBODIV G:Y<0 END
19 ;
20 ; - Select bill type to print.
21 S DIC="^DGCR(399.3,",DIC(0)="AEQMN",DIC("S")="I $P(^(0),U,7)=""i"""
22 W ! D ^DIC K DIC G END:Y<1 S IBRT=+Y,IBRTN=$P(Y,U,2)
23 ;
24 ; - Issue selection field decision prompt.
25 W !!,"You may select a field from the BILL/CLAIMS file which you may"
26 W !,"use to limit the selection of records to appear on the report.",!
27 S DIR(0)="Y",DIR("A")="Do you wish to choose such a field"
28 S DIR("B")="NO",DIR("?")="^S IBOFF=7 W ! D HELP^IBOTR"
29 D ^DIR K DIR G END:$D(DIRUT),CONT:'Y
30 ;
31 ; - Issue selection field prompts.
32 S DIC="^DD(399,",DIC(0)="AEQM",DIC("A")="Select BILL/CLAIMS FIELD: "
33 S DIC("S")="S IBX=$P(^(0),U,2) I $S('$D(^DD(+IBX,.01,0)):1,$P(^(0),U,2)[""M"":0,1:1)"
34 D ^DIC K DIC,IBX I Y<0 G CONT
35 S IBAF=+Y,IBAFN=$P(Y,U,2),IBAFD=$P($G(^DD(399,IBAF,0)),U,2)["D"
36 ;
37FD1 W !?3,"Start with "_IBAFN_": FIRST// " R X:DTIME G END:'$T!(X["^")
38 I $E(X,1,2)="??" S IBOFF=7 D HELP1,HELP2,HELP W ! G FD1
39 I $E(X)="?" S IBOFF=13 D HELP2,HELP W ! G FD1
40 I "@"[X S IBAFF=$S(IBAFD&(X=""):0,1:X) G FD2
41 I IBAFD D ^%DT K %DT S IBAFF=Y I Y<0 K IBAFF W ! S IBOFF=7 D HELP W ! G FD1
42 I 'IBAFD S IBAFF=X
43 ;
44FD2 W !?8,"Go to "_IBAFN_": LAST// " R X:DTIME G END:'$T!(X["^")
45 I $E(X,1,2)="??" S IBOFF=19 D HELP1,HELP2,HELP W ! G FD2
46 I $E(X)="?" S IBOFF=13 D HELP2,HELP W ! G FD2
47 I X="" S IBAFL=$S(IBAFD:9999999,1:"") S:IBAFF="" IBAFZ="ALL" G CONT
48 I X="@",IBAFF="@" S IBAFL="@",IBAFZ="NULL" G CONT
49 I IBAFD D ^%DT K %DT S IBAFL=Y I Y<0!(IBAFF'="@"&(Y<IBAFF)) K IBAFL W !!?3,"LAST DATE must follow the BEGIN DATE.",! G FD2
50 I 'IBAFD,+IBAFF=IBAFF,+X=X G:X'<IBAFF FD21 W !!?3,"The LAST value must follow the FIRST.",! G FD2
51 I 'IBAFD,IBAFF'="@",IBAFF]X W !!?3,"The LAST value must follow the FIRST.",! G FD2
52FD21 I 'IBAFD S IBAFL=X
53 ;
54CONT D ^IBOTR1 ; Continue user interface/compile and print report.
55 ;
56END K IBRT,IBRTN,IBADFREF,IBAF,IBAFN,IBAFD,IBAFF,IBAFL,IBAFZ,IBBRT,IBBRN,IBG
57 K IBDF,IBDFN,IBBDT,IBEDT,IBICF,IBICL,IBIC,IBBRTY,IBOFF,IBTEXT,IBARST
58 K IBCANC,IBCNC,IBINRC,IBPRNT,IBSDIV,IBSORT,IBICPT,VAUTD
59 K DIROUT,DTOUT,DUOUT,DIRUT
60 ;***
61 ;I $D(XRT0) S:'$D(XRTN) XRTN="IBOTR" D T1^%ZOSV ;stop rt clock
62 Q
63 ;
64HELP F S IBTEXT=$P($T(TEXT+IBOFF),";",3) Q:IBTEXT="" W !,IBTEXT S IBOFF=IBOFF+1
65 Q
66 ;
67HELP1 W ! S IBX=0 F S IBX=$O(^DD(399,IBAF,21,IBX)) Q:'IBX W:$D(^(IBX,0)) !,^(0)
68 K IBX Q
69 ;
70HELP2 W:$D(^DD(399,IBAF,3)) !!,^(3),! Q
71 ;
72TEXT ; - 'Sort by division' prompt.
73 ;; Enter: '<CR>' - To print the report without regard to division
74 ;; 'Y' - To select those divisions for which a separate
75 ;; report should be created
76 ;; '^' - To quit this option
77 ;
78 ; - 'Additional field' prompt.
79 ;; Enter: 'Y' - To select a field from the BILL/CLAIMS file
80 ;; 'N' - To skip this prompt and continue with this
81 ;; option
82 ;; '^' - To quit this option
83 ;
84 ; - 'Start with FIELD NAME' prompt.
85 ;; Enter a valid field value, or
86 ;; '@' - To include null values
87 ;; '<CR>' - To start from the 'first' value for this field
88 ;; '^' - To quit this option
89 ;
90 ; - 'Go to FIELD NAME' prompt.
91 ;; Enter a valid field value, or
92 ;; '@' - To include only null values, if 'Start with'
93 ;; value is @
94 ;; '<CR>' - To go to the 'last' value for this field
95 ;; '^' - To quit this option
96 ;
Note: See TracBrowser for help on using the repository browser.