ABMDE0A ; IHS/ASDST/DMJ - Claim Summary-Part 2 ;
;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
;
; IHS/SD/SDR 10/10/02 - V2.5 P2 - OVA-0801-190113
; Modified so Number of Errors Found field would be populated with
; a number instead of "Y"
;
; IHS/SD/SDR - v2.5 p9 - task 2
; Added code for warning message if Immunization CPT exists
;
; *********************************************************************
DISP ;EP - Entry Point from ABMDE0 for displaying claim summary
S ABMZ("TITL")="CLAIM SUMMARY"
S ABMZ("PG")=0
D SUM^ABMDE1
I ABM("CNT2")>13&(ABM("CNT3")+ABM("CNT1")<14) D
.S ABM("CNT2")=ABM("CNT2")-ABM("CNT3")
.S ABM("CNT1")=ABM("CNT1")+ABM("CNT3")
.S ABM("CNT3")=9
D IDEN^ABMDE0B
S ABM("C")=$S(ABM("CNT1")<12:7,1:6)
D INS^ABMDE0B
S ABM("C")=$S(ABM("CNT1")<12:ABM("C")+1,1:ABM("C"))
D QUES^ABMDE0B
S ABM("C2")=0
F ABM="ACC","EMRG","PROG","EMPL" I @("ABM("""_ABM_""")")="YES" D
.S ABM("C2")=ABM("C2")+1
.S ABMZ(ABM("C"))=$S(ABM("C2")#2=1:"W !",1:ABMZ(ABM("C"))_",?20")_$P($T(@ABM),";;",2)
.I ABM("C2")#2=0 D
..S ABMZ(ABM("C"))=ABMZ(ABM("C"))_",?40,""|"""
..D CNT
I ABM("C2")#2=1 D
.S ABMZ(ABM("C"))=ABMZ(ABM("C"))_",?40,""|"""
.D CNT
S ABM=$S(ABM("OPRV")]"":3,1:2)
I ABM("CNT3")'=9 S ABM("C")=1
I ABM("C")+ABM>14 S ABM("C")=1
F ABM("I")=0:1:ABM-1 D
.S ABMZ(ABM("C"))=$S(ABM("C")<5:ABMZ(ABM("C")),1:"W !")_$P($T(PRV+ABM("I")),";;",2)_$S(ABM("C")<5:"",1:",?40,""|""")
.D CNT
I ABM("C")>9 S ABM("C")=1
F ABM("I")=4:1:13 S:'$D(ABMZ(ABM("I"))) ABMZ(ABM("I"))="W !?40,""|"""
I ABMP("VTYP")=998&'$D(ABMP("FLAT")) G PRC
S ABM("C")=$S(ABM("C")=1:1,ABM("CNT2")<6:ABM("C")+3,ABM("CNT2")<9:ABM("C")+2,ABM("CNT2")<12:ABM("C")+1,1:ABM("C"))
F ABM("I")=0:1:5 D
.I ABM("I")<1!($D(ABM("D"_ABM("I")))) D
..S ABMZ(ABM("C"))=ABMZ(ABM("C"))_$P($T(DX+ABM("I")),";;",2)
..D CNT
;
PRC ;
S ABM("C")=$S(ABM("C")=1:1,ABM("CNT2")<6:ABM("C")+3,ABM("CNT2")<8:ABM("C")+2,ABM("CNT2")<12:ABM("C")+1,1:ABM("C"))
S ABMZ(ABM("C"))=ABMZ(ABM("C"))_",""_______"_$S(ABMP("VTYP")=998&'$D(ABMP("FLAT")):" Pg-6 (Dental Services) ",ABMP("PX")="C":"_ Pg-8 (CPT Procedures) _",1:" Pg-5B (ICD Procedures) ")_"_______"""
D CNT
F ABM("I")=1:1:12 Q:ABM("C")>12 D
.I $D(ABM("P"_ABM("I"))) D
..S ABMZ(ABM("C"))=ABMZ(ABM("C"))_","_""" "_ABM("I")_") "_ABM("P"_ABM("I"))_""""
..D CNT
I ABM("C")>12,$D(ABM("P"_ABM("I"))) S ABMZ(13)=ABMZ(13)_","_$S('$D(ABM("P"_(ABM("I")+1))):""" "_ABM("I")_") "_ABM("P"_ABM("I"))_"""",1:""" *** additional procedures exist ***""")
;
S ABMZ(14)="W !,""________________________________________|_______________________________________"""
F ABM("I")=1:1:14 X ABMZ(ABM("I"))
;
I +$O(ABME(0)) D
.S ABME("CHK")=""
.D ^ABMDERR
.I $P(^ABMDCLM(DUZ(2),ABMP("CDFN"),0),U,5)'=0 D
..S DIE="^ABMDCLM(DUZ(2),"
..S DA=ABMP("CDFN")
..S DR=".05////"_$G(ABM("ERR"))
..D ^DIE
..K DR
I $P($G(^ABMDCLM(DUZ(2),ABMP("CDFN"),4)),U,2)="Y" D
.W !,"***PCC Data was Edited without automatic Claim Update (check claim accuracy)***"
.S DIE="^ABMDCLM(DUZ(2),"
.S DA=ABMP("CDFN")
.S DR=".42///@"
.D ^DIE
.K DR
I $P(^ABMDCLM(DUZ(2),ABMP("CDFN"),0),U,4)="U" D Q
.W *7,!?5
.W "Claim is CLOSED until a Payment is Posted for the Billed Insurer."
I $P(^ABMDCLM(DUZ(2),ABMP("CDFN"),0),U,4)="X" D Q
.W *7,!?5
.W "Claim is CLOSED and therefore uneditable."
;
DUP ;check for duplicate claims
S ABMPV=$O(^ABMDCLM(DUZ(2),ABMP("CDFN"),11,"AC","P",0))
S I=0 F S I=$O(^ABMDCLM(I)) Q:'I D
.Q:'ABMPV
.Q:I=DUZ(2)
.Q:'$D(^ABMDCLM(I,"AV",ABMPV))
.S ABMCLNM=$O(^ABMDCLM(I,"AV",ABMPV,0))
.W !,*7,"WARNING: Potential duplicate claim detected. Claim number "
.W ABMCLNM,!,"Location ",$P(^DIC(4,I,0),U)
K ABMCLNM,ABMPV
I $P(^ABMDCLM(DUZ(2),ABMP("CDFN"),0),U,5) W *7,!?5,"*** Claim File ERRORS exist use the VIEW command to list them. ***"
;
F ABMCPT=90656,90658,90732,90746,90747,"G0008","G0009","G0010" S ABMLIST(ABMCPT)=""
I $G(ABMVDFN)'="" S ABMCFLG=$$CPTCHK^ABMCPTCK(ABMVDFN,.ABMLIST)
I $G(ABMCFLG)=1,$P($G(^AUTNINS(ABMP("INS"),0)),U)["MEDICARE" W !!,"THESE SERVICES MUST BE ITEMIZED AND BILLED SEPARATELY FROM THE ALL-INCLUSIVE RATE VISIT",!
K ABMLIST
XIT ;
Q
;
EMRG ;;,"Emrg Related: ",ABM("EMRG")
PROG ;;,"Spcl Program: ",ABM("PROG")
ACC ;;,"Accident Rel: ",ABM("ACC")
EMPL ;;,"Empl Related: ",ABM("EMPL")
;
PRV ;;,"__________ Pg-4 (Providers) ___________"
;;," Attn: ",ABM("APRV")
;;," Oper: ",ABM("OPRV")
;
DX ;;,"__________ Pg-5A (Diagnosis) __________"
;;," 1) ",ABM("D1")
;;," 2) ",ABM("D2")
;;," 3) ",ABM("D3")
;;," 4) ",ABM("D4")
;;," 5) ",ABM("D5")
;
CNT S ABM("C")=ABM("C")+1
Q
ABMDE0A ; IHS/ASDST/DMJ - Claim Summary-Part 2 ;
+1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
+2 ;
+3 ; IHS/SD/SDR 10/10/02 - V2.5 P2 - OVA-0801-190113
+4 ; Modified so Number of Errors Found field would be populated with
+5 ; a number instead of "Y"
+6 ;
+7 ; IHS/SD/SDR - v2.5 p9 - task 2
+8 ; Added code for warning message if Immunization CPT exists
+9 ;
+10 ; *********************************************************************
DISP ;EP - Entry Point from ABMDE0 for displaying claim summary
+1 SET ABMZ("TITL")="CLAIM SUMMARY"
+2 SET ABMZ("PG")=0
+3 DO SUM^ABMDE1
+4 IF ABM("CNT2")>13&(ABM("CNT3")+ABM("CNT1")<14)
Begin DoDot:1
+5 SET ABM("CNT2")=ABM("CNT2")-ABM("CNT3")
+6 SET ABM("CNT1")=ABM("CNT1")+ABM("CNT3")
+7 SET ABM("CNT3")=9
End DoDot:1
+8 DO IDEN^ABMDE0B
+9 SET ABM("C")=$SELECT(ABM("CNT1")<12:7,1:6)
+10 DO INS^ABMDE0B
+11 SET ABM("C")=$SELECT(ABM("CNT1")<12:ABM("C")+1,1:ABM("C"))
+12 DO QUES^ABMDE0B
+13 SET ABM("C2")=0
+14 FOR ABM="ACC","EMRG","PROG","EMPL"
IF @("ABM("""_ABM_""")")="YES"
Begin DoDot:1
+15 SET ABM("C2")=ABM("C2")+1
+16 SET ABMZ(ABM("C"))=$SELECT(ABM("C2")#2=1:"W !",1:ABMZ(ABM("C"))_",?20")_$PIECE($TEXT(@ABM),";;",2)
+17 IF ABM("C2")#2=0
Begin DoDot:2
+18 SET ABMZ(ABM("C"))=ABMZ(ABM("C"))_",?40,""|"""
+19 DO CNT
End DoDot:2
End DoDot:1
+20 IF ABM("C2")#2=1
Begin DoDot:1
+21 SET ABMZ(ABM("C"))=ABMZ(ABM("C"))_",?40,""|"""
+22 DO CNT
End DoDot:1
+23 SET ABM=$SELECT(ABM("OPRV")]"":3,1:2)
+24 IF ABM("CNT3")'=9
SET ABM("C")=1
+25 IF ABM("C")+ABM>14
SET ABM("C")=1
+26 FOR ABM("I")=0:1:ABM-1
Begin DoDot:1
+27 SET ABMZ(ABM("C"))=$SELECT(ABM("C")<5:ABMZ(ABM("C")),1:"W !")_$PIECE($TEXT(PRV+ABM("I")),";;",2)_$SELECT(ABM("C")<5:"",1:",?40,""|""")
+28 DO CNT
End DoDot:1
+29 IF ABM("C")>9
SET ABM("C")=1
+30 FOR ABM("I")=4:1:13
IF '$DATA(ABMZ(ABM("I")))
SET ABMZ(ABM("I"))="W !?40,""|"""
+31 IF ABMP("VTYP")=998&'$DATA(ABMP("FLAT"))
GOTO PRC
+32 SET ABM("C")=$SELECT(ABM("C")=1:1,ABM("CNT2")<6:ABM("C")+3,ABM("CNT2")<9:ABM("C")+2,ABM("CNT2")<12:ABM("C")+1,1:ABM("C"))
+33 FOR ABM("I")=0:1:5
Begin DoDot:1
+34 IF ABM("I")<1!($DATA(ABM("D"_ABM("I"))))
Begin DoDot:2
+35 SET ABMZ(ABM("C"))=ABMZ(ABM("C"))_$PIECE($TEXT(DX+ABM("I")),";;",2)
+36 DO CNT
End DoDot:2
End DoDot:1
+37 ;
PRC ;
+1 SET ABM("C")=$SELECT(ABM("C")=1:1,ABM("CNT2")<6:ABM("C")+3,ABM("CNT2")<8:ABM("C")+2,ABM("CNT2")<12:ABM("C")+1,1:ABM("C"))
+2 SET ABMZ(ABM("C"))=ABMZ(ABM("C"))_",""_______"_$SELECT(ABMP("VTYP")=998&'$DATA(ABMP("FLAT")):" Pg-6 (Dental Services) ",ABMP("PX")="C":"_ Pg-8 (CPT Procedures) _",1:" Pg-5B (ICD Procedures) ")_"_______"""
+3 DO CNT
+4 FOR ABM("I")=1:1:12
IF ABM("C")>12
QUIT
Begin DoDot:1
+5 IF $DATA(ABM("P"_ABM("I")))
Begin DoDot:2
+6 SET ABMZ(ABM("C"))=ABMZ(ABM("C"))_","_""" "_ABM("I")_") "_ABM("P"_ABM("I"))_""""
+7 DO CNT
End DoDot:2
End DoDot:1
+8 IF ABM("C")>12
IF $DATA(ABM("P"_ABM("I")))
SET ABMZ(13)=ABMZ(13)_","_$SELECT('$DATA(ABM("P"_(ABM("I")+1))):""" "_ABM("I")_") "_ABM("P"_ABM("I"))_"""",1:""" *** additional procedures exist ***""")
+9 ;
+10 SET ABMZ(14)="W !,""________________________________________|_______________________________________"""
+11 FOR ABM("I")=1:1:14
XECUTE ABMZ(ABM("I"))
+12 ;
+13 IF +$ORDER(ABME(0))
Begin DoDot:1
+14 SET ABME("CHK")=""
+15 DO ^ABMDERR
+16 IF $PIECE(^ABMDCLM(DUZ(2),ABMP("CDFN"),0),U,5)'=0
Begin DoDot:2
+17 SET DIE="^ABMDCLM(DUZ(2),"
+18 SET DA=ABMP("CDFN")
+19 SET DR=".05////"_$GET(ABM("ERR"))
+20 DO ^DIE
+21 KILL DR
End DoDot:2
End DoDot:1
+22 IF $PIECE($GET(^ABMDCLM(DUZ(2),ABMP("CDFN"),4)),U,2)="Y"
Begin DoDot:1
+23 WRITE !,"***PCC Data was Edited without automatic Claim Update (check claim accuracy)***"
+24 SET DIE="^ABMDCLM(DUZ(2),"
+25 SET DA=ABMP("CDFN")
+26 SET DR=".42///@"
+27 DO ^DIE
+28 KILL DR
End DoDot:1
+29 IF $PIECE(^ABMDCLM(DUZ(2),ABMP("CDFN"),0),U,4)="U"
Begin DoDot:1
+30 WRITE *7,!?5
+31 WRITE "Claim is CLOSED until a Payment is Posted for the Billed Insurer."
End DoDot:1
QUIT
+32 IF $PIECE(^ABMDCLM(DUZ(2),ABMP("CDFN"),0),U,4)="X"
Begin DoDot:1
+33 WRITE *7,!?5
+34 WRITE "Claim is CLOSED and therefore uneditable."
End DoDot:1
QUIT
+35 ;
DUP ;check for duplicate claims
+1 SET ABMPV=$ORDER(^ABMDCLM(DUZ(2),ABMP("CDFN"),11,"AC","P",0))
+2 SET I=0
FOR
SET I=$ORDER(^ABMDCLM(I))
IF 'I
QUIT
Begin DoDot:1
+3 IF 'ABMPV
QUIT
+4 IF I=DUZ(2)
QUIT
+5 IF '$DATA(^ABMDCLM(I,"AV",ABMPV))
QUIT
+6 SET ABMCLNM=$ORDER(^ABMDCLM(I,"AV",ABMPV,0))
+7 WRITE !,*7,"WARNING: Potential duplicate claim detected. Claim number "
+8 WRITE ABMCLNM,!,"Location ",$PIECE(^DIC(4,I,0),U)
End DoDot:1
+9 KILL ABMCLNM,ABMPV
+10 IF $PIECE(^ABMDCLM(DUZ(2),ABMP("CDFN"),0),U,5)
WRITE *7,!?5,"*** Claim File ERRORS exist use the VIEW command to list them. ***"
+11 ;
+12 FOR ABMCPT=90656,90658,90732,90746,90747,"G0008","G0009","G0010"
SET ABMLIST(ABMCPT)=""
+13 IF $GET(ABMVDFN)'=""
SET ABMCFLG=$$CPTCHK^ABMCPTCK(ABMVDFN,.ABMLIST)
+14 IF $GET(ABMCFLG)=1
IF $PIECE($GET(^AUTNINS(ABMP("INS"),0)),U)["MEDICARE"
WRITE !!,"THESE SERVICES MUST BE ITEMIZED AND BILLED SEPARATELY FROM THE ALL-INCLUSIVE RATE VISIT",!
+15 KILL ABMLIST
XIT ;
+1 QUIT
+2 ;
EMRG ;;,"Emrg Related: ",ABM("EMRG")
PROG ;;,"Spcl Program: ",ABM("PROG")
ACC ;;,"Accident Rel: ",ABM("ACC")
EMPL ;;,"Empl Related: ",ABM("EMPL")
+1 ;
PRV ;;,"__________ Pg-4 (Providers) ___________"
+1 ;;," Attn: ",ABM("APRV")
+2 ;;," Oper: ",ABM("OPRV")
+3 ;
DX ;;,"__________ Pg-5A (Diagnosis) __________"
+1 ;;," 1) ",ABM("D1")
+2 ;;," 2) ",ABM("D2")
+3 ;;," 3) ",ABM("D3")
+4 ;;," 4) ",ABM("D4")
+5 ;;," 5) ",ABM("D5")
+6 ;
CNT SET ABM("C")=ABM("C")+1
+1 QUIT