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

IBEMTO1.m

Go to the documentation of this file.
  1. IBEMTO1 ;ALB/CPM-LIST MT CHARGES AWAITING NEW COPAY RATE;10-AUG-93
  1. ;;2.0;INTEGRATED BILLING;**183**;21-MAR-94
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;
  1. EN ; List Means Test charges on hold, awaiting the new copay rate.
  1. ;
  1. ; - quit if there are no charges on hold awaiting the new rate
  1. I '$D(^IB("AC",20)) W !!,"There are no charges on hold awaiting the entry of the new copay rate." G ENQ
  1. ;
  1. ; - select a device
  1. S %ZIS="QM" D ^%ZIS G:POP ENQ
  1. I $D(IO("Q")) D G ENQ
  1. .S ZTRTN="DQ^IBEMTO1",ZTDESC="LIST MT CHARGES ON HOLD AWAITING NEW COPAY RATE"
  1. .D ^%ZTLOAD W !!,$S($D(ZTSK):"This job has been queued. The task number is "_ZTSK_".",1:"Unable to queue this job.")
  1. .K ZTSK,IO("Q") D HOME^%ZIS
  1. ;
  1. U IO
  1. ;
  1. DQ ; Tasked entry point.
  1. ;
  1. ; - compile data
  1. D ENQ1 S IBN=0 F S IBN=$O(^IB("AC",20,IBN)) Q:'IBN D
  1. .S IBND=$G(^IB(IBN,0)),DFN=+$P(IBND,"^",2) Q:'DFN
  1. .S IBPT=$$PT^IBEFUNC(DFN)
  1. .S ^TMP("IBEMTO1",$J,$P(IBPT,"^")_"@"_$P(IBPT,"^",3)_"@"_DFN,IBN)=""
  1. ;
  1. S (IBPAG,IBQ)=0 D HDR
  1. ; - print message if there are no charges
  1. I '$D(^TMP("IBEMTO1",$J)) W !!,"There are no charges on hold awaiting the new copay rate." D PAUSE^IBEMTF2 G ENQ
  1. ;
  1. ; - print charges
  1. S IBNAM="" F S IBNAM=$O(^TMP("IBEMTO1",$J,IBNAM)) Q:IBNAM="" D Q:IBQ
  1. .I $Y>(IOSL-3) D PAUSE^IBEMTF2 Q:IBQ D HDR
  1. .W !,$P(IBNAM,"@")," (",$P(IBNAM,"@",2),")"
  1. .S (IBF,IBN)=0 F S IBN=$O(^TMP("IBEMTO1",$J,IBNAM,IBN)) Q:'IBN D Q:IBQ
  1. ..I IBF,$Y>(IOSL-3) D PAUSE^IBEMTF2 Q:IBQ D HDR
  1. ..S IBND=$G(^IB(IBN,0))
  1. ..W:IBF ! W ?41,$$DAT1^IBOUTL($P(IBND,"^",14)),?61,$$FORMAT(+$P(IBND,"^",7),10)
  1. ..S IBF=1
  1. ;
  1. ; - end-of-report pause
  1. D:'IBQ PAUSE^IBEMTF2
  1. ;
  1. ENQ I '$D(ZTQUEUED) D ^%ZISC
  1. K DFN,IBF,IBN,IBNAM,IBND,IBPT,IBQ,IBPAG
  1. ENQ1 K ^TMP("IBEMTO1",$J)
  1. Q
  1. ;
  1. HDR ; Generate a report header.
  1. I $E(IOST,1,2)="C-"!(IBPAG) W @IOF,*13
  1. S IBPAG=IBPAG+1
  1. W ?14,"LIST OF ALL COPAYMENT/PER DIEM CHARGES 'ON HOLD'"
  1. W !?18,"AWAITING ENTRY OF THE NEW RATE",?64,"Page: ",IBPAG
  1. W !?60,"Run Date: ",$$DAT1^IBOUTL(DT)
  1. W !,$$DASH(),!,"PATIENT NAME (ID)",?41,"BILL FROM",?64,"CHARGE",!,$$DASH()
  1. Q
  1. ;
  1. DASH() ; Return a dashed line.
  1. Q $TR($J("",80)," ","-")
  1. ;
  1. ; Number format
  1. FORMAT(IBNUM,IBDIG,IBFRM) ;
  1. N X,X1,X2,X3
  1. S X=IBNUM,X2=$G(IBFRM,"2$"),X3=IBDIG
  1. D COMMA^%DTC
  1. Q X
  1. ;
  1. BULL ; Post results of background billing run in a bulletin.
  1. K IBT
  1. S XMTEXT="IBT("
  1. S XMSUB="BILLING OF MEANS TEST CHARGES AWAITING NEW COPAY RATE"
  1. S XMDUZ="INTEGRATED BILLING PACKAGE"
  1. S IBT(1)="The job to automatically bill Means Test Outpatient copayment charges"
  1. S IBT(2)="which were on hold, awaiting the new copayment rate, has just completed."
  1. S IBT(3)=" "
  1. S IBT(4)=" Job Start Time: "_$P(IBSTART,"@")_" at "_$P(IBSTART,"@",2)
  1. S IBT(5)=" Job End Time: "_$P(IBEND,"@")_" at "_$P(IBEND,"@",2)
  1. S IBT(6)=" "
  1. S IBT(7)="Number of charges billed: "_IBCNT
  1. S IBT(8)=$S($D(^IB("AC",20)):"Please Note! There are still similar charges which remain on hold.",1:"There are no longer any charges awaiting the new copay rate which are on hold.")
  1. S XMY(DUZ)=""
  1. D ^XMD
  1. Q