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

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

initial load of WorldVistAEHR

File size: 3.6 KB
Line 
1IBCNSMRA ;ALB/AAS - MEDICARE BILLS ; 02-SEPT-97
2 ;;2.0; INTEGRATED BILLING ;**92**; 21-MAR-94
3 ;
4RPRT ; -- Create list of all bills for an insurance company
5 ; by year, by inpatient/outpatient, by w/wo procs and dia,
6 ; by IB Status, by leaving and dead patients.
7 ;
8 ; store in ^tmp("ib-mra",$j, ins co, calendar year of care, inpt/opt,
9 ; w/wo proc and diag, ar status, ib status,
10 ; leaving/dead,entry in 399) := bill no ^ dfn ^
11 ;
12 ; -- cnt := no. bills checked
13 ; ;cnt("a") := no. patients alive ; Not used per group
14 ; cnt("b") := no. bills with both procedure and diagnosis
15 ; cnt("c") := no. bills canceled before completion
16 ; cnt("d") := no. bills w/ diagnosis
17 ; cnt("f") := no. bills never printed
18 ; cnt("p") := no. bills w/ procedures
19 ; cnt("m") := no. bills meeting criteria
20 ; cnt("n") := no. bills w/ no diag no proc (neither)
21 ; cnt("r") := no. bills w/ rate type not billable to medicare
22 ; cnt("t") := no. bills w/ bill class. (type of bill) = 2 or 4
23 ; cnt("w") := no. bills who's responsible not = "i"
24 ; cnt("x") := no. bills for RX
25 ; cnt("z") := no. bills for prosthetics
26 ; cnt( ,0) := total dollar amount of bills
27 ; cnt( ,1) := no. bills with paid principal
28 ; cnt( ,2) := Total dollar amount of payments received
29 ; cnt(m,4) := no. bills meeting criteria and referred to dc
30 ; cnt(m,5) := Total $$ of bills criteria and referred to dc
31 ; cnt(m,6) := no. bills meeting criteria with $$ and referred to dc
32 ; cnt(m,7) := Total payment $$ bills meeting criteria and refer to dc
33 ; cnt(3, := insurance company specific data, follows above format
34 ; cnt("in" := totals for inpatients
35 ; cnt("op" := totals for outpatients
36 ;
37 D HOME^%ZIS
38 I '$D(DT) D DT^DICRW
39 S IBQUIT=0
40 ;
41 W !!,"Build statistics on Insurance Companies that are withholding Medicare",!,"Supplemental Policy Payments.",!!
42 ;
43 I '$O(^IBE(350.9,1,99,0)) W !!,"You must enter the list of Insurance Companies Withholding Supplimental Payments first",!! D BLD1^IBCNSMRE
44 I '$O(^IBE(350.9,1,99,0)) G END
45 ;
46 D ASKRPRT I IBQUIT G END
47 D ASKPRNT I IBQUIT G END
48 I IBPRNT="N",IBSNDRPT=0 W !!,"You didn't select anything to do! Try again.",!! G END
49 ;
50QUE ; -- que compilation to run
51 I IBPRNT="N",IBSNDRPT D G Q
52 .W !!,"This will automatically be tasked to run. A mail message containing",!,"the data will be sent to you.",!
53 .S ZTIO="",IO("Q")=1
54 ;
55Q I $D(IO("Q")) D
56 .S ZTDESC="IB-Compile MRA statistics",ZTRTN="DQ^IBCNSMR",ZTSAVE("IB*")=""
57 .D ^%ZTLOAD
58 I '$D(ZTSK) D DQ^IBCNSMR
59 K ZTSK,ZTIO,ZTDESC,ZTRTN,ZTSAVE,IO("Q")
60 G END
61 Q
62 ;
63END ; -- end of program
64 K ^TMP("IB-MRA",$J),^TMP("IB-MRA-CNT",$J)
65 I $D(ZTQUEUED),'IBQUIT S ZTREQ="@"
66 Q:$D(ZTQUEUED)
67 K C,I,J,POP,X,Y,ZTSK,ZTSAVE,ZTDESC,ZTRTN,IBPRNT,IBSNDRPT,IBQUIT
68 D ^%ZISC
69 Q
70 ;
71ASKPRNT ; -- should a report be printed, summary, detail, none
72 N %ZIS,DIR,DIRUT,DUOUT,DTOUT,X,Y
73 W !
74 S DIR("A")="Print Report, [S]ummary, [D]etail, [None]: "
75 S DIR("?")="Select whether you want to print a summary report, a detail report, or No report. A detail report will list every claim. No report will automatically send data for national rollup."
76 S DIR(0)="SMA^S:Summary;D:Detail;N:None"
77 S DIR("B")="Summary"
78 D ^DIR
79 S IBPRNT=Y
80 I $D(DIRUT) S IBQUIT=1 Q
81 I IBPRNT'="N" D
82 .S %ZIS="QM" D ^%ZIS I POP S IBQUIT=1
83 Q
84 ;
85ASKRPRT ; -- should a report be sent to the ISC
86 N DIR,DIRUT,DUOUT,DTOUT,X,Y
87 S DIR("A")="Send Data for National Rollup"
88 S DIR("?")="Answer 'Yes' if you wish to send a report for national rollup purposes or answer 'No' if you just want to print a report."
89 S DIR(0)="Y"
90 S DIR("B")="NO"
91 D ^DIR
92 I $D(DIRUT) S IBQUIT=1
93 S IBSNDRPT=Y
94 Q
Note: See TracBrowser for help on using the repository browser.