ABMDEAD2 ; IHS/ASDST/DMJ - Add New Claim - Program 2 ;
;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
;
; IHS/SD/SDR - v2.5 p10 - IM20022
; Use ROI/AOB multiples
;
; IHS/SD/SDR - v2.5 p10 - IM20320
; Fix for manually added insurer (not being put as ACTIVE INSURER)
;
STUFF K DIC S DIC="^ABMDCLM(DUZ(2),",DIC(0)="L",X=ABMP("PDFN")
S DINUM=$$NXNM^ABMDUTL
I DINUM="" D G XIT
.W !!,"ERROR: Claim not created - check global ^ABMDCLM(0)"
.S DIR(0)="E" D ^DIR K DIR
K DD,DO D FILE^DICN
I +Y<0 D G XIT
.W *7,!!,"ERROR: Claim not created, ensure FILEMAN ACCESS CODE contains a 'V'."
.S DIR(0)="E" D ^DIR K DIR
L +^ABMDCLM(DUZ(2),+Y):1 I '$T W !,*7,"Claim File is LOCKED by another USER, CLAIM NOT CREATED!" H 3 G XIT
S (ABMP("CDFN"),ABMA("CDFN"))=+Y,ABMA("X")=+Y
S DA=ABMP("CDFN"),DIE="^ABMDCLM(DUZ(2),"
S DR=".02////"_ABMP("VDT")_";.03////"_ABMP("LDFN")_";.04////E" D ^DIE
S DR=".06////"_ABMP("CLN")_";.07////"_ABMP("VTYP") D ^DIE
S DR=".72////"_ABMP("DDT")_";.17////"_DT D ^DIE
I ABMP("VTYP")=111 D
.S X2=ABMP("VDT"),X1=ABMP("DDT") D ^%DTC S ABM("CVD")=X,ABM("PCD")=X+1
.I X=0 S (ABM("CVD"),ABM("PCD"))=1
.S DR=".57////"_ABM("PCD")_";.61////"_ABMP("VDT")_";.63////"_ABMP("DDT")_";.51////83" D ^DIE
.S DR=".52////45;.53////58;.54////90;.62////12;.64////12;.73////"_ABM("CVD")_";.66////0" D ^DIE
S ABM=$O(ABML(0)) Q:ABM="" D
.S ABMI=$O(ABML(ABM,0)) Q:ABMI="" S DR=".08////"_ABMI
.D ^DIE K DR
I $D(ABM("F1")) D
.S DR=".91;.83" D ^DIE
;
I $O(^DIC(40.7,"B","EMERGENCY MEDICINE",""))=ABMP("CLN") S ABMP("C0")=^ABMDCLM(DUZ(2),ABMP("CDFN"),0) D ASET^ABMDE3B
I $O(^DIC(40.7,"B","EPSDT",""))=ABMP("CLN") S Y=67 D SP^ABMDE3B
I $O(^DIC(40.7,"B","FAMILY PLANNING",""))=ABMP("CLN") S Y=70 D SP^ABMDE3B
;
REL K DIE S DIE="^ABMDCLM(DUZ(2),",DA=ABMP("CDFN")
I ABMP("VTYP")=111 S DR=".74////N;.75////N" D ^DIE K DR G ELCK
I ($D(^AUPNPAT(ABMP("PDFN"),36,0)))>10,($O(^AUPNPAT(ABMP("PDFN"),36,"B",0),-1)<ABMP("VDT")) S DR=".74////Y;.711////"_$O(^AUPNPAT(ABMP("PDFN"),36,"B",0),-1)
E S DR=".74////N"
BENE I ($D(^AUPNPAT(ABMP("PDFN"),71,0)))>10,($O(^AUPNPAT(ABMP("PDFN"),71,"B",0),-1)<ABMP("VDT")) S DR=".75////Y;.712////"_$O(^AUPNPAT(ABMP("PDFN"),71,"B",0),-1)
E S DR=DR_";.75////N"
D ^DIE K DR
;
ELCK D ENT^ABMDE2E
L -^ABMDCLM(DUZ(2),ABMP("CDFN"))
;
K ABMP,ABM,ABMX,ABMV,ABMZ,ABMC,ABMU,ABML
S ABMP("CDFN")=ABMA("CDFN"),X=ABMA("X") K ABMA
S ABMPERM("EDITOR")=1
G EXT^ABMDE
;
XIT K DIC,ABM,ABMP,ABMX,ABMV,ABME,ABML
Q
ABMDEAD2 ; IHS/ASDST/DMJ - Add New Claim - Program 2 ;
+1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
+2 ;
+3 ; IHS/SD/SDR - v2.5 p10 - IM20022
+4 ; Use ROI/AOB multiples
+5 ;
+6 ; IHS/SD/SDR - v2.5 p10 - IM20320
+7 ; Fix for manually added insurer (not being put as ACTIVE INSURER)
+8 ;
STUFF KILL DIC
SET DIC="^ABMDCLM(DUZ(2),"
SET DIC(0)="L"
SET X=ABMP("PDFN")
+1 SET DINUM=$$NXNM^ABMDUTL
+2 IF DINUM=""
Begin DoDot:1
+3 WRITE !!,"ERROR: Claim not created - check global ^ABMDCLM(0)"
+4 SET DIR(0)="E"
DO ^DIR
KILL DIR
End DoDot:1
GOTO XIT
+5 KILL DD,DO
DO FILE^DICN
+6 IF +Y<0
Begin DoDot:1
+7 WRITE *7,!!,"ERROR: Claim not created, ensure FILEMAN ACCESS CODE contains a 'V'."
+8 SET DIR(0)="E"
DO ^DIR
KILL DIR
End DoDot:1
GOTO XIT
+9 LOCK +^ABMDCLM(DUZ(2),+Y):1
IF '$TEST
WRITE !,*7,"Claim File is LOCKED by another USER, CLAIM NOT CREATED!"
HANG 3
GOTO XIT
+10 SET (ABMP("CDFN"),ABMA("CDFN"))=+Y
SET ABMA("X")=+Y
+11 SET DA=ABMP("CDFN")
SET DIE="^ABMDCLM(DUZ(2),"
+12 SET DR=".02////"_ABMP("VDT")_";.03////"_ABMP("LDFN")_";.04////E"
DO ^DIE
+13 SET DR=".06////"_ABMP("CLN")_";.07////"_ABMP("VTYP")
DO ^DIE
+14 SET DR=".72////"_ABMP("DDT")_";.17////"_DT
DO ^DIE
+15 IF ABMP("VTYP")=111
Begin DoDot:1
+16 SET X2=ABMP("VDT")
SET X1=ABMP("DDT")
DO ^%DTC
SET ABM("CVD")=X
SET ABM("PCD")=X+1
+17 IF X=0
SET (ABM("CVD"),ABM("PCD"))=1
+18 SET DR=".57////"_ABM("PCD")_";.61////"_ABMP("VDT")_";.63////"_ABMP("DDT")_";.51////83"
DO ^DIE
+19 SET DR=".52////45;.53////58;.54////90;.62////12;.64////12;.73////"_ABM("CVD")_";.66////0"
DO ^DIE
End DoDot:1
+20 SET ABM=$ORDER(ABML(0))
IF ABM=""
QUIT
Begin DoDot:1
+21 SET ABMI=$ORDER(ABML(ABM,0))
IF ABMI=""
QUIT
SET DR=".08////"_ABMI
+22 DO ^DIE
KILL DR
End DoDot:1
+23 IF $DATA(ABM("F1"))
Begin DoDot:1
+24 SET DR=".91;.83"
DO ^DIE
End DoDot:1
+25 ;
+26 IF $ORDER(^DIC(40.7,"B","EMERGENCY MEDICINE",""))=ABMP("CLN")
SET ABMP("C0")=^ABMDCLM(DUZ(2),ABMP("CDFN"),0)
DO ASET^ABMDE3B
+27 IF $ORDER(^DIC(40.7,"B","EPSDT",""))=ABMP("CLN")
SET Y=67
DO SP^ABMDE3B
+28 IF $ORDER(^DIC(40.7,"B","FAMILY PLANNING",""))=ABMP("CLN")
SET Y=70
DO SP^ABMDE3B
+29 ;
REL KILL DIE
SET DIE="^ABMDCLM(DUZ(2),"
SET DA=ABMP("CDFN")
+1 IF ABMP("VTYP")=111
SET DR=".74////N;.75////N"
DO ^DIE
KILL DR
GOTO ELCK
+2 IF ($DATA(^AUPNPAT(ABMP("PDFN"),36,0)))>10
IF ($ORDER(^AUPNPAT(ABMP("PDFN"),36,"B",0),-1)<ABMP("VDT"))
SET DR=".74////Y;.711////"_$ORDER(^AUPNPAT(ABMP("PDFN"),36,"B",0),-1)
+3 IF '$TEST
SET DR=".74////N"
BENE IF ($DATA(^AUPNPAT(ABMP("PDFN"),71,0)))>10
IF ($ORDER(^AUPNPAT(ABMP("PDFN"),71,"B",0),-1)<ABMP("VDT"))
SET DR=".75////Y;.712////"_$ORDER(^AUPNPAT(ABMP("PDFN"),71,"B",0),-1)
+1 IF '$TEST
SET DR=DR_";.75////N"
+2 DO ^DIE
KILL DR
+3 ;
ELCK DO ENT^ABMDE2E
+1 LOCK -^ABMDCLM(DUZ(2),ABMP("CDFN"))
+2 ;
+3 KILL ABMP,ABM,ABMX,ABMV,ABMZ,ABMC,ABMU,ABML
+4 SET ABMP("CDFN")=ABMA("CDFN")
SET X=ABMA("X")
KILL ABMA
+5 SET ABMPERM("EDITOR")=1
+6 GOTO EXT^ABMDE
+7 ;
XIT KILL DIC,ABM,ABMP,ABMX,ABMV,ABME,ABML
+1 QUIT