ABMDANTC ; IHS/ASDST/DMJ - COMPUTE ANESTHESIA TIME CHARGE ;
;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
C(D0,D1) ;EP - CLAIM START HERE (X=D0,Y=D1 of field 39 multiple)
N ABM,I
F I=1:1:9 S ABM(I)=$P($G(^ABMDCLM(DUZ(2),D0,39,D1,0)),"^",I)
I 'ABM(7)!('ABM(8)) S X="" Q X
I '$G(ABMP("VDT"))!('$G(ABMP("FEE"))) S X="" Q X
D FIGR
Q X
B(D0,D1) ;EP - BILL START HERE (X=D0,Y=D1)
N ABM,I
F I=1:1:9 S ABM(I)=$P($G(^ABMDBILL(DUZ(2),D0,39,D1,0)),"^",I)
I 'ABM(7)!('ABM(8)) S X="" Q X
I '$G(ABMP("VDT"))!('$G(ABMP("FEE"))) S X="" Q X
D FIGR
Q X
FIGR ;EP - FIGURE OUT TIME CHARGE
S ABM("TM")=$$TM^ABMDUTL(ABM(7),ABM(8))
S ABM("T5S")=ABM("TM")\5
S:ABM(9) ABM("TU")=ABM("T5S")/3
S:'ABM(9)&(ABM("T5S")<49) ABM("TU")=ABM("T5S")/3
S:'$D(ABM("TU")) ABM("TU")=16+(ABM("T5S")-48/2)
S ABM("FY")=$E(ABMP("VDT"),1,3)+1700.5
S ABM("FY")=$O(^ABMDFEE(ABMP("FEE"),33,ABM("FY")),-1)
S ABM("CV")=$P($G(^ABMDFEE(ABMP("FEE"),33,+ABM("FY"),0)),"^",4)
S X=ABM("CV")*ABM("TU")
S X=(X+.5)\1
Q
ABMDANTC ; IHS/ASDST/DMJ - COMPUTE ANESTHESIA TIME CHARGE ;
+1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
C(D0,D1) ;EP - CLAIM START HERE (X=D0,Y=D1 of field 39 multiple)
+1 NEW ABM,I
+2 FOR I=1:1:9
SET ABM(I)=$PIECE($GET(^ABMDCLM(DUZ(2),D0,39,D1,0)),"^",I)
+3 IF 'ABM(7)!('ABM(8))
SET X=""
QUIT X
+4 IF '$GET(ABMP("VDT"))!('$GET(ABMP("FEE")))
SET X=""
QUIT X
+5 DO FIGR
+6 QUIT X
B(D0,D1) ;EP - BILL START HERE (X=D0,Y=D1)
+1 NEW ABM,I
+2 FOR I=1:1:9
SET ABM(I)=$PIECE($GET(^ABMDBILL(DUZ(2),D0,39,D1,0)),"^",I)
+3 IF 'ABM(7)!('ABM(8))
SET X=""
QUIT X
+4 IF '$GET(ABMP("VDT"))!('$GET(ABMP("FEE")))
SET X=""
QUIT X
+5 DO FIGR
+6 QUIT X
FIGR ;EP - FIGURE OUT TIME CHARGE
+1 SET ABM("TM")=$$TM^ABMDUTL(ABM(7),ABM(8))
+2 SET ABM("T5S")=ABM("TM")\5
+3 IF ABM(9)
SET ABM("TU")=ABM("T5S")/3
+4 IF 'ABM(9)&(ABM("T5S")<49)
SET ABM("TU")=ABM("T5S")/3
+5 IF '$DATA(ABM("TU"))
SET ABM("TU")=16+(ABM("T5S")-48/2)
+6 SET ABM("FY")=$EXTRACT(ABMP("VDT"),1,3)+1700.5
+7 SET ABM("FY")=$ORDER(^ABMDFEE(ABMP("FEE"),33,ABM("FY")),-1)
+8 SET ABM("CV")=$PIECE($GET(^ABMDFEE(ABMP("FEE"),33,+ABM("FY"),0)),"^",4)
+9 SET X=ABM("CV")*ABM("TU")
+10 SET X=(X+.5)\1
+11 QUIT