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

ABMDTFPC.m

Go to the documentation of this file.
ABMDTFPC ; IHS/SD/SDR - Apply per cent change to fee sched ;
 ;;2.6;IHS Third Party Billing System;**2,14,21,27**;NOV 12, 2009;Build 486
 ;IHS/SD/SDR 2.6*2 3PMS10003A modified to track changes in effective date multiples and who updated
 ;IHS/SD/SDR 2.6*21 HEAT112857 Fixed increase fee even when old data structure is incomplete.
 ;IHS/SD/SDR 2.6*27 CR8894 Fixed how it calculates fees; it was rounding everything off to a whole number which doesn't work for the Drugs section
 ;
START ;START
 W !!,"This routine will apply a percentage increase or decrease to"
 W !,"a selected segment or the entire fee schedule."
 S DIR(0)="Y",DIR("A")="Continue",DIR("B")="NO" D ^DIR K DIR Q:Y'=1
 S DIC="^ABMDFEE(",DIC(0)="AEMQ" D ^DIC Q:Y<0  S ABMFEE=+Y
ID ;INCREASE OR DECREASE
 S DIR(0)="S^1:INCREASE;2:DECREASE",DIR("B")=1 D ^DIR K DIR Q:'Y  S ABMID=Y,ABMIDNM=Y(0)
 S DIR(0)="N^0.01:100:2",DIR("A")="Enter PERCENTAGE" D ^DIR K DIR Q:'Y  S ABMPCT=+Y
 S ABMMULT=$S(ABMID=1:1+(ABMPCT/100),1:(100-ABMPCT)/100)
 ;S DIR(0)="S^1:ALL;11:SURGERY;13:HCPCS;15:RADIOLOGY;17:LABORATORY;19:MEDICINE;21:DENTAL;23:ANESTHESIA;25:DRUG;31:ROOM & BOARD"  ;abm*2.6*2 3PMS10003A
 S DIR(0)="S^1:ALL;11:SURGERY;13:HCPCS;15:RADIOLOGY;17:LABORATORY;19:MEDICAL;21:DENTAL;23:ANESTHESIA;25:DRUG;31:REVENUE CODE (ROOM & BOARD)"  ;abm*2.6*2 3PMS10003A
 S DIR("A")="Select FEE SCHEDULE CATEGORY"
 D ^DIR K DIR Q:'Y  S ABMCAT=Y,ABMCNAME=Y(0)
 ;start new code abm*2.6*2 3PMS10003A
 D ^XBFMK
 S DIR(0)="D"
 S DIR("A")="Effective Date of "_ABMIDNM
 S DIR("B")="TODAY"
 D ^DIR K DIR
 Q:$D(DIRUT)
 S ABMEDT=Y
 ;end new code 3PMS10003A
 W !!,"I am going to apply a ",ABMPCT," percent ",ABMIDNM," to category ",ABMCNAME
 ;W !," for fee schedule #",ABMFEE,"."  ;abm*2.6*2 3PMS10003A
 W !," for fee schedule #",ABMFEE,", with an effective date of "_$$SDT^ABMDUTL(ABMEDT)_"."  ;abm*2.6*2 3PMS10003A
 S DIR(0)="Y",DIR("A")="ARE YOU SURE",DIR("B")="NO" D ^DIR K DIR Q:Y'=1
 I ABMCAT'=1 D CAT1
 I ABMCAT=1 D
 .F ABMCAT=11,13,15,17,19,21,23,25,31 D CAT1
 ;start new code abm*2.6*2 3PMS10003A
 D ^XBFMK
 S DA(1)=ABMFEE
 S DIC="^ABMDFEE("_DA(1)_",1,"
 S DIC(0)="MQL"
 S DIC("P")=$P(^DD(9002274.01,1,0),U,2)
 D NOW^%DTC
 S X=%
 S DIC("DR")=".02////"_DUZ_";.04////"_$E(ABMIDNM,1)_";.05////"_ABMPCT
 D ^DIC
 ;end new code 3PMS10003A
 ;start new abm*2.6*27 IHS/SD/SDR CR8894
 ;reindex all entries for look up
 S DIK="^ABMDFEE("
 S DA=ABMFEE
 D IX^DIK
 ;end new abm*2.6*27 IHS/SD/SDR CR8894
 W !!,"Finished.",!!
 K ABMCAT,ABMFEE,ABMID,ABMMULT,ABMPCT,ABMCTR,ABMCNAME,ABMIDNM
 S DIR(0)="E" D ^DIR K DIR
 Q
CAT1 ;CHANGE FEES ONE CATEGORY
 S ABMI=0
 F  S ABMI=$O(^ABMDFEE(ABMFEE,ABMCAT,ABMI)) Q:'ABMI  D
 .S ABMCTR=+$G(ABMCTR)+1 W:'(ABMCTR#10) "."
 .;start old abm*2.6*21 HEAT112857
 .;S ABMOFE=$P(^ABMDFEE(ABMFEE,ABMCAT,ABMI,0),U,2)
 .;S ABMNFE=ABMOFE*ABMMULT
 .;S ABMNFE=ABMNFE+.5
 .;S ABMNFE=ABMNFE\1
 .;S $P(^ABMDFEE(ABMFEE,ABMCAT,ABMI,0),U,2)=ABMNFE
 .;end old start new abm*2.6*21 IHS/SD/SDR HEAT112857
 .S ABMOFE=+$P($G(^ABMDFEE(ABMFEE,ABMCAT,ABMI,0)),U,2)
 .I ABMOFE'=0 D
 ..;start old abm*2.6*27 IHS/SD/SDR CR8894
 ..;S ABMNFE=ABMOFE*ABMMULT
 ..;S ABMNFE=ABMNFE+.5
 ..;S ABMNFE=ABMNFE\1
 ..;end old start abm*2.6*27 IHS/SD/SDR CR8894
 ..D ROUND  ;abm*2.6*27 IHS/SD/SDR CR8894
 ..S $P(^ABMDFEE(ABMFEE,ABMCAT,ABMI,0),U,2)=ABMNFE
 .;end new abm*2.6*21 IHS/SD/SDR HEAT112857
 .D EFFDT
 Q
 ;start new code abm*2.6*2 3PMS10003A
 ;
 ;start new abm*2.6*27 IHS/SD/SDR CR8894
ROUND ;EP
 I ABMCAT'=25 D
 .S ABMNFE=ABMOFE*ABMMULT
 .S ABMNFE=ABMNFE+.5
 .S ABMNFE=ABMNFE\1
 I ABMCAT=25 D
 .S ABMNFE=ABMOFE*ABMMULT
 .S ABMDEC=$L($P(ABMOFE,".",2))
 .S ABMNFE=$J(ABMNFE,0,ABMDEC)
 Q
 ;end new abm*2.6*27 IHS/SD/SDR CR8894
 ;
EFFDT ;
 D GETFEES
 ;
 S ABMTFE=ABMTFE*ABMMULT
 S ABMTFE=ABMTFE+.5
 S ABMTFE=ABMTFE\1
 ;
 S ABMPFE=ABMPFE*ABMMULT
 S ABMPFE=ABMPFE+.5
 S ABMPFE=ABMPFE\1
 ;
 D ^XBFMK
 S DA(2)=ABMFEE
 S DA(1)=ABMI
 S DIC="^ABMDFEE("_DA(2)_","_ABMCAT_","_DA(1)_",1,"
 S DIC(0)="L"
 S DIC("P")=$P(^DD(9002274.01_ABMCAT,1,0),U,2)
 S X=ABMEDT
 D ^DIC
 S ABMENTRY=+Y
 D ^XBFMK
 S DA(2)=ABMFEE
 S DA(1)=ABMI
 S DIE="^ABMDFEE("_DA(2)_","_ABMCAT_","_DA(1)_",1,"
 S DA=ABMENTRY
 S DR=".02////"_ABMNFE
 S DR=DR_";.03////"_ABMTFE
 S DR=DR_";.04////"_ABMPFE
 S DR=DR_";.05////"_DT_";.06////"_DUZ
 D ^DIE
 Q
GETFEES ;
 S ABMDT=0
 F  S ABMDT=$O(^ABMDFEE(ABMFEE,ABMCAT,ABMI,1,"B",ABMDT)) Q:(+$G(ABMDT)=0)  D
 .S ABMDIEN=0
 .F  S ABMDIEN=$O(^ABMDFEE(ABMFEE,ABMCAT,ABMI,1,"B",ABMDT,ABMDIEN))  Q:(+$G(ABMDIEN)=0)  D
 ..;start new abm*2.6*21 IHS/SD/SDR HEAT112857
 ..I ABMOFE=0 D
 ...S ABMOFE=+$P($G(^ABMDFEE(ABMFEE,ABMCAT,ABMI,1,ABMDIEN,0)),U,2)
 ...;start old abm*2.6*27 IHS/SD/SDR CR8894
 ...;S ABMNFE=ABMOFE*ABMMULT
 ...;S ABMNFE=ABMNFE+.5
 ...;S ABMNFE=ABMNFE\1
 ...;end old abm*2.6*27 IHS/SD/SDR CR8894
 ...D ROUND  ;abm*2.6*27 IHS/SD/SDR CR8894
 ...;S ^ABMDFEE(ABMFEE,ABMCAT,ABMI,0)=ABMI_U_ABMNFE_U_ABMEDT  ;abm*2.6*27 IHS/SD/SDR CR8894
 ...S $P(^ABMDFEE(ABMFEE,ABMCAT,ABMI,0),U,2)=ABMNFE  ;abm*2.6*27 IHS/SD/SDR CR8894
 ...S $P(^ABMDFEE(ABMFEE,ABMCAT,ABMI,0),U,3)=ABMEDT  ;abm*2.6*27 IHS/SD/SDR CR8894
 ..;end new abm*2.6*21 IHS/SD/SDR HEAT112857
 ..S ABMTFE=+$P($G(^ABMDFEE(ABMFEE,ABMCAT,ABMI,1,ABMDIEN,0)),U,3)  ;technical charge
 ..S ABMPFE=+$P($G(^ABMDFEE(ABMFEE,ABMCAT,ABMI,1,ABMDIEN,0)),U,4)  ;professional charge
 Q
 ;end new code 3PMS10003A