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

ABMDANTC.m

Go to the documentation of this file.
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