Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: IBCNSMRA

IBCNSMRA.m

Go to the documentation of this file.
  1. IBCNSMRA ;ALB/AAS - MEDICARE BILLS ; 02-SEPT-97
  1. ;;2.0; INTEGRATED BILLING ;**92**; 21-MAR-94
  1. ;
  1. RPRT ; -- Create list of all bills for an insurance company
  1. ; by year, by inpatient/outpatient, by w/wo procs and dia,
  1. ; by IB Status, by leaving and dead patients.
  1. ;
  1. ; store in ^tmp("ib-mra",$j, ins co, calendar year of care, inpt/opt,
  1. ; w/wo proc and diag, ar status, ib status,
  1. ; leaving/dead,entry in 399) := bill no ^ dfn ^
  1. ;
  1. ; -- cnt := no. bills checked
  1. ; ;cnt("a") := no. patients alive ; Not used per group
  1. ; cnt("b") := no. bills with both procedure and diagnosis
  1. ; cnt("c") := no. bills canceled before completion
  1. ; cnt("d") := no. bills w/ diagnosis
  1. ; cnt("f") := no. bills never printed
  1. ; cnt("p") := no. bills w/ procedures
  1. ; cnt("m") := no. bills meeting criteria
  1. ; cnt("n") := no. bills w/ no diag no proc (neither)
  1. ; cnt("r") := no. bills w/ rate type not billable to medicare
  1. ; cnt("t") := no. bills w/ bill class. (type of bill) = 2 or 4
  1. ; cnt("w") := no. bills who's responsible not = "i"
  1. ; cnt("x") := no. bills for RX
  1. ; cnt("z") := no. bills for prosthetics
  1. ; cnt( ,0) := total dollar amount of bills
  1. ; cnt( ,1) := no. bills with paid principal
  1. ; cnt( ,2) := Total dollar amount of payments received
  1. ; cnt(m,4) := no. bills meeting criteria and referred to dc
  1. ; cnt(m,5) := Total $$ of bills criteria and referred to dc
  1. ; cnt(m,6) := no. bills meeting criteria with $$ and referred to dc
  1. ; cnt(m,7) := Total payment $$ bills meeting criteria and refer to dc
  1. ; cnt(3, := insurance company specific data, follows above format
  1. ; cnt("in" := totals for inpatients
  1. ; cnt("op" := totals for outpatients
  1. ;
  1. D HOME^%ZIS
  1. I '$D(DT) D DT^DICRW
  1. S IBQUIT=0
  1. ;
  1. W !!,"Build statistics on Insurance Companies that are withholding Medicare",!,"Supplemental Policy Payments.",!!
  1. ;
  1. I '$O(^IBE(350.9,1,99,0)) W !!,"You must enter the list of Insurance Companies Withholding Supplimental Payments first",!! D BLD1^IBCNSMRE
  1. I '$O(^IBE(350.9,1,99,0)) G END
  1. ;
  1. D ASKRPRT I IBQUIT G END
  1. D ASKPRNT I IBQUIT G END
  1. I IBPRNT="N",IBSNDRPT=0 W !!,"You didn't select anything to do! Try again.",!! G END
  1. ;
  1. QUE ; -- que compilation to run
  1. I IBPRNT="N",IBSNDRPT D G Q
  1. .W !!,"This will automatically be tasked to run. A mail message containing",!,"the data will be sent to you.",!
  1. .S ZTIO="",IO("Q")=1
  1. ;
  1. Q I $D(IO("Q")) D
  1. .S ZTDESC="IB-Compile MRA statistics",ZTRTN="DQ^IBCNSMR",ZTSAVE("IB*")=""
  1. .D ^%ZTLOAD
  1. I '$D(ZTSK) D DQ^IBCNSMR
  1. K ZTSK,ZTIO,ZTDESC,ZTRTN,ZTSAVE,IO("Q")
  1. G END
  1. Q
  1. ;
  1. END ; -- end of program
  1. K ^TMP("IB-MRA",$J),^TMP("IB-MRA-CNT",$J)
  1. I $D(ZTQUEUED),'IBQUIT S ZTREQ="@"
  1. Q:$D(ZTQUEUED)
  1. K C,I,J,POP,X,Y,ZTSK,ZTSAVE,ZTDESC,ZTRTN,IBPRNT,IBSNDRPT,IBQUIT
  1. D ^%ZISC
  1. Q
  1. ;
  1. ASKPRNT ; -- should a report be printed, summary, detail, none
  1. N %ZIS,DIR,DIRUT,DUOUT,DTOUT,X,Y
  1. W !
  1. S DIR("A")="Print Report, [S]ummary, [D]etail, [None]: "
  1. 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."
  1. S DIR(0)="SMA^S:Summary;D:Detail;N:None"
  1. S DIR("B")="Summary"
  1. D ^DIR
  1. S IBPRNT=Y
  1. I $D(DIRUT) S IBQUIT=1 Q
  1. I IBPRNT'="N" D
  1. .S %ZIS="QM" D ^%ZIS I POP S IBQUIT=1
  1. Q
  1. ;
  1. ASKRPRT ; -- should a report be sent to the ISC
  1. N DIR,DIRUT,DUOUT,DTOUT,X,Y
  1. S DIR("A")="Send Data for National Rollup"
  1. 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."
  1. S DIR(0)="Y"
  1. S DIR("B")="NO"
  1. D ^DIR
  1. I $D(DIRUT) S IBQUIT=1
  1. S IBSNDRPT=Y
  1. Q