- ABMDRBR2 ; IHS/ASDST/DMJ - Brief Claim List - 132 width ;
- ;;2.6;IHS Third Party Billing;**1**;NOV 12, 2009
- ;Original;TMD;
- ;
- ; IHS/SD/SDR - abm*2.6*1 - HEAT4482 - Added claim status to report
- ;
- PRINT ;EP for printing data
- S ABM("PRIVACY")=1
- U IO W:$D(ABM("PRINT",16)) @ABM("PRINT",16) D HDB
- S (ABM("TXT"),ABM("CNT"),ABM("SUBCNT"))=0,(ABM("L"),ABM("V"))=""
- S ABM("A")="TMP(""ABM-BR"","_$J,ABM="^"_ABM("A")_")" I '$D(@ABM) Q
- F S ABM=$Q(@ABM) Q:ABM'[ABM("A") D Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)
- .I $Y>(IOSL-5) D HD Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT) D LOC W " (cont)"
- .S ABM("T")=$P(ABM,"ABM-B",2),ABM("TXT")=$P($P(ABM("T"),",",3,99),"""",2)
- .S ABM("C")=$G(^ABMDCLM(DUZ(2),$P(ABM("TXT"),U,4),0)) Q:ABM("C")=""
- .Q:'ABM("C")!'$P(ABM("C"),U,7)!'$P(ABM("C"),U,8)
- .I ABM("L")'=$P(ABM("TXT"),U) S ABM("V")="" D SUB,LOC
- .S ABM("L")=$P(ABM("TXT"),U)
- .I ABM("V")'=$P(ABM("TXT"),U,2) D SUB:ABM("V")]"" W:ABM("V")'="" ! W !?7,$S(ABMY("SORT")="C":"Clinic: "_$P(^DIC(40.7,$P(ABM("TXT"),U,2),0),U),1:"Visit Type: "_$P(^ABMDVTYP($P(ABM("TXT"),U,2),0),U))
- .S ABM("V")=$P(ABM("TXT"),U,2)
- .;W !,$E($P(ABM("TXT"),U,3),1,30) ;abm*2.6*1 HEAT4482
- .;start new code abm*2.6*1 HEAT4482
- .S ABMSTA=$P($G(^ABMDCLM(DUZ(2),$P(ABM("TXT"),U,4),0)),U,4)
- .S ABMSTA=$S(ABMSTA="E":"EDIT",ABMSTA="R":"RJECT",ABMSTA="U":"BILLD",ABMSTA="C":"CCOMP",ABMSTA="F":"FAB",ABMSTA="O":"ROL-EDT",1:"")
- .W !?2,ABMSTA
- .W ?11,$E($P(ABM("TXT"),U,3),1,23)
- .;end new code HEAT4482
- .W ?32,$S($D(^AUPNPAT($P(ABM("C"),U),41,DUZ(2),0)):$P(^(0),U,2),1:"")
- .W ?40,$E($P(^AUTNINS($P(ABM("C"),U,8),0),U),1,30)
- .W ?72,$P(ABM("TXT"),U,4)
- .W ?80,$$SDT^ABMDUTL($P(ABM("C"),"^",2))
- .I $P($G(^ABMDCLM(DUZ(2),$P(ABM("TXT"),U,4),6)),U,3)]"" W ?92,$$SDT^ABMDUTL($P(^(6),U,3))
- .I ABMY("SORT")="V" W ?104,$E($P(^DIC(40.7,$P(ABM("C"),U,6),0),U),1,28)
- .E W ?100,$E($P(^ABMDVTYP($P(ABM("C"),U,7),0),U),1,30)
- .S ABM("CNT")=ABM("CNT")+1,ABM("SUBCNT")=ABM("SUBCNT")+1
- Q:$D(DIROUT)!($D(DTOUT))!($D(DUOUT))
- D SUB
- W !?72,"======"
- W !?64,"Total:",?72,$FN(ABM("CNT"),",",0)
- Q
- ;
- HD D PAZ^ABMDRUTL Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)
- HDB S ABM("PG")=ABM("PG")+1 D WHD^ABMDRHD
- W !,?72,"Claim",?81,"Visit",?90,"Discharge"
- ;W !?5,"Patient",?33,"HRN",?45,"Active Insurer",?72,"Number",?82,"Date",?92,"Date",?104,$S(ABMY("SORT")="V":"Clinic",1:"Visit Type") ;abm*2.6*1 HEAT4482
- W !?3,"STA",?11,"Patient",?33,"HRN",?45,"Active Insurer",?72,"Number",?82,"Date",?92,"Date",?104,$S(ABMY("SORT")="V":"Clinic",1:"Visit Type") ;abm*2.6*1 HEAT4482
- S $P(ABM("LINE"),"-",132)="" W !,ABM("LINE") K ABM("LINE")
- Q
- ;
- LOC W !!?3,"Visit Location: ",$P(ABM("TXT"),U)
- Q
- ;
- SUB Q:'ABM("SUBCNT")
- W !?72,"------"
- W !?61,"Subtotal:",?72,$FN(ABM("SUBCNT"),",",0)
- S ABM("SUBCNT")=0
- Q
- ABMDRBR2 ; IHS/ASDST/DMJ - Brief Claim List - 132 width ;
- +1 ;;2.6;IHS Third Party Billing;**1**;NOV 12, 2009
- +2 ;Original;TMD;
- +3 ;
- +4 ; IHS/SD/SDR - abm*2.6*1 - HEAT4482 - Added claim status to report
- +5 ;
- PRINT ;EP for printing data
- +1 SET ABM("PRIVACY")=1
- +2 USE IO
- IF $DATA(ABM("PRINT",16))
- WRITE @ABM("PRINT",16)
- DO HDB
- +3 SET (ABM("TXT"),ABM("CNT"),ABM("SUBCNT"))=0
- SET (ABM("L"),ABM("V"))=""
- +4 SET ABM("A")="TMP(""ABM-BR"","_$JOB
- SET ABM="^"_ABM("A")_")"
- IF '$DATA(@ABM)
- QUIT
- +5 FOR
- SET ABM=$QUERY(@ABM)
- IF ABM'[ABM("A")
- QUIT
- Begin DoDot:1
- +6 IF $Y>(IOSL-5)
- DO HD
- IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIROUT)
- QUIT
- DO LOC
- WRITE " (cont)"
- +7 SET ABM("T")=$PIECE(ABM,"ABM-B",2)
- SET ABM("TXT")=$PIECE($PIECE(ABM("T"),",",3,99),"""",2)
- +8 SET ABM("C")=$GET(^ABMDCLM(DUZ(2),$PIECE(ABM("TXT"),U,4),0))
- IF ABM("C")=""
- QUIT
- +9 IF 'ABM("C")!'$PIECE(ABM("C"),U,7)!'$PIECE(ABM("C"),U,8)
- QUIT
- +10 IF ABM("L")'=$PIECE(ABM("TXT"),U)
- SET ABM("V")=""
- DO SUB
- DO LOC
- +11 SET ABM("L")=$PIECE(ABM("TXT"),U)
- +12 IF ABM("V")'=$PIECE(ABM("TXT"),U,2)
- IF ABM("V")]""
- DO SUB
- IF ABM("V")'=""
- WRITE !
- WRITE !?7,$SELECT(ABMY("SORT")="C":"Clinic: "_$PIECE(^DIC(40.7,$PIECE(ABM("TXT"),U,2),0),U),1:"Visit Type: "_$PIECE(^ABMDVTYP($PIECE(ABM("TXT"),U,2),0),U))
- +13 SET ABM("V")=$PIECE(ABM("TXT"),U,2)
- +14 ;W !,$E($P(ABM("TXT"),U,3),1,30) ;abm*2.6*1 HEAT4482
- +15 ;start new code abm*2.6*1 HEAT4482
- +16 SET ABMSTA=$PIECE($GET(^ABMDCLM(DUZ(2),$PIECE(ABM("TXT"),U,4),0)),U,4)
- +17 SET ABMSTA=$SELECT(ABMSTA="E":"EDIT",ABMSTA="R":"RJECT",ABMSTA="U":"BILLD",ABMSTA="C":"CCOMP",ABMSTA="F":"FAB",ABMSTA="O":"ROL-EDT",1:"")
- +18 WRITE !?2,ABMSTA
- +19 WRITE ?11,$EXTRACT($PIECE(ABM("TXT"),U,3),1,23)
- +20 ;end new code HEAT4482
- +21 WRITE ?32,$SELECT($DATA(^AUPNPAT($PIECE(ABM("C"),U),41,DUZ(2),0)):$PIECE(^(0),U,2),1:"")
- +22 WRITE ?40,$EXTRACT($PIECE(^AUTNINS($PIECE(ABM("C"),U,8),0),U),1,30)
- +23 WRITE ?72,$PIECE(ABM("TXT"),U,4)
- +24 WRITE ?80,$$SDT^ABMDUTL($PIECE(ABM("C"),"^",2))
- +25 IF $PIECE($GET(^ABMDCLM(DUZ(2),$PIECE(ABM("TXT"),U,4),6)),U,3)]""
- WRITE ?92,$$SDT^ABMDUTL($PIECE(^(6),U,3))
- +26 IF ABMY("SORT")="V"
- WRITE ?104,$EXTRACT($PIECE(^DIC(40.7,$PIECE(ABM("C"),U,6),0),U),1,28)
- +27 IF '$TEST
- WRITE ?100,$EXTRACT($PIECE(^ABMDVTYP($PIECE(ABM("C"),U,7),0),U),1,30)
- +28 SET ABM("CNT")=ABM("CNT")+1
- SET ABM("SUBCNT")=ABM("SUBCNT")+1
- End DoDot:1
- IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIROUT)
- QUIT
- +29 IF $DATA(DIROUT)!($DATA(DTOUT))!($DATA(DUOUT))
- QUIT
- +30 DO SUB
- +31 WRITE !?72,"======"
- +32 WRITE !?64,"Total:",?72,$FNUMBER(ABM("CNT"),",",0)
- +33 QUIT
- +34 ;
- HD DO PAZ^ABMDRUTL
- IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIROUT)
- QUIT
- HDB SET ABM("PG")=ABM("PG")+1
- DO WHD^ABMDRHD
- +1 WRITE !,?72,"Claim",?81,"Visit",?90,"Discharge"
- +2 ;W !?5,"Patient",?33,"HRN",?45,"Active Insurer",?72,"Number",?82,"Date",?92,"Date",?104,$S(ABMY("SORT")="V":"Clinic",1:"Visit Type") ;abm*2.6*1 HEAT4482
- +3 ;abm*2.6*1 HEAT4482
- WRITE !?3,"STA",?11,"Patient",?33,"HRN",?45,"Active Insurer",?72,"Number",?82,"Date",?92,"Date",?104,$SELECT(ABMY("SORT")="V":"Clinic",1:"Visit Type")
- +4 SET $PIECE(ABM("LINE"),"-",132)=""
- WRITE !,ABM("LINE")
- KILL ABM("LINE")
- +5 QUIT
- +6 ;
- LOC WRITE !!?3,"Visit Location: ",$PIECE(ABM("TXT"),U)
- +1 QUIT
- +2 ;
- SUB IF 'ABM("SUBCNT")
- QUIT
- +1 WRITE !?72,"------"
- +2 WRITE !?61,"Subtotal:",?72,$FNUMBER(ABM("SUBCNT"),",",0)
- +3 SET ABM("SUBCNT")=0
- +4 QUIT