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

IBECEAU1.m

Go to the documentation of this file.
  1. IBECEAU1 ;ALB/CPM - Cancel/Edit/Add... Clock Utilities ; 12-MAR-93
  1. ;;2.0;INTEGRATED BILLING;**57,704**;21-MAR-94;Build 49
  1. ;Per VA Directive 6402, this routine should not be modified.
  1. ;
  1. CLSTR(DFN,DATE) ; Find the billing clock in effect on DATE.
  1. ; Input: DFN -- Pointer to the patient in file #2
  1. ; DATE -- The date which is covered by the clock
  1. ; Output: IBCLDA -- Pointer to the clock in file #351
  1. ; (or null if there is none)
  1. ; IBCLST -- Zeroth node of clock pointed to by
  1. ; IBCLDA [OPTIONAL]
  1. N X,Y
  1. K IBCLST S IBCLDA=""
  1. I '$G(DATE)!'$G(DFN) G CLSTRQ
  1. S X="" F S X=$O(^IBE(351,"AIVDT",DFN,X)) Q:'X S IBCLDA=0 F S IBCLDA=$O(^IBE(351,"AIVDT",DFN,X,IBCLDA)) Q:'IBCLDA S Y=$G(^IBE(351,IBCLDA,0)) I Y,$P(Y,"^",4)'=3,$P(Y,"^",3)'>DATE S IBCLST=Y G CLSTRQ
  1. CLSTRQ Q
  1. ;
  1. CLDSP(X,NAM) ; Display Billing Clock data for NAM.
  1. ; Input: X -- Zeroth node of clock in file #351
  1. ; NAM -- Patient name^short id^long id
  1. I '$G(X)!($G(NAM)="") G CLDSPQ
  1. W !!,"Means Test Billing Clock information for ",$P(NAM,"^")," (",$P(NAM,"^",3),")"
  1. W !,$TR($J("",80)," ","-")
  1. W !?2,"Clock Start Date: ",$$DAT1^IBOUTL($P(X,"^",3)),?42,"Clock End Date: ",$S($P(X,"^",10):$$DAT1^IBOUTL($P(X,"^",10)),1:"N/A")
  1. W !?6,"Clock Status: ",$S($P(X,"^",4)=1:"CURRENT",$P(X,"^",4)=2:"CLOSED",1:"UNKNOWN"),?42,"Inpatient Days: ",+$P(X,"^",9)
  1. W !!?2,"Medicare Deductible Co-payments:"
  1. W !?15,"1st 90 days: $",+$P(X,"^",5),?45,"3rd 90 days: $",+$P(X,"^",7)
  1. W !?15,"2nd 90 days: $",+$P(X,"^",6),?45,"4th 90 days: $",+$P(X,"^",8)
  1. W !,$TR($J("",80)," ","-")
  1. CLDSPQ Q
  1. ;
  1. CLINP(BEG,DIF,IBCLDA) ; Update Billing Clock Inpatient Days
  1. ; Input: BEG -- Existing number of inpatient days
  1. ; DIF -- Days to add to clock (could be negative)
  1. ; IBCLDA -- Pointer to clock in file #351
  1. N DAYS,DIR,DIRUT,DUOUT,DTOUT,DIE,DA,DR,I,IBF
  1. I $G(BEG)=""!'$G(DIF)!'$G(IBCLDA) G CLINPQ1
  1. S DAYS=BEG+DIF
  1. I DAYS<0!(DAYS>365) W !!,"Can't update the clock to reflect ",DAYS," inpatient days.",!,"Please review this patient's clock and use the Clock Maintenance option",!,"to make any changes, if necessary." G CLINPQ1
  1. W ! S DIR(0)="Y",DIR("?")="Enter 'Y' or 'YES' to update the clock, or 'N', 'NO', or '^' to stop.",DIR("A")="Update the number of inpatient days from "_BEG_" to "_DAYS D ^DIR
  1. I 'Y!($D(DIRUT))!($D(DUOUT)) W !,"The billing clock has not been updated." G CLINPQ
  1. S DIE="^IBE(351,",DA=IBCLDA,DR=".09////"_DAYS_";13////"_DUZ_";14///NOW" D ^DIE
  1. W !,"The clock has been updated."
  1. I $$GET1^DIQ(351,IBCLDA_",",16,"I")=1 D EN^IBECECU1(DFN,IBCLDA) ;IB*2.0*704 - Update billing clocks as other sites
  1. CLINPQ S IBF=0 F I=90,180,270 I BEG'>I,DAYS>I S IBF=1 Q
  1. I IBF W !!,*7," ** Please review to see if this patient requires a new copay charge. **"
  1. CLINPQ1 Q
  1. ;
  1. CLAMT(STR,AMT,IBCLDA) ; Update Billing Clock Medicare Deductible co-payments
  1. ; Input: STR -- Zeroth node of clock in file #351
  1. ; AMT -- Dollar Amt to add to clock (could be negative)
  1. ; IBCLDA -- Pointer to clock in file #351
  1. N DAYS,DIR,DIRUT,DUOUT,DTOUT,DIE,DA,DR,IBMED,IBCLDT,NEWAMT,PTR
  1. I $G(STR)=""!'$G(AMT)!'$G(IBCLDA) G CLAMTQ
  1. S DAYS=+$P(STR,"^",9),PTR=$S(DAYS<91:5,DAYS<181:6,DAYS<271:7,1:8)
  1. S IBCLDT=+$P(STR,"^",3) D DED^IBAUTL3
  1. S NEWAMT=+$P(STR,"^",PTR)+AMT
  1. I NEWAMT<0 W !!,"Can't update the clock to reflect a copayment of -$",-NEWAMT,".",!,"Please review this patient's clock and use the Clock Maintenance option",!,"to make any changes, if necessary." G CLAMTQ
  1. I NEWAMT>IBMED W !!,"Note that the effective Medicare Deductible for this billing clock is $",IBMED,".",!,"Please note that $",NEWAMT," is beyond this limit."
  1. W ! S DIR(0)="Y",DIR("?")="Enter 'Y' or 'YES' to update the clock, or 'N', 'NO', or '^' to stop.",DIR("A")="Update the "_$$INPT^IBECEAU(DAYS)_" 90 days copayment from $"_+$P(STR,"^",PTR)_" to $"_NEWAMT D ^DIR
  1. I 'Y!($D(DIRUT))!($D(DUOUT)) W !,"The billing clock has not been updated." G CLAMTQ
  1. S DIE="^IBE(351,",DA=IBCLDA,DR=".0"_PTR_"////"_NEWAMT_";13////"_DUZ_";14///NOW" D ^DIE
  1. W !,"The clock has been updated."
  1. I $$GET1^DIQ(351,IBCLDA_",",16,"I")=1 D EN^IBECECU1(DFN,IBCLDA) ;IB*2.0*704 - Update billing clocks as other sites
  1. CLAMTQ Q