ABMDESMA ; IHS/ASDST/DMJ - Summarized Claim ANESTHESIA charges ;
;;2.6;IHS Third Party Billing;**1,3,13**;NOV 12, 2009;Build 213
;
;IHS/SD/SDR - V2.5 P8 - IM10618/IM11164 - Prompt/display provider
;IHS/SD/SDR - v2.5 p9 - IM17729 - Added code to calculate anesthesia minutes
;IHS/SD/SDR - v2.5 p9 - task 1 - Use new service line provider multiple
;IHS/SD/SDR - v2.5 p10 - IM21539 - Fixed summary screen to display correct anes amt
;IHS/SD/SDR - v2.5 p11 - NPI
;IHS/SD/SDR - 2.5 p12 - IM25331 - Add provider taxonomy to CMS-1500 block 24K
;IHS/SD/SDR - v2.5 p12 - IM24277 - Added code for 2nd and 3rd modifiers
;IHS/SD/SDR,AML - v2.5 p13 - IM25899 - Alignment changes
;
;IHS/SD/SDR - v2.6 CSV
;IHS/SD/SDR - abm*2.6*1 - HEAT6566 - Populate anes based on MCR vs non-MCR
;IHS/SD/SDR - abm*2.6*3 - HEAT12742 - Corrections to MCR/non-MCR; removed all HEAT6566 changes
;IHS/SD/SDR - 2.6*13 - Added check for new export mode 35
;
ANS ;EP for Anesthesia Charges
I $G(ABMP("VTYP",992)),'$G(ABMPRINT) Q:ABMP("VTYP",992)'=ABMP("EXP")
S ABMCAT=39 D PCK^ABMDESM1 Q:$G(ABMQUIT)
S ABMX=0 F ABMS("I")=ABMS("I"):1 S ABMX=$O(@(ABMP("GL")_"39,"_ABMX_")")) Q:'ABMX S ABMX("X")=ABMX D ANS1
Q
ANS1 ;
S ABMX(0)=@(ABMP("GL")_"39,"_ABMX("X")_",0)")
I $P(^ABMDEXP(ABMP("EXP"),0),U)["UB" S ABMX("R")=$P(ABMX(0),U,2)
S (ABMX("C"),ABMX("SUB"))=$P(ABMX(0),U,4) ;abm*2.6*1 HEAT6566
;I ($G(ABMP("ITYP"))="R")!($G(ABMP("ITYPE"))="R") S (ABMX("C"),ABMX("SUB"))=$P(ABMX(0),U,4) ;abm*2.6*1 HEAT6566
;I ($G(ABMP("ITYP"))'="R")!($G(ABMP("ITYPE"))'="R") S ABMX("C")=$P(ABMX(0),U,3),ABMX("SUB")=ABMX("C")+$P(ABMX(0),U,4) ;abm*2.6*1 HEAT6566 ;IHS/SD/SDR 4/27/10 HEAT12742
;I ($G(ABMP("ITYP"))'="R")!($G(ABMP("ITYPE"))'="R") S (ABMX("C"),ABMX("SUB"))=+$P(ABMX(0),U,4) ;abm*2.6*1 HEAT6566 ;IHS/SD/SDR 4/27/10 HEAT12742
S ABMS("TOT")=ABMS("TOT")+ABMX("SUB")
I $P(^ABMDEXP(ABMP("EXP"),0),U)'["UB" G ANSH
ANSU Q:ABMX("R")="" D REVN
Q
;
ANSH S ABMS(ABMS("I"))=ABMX("SUB")
S ABMCAT=39 D HDT^ABMDESM1
S ABMX("C")=$P(ABMX(0),U) D CPT S $P(ABMS(ABMS("I")),U,4)=ABMX("C")
S:$P(ABMX(0),"^",6)'="" $P(ABMS(ABMS("I")),"^",4)=$P(ABMS(ABMS("I")),"^",4)_"-"_$P(ABMX(0),"^",6)
S:$P(ABMX(0),"^",14)'="" $P(ABMS(ABMS("I")),"^",4)=$P(ABMS(ABMS("I")),"^",4)_"-"_$P(ABMX(0),"^",14)
S:$P(ABMX(0),"^",19)'="" $P(ABMS(ABMS("I")),"^",4)=$P(ABMS(ABMS("I")),"^",4)_"-"_$P(ABMX(0),"^",19)
;I ABMP("EXP")=27 S ABMX("C")=$P(ABMX(0),U) D CPT S $P(ABMS(ABMS("I")),U,4)=ABMX("C") D ;abm*2.6*13 export mode 35
I ABMP("EXP")=27!(ABMP("EXP")=35) S ABMX("C")=$P(ABMX(0),U) D CPT S $P(ABMS(ABMS("I")),U,4)=ABMX("C") D ;abm*2.6*13 export mode 35
.S:$P(ABMX(0),U,6)'="" $P(ABMS(ABMS("I")),U,4)=$P(ABMS(ABMS("I")),U,4)_" "_$P(ABMX(0),U,6)
.S:$P(ABMX(0),U,14)'="" $P(ABMS(ABMS("I")),U,4)=$P(ABMS(ABMS("I")),U,4)_" "_$P(ABMX(0),U,14)
.S:$P(ABMX(0),U,19)'="" $P(ABMS(ABMS("I")),U,4)=$P(ABMS(ABMS("I")),U,4)_" "_$P(ABMX(0),U,19)
S $P(ABMS(ABMS("I")),"^",5)=$P(ABMX(0),"^",10)
S $P(ABMS(ABMS("I")),U,10)=$P(ABMX(0),U,15)
S ABMMTS=$$FMDIFF^XLFDT($P(ABMX(0),U,8),$P(ABMX(0),U,7),2)
S ABMMTS=ABMMTS\60
S $P(ABMS(ABMS("I")),U,6)=ABMMTS
S:$P(ABMS(ABMS("I")),"^",6)="" $P(ABMS(ABMS("I")),"^",6)=1
S $P(ABMS(ABMS("I")),U,7)=7
S $P(ABMS(ABMS("I")),U,8)="ANESTHESIA IN ASSOC W/ CPT:"_$P($$CPT^ABMCVAPI(+ABMX(0),ABMP("VDT")),U,2) ;CSV-c
S ABMX(0)=@(ABMP("GL")_"39,"_ABMX("X")_",0)")
S ABMDPRV=$O(@(ABMP("GL")_"39,"_ABMX_",""P"",""C"",""R"",0)"))
S:+ABMDPRV'=0 ABMDPRV=$P($G(@(ABMP("GL")_"39,"_ABMX_",""P"","_ABMDPRV_",0)")),U)
I $G(ABMDPRV)="" S ABMDPRV=$$GETPRV^ABMDFUTL
I +$G(ABMDPRV)'=0 D
.Q:'$$K24^ABMDFUTL
.S $P(ABMS(ABMS("I")),U,9)=$$K24N^ABMDFUTL(ABMDPRV)
.S $P(ABMS(ABMS("I")),U,11)=$P($$NPI^XUSNPI("Individual_ID",ABMDPRV),U)
.I $G(ABMP("NPIS"))="N" S $P(ABMS(ABMS("I")),U,9)=$$PTAX^ABMEEPRV(ABMDPRV)
S:$P(ABMX(0),"^",6)'="" $P(ABMS(ABMS("I")),"^",8)=$P(ABMS(ABMS("I")),"^",8)_"-"_$P(ABMX(0),"^",6)
;I ABMP("EXP")=27 D ;abm*2.6*13 export mode 35
I ABMP("EXP")=27!(ABMP("EXP")=35) D ;abm*2.6*13 export mode 35
.S $P(ABMS(ABMS("I")),U,2)=$P(ABMS(ABMS("I")),U,2)_"@"_$P($$MDT^ABMDUTL($P(ABMX(0),U,7))," ",2)
.S $P(ABMS(ABMS("I")),U,3)=$P(ABMS(ABMS("I")),U,3)_"@"_$P($$MDT^ABMDUTL($P(ABMX(0),U,8))," ",2)
Q
;
CPT I ABMX("C")]"" S ABMX("C")=$P($$CPT^ABMCVAPI(ABMX("C"),ABMP("VDT")),U,2) ;CSV-c
Q
ICD I ABMX("D")]"" S ABMX("D")=$P($$DX^ABMCVAPI(ABMX("D"),ABMP("VDT")),U,2) ;CSV-c
Q
;
REVN I $D(ABMS(ABMX("R"))) S $P(ABMS(ABMX("R")),U)=$P(ABMS(ABMX("R")),U)+ABMX("SUB")
E S ABMS(ABMX("R"))=ABMX("SUB")
Q
ABMDESMA ; IHS/ASDST/DMJ - Summarized Claim ANESTHESIA charges ;
+1 ;;2.6;IHS Third Party Billing;**1,3,13**;NOV 12, 2009;Build 213
+2 ;
+3 ;IHS/SD/SDR - V2.5 P8 - IM10618/IM11164 - Prompt/display provider
+4 ;IHS/SD/SDR - v2.5 p9 - IM17729 - Added code to calculate anesthesia minutes
+5 ;IHS/SD/SDR - v2.5 p9 - task 1 - Use new service line provider multiple
+6 ;IHS/SD/SDR - v2.5 p10 - IM21539 - Fixed summary screen to display correct anes amt
+7 ;IHS/SD/SDR - v2.5 p11 - NPI
+8 ;IHS/SD/SDR - 2.5 p12 - IM25331 - Add provider taxonomy to CMS-1500 block 24K
+9 ;IHS/SD/SDR - v2.5 p12 - IM24277 - Added code for 2nd and 3rd modifiers
+10 ;IHS/SD/SDR,AML - v2.5 p13 - IM25899 - Alignment changes
+11 ;
+12 ;IHS/SD/SDR - v2.6 CSV
+13 ;IHS/SD/SDR - abm*2.6*1 - HEAT6566 - Populate anes based on MCR vs non-MCR
+14 ;IHS/SD/SDR - abm*2.6*3 - HEAT12742 - Corrections to MCR/non-MCR; removed all HEAT6566 changes
+15 ;IHS/SD/SDR - 2.6*13 - Added check for new export mode 35
+16 ;
ANS ;EP for Anesthesia Charges
+1 IF $GET(ABMP("VTYP",992))
IF '$GET(ABMPRINT)
IF ABMP("VTYP",992)'=ABMP("EXP")
QUIT
+2 SET ABMCAT=39
DO PCK^ABMDESM1
IF $GET(ABMQUIT)
QUIT
+3 SET ABMX=0
FOR ABMS("I")=ABMS("I"):1
SET ABMX=$ORDER(@(ABMP("GL")_"39,"_ABMX_")"))
IF 'ABMX
QUIT
SET ABMX("X")=ABMX
DO ANS1
+4 QUIT
ANS1 ;
+1 SET ABMX(0)=@(ABMP("GL")_"39,"_ABMX("X")_",0)")
+2 IF $PIECE(^ABMDEXP(ABMP("EXP"),0),U)["UB"
SET ABMX("R")=$PIECE(ABMX(0),U,2)
+3 ;abm*2.6*1 HEAT6566
SET (ABMX("C"),ABMX("SUB"))=$PIECE(ABMX(0),U,4)
+4 ;I ($G(ABMP("ITYP"))="R")!($G(ABMP("ITYPE"))="R") S (ABMX("C"),ABMX("SUB"))=$P(ABMX(0),U,4) ;abm*2.6*1 HEAT6566
+5 ;I ($G(ABMP("ITYP"))'="R")!($G(ABMP("ITYPE"))'="R") S ABMX("C")=$P(ABMX(0),U,3),ABMX("SUB")=ABMX("C")+$P(ABMX(0),U,4) ;abm*2.6*1 HEAT6566 ;IHS/SD/SDR 4/27/10 HEAT12742
+6 ;I ($G(ABMP("ITYP"))'="R")!($G(ABMP("ITYPE"))'="R") S (ABMX("C"),ABMX("SUB"))=+$P(ABMX(0),U,4) ;abm*2.6*1 HEAT6566 ;IHS/SD/SDR 4/27/10 HEAT12742
+7 SET ABMS("TOT")=ABMS("TOT")+ABMX("SUB")
+8 IF $PIECE(^ABMDEXP(ABMP("EXP"),0),U)'["UB"
GOTO ANSH
ANSU IF ABMX("R")=""
QUIT
DO REVN
+1 QUIT
+2 ;
ANSH SET ABMS(ABMS("I"))=ABMX("SUB")
+1 SET ABMCAT=39
DO HDT^ABMDESM1
+2 SET ABMX("C")=$PIECE(ABMX(0),U)
DO CPT
SET $PIECE(ABMS(ABMS("I")),U,4)=ABMX("C")
+3 IF $PIECE(ABMX(0),"^",6)'=""
SET $PIECE(ABMS(ABMS("I")),"^",4)=$PIECE(ABMS(ABMS("I")),"^",4)_"-"_$PIECE(ABMX(0),"^",6)
+4 IF $PIECE(ABMX(0),"^",14)'=""
SET $PIECE(ABMS(ABMS("I")),"^",4)=$PIECE(ABMS(ABMS("I")),"^",4)_"-"_$PIECE(ABMX(0),"^",14)
+5 IF $PIECE(ABMX(0),"^",19)'=""
SET $PIECE(ABMS(ABMS("I")),"^",4)=$PIECE(ABMS(ABMS("I")),"^",4)_"-"_$PIECE(ABMX(0),"^",19)
+6 ;I ABMP("EXP")=27 S ABMX("C")=$P(ABMX(0),U) D CPT S $P(ABMS(ABMS("I")),U,4)=ABMX("C") D ;abm*2.6*13 export mode 35
+7 ;abm*2.6*13 export mode 35
IF ABMP("EXP")=27!(ABMP("EXP")=35)
SET ABMX("C")=$PIECE(ABMX(0),U)
DO CPT
SET $PIECE(ABMS(ABMS("I")),U,4)=ABMX("C")
Begin DoDot:1
+8 IF $PIECE(ABMX(0),U,6)'=""
SET $PIECE(ABMS(ABMS("I")),U,4)=$PIECE(ABMS(ABMS("I")),U,4)_" "_$PIECE(ABMX(0),U,6)
+9 IF $PIECE(ABMX(0),U,14)'=""
SET $PIECE(ABMS(ABMS("I")),U,4)=$PIECE(ABMS(ABMS("I")),U,4)_" "_$PIECE(ABMX(0),U,14)
+10 IF $PIECE(ABMX(0),U,19)'=""
SET $PIECE(ABMS(ABMS("I")),U,4)=$PIECE(ABMS(ABMS("I")),U,4)_" "_$PIECE(ABMX(0),U,19)
End DoDot:1
+11 SET $PIECE(ABMS(ABMS("I")),"^",5)=$PIECE(ABMX(0),"^",10)
+12 SET $PIECE(ABMS(ABMS("I")),U,10)=$PIECE(ABMX(0),U,15)
+13 SET ABMMTS=$$FMDIFF^XLFDT($PIECE(ABMX(0),U,8),$PIECE(ABMX(0),U,7),2)
+14 SET ABMMTS=ABMMTS\60
+15 SET $PIECE(ABMS(ABMS("I")),U,6)=ABMMTS
+16 IF $PIECE(ABMS(ABMS("I")),"^",6)=""
SET $PIECE(ABMS(ABMS("I")),"^",6)=1
+17 SET $PIECE(ABMS(ABMS("I")),U,7)=7
+18 ;CSV-c
SET $PIECE(ABMS(ABMS("I")),U,8)="ANESTHESIA IN ASSOC W/ CPT:"_$PIECE($$CPT^ABMCVAPI(+ABMX(0),ABMP("VDT")),U,2)
+19 SET ABMX(0)=@(ABMP("GL")_"39,"_ABMX("X")_",0)")
+20 SET ABMDPRV=$ORDER(@(ABMP("GL")_"39,"_ABMX_",""P"",""C"",""R"",0)"))
+21 IF +ABMDPRV'=0
SET ABMDPRV=$PIECE($GET(@(ABMP("GL")_"39,"_ABMX_",""P"","_ABMDPRV_",0)")),U)
+22 IF $GET(ABMDPRV)=""
SET ABMDPRV=$$GETPRV^ABMDFUTL
+23 IF +$GET(ABMDPRV)'=0
Begin DoDot:1
+24 IF '$$K24^ABMDFUTL
QUIT
+25 SET $PIECE(ABMS(ABMS("I")),U,9)=$$K24N^ABMDFUTL(ABMDPRV)
+26 SET $PIECE(ABMS(ABMS("I")),U,11)=$PIECE($$NPI^XUSNPI("Individual_ID",ABMDPRV),U)
+27 IF $GET(ABMP("NPIS"))="N"
SET $PIECE(ABMS(ABMS("I")),U,9)=$$PTAX^ABMEEPRV(ABMDPRV)
End DoDot:1
+28 IF $PIECE(ABMX(0),"^",6)'=""
SET $PIECE(ABMS(ABMS("I")),"^",8)=$PIECE(ABMS(ABMS("I")),"^",8)_"-"_$PIECE(ABMX(0),"^",6)
+29 ;I ABMP("EXP")=27 D ;abm*2.6*13 export mode 35
+30 ;abm*2.6*13 export mode 35
IF ABMP("EXP")=27!(ABMP("EXP")=35)
Begin DoDot:1
+31 SET $PIECE(ABMS(ABMS("I")),U,2)=$PIECE(ABMS(ABMS("I")),U,2)_"@"_$PIECE($$MDT^ABMDUTL($PIECE(ABMX(0),U,7))," ",2)
+32 SET $PIECE(ABMS(ABMS("I")),U,3)=$PIECE(ABMS(ABMS("I")),U,3)_"@"_$PIECE($$MDT^ABMDUTL($PIECE(ABMX(0),U,8))," ",2)
End DoDot:1
+33 QUIT
+34 ;
CPT ;CSV-c
IF ABMX("C")]""
SET ABMX("C")=$PIECE($$CPT^ABMCVAPI(ABMX("C"),ABMP("VDT")),U,2)
+1 QUIT
ICD ;CSV-c
IF ABMX("D")]""
SET ABMX("D")=$PIECE($$DX^ABMCVAPI(ABMX("D"),ABMP("VDT")),U,2)
+1 QUIT
+2 ;
REVN IF $DATA(ABMS(ABMX("R")))
SET $PIECE(ABMS(ABMX("R")),U)=$PIECE(ABMS(ABMX("R")),U)+ABMX("SUB")
+1 IF '$TEST
SET ABMS(ABMX("R"))=ABMX("SUB")
+2 QUIT