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

IBCBR.m

Go to the documentation of this file.
  1. IBCBR ;ALB/AAS - ADD/EDIT BILLING RATES FILE; 3 MAY 90
  1. ;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;
  1. ;MAP TO DGCRBR
  1. ;
  1. ;ask date, bed section, revenue code, amount, the file.
  1. ; reask revenue code until null
  1. ; reask bed section untill null - then revenue code
  1. ; reask date until null .....
  1. ADD W ! S %DT="AEX",%DT("A")="Select BILLING RATE EFFECTIVE DATE: " D ^%DT G:Y<1 END1 S IBEFDT=+Y
  1. F I=0:0 D BS G:IBBS<1 ADD
  1. Q
  1. BS W ! S DIC("S")="I $P(^(0),U,5)",DIC="^DGCR(399.1,",DIC(0)="AEQM",DIC("A")=" Select BILLING BEDSECTION: " D ^DIC K DIC S IBBS=+Y Q:IBBS<1
  1. F J=0:0 D REV Q:IBREV<1
  1. Q
  1. REV W ! S DIC("S")="I $P(^(0),U,3)",DIC="^DGCR(399.2,",DIC(0)="AEQM",DIC("A")=" Select REVENUE CODE: " D ^DIC K DIC S IBREV=+Y Q:IBREV<1
  1. I $D(^DGCR(399.5,"AIVDT",IBBS,-IBEFDT,IBREV)) S DIC(0)="EMQF",X=IBEFDT,DIC="^DGCR(399.5,",DIC("S")="I $P(^(0),U,2)=IBBS,$P(^(0),U,3)=IBREV" D ^DIC K DIC D NEW:+Y<1 Q:Y<1 S DA=+Y D EDIT Q
  1. W !,"Filing New Entry!" D FILE,EDIT
  1. Q
  1. FILE S:'$D(DIC(0)) DIC(0)="L" S DIC="^DGCR(399.5,",X=IBEFDT,DIC("DR")=".02////"_IBBS_";.03////"_IBREV K DD,DO D FILE^DICN S DA=+Y
  1. Q
  1. ;
  1. NEW ;ask to add new entry from fast
  1. S Y=IBEFDT X ^DD("DD") W !?3,"ARE YOU ADDING '",Y,"' AS A NEW BILLING RATES" D YN^DICN Q:%=-1!(%=2)
  1. I '% W !!?3,"Enter 'YES' to add this as a new BILLING RATES",!?3,"or Enter 'NO' to not add a new entry",! G NEW
  1. S DIC(0)="EQL" D FILE Q
  1. Q
  1. ;
  1. EN1 ;edit file entry, do lookup, then edit.
  1. W ! S DIC("A")="Select BEDSECTION: ",DIC="^DGCR(399.1,",DIC(0)="AEQMN",DIC("S")="I $P(^(0),U,5)" D ^DIC K DIC G:Y<1 END S IBBS=+Y D BR G EN1
  1. Q
  1. BR W ! S DIC("DR")=".02///"_IBBS,DIC("S")="I $P(^(0),U,2)=IBBS",DIC="^DGCR(399.5,",DIC(0)="AEQL" D ^DIC K DIC Q:Y<1 S DA=+Y D EDIT G BR
  1. ;
  1. EDIT S (DIC,DIE)="^DGCR(399.5,",DR=".01:99" D ^DIE
  1. Q
  1. ;
  1. END1 D ENR^IBEMTO K IBRUN ; bill MT OPT charges awaiting the new copay rate
  1. END K I,J,X,Y,%DT,DA,DIC,DIE,DR,IBBS,IBREV,IBEFDT
  1. Q
  1. ;
  1. REDO ;re-index the aivdt x-ref in billing rates file.
  1. K ^DGCR(399.5,"AIVDT")
  1. S IBJ=0 F IBI=0:0 S IBJ=$O(^DGCR(399.5,IBJ)) Q:'IBJ I $D(^DGCR(399.5,IBJ,0)) S X=^(0) I $P(X,"^",2)]"",$P(X,"^",3)]"" S ^DGCR(399.5,"AIVDT",$P(X,"^",2),-($P(X,"^")),$P(X,"^",3),IBJ)=""