ABMDRXC ; IHS/SD/DMJ - Closed Claims Listing ;
;;2.6;IHS 3P BILLING SYSTEM;**4**;NOV 12, 2009
;Original;TMD;
; IHS/SD/SDR - abm*2.6*4 - NOHEAT -fixed report header for closed/exported dates
;
K ABM,ABMY
S ABM("RTYP")=1,ABM("RTYP","NM")="BRIEF LISTING (80 Width)"
;
SEL S ABM("CLOS")=DUZ
;S ABM("STA")="X",ABM("STA","NM")="Closed Claims Report" ;abm*2.6*4 NOHEAT
S ABM("STA")="M",ABM("STA","NM")="Closed Claims Report" ;abm*2.6*4 NOHEAT
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^ABMDRXC"
S ABMQ("RX")="POUT^ABMDRUTL"
S ABMQ("NS")="ABM"
S ABMQ("RP")="PRINT^ABMDRXC"_ABM("RTYP")
D ^ABMDRDBQ
Q
;
COMPUTE ;EP - Entry Point for Setting up Data
S ABM("STA")="X" ;abm*2.6*4 NOHEAT
I $G(ABMY("DT"))="M" S ABMY("DT")="X" ;abm*2.6*4 NOHEAT
S ABM("SUBR")="ABM-CLS" K ^TMP("ABM-CLS",$J) Q:'$D(ABM("STA")) S ABM("PG")=0
ALL ;ALL STATUS
SLOOP I $D(ABMY("DT")),($G(ABMY("DT"))="V") 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-CLS",$J,ABMY("CLOSER")_U_ABM("L")_U_ABM("SORT")_U_ABM("REAS")_U_$P(^DPT(ABM("P"),0),U)_U_ABM_$S(+$G(ABMCLSCT)>1:"*",1:""))=""
S ABM("ST",ABMY("CLOSER"),ABM("L"),ABM("SORT"))=$G(ABM("ST",ABMY("CLOSER"),ABM("L"),ABM("SORT")))+1
Q
ABMDRXC ; IHS/SD/DMJ - Closed Claims Listing ;
+1 ;;2.6;IHS 3P BILLING SYSTEM;**4**;NOV 12, 2009
+2 ;Original;TMD;
+3 ; IHS/SD/SDR - abm*2.6*4 - NOHEAT -fixed report header for closed/exported dates
+4 ;
+5 KILL ABM,ABMY
+6 SET ABM("RTYP")=1
SET ABM("RTYP","NM")="BRIEF LISTING (80 Width)"
+7 ;
SEL SET ABM("CLOS")=DUZ
+1 ;S ABM("STA")="X",ABM("STA","NM")="Closed Claims Report" ;abm*2.6*4 NOHEAT
+2 ;abm*2.6*4 NOHEAT
SET ABM("STA")="M"
SET ABM("STA","NM")="Closed Claims Report"
+3 SET ABM("NODX")=""
+4 DO ^ABMDRSEL
IF $DATA">DATA">DATA">DATA(DTOUT)!$DATA">DATA">DATA">DATA(DUOUT)!$DATA">DATA">DATA">DATA(DIROUT)
QUIT
+5 SET ABM("HD",0)="BRIEF LISTING of CLAIMS "_ABM("STA","NM")
+6 DO ^ABMDRHD
+7 SET ABMQ("RC")="COMPUTE^ABMDRXC"
+8 SET ABMQ("RX")="POUT^ABMDRUTL"
+9 SET ABMQ("NS")="ABM"
+10 SET ABMQ("RP")="PRINT^ABMDRXC"_ABM("RTYP")
+11 DO ^ABMDRDBQ
+12 QUIT
+13 ;
COMPUTE ;EP - Entry Point for Setting up Data
+1 ;abm*2.6*4 NOHEAT
SET ABM("STA")="X"
+2 ;abm*2.6*4 NOHEAT
IF $GET(ABMY("DT"))="M"
SET ABMY("DT")="X"
+3 SET ABM("SUBR")="ABM-CLS"
KILL ^TMP("ABM-CLS",$JOB)
IF '$DATA(ABM("STA"))
QUIT
SET ABM("PG")=0
ALL ;ALL STATUS
SLOOP IF $DATA(ABMY("DT"))
IF ($GET(ABMY("DT"))="V")
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-CLS",$JOB,ABMY("CLOSER")_U_ABM("L")_U_ABM("SORT")_U_ABM("REAS")_U_$PIECE(^DPT(ABM("P"),0),U)_U_ABM_$SELECT(+$GET(ABMCLSCT)>1:"*",1:""))=""
+4 SET ABM("ST",ABMY("CLOSER"),ABM("L"),ABM("SORT"))=$GET(ABM("ST",ABMY("CLOSER"),ABM("L"),ABM("SORT")))+1
+5 QUIT