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

ABMFECNV.m

Go to the documentation of this file.
ABMFECNV ; IHS/SD/SDR - 3P Fee Table Conversion
 ;;2.6;IHS THIRD PARTY BILLING SYSTEM;**2**;NOV 12, 2009
 ;
 Q
CONVERT ;
 S X=$$PATCH^XPDUTL("ABM*2.6*2")
 I $P(X,U)=1 Q  ;patch 2 already installed
 ;11=SURGICAL
 ;13=HCPCS
 ;15=RADIOLOGY
 ;17=LABORATORY
 ;19=MEDICAL
 ;23=ANESTHESIA
 S ABMTBL=0
 F  S ABMTBL=$O(^ABMDFEE(ABMTBL)) Q:(+$G(ABMTBL)=0)  D
 .D BMES^XPDUTL("Fee Schedule "_ABMTBL_" ...")
 .D MES^XPDUTL("  Schd  Cat Code    EffDt               Fee")
 .S ABMEFFDT=$P($G(^ABMDFEE(ABMTBL,0)),U,5)
 .F ABMM=11,13,15,17,19,23 D
 ..S ABMMI=0
 ..F  S ABMMI=$O(^ABMDFEE(ABMTBL,ABMM,ABMMI)) Q:(+$G(ABMMI)=0)  D
 ...S ABMCODE=$P($G(^ABMDFEE(ABMTBL,ABMM,ABMMI,0)),U)
 ...S ABMCHRG=$P($G(^ABMDFEE(ABMTBL,ABMM,ABMMI,0)),U,2)
 ...D ^XBFMK
 ...S DA(2)=ABMTBL
 ...S DA(1)=ABMCODE
 ...S DIC="^ABMDFEE("_DA(2)_","_ABMM_","_DA(1)_",1,"
 ...S DIC(0)="L"
 ...S DIC("P")=$P(^DD(9002274.01_ABMM,1,0),U,2)
 ...S X=ABMEFFDT
 ...S DIC("DR")=".02////"_ABMCHRG
 ...D ^DIC
 ...D MES^XPDUTL("  "_ABMTBL_"        "_ABMM_" "_$S($G(^ICPT(ABMCODE,0))'="":$P($G(^ICPT(ABMCODE,0)),U),1:ABMCODE)_"   "_$$SDT^ABMDUTL(ABMEFFDT)_"      "_$J($FN(ABMCHRG,",",2),"10R"))
 .;21=DENTAL
 .S ABMMI=0
 .F  S ABMMI=$O(^ABMDFEE(ABMTBL,21,ABMMI)) Q:(+$G(ABMMI)=0)  D
 ..S ABMCODE=$P($G(^AUTTADA($P($G(^ABMDFEE(ABMTBL,21,ABMMI,0)),U),0)),U)
 ..S ABMCHRG=+$P($G(^ABMDFEE(ABMTBL,21,ABMMI,0)),U,2)
 ..D ^XBFMK
 ..S DA(2)=ABMTBL
 ..S DA(1)=ABMMI
 ..S DIC="^ABMDFEE("_DA(2)_",21,"_DA(1)_",1,"
 ..S DIC(0)="L"
 ..S DIC("P")=$P(^DD(9002274.0121,1,0),U,2)
 ..S X=ABMEFFDT
 ..S DIC("DR")=".02////"_ABMCHRG
 ..D ^DIC
 ..D MES^XPDUTL("  "_ABMTBL_"        21 "_ABMCODE_"   "_$$SDT^ABMDUTL(ABMEFFDT)_"      "_$J($FN(ABMCHRG,",",2),"10R"))
 .;25=DRUG
 .S ABMMI=0
 .F  S ABMMI=$O(^ABMDFEE(ABMTBL,25,ABMMI)) Q:(+$G(ABMMI)=0)  D
 ..S ABMCODE=$P($G(^PSDRUG($P($G(^ABMDFEE(ABMTBL,25,ABMMI,0)),U),0)),U)
 ..S ABMCHRG=+$P($G(^ABMDFEE(ABMTBL,25,ABMMI,0)),U,2)
 ..D ^XBFMK
 ..S DA(2)=ABMTBL
 ..S DA(1)=ABMMI
 ..S DIC="^ABMDFEE("_DA(2)_",25,"_DA(1)_",1,"
 ..S DIC(0)="L"
 ..S DIC("P")=$P(^DD(9002274.0125,1,0),U,2)
 ..S X=ABMEFFDT
 ..S DIC("DR")=".02////"_ABMCHRG
 ..D ^DIC
 ..D MES^XPDUTL("  "_ABMTBL_"   25 "_$$FMT^ABMERUTL(ABMCODE,"30L")_"   "_$$SDT^ABMDUTL(ABMEFFDT)_"      "_$J($FN(ABMCHRG,",",2),"10R"))
 .;31=REVENUE CODES
 .S ABMMI=0
 .F  S ABMMI=$O(^ABMDFEE(ABMTBL,31,ABMMI)) Q:(+$G(ABMMI)=0)  D
 ..S ABMCODE=$P($G(^AUTTREVN($P($G(^ABMDFEE(ABMTBL,31,ABMMI,0)),U),0)),U)
 ..S ABMCHRG=+$P($G(^ABMDFEE(ABMTBL,31,ABMMI,0)),U,2)
 ..D ^XBFMK
 ..S DA(2)=ABMTBL
 ..S DA(1)=ABMMI
 ..S DIC="^ABMDFEE("_DA(2)_",31,"_DA(1)_",1,"
 ..S DIC(0)="L"
 ..S DIC("P")=$P(^DD(9002274.0131,1,0),U,2)
 ..S X=ABMEFFDT
 ..S DIC("DR")=".02////"_ABMCHRG
 ..D ^DIC
 ..D MES^XPDUTL("  "_ABMTBL_"        31 "_ABMCODE_"-"_$$FMT^ABMERUTL($P($G(^AUTTREVN($P($G(^ABMDFEE(ABMTBL,31,ABMMI,0)),U),0)),U,2),"25L")_"   "_$$SDT^ABMDUTL(ABMEFFDT)_"      "_$J($FN(ABMCHRG,",",2),"10R"))
 .;32=CHARGE MASTER
 .S ABMMI=0
 .F  S ABMMI=$O(^ABMDFEE(ABMTBL,32,ABMMI)) Q:(+$G(ABMMI)=0)  D
 ..S ABMCODE=$P($G(^ABMCM($P($G(^ABMDFEE(ABMTBL,32,ABMMI,0)),U),0)),U)
 ..S ABMCHRG=+$P($G(^ABMDFEE(ABMTBL,32,ABMMI,0)),U,2)
 ..D ^XBFMK
 ..S DA(2)=ABMTBL
 ..S DA(1)=ABMMI
 ..S DIC="^ABMDFEE("_DA(2)_",32,"_DA(1)_",1,"
 ..S DIC(0)="L"
 ..S DIC("P")=$P(^DD(9002274.0132,1,0),U,2)
 ..S X=ABMEFFDT
 ..S DIC("DR")=".02////"_ABMCHRG
 ..D ^DIC
 ..D MES^XPDUTL("  "_ABMTBL_"        32 "_ABMCODE_"   "_$$SDT^ABMDUTL(ABMEFFDT)_"      "_$J($FN(ABMCHRG,",",2),"10R"))
 Q