ABMDRBR ; IHS/ASDST/DMJ - Brief Claims Listing ;
;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
;Original;TMD;
;
; IHS/SD/SDR - v2.5 p13 - NO IM
;
K ABM,ABMY
S ABM("RTYP")=1,ABM("RTYP","NM")="BRIEF LISTING (80 Width)"
S ABM("STA")="F"
S ABM("STA","NM")="Flagged as Billable"
;
SEL S ABM("NODX")="" D ^ABMDRSEL Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)
S ABM("HD",0)="BRIEF LISTING of CLAIMS "_ABM("STA","NM")
D ^ABMDRHD
S ABMQ("RC")="COMPUTE^ABMDRBR",ABMQ("RX")="POUT^ABMDRUTL",ABMQ("NS")="ABM"
S ABMQ("RP")="PRINT^ABMDRBR"_ABM("RTYP")
;S ABM("$J")=DUZ_"-"_$P($H,",",1)_"-"_$P($H,",",2)
D ^ABMDRDBQ
Q
;
COMPUTE ;EP - Entry Point for Setting up Data
S ABM("SUBR")="ABM-BR" K ^TMP("ABM-BR",$J) Q:'$D(ABM("STA")) S ABM("PG")=0
ALL ;ALL STATUS
I ABM("STA")="" D Q
.;F ABM("STA")="E","F","U","R","C" D SLOOP ;abm*2.5*13 NO IM
.F ABM("STA")="E","F","U","R","C","O" D SLOOP ;abm*2.5*13 NO IM
I ABM("STA")="F" D Q
.F ABM("STA")="E","F" D SLOOP
SLOOP I $D(ABMY("DT")) D Q
.S ABM("RD")=ABMY("DT",1)-1
.F S ABM("RD")=$O(^ABMDCLM(DUZ(2),"AD",ABM("RD"))) Q:'+ABM("RD")!(ABM("RD")>ABMY("DT",2)) D
..S ABM="" F S ABM=$O(^ABMDCLM(DUZ(2),"AD",ABM("RD"),ABM)) Q:'ABM D DATA
;LOOP THROUGH STATUS
S ABM="" F S ABM=$O(^ABMDCLM(DUZ(2),"AS",ABM("STA"),ABM)) Q:'ABM D DATA
Q
;
DATA S ABMP("HIT")=0 D CLM^ABMDRCHK Q:'ABMP("HIT")
S ABM("SORT")=$S(ABMY("SORT")="C":ABM("C"),1:ABM("V"))
S ABM("L")=$P(^DIC(4,ABM("L"),0),U)
S ^TMP("ABM-BR",$J,ABM("L")_U_ABM("SORT")_U_$P(^DPT(ABM("P"),0),U)_U_ABM)=""
S ABM("ST",ABM("L"),ABM("SORT"))=$G(ABM("ST",ABM("L"),ABM("SORT")))+1
Q
ABMDRBR ; IHS/ASDST/DMJ - Brief Claims Listing ;
+1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
+2 ;Original;TMD;
+3 ;
+4 ; IHS/SD/SDR - v2.5 p13 - NO IM
+5 ;
+6 KILL ABM,ABMY
+7 SET ABM("RTYP")=1
SET ABM("RTYP","NM")="BRIEF LISTING (80 Width)"
+8 SET ABM("STA")="F"
+9 SET ABM("STA","NM")="Flagged as Billable"
+10 ;
SEL SET ABM("NODX")=""
DO ^ABMDRSEL
IF $DATA">DATA">DATA">DATA(DTOUT)!$DATA">DATA">DATA">DATA(DUOUT)!$DATA">DATA">DATA">DATA(DIROUT)
QUIT
+1 SET ABM("HD",0)="BRIEF LISTING of CLAIMS "_ABM("STA","NM")
+2 DO ^ABMDRHD
+3 SET ABMQ("RC")="COMPUTE^ABMDRBR"
SET ABMQ("RX")="POUT^ABMDRUTL"
SET ABMQ("NS")="ABM"
+4 SET ABMQ("RP")="PRINT^ABMDRBR"_ABM("RTYP")
+5 ;S ABM("$J")=DUZ_"-"_$P($H,",",1)_"-"_$P($H,",",2)
+6 DO ^ABMDRDBQ
+7 QUIT
+8 ;
COMPUTE ;EP - Entry Point for Setting up Data
+1 SET ABM("SUBR")="ABM-BR"
KILL ^TMP("ABM-BR",$JOB)
IF '$DATA(ABM("STA"))
QUIT
SET ABM("PG")=0
ALL ;ALL STATUS
+1 IF ABM("STA")=""
Begin DoDot:1
+2 ;F ABM("STA")="E","F","U","R","C" D SLOOP ;abm*2.5*13 NO IM
+3 ;abm*2.5*13 NO IM
FOR ABM("STA")="E","F","U","R","C","O"
DO SLOOP
End DoDot:1
QUIT
+4 IF ABM("STA")="F"
Begin DoDot:1
+5 FOR ABM("STA")="E","F"
DO SLOOP
End DoDot:1
QUIT
SLOOP IF $DATA(ABMY("DT"))
Begin DoDot:1
+1 SET ABM("RD")=ABMY("DT",1)-1
+2 FOR
SET ABM("RD")=$ORDER(^ABMDCLM(DUZ(2),"AD",ABM("RD")))
IF '+ABM("RD")!(ABM("RD")>ABMY("DT",2))
QUIT
Begin DoDot:2
+3 SET ABM=""
FOR
SET ABM=$ORDER(^ABMDCLM(DUZ(2),"AD",ABM("RD"),ABM))
IF 'ABM
QUIT
DO DATA
End DoDot:2
End DoDot:1
QUIT
+4 ;LOOP THROUGH STATUS
+5 SET ABM=""
FOR
SET ABM=$ORDER(^ABMDCLM(DUZ(2),"AS",ABM("STA"),ABM))
IF 'ABM
QUIT
DO DATA
+6 QUIT
+7 ;
DATA SET ABMP("HIT")=0
DO CLM^ABMDRCHK
IF 'ABMP("HIT")
QUIT
+1 SET ABM("SORT")=$SELECT(ABMY("SORT")="C":ABM("C"),1:ABM("V"))
+2 SET ABM("L")=$PIECE(^DIC(4,ABM("L"),0),U)
+3 SET ^TMP("ABM-BR",$JOB,ABM("L")_U_ABM("SORT")_U_$PIECE(^DPT(ABM("P"),0),U)_U_ABM)=""
+4 SET ABM("ST",ABM("L"),ABM("SORT"))=$GET(ABM("ST",ABM("L"),ABM("SORT")))+1
+5 QUIT