- ABMDCCL ; IHS/SD/SDR - Canceled Claims Listing ; JUN 29, 2005
- ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
- ;Original;DMJ;
- ;
- K ABM,ABMY
- S ABM("RTYP")=1,ABM("RTYP","NM")="BRIEF LISTING (80 Width)"
- S ABM("STA")="X" ;cancelled claims
- S ABM("DT")="C" ;by visit date
- S ABM("CANC")=DUZ ;cancelling official
- S ABM("STA","NM")="CANCELLED CLAIMS"
- S ABM("REASON")="CANC"
- ;
- SEL S ABM("NODX")="" D ^ABMDRSEL Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)
- S ABM("HD",0)="CANCELLED CLAIMS LISTING"
- D ^ABMDRHD
- S ABMQ("RC")="COMPUTE^ABMDCCL",ABMQ("RX")="POUT^ABMDRUTL",ABMQ("NS")="ABM"
- S ABMQ("RP")="PRINT^ABMDCCL"_ABM("RTYP")
- D ^ABMDRDBQ
- Q
- ;
- COMPUTE ;EP - Entry Point for Setting up Data
- S ABM("SUBR")="ABM-CC" K ^TMP("ABM-CC",$J) S ABM("PG")=0
- D SLOOP
- Q
- SLOOP I $D(ABMY("DT")) D Q
- .S ABM("RD")=ABMY("DT",1)-1
- .S ABMY("DT",2)=ABMY("DT",2)+1
- .F S ABM("RD")=$O(^ABMCCLMS(DUZ(2),"AC",ABM("RD"))) Q:'+ABM("RD")!($P(ABM("RD"),".")>ABMY("DT",2)) D
- ..S ABM="" F S ABM=$O(^ABMCCLMS(DUZ(2),"AC",ABM("RD"),ABM)) Q:'ABM D DATA
- S ABMP=0
- F S ABMP=$O(^ABMCCLMS(DUZ(2),"B",ABMP)) Q:ABMP="" D
- .S ABM=0
- .F S ABM=$O(^ABMCCLMS(DUZ(2),"B",ABMP,ABM)) Q:'ABM D DATA
- Q
- ;
- DATA S ABMP("HIT")=0 D CANCEL^ABMDRCHK Q:'ABMP("HIT")
- S ABM("SORT")=$S(ABMY("SORT")="C":ABM("CL"),1:ABM("VT"))
- S ABM("VLOC")=$P(^DIC(4,ABM("VLOC"),0),U)
- S ^TMP("ABM-CC",$J,ABM("CANC"),ABM("VLOC")_U_ABM("SORT")_U_$P(^DPT(ABM("PDFN"),0),U)_U_ABM)=""
- S ABM("ST",ABM("VLOC"),ABM("SORT"))=$G(ABM("ST",ABM("VLOC"),ABM("SORT")))+1
- S $P(ABM("ST",ABM("CANC"),ABM("VLOC"),ABM("SORT")),U)=$P(+$G(ABM("ST",ABM("CANC"),ABM("VLOC"),ABM("SORT"))),U)+1
- Q
- ABMDCCL ; IHS/SD/SDR - Canceled Claims Listing ; JUN 29, 2005
- +1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
- +2 ;Original;DMJ;
- +3 ;
- +4 KILL ABM,ABMY
- +5 SET ABM("RTYP")=1
- SET ABM("RTYP","NM")="BRIEF LISTING (80 Width)"
- +6 ;cancelled claims
- SET ABM("STA")="X"
- +7 ;by visit date
- SET ABM("DT")="C"
- +8 ;cancelling official
- SET ABM("CANC")=DUZ
- +9 SET ABM("STA","NM")="CANCELLED CLAIMS"
- +10 SET ABM("REASON")="CANC"
- +11 ;
- 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)="CANCELLED CLAIMS LISTING"
- +2 DO ^ABMDRHD
- +3 SET ABMQ("RC")="COMPUTE^ABMDCCL"
- SET ABMQ("RX")="POUT^ABMDRUTL"
- SET ABMQ("NS")="ABM"
- +4 SET ABMQ("RP")="PRINT^ABMDCCL"_ABM("RTYP")
- +5 DO ^ABMDRDBQ
- +6 QUIT
- +7 ;
- COMPUTE ;EP - Entry Point for Setting up Data
- +1 SET ABM("SUBR")="ABM-CC"
- KILL ^TMP("ABM-CC",$JOB)
- SET ABM("PG")=0
- +2 DO SLOOP
- +3 QUIT
- SLOOP IF $DATA(ABMY("DT"))
- Begin DoDot:1
- +1 SET ABM("RD")=ABMY("DT",1)-1
- +2 SET ABMY("DT",2)=ABMY("DT",2)+1
- +3 FOR
- SET ABM("RD")=$ORDER(^ABMCCLMS(DUZ(2),"AC",ABM("RD")))
- IF '+ABM("RD")!($PIECE(ABM("RD"),".")>ABMY("DT",2))
- QUIT
- Begin DoDot:2
- +4 SET ABM=""
- FOR
- SET ABM=$ORDER(^ABMCCLMS(DUZ(2),"AC",ABM("RD"),ABM))
- IF 'ABM
- QUIT
- DO DATA
- End DoDot:2
- End DoDot:1
- QUIT
- +5 SET ABMP=0
- +6 FOR
- SET ABMP=$ORDER(^ABMCCLMS(DUZ(2),"B",ABMP))
- IF ABMP=""
- QUIT
- Begin DoDot:1
- +7 SET ABM=0
- +8 FOR
- SET ABM=$ORDER(^ABMCCLMS(DUZ(2),"B",ABMP,ABM))
- IF 'ABM
- QUIT
- DO DATA
- End DoDot:1
- +9 QUIT
- +10 ;
- DATA SET ABMP("HIT")=0
- DO CANCEL^ABMDRCHK
- IF 'ABMP("HIT")
- QUIT
- +1 SET ABM("SORT")=$SELECT(ABMY("SORT")="C":ABM("CL"),1:ABM("VT"))
- +2 SET ABM("VLOC")=$PIECE(^DIC(4,ABM("VLOC"),0),U)
- +3 SET ^TMP("ABM-CC",$JOB,ABM("CANC"),ABM("VLOC")_U_ABM("SORT")_U_$PIECE(^DPT(ABM("PDFN"),0),U)_U_ABM)=""
- +4 SET ABM("ST",ABM("VLOC"),ABM("SORT"))=$GET(ABM("ST",ABM("VLOC"),ABM("SORT")))+1
- +5 SET $PIECE(ABM("ST",ABM("CANC"),ABM("VLOC"),ABM("SORT")),U)=$PIECE(+$GET(ABM("ST",ABM("CANC"),ABM("VLOC"),ABM("SORT"))),U)+1
- +6 QUIT