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

IBOSTUS.m

Go to the documentation of this file.
  1. IBOSTUS ;ALB/SGD - MCCR BILL STATUS REPORT ;25 MAY 88 14:19
  1. ;;2.0;INTEGRATED BILLING;**118,128,137,161,155**;21-MAR-94
  1. ;
  1. ;MAP TO DGCROST
  1. ;
  1. EN I '$D(DT) D DT^DICRW
  1. ;
  1. S IBNOEOB=0 ;init.
  1. ;
  1. ; - Choose bill status, if necessary.
  1. S DIR(0)="Y",DIR("A")="Do you want to print the status of ALL bills"
  1. S DIR("B")="YES",DIR("?")="Choose (Y)es or (N)o" W !
  1. D ^DIR K DIR I $D(DIRUT)!$D(DTOUT)!$D(DUOUT)!$D(DIROUT) G Q
  1. I Y S IBBST="ALL" G SORT
  1. ;
  1. S DIR(0)="399,.13AO^^I X[""*""!(X=5) W !,*7,""THIS STATUS IS NOT USED"" K X",DIR("A")="CHOOSE BILL STATUS: " D
  1. . N DA
  1. . W ! D ^DIR W ! K DIR
  1. I $D(DIRUT) G Q
  1. S IBBST=$E(Y(0)),IBHD=Y(0)
  1. ;
  1. MRA ; If user chose MRA Request status, check if user wants to only print Bills with No MRA Received
  1. I IBBST'="R" G SORT
  1. S DIR(0)="Y",DIR("A")="Print ONLY Bills with No MRA Received and No CSA Rejection messages"
  1. S DIR("B")="No",DIR("?")="Enter (Y)es or (N)o"
  1. S DIR("??")="^D HELP4^IBOSTUS"
  1. D ^DIR K DIR I $D(DIRUT)!$D(DTOUT)!$D(DUOUT)!$D(DIROUT) G Q
  1. S IBNOEOB=Y
  1. ;
  1. SORT ; - Choose the date type to sort on.
  1. S DIR(0)="S^1:EVENT DATE;2:BILL DATE;3:ENTERED DATE;4:MRA REQUEST DATE"
  1. S DIR("A")="SORT BY",DIR("B")=1,DIR("?")="^D HELP2^IBOSTUS"
  1. D ^DIR K DIR I $D(DIRUT)!$D(DTOUT)!$D(DUOUT)!$D(DIROUT) G Q
  1. S IBDTP=$S(Y=1:"Event",Y=2:"Bill",Y=3:"Entered",Y=4:"MRA Request",1:"") Q:IBDTP=""
  1. DATE W ! S %DT="AEPX",%DT("A")="Start with "_IBDTP_" DATE: ",%DT(0)=-DT
  1. D ^%DT G Q:Y<0 S IBBEG=Y
  1. DATE1 S %DT="EPX" W !,"Go to "_IBDTP_" DATE: TODAY// " R X:DTIME
  1. S:X=" " X=IBBEG G Q:(X["^") S:X="" X="TODAY" D ^%DT I Y<0 G DATE1
  1. S IBEND=Y I IBEND<IBBEG W *7," ??",!,"ENDING DATE must follow BEGINNING DATE." G DATE1
  1. I IBEND>DT W *7," ??" G DATE1
  1. ;
  1. PS ; - Print summary, if necessary.
  1. S DIR(0)="Y",DIR("A")="Do you want to print the summary ONLY"
  1. S DIR("B")="NO",DIR("?")="^D HELP3^IBOSTUS" W !
  1. D ^DIR K DIR I $D(DIRUT)!$D(DTOUT)!$D(DUOUT)!$D(DIROUT) G Q
  1. S IBSUM=+Y
  1. ;
  1. ; If the user wants both the detail and summary reports AND
  1. ; if ClaimsManager is currently running, then ask the user if he
  1. ; or she wishes to display the Comments from the ClaimsManager
  1. ; file (#351.9).
  1. ;
  1. S IBCICOMM=0
  1. I 'IBSUM,$$CK0^IBCIUT1() D I $D(DIRUT)!$D(DTOUT)!$D(DUOUT)!$D(DIROUT) G Q
  1. . W !
  1. . S DIR(0)="Y"
  1. . S DIR("A")="Do you want to see ClaimsManager comments associated with these bills"
  1. . S DIR("B")="NO"
  1. . S DIR("?",1)=" Enter YES if you would like to see the comments which are stored in the"
  1. . S DIR("?",2)=" ClaimsManager file (#351.9) for each bill on this report."
  1. . S DIR("?")=" Enter NO if you do not want to see these comments."
  1. . D ^DIR K DIR
  1. . S IBCICOMM=+Y
  1. . Q
  1. ;
  1. W !!,*7,"*** Margin width of this output is ",$S(IBSUM:80,1:132)," ***"
  1. S %ZIS="QM" D ^%ZIS G:POP Q
  1. I $D(IO("Q")) K IO("Q") D G Q
  1. .S ZTRTN="DQ^IBOSTUS",ZTDESC="IB - Bill Status Report",ZTSAVE("IB*")=""
  1. .D ^%ZTLOAD K ZTSK D HOME^%ZIS
  1. ;
  1. U IO
  1. ;
  1. DQ ; - Tasked entry point.
  1. D EN^IBOSTUS1
  1. ;
  1. Q D ^%ZISC
  1. K %,I,J,X,X1,X2,Y,Z,IBIFN,%DT,IBAPP,POP,IBPAGE,DGPGM,DGVAR,IBNEX,IBBEG
  1. K IBF,IBEND,IBHD,IBL,IBBST,IBBS,IBBSBY,IBBSDT,IB0,IBS,IBRUN,IBSUM,IBU1
  1. K IBDTP,IBBY,VAERR,DIRUT,DUOUT,DTOUT,DIROUT,IBCICOMM,IBNOEOB
  1. Q
  1. ;
  1. HELP2 ; - Help for Sort By prompt.
  1. W !!," EVENT DATE is the date beginning the bill's episode of care"
  1. W !!," BILL DATE is the date the bill was initially printed"
  1. W !!," ENTERED DATE is the date the bill was first entered"
  1. W !!," MRA REQUEST DATE is the date the MRA request bill was sent to Medicare"
  1. Q
  1. ;
  1. HELP3 ; - Help for Summary Only prompt.
  1. W !!,"Select (Y)ES to just print the bill status summary, or (N)O"
  1. W !," to print the BOTH the detail and summary reports."
  1. Q
  1. ;
  1. HELP4 ; Help for No MRA on file prompt.
  1. W !,"Enter YES if you would like to see bills that are in a Request MRA status"
  1. W !,"with no MRAs and no CSA rejection messages on file."
  1. W !!,"Enter NO if you would like to see ALL bills that are in a Request MRA status."
  1. Q
  1. ;
  1. SUM ; - Print summary.
  1. S:'IBSUM IBSUM=1 D HEAD^IBOSTUS1
  1. S IBST1="RATE TYPE : ",IBST2="BILL STATUS: "
  1. F I="IBST1","IBST2" N IBTOT D
  1. .S IBCAT="" F S IBCAT=$O(@I@(IBCAT)) Q:IBCAT="" D
  1. ..I IBCRT,($Y>(IOSL-2)) D HEAD^IBOSTUS1
  1. ..S X=@I@(IBCAT,"$"),X2="2$" D COMMA^%DTC
  1. ..W !,IBCAT,?18,".................... ",?42,$J(X,15),?60,$J(@I@(IBCAT,"C"),6),?67," BILLS"
  1. ..S IBTOT("C")=$G(IBTOT("C"))+@I@(IBCAT,"C")
  1. ..S IBTOT("$")=$G(IBTOT("$"))+@I@(IBCAT,"$")
  1. .W !,?40,"-----------------",?60,"-------------"
  1. .S X=$G(IBTOT("$")),X2="2$" D COMMA^%DTC
  1. .W !?42,$J(X,15),?60,$J($G(IBTOT("C")),6),?67," BILLS",!
  1. ;
  1. Q