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

IB20PT51.m

Go to the documentation of this file.
  1. IB20PT51 ;ALB/CPM - MORE IB V2.0 POST-INIT ONE-TIME ITEMS ; 28-JAN-94
  1. ;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
  1. ;
  1. ; Perform more one-time post-init items
  1. D UBFM ; add UB-92 form type to the Form Type (#353) file
  1. D RXFT ; add Addendum form type to the Form Type (#353) file
  1. D FLAG ; flag telephone stop codes as non-billable
  1. D HOLD ; check all charges 'on hold' in file #350
  1. Q
  1. ;
  1. ;
  1. UBFM ; Add UB-92 form type to the Form Type (#353) file.
  1. Q:$O(^IBE(353,"B","UB-92",0))
  1. W !!,">>> Adding UB-92 form type to the Form Type (#353) file."
  1. S DINUM=0 F Y=3:1:1000 I '$D(^IBE(353,Y,0))!($P($G(^IBE(353,Y,0)),U,1)="UB-92") S DINUM=Y Q
  1. I 'DINUM W !!,"**** ERROR: Could not add UB-92 claim form to file 353! ****" G UBFMQ
  1. S DIC="^IBE(353,",DIC(0)="LX",X="UB-92" D ^DIC
  1. I '$P(Y,U,3) W !!,"**** ERROR: UB-92 Claim Form already defined! Check Routine. ****" G UBFMQ
  1. I +Y>0 S DA=+Y,DIE=DIC,DR="1.01///^S X=""EN^IBCF3""" D ^DIE
  1. UBFMQ K DIC,DIE,DA,Y,X,DR,DINUM
  1. Q
  1. ;
  1. RXFT ; Add Addendum form type to the Form Type (#353) file.
  1. W !!,">>> Adding Addendum form type to the Form Type (#353) file."
  1. S DINUM=0 F Y=3:1:1000 I '$D(^IBE(353,Y,0))!($P($G(^IBE(353,Y,0)),U,1)="BILL ADDENDUM") S DINUM=Y Q
  1. I 'DINUM W !!,"**** ERROR: Could not add BILL ADDENDUM claim form to file 353! ****" G RXFTE
  1. S DIC="^IBE(353,",DIC(0)="LX",X="BILL ADDENDUM" D ^DIC
  1. I '$P(Y,U,3) W !!,"**** ERROR: BILL ADDENDUM Claim Form already defined! Check Routine. ****" G RXFTE
  1. I +Y>0 S DA=+Y,DIE=DIC,DR="1.01///^S X=""EN^IBCF4""" D ^DIE
  1. RXFTE K DIC,DIE,DA,Y,X,DR,DINUM
  1. Q
  1. ;
  1. FLAG ; Flag Telephone Stop Codes as non-billable for Means Test Billing
  1. W !!,">>> Flagging Telephone stop codes as non-billable for Means Test Billing..."
  1. F IBI=1:1 S IBS=$P($T(STOPS+IBI),";;",2) Q:IBS="QUIT" D
  1. .S X=$O(^DIC(40.7,"B",IBS,0))
  1. .I 'X W !?4,"Unable to flag the stop code '",IBS,"' (not on file)..." Q
  1. .K DD,DO S DIC="^IBE(352.3,",DIC(0)="" D FILE^DICN Q:Y<0
  1. .S DIE=DIC,DA=+Y,DR=".02////2940201;.03////1" D ^DIE
  1. .W !?4,"Flagged stop code '",IBS,"' as non-billable..."
  1. K DA,DIC,DIE,DR,IBI,IBS,X,Y
  1. Q
  1. ;
  1. STOPS ; Stop codes to flag
  1. ;;TELEPHONE TRIAGE
  1. ;;TELEPHONE/MEDICINE
  1. ;;TELEPHONE/SURGERY
  1. ;;TELEPHONE/SPECIAL PSYCHIATRY
  1. ;;TELEPHONE/GENERAL PSYCHIATRY
  1. ;;TELEPHONE/PTSD
  1. ;;TELEPHONE/ALCOHOL DEPENDENCE
  1. ;;TELEPHONE/DRUG DEPENDENCE
  1. ;;TELEPHONE/SUBSTANCE ABUSE
  1. ;;TELEPHONE/ANCILLARY
  1. ;;TELEPHONE/REHAB AND SUPPORT
  1. ;;TELEPHONE/DIAGNOSTIC
  1. ;;TELEPHONE/PROSTHETICS/ORTHOTIC
  1. ;;TELEPHONE/DENTAL
  1. ;;TELEPHONE/DIALYSIS
  1. ;;QUIT
  1. ;
  1. ;
  1. HOLD ; Check all charges in file #350 that are on hold.
  1. ;
  1. W !!,">>> Examining all charges 'on hold' in File #350..."
  1. ;
  1. S (IBCNTR,IBCNTU)=0
  1. ;
  1. ; - run through all held charges
  1. S DFN=0 F S DFN=$O(^IB("AH",DFN)) Q:'DFN D
  1. .S IBN=0 F S IBN=$O(^IB("AH",DFN,IBN)) Q:'IBN D
  1. ..;
  1. ..; - get the action and parent
  1. ..S IBND=$G(^IB(IBN,0)),IBPAR=+$P(IBND,"^",9)
  1. ..;
  1. ..; - if the parent is itself, and there's no entry in
  1. ..; - ^ib("apdt",ibpar then re-index entry
  1. ..I IBN=IBPAR,'$D(^IB("APDT",IBN)) S DA=IBN,DIK="^IB(" D IX1^DIK S IBCNTR=IBCNTR+1
  1. ..;
  1. ..; - determine the transaction type of the last transaction
  1. ..S IBL=$$LAST^IBECEAU(IBPAR)
  1. ..S IBTRTY=$P($G(^IBE(350.1,+$P($G(^IB(IBL,0)),"^",3),0)),"^",5)
  1. ..;
  1. ..; - if the transaction was a cancel-type transaction, update
  1. ..; - the status of the held charge to cancelled.
  1. ..Q:IBTRTY'=2
  1. ..S DA=IBN,DIE="^IB(",DR=".05////10" D ^DIE
  1. ..S IBCNTU=IBCNTU+1
  1. ..;
  1. ..; - show signs of life
  1. ..W:'(IBCNTU#10) "."
  1. ;
  1. ;
  1. W !," >> ",$S(IBCNTU:IBCNTU,1:"No")," held charge",$S(IBCNTU=1:" was",1:"s were")," updated to cancelled."
  1. W !," >> ",$S(IBCNTR:IBCNTR,1:"No")," held charge",$S(IBCNTR=1:" was",1:"s were")," re-indexed."
  1. ;
  1. K DA,DIK,DIE,DR,DFN,IBCNTR,IBCNTU,IBN,IBND,IBPAR,IBL,IBTRTY
  1. Q