ABMURCN2 ; IHS/SD/SDR - 3PB/UFMS Reconcile Sessions Option (2)
;;2.6;IHS Third Party Billing;**1,11**;NOV 12, 2009;Build 133
;split routine from ABMURCON
; IHS/SD/SDR - abm*2.6*1 - Added fields (3PMS10019):
; FIXPMS10001 and FIXPMS10011 - Date of Service
; FIXPMS10026 - Visit type
; FIXPMS10027 - Insurer Type
;
RECORD ;EP
D GETBILL^ABMUCUTL(ABMPREC)
S ABMEXCLD=$$BILL^ABMUEAPI($P(ABMPREC,U,2),$P(ABMPREC,U,3)) ;exclude table entry?
I ABMEXCLD<1 D BATCH^ABMURCON,BILL^ABMURCON Q ;flag as excluded data in batch/on bill & quit
I $P($G(^ABMDPARM($P(ABMPREC,U,2),1,4)),U,14)=0 S ABMEXCLD=0 D BATCH^ABMURCON,BILL^ABMURCON Q ;if do not export, flag as excluded data in batch/on bill & quit
S ABMCNT=ABMCNT+1
;CAN#
;returns-budget act(10) & cost center(3)
S ABMCAN=$$EP^ABMUCAPI(ABMP("ITYP"),ABMCLN,ABMDTAPP,ABMSASUF)
S ABMREC=ABMRECT_$$FMT^ABMERUTL(ABMPASUF_ABMSASUF_$S(+$G(ABMUAOF)'=0:$P($G(^AUTTLOC(ABMP("LDFN"),0)),U,7),1:"")_ABMP("BDFN"),40) ;inv#
S ABMREC=ABMREC_$$SDT^ABMDUTL(ABMDTAPP) ;Dt/Tm Approved (MM/DD/YYYY) from 3P Bill file
S ABMREC=ABMREC_$$FMT^ABMERUTL(ABMTAXID,10) ;TAX ID (.11)-Insurer file
S ABMDESC=ABMPASUF_ABMSASUF_$S(+$G(ABMUAOF)'=0:$P($G(^AUTTLOC(ABMP("LDFN"),0)),U,7),1:"")_ABMPBNUM
S ABMREC=ABMREC_$$FMT^ABMERUTL(ABMDESC,100) ;<parASUFAC><satASUFAC>3P BILL#
S ABMREC=ABMREC_$$FMT^ABMERUTL($TR($J(ABMP("BAMT"),".",2),"."),"20NR") ;bill amount
S ABMREC=ABMREC_$$FMT^ABMERUTL("","10R") ;CAN-don't send; calculated by IE
S ABMREC=ABMREC_$$FMT^ABMERUTL(ABMTCODE,"10R")
S ABMREC=ABMREC_ABMOCL
S ABMREC=ABMREC_ABMCAN ;this is actually ba/cc
;start old code abm*2.6*11 Update insurer type groupings
;I "^R^MD^MH^"[("^"_ABMP("ITYP")_"^") S ABMPTIN="MCR"
;I "^D^K^"[("^"_ABMP("ITYP")_"^") S ABMPTIN="MCD"
;I "^H^M^P^F^T^"[("^"_ABMP("ITYP")_"^") S ABMPTIN="PRV"
;I "^W^C^N^G^"[("^"_ABMP("ITYP")_"^") S ABMPTIN="OTH"
;end old code start new code
I "^R^MD^MH^MC^MMC^"[("^"_ABMP("ITYP")_"^") S ABMPTIN="MCR"
I "^D^K^FPL^"[("^"_ABMP("ITYP")_"^") S ABMPTIN="MCD"
I "^H^M^P^F^"[("^"_ABMP("ITYP")_"^") S ABMPTIN="PRV"
I "^W^C^N^I^T^G^SEP^TSI^"[("^"_ABMP("ITYP")_"^") S ABMPTIN="OTH"
I "^V^"[("^"_ABMP("ITYP")_"^") S ABMPTIN="VET"
;end new code
S ABMPTIN=ABMSASUF_ABMPTIN
;
K DIC,DIE,X,Y,DA
S DIE="^ABMDBILL("_$P(ABMPREC,U,2)_","
S DA=$P(ABMPREC,U,3)
S DR=".114////"_ABMPTIN
D ^DIE
;
S ABMREC=ABMREC_$$FMT^ABMERUTL(ABMPTIN,10)
S ABMREC=ABMREC_$$SDT^ABMDUTL(ABMP("DOS")) ;DOS - abm*2.6*2 FIXPMS10011
S ABMREC=ABMREC_$$FMT^ABMERUTL(ABMP("VTYP"),50) ;visit type - abm*2.6*2 FIXPMS10026
S ABMREC=ABMREC_$$FMT^ABMERUTL(ABMP("ITYP"),10) ;ins type - abm*2.6*2 FIXPMS10027
S ^ABMUFMS($J,ABMCNT)=ABMREC
S ABMTOT=+$G(ABMTOT)+(ABMP("BAMT"))
D BATCH^ABMURCON ;put bill into batch file
D BILL^ABMURCON ;put entry in bill mult for transmit dt
Q
ABMURCN2 ; IHS/SD/SDR - 3PB/UFMS Reconcile Sessions Option (2)
+1 ;;2.6;IHS Third Party Billing;**1,11**;NOV 12, 2009;Build 133
+2 ;split routine from ABMURCON
+3 ; IHS/SD/SDR - abm*2.6*1 - Added fields (3PMS10019):
+4 ; FIXPMS10001 and FIXPMS10011 - Date of Service
+5 ; FIXPMS10026 - Visit type
+6 ; FIXPMS10027 - Insurer Type
+7 ;
RECORD ;EP
+1 DO GETBILL^ABMUCUTL(ABMPREC)
+2 ;exclude table entry?
SET ABMEXCLD=$$BILL^ABMUEAPI($PIECE(ABMPREC,U,2),$PIECE(ABMPREC,U,3))
+3 ;flag as excluded data in batch/on bill & quit
IF ABMEXCLD<1
DO BATCH^ABMURCON
DO BILL^ABMURCON
QUIT
+4 ;if do not export, flag as excluded data in batch/on bill & quit
IF $PIECE($GET(^ABMDPARM($PIECE(ABMPREC,U,2),1,4)),U,14)=0
SET ABMEXCLD=0
DO BATCH^ABMURCON
DO BILL^ABMURCON
QUIT
+5 SET ABMCNT=ABMCNT+1
+6 ;CAN#
+7 ;returns-budget act(10) & cost center(3)
+8 SET ABMCAN=$$EP^ABMUCAPI(ABMP("ITYP"),ABMCLN,ABMDTAPP,ABMSASUF)
+9 ;inv#
SET ABMREC=ABMRECT_$$FMT^ABMERUTL(ABMPASUF_ABMSASUF_$SELECT(+$GET(ABMUAOF)'=0:$PIECE($GET(^AUTTLOC(ABMP("LDFN"),0)),U,7),1:"")_ABMP("BDFN"),40)
+10 ;Dt/Tm Approved (MM/DD/YYYY) from 3P Bill file
SET ABMREC=ABMREC_$$SDT^ABMDUTL(ABMDTAPP)
+11 ;TAX ID (.11)-Insurer file
SET ABMREC=ABMREC_$$FMT^ABMERUTL(ABMTAXID,10)
+12 SET ABMDESC=ABMPASUF_ABMSASUF_$SELECT(+$GET(ABMUAOF)'=0:$PIECE($GET(^AUTTLOC(ABMP("LDFN"),0)),U,7),1:"")_ABMPBNUM
+13 ;<parASUFAC><satASUFAC>3P BILL#
SET ABMREC=ABMREC_$$FMT^ABMERUTL(ABMDESC,100)
+14 ;bill amount
SET ABMREC=ABMREC_$$FMT^ABMERUTL($TRANSLATE($JUSTIFY(ABMP("BAMT"),".",2),"."),"20NR")
+15 ;CAN-don't send; calculated by IE
SET ABMREC=ABMREC_$$FMT^ABMERUTL("","10R")
+16 SET ABMREC=ABMREC_$$FMT^ABMERUTL(ABMTCODE,"10R")
+17 SET ABMREC=ABMREC_ABMOCL
+18 ;this is actually ba/cc
SET ABMREC=ABMREC_ABMCAN
+19 ;start old code abm*2.6*11 Update insurer type groupings
+20 ;I "^R^MD^MH^"[("^"_ABMP("ITYP")_"^") S ABMPTIN="MCR"
+21 ;I "^D^K^"[("^"_ABMP("ITYP")_"^") S ABMPTIN="MCD"
+22 ;I "^H^M^P^F^T^"[("^"_ABMP("ITYP")_"^") S ABMPTIN="PRV"
+23 ;I "^W^C^N^G^"[("^"_ABMP("ITYP")_"^") S ABMPTIN="OTH"
+24 ;end old code start new code
+25 IF "^R^MD^MH^MC^MMC^"[("^"_ABMP("ITYP")_"^")
SET ABMPTIN="MCR"
+26 IF "^D^K^FPL^"[("^"_ABMP("ITYP")_"^")
SET ABMPTIN="MCD"
+27 IF "^H^M^P^F^"[("^"_ABMP("ITYP")_"^")
SET ABMPTIN="PRV"
+28 IF "^W^C^N^I^T^G^SEP^TSI^"[("^"_ABMP("ITYP")_"^")
SET ABMPTIN="OTH"
+29 IF "^V^"[("^"_ABMP("ITYP")_"^")
SET ABMPTIN="VET"
+30 ;end new code
+31 SET ABMPTIN=ABMSASUF_ABMPTIN
+32 ;
+33 KILL DIC,DIE,X,Y,DA
+34 SET DIE="^ABMDBILL("_$PIECE(ABMPREC,U,2)_","
+35 SET DA=$PIECE(ABMPREC,U,3)
+36 SET DR=".114////"_ABMPTIN
+37 DO ^DIE
+38 ;
+39 SET ABMREC=ABMREC_$$FMT^ABMERUTL(ABMPTIN,10)
+40 ;DOS - abm*2.6*2 FIXPMS10011
SET ABMREC=ABMREC_$$SDT^ABMDUTL(ABMP("DOS"))
+41 ;visit type - abm*2.6*2 FIXPMS10026
SET ABMREC=ABMREC_$$FMT^ABMERUTL(ABMP("VTYP"),50)
+42 ;ins type - abm*2.6*2 FIXPMS10027
SET ABMREC=ABMREC_$$FMT^ABMERUTL(ABMP("ITYP"),10)
+43 SET ^ABMUFMS($JOB,ABMCNT)=ABMREC
+44 SET ABMTOT=+$GET(ABMTOT)+(ABMP("BAMT"))
+45 ;put bill into batch file
DO BATCH^ABMURCON
+46 ;put entry in bill mult for transmit dt
DO BILL^ABMURCON
+47 QUIT