IBTOLR ;ALB/AAS/BGA - LIST CLAIMS TRACKING LIST ENTRIES BEING TRACKED; 04-NOV-93
;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
;
% ;
; -- fileman print of random sample cases, etc.
W !!,"Print List of Visits Requiring Review",!!
;
W !!,"You will need a 132 column printer for this report!",!!
D SORT G:$G(IBQUIT) END
D ADM G:$G(IBQUIT) END
D ASK G:$G(IBQUIT) END
S DIC="^IBT(356,",FLDS="[IBT LIST VISITS]",BY="[IBT LIST VISITS]"
;
I $G(IBSORT)="H" S DIS(0)="N IBTRND S IBTRND=$G(^IBT(356,D0,0)) I $P(IBTRND,U,20) I $P(IBTRND,U,25)!($P(IBTRND,U,26))!($P(IBTRND,U,27))"
I $G(IBSORT)="I" S DIS(0)="N IBTRND S IBTRND=$G(^IBT(356,D0,0)) I $P(IBTRND,U,20),$P(IBTRND,U,24)"
I $G(IBSORT)="B" S DIS(0)="N IBTRND S IBTRND=$G(^IBT(356,D0,0)) I $P(IBTRND,U,20) I $P(IBTRND,U,24)!($P(IBTRND,U,25))!($P(IBTRND,U,26))!($P(IBTRND,U,27))"
;
I $G(IBADM) S DIS(1)="I $P($G(^IBE(356.6,+$P($G(^IBT(356,D0,0)),U,18),0)),U,3)=1"
;
;
S IBCNT=0 F I=24:1:27 S IBCNT(I)=0 ;initialize count variable
S DHIT="D SUB^IBTOLR"
S DIOEND="D FNL^IBTOLR"
S DHD="LIST OF VISITS FROM "_IBFR_" TO: "_IBTO_" REQUIRING REVIEWS"
D EN1^DIP
W !
;
END I $D(ZTQUEUED) S ZTREQ="@" Q
D ^%ZISC
K D,I,J,X,Y,DIC,FLDS,BY,TO,FR,DIS,IBSORT,IBQUIT,IBCNT,IBHIT,DIOEND
K IBFR,IBTO
Q
;
SORT ; -- ask how they want it sorted
N DIR
S DIR(0)="SOBA^H:HOSPITAL REVIEWS;I:INSURANCE REVIEWS;B:BOTH"
S DIR("A")="Include [H]ospital Reviews [I]nsurance Reviews [B]oth: "
S DIR("B")="B"
S DIR("?",1)="This report will list visits that are currently indicate that reviews"
S DIR("?",2)="are required. Indicate if you want visits that require Hospital Reviews, Insurance Reviews or Both"
S DIR("?",3)=" ",DIR("?")="The default is Both."
D ^DIR K DIR
S IBSORT=Y I "HIB"'[Y!($D(DIRUT)) S IBQUIT=1 Q
W !
Q
;
ADM S DIR(0)="Y",DIR("A")="List Admissions Only",DIR("B")="YES"
S DIR("?")="Answer Yes if you only want admissions listed, answer No if you want all visit types (outpatient, prescription, etc) listed"
D ^DIR K DIR
S IBADM=Y I $D(DIRUT) S IBQUIT=1
Q
;
ASK N IBBDT,IBEDT
D DATE^IBOUTL
I (IBBDT<1)!(IBEDT<1) S IBQUIT=1 Q
S FR=IBBDT_",?",TO=IBEDT_",?"
S IBFR=$$DAT1^IBOUTL(IBBDT),IBTO=$$DAT1^IBOUTL(IBEDT)
Q
;
SUB ; -- do subcount
N IBX,IBI
S IBX=$G(^IBT(356,D0,0))
F IBI=24:1:27 I $P(IBX,"^",IBI) S IBCNT(IBI)=IBCNT(IBI)+1
S IBCNT=IBCNT+1
Q
;
FNL ; -- print sub counts
Q:'IBCNT
N IBPLUS
I $G(IOM)<81 S IBPLUS=4
W !?72,"----",?77," ---",?(86+$G(IBPLUS)),"----",?(94+$G(IBPLUS))," ---"
W !,"COUNT",?72,$J(IBCNT(24),4),?77,$J(IBCNT(25),4),?(86+$G(IBPLUS)),$J(+IBCNT(26),4),?(94+$G(IBPLUS)),$J(+IBCNT(27),4)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBTOLR 2679 printed Oct 16, 2024@18:27:56 Page 2
IBTOLR ;ALB/AAS/BGA - LIST CLAIMS TRACKING LIST ENTRIES BEING TRACKED; 04-NOV-93
+1 ;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
+2 ;
% ;
+1 ; -- fileman print of random sample cases, etc.
+2 WRITE !!,"Print List of Visits Requiring Review",!!
+3 ;
+4 WRITE !!,"You will need a 132 column printer for this report!",!!
+5 DO SORT
if $GET(IBQUIT)
GOTO END
+6 DO ADM
if $GET(IBQUIT)
GOTO END
+7 DO ASK
if $GET(IBQUIT)
GOTO END
+8 SET DIC="^IBT(356,"
SET FLDS="[IBT LIST VISITS]"
SET BY="[IBT LIST VISITS]"
+9 ;
+10 IF $GET(IBSORT)="H"
SET DIS(0)="N IBTRND S IBTRND=$G(^IBT(356,D0,0)) I $P(IBTRND,U,20) I $P(IBTRND,U,25)!($P(IBTRND,U,26))!($P(IBTRND,U,27))"
+11 IF $GET(IBSORT)="I"
SET DIS(0)="N IBTRND S IBTRND=$G(^IBT(356,D0,0)) I $P(IBTRND,U,20),$P(IBTRND,U,24)"
+12 IF $GET(IBSORT)="B"
SET DIS(0)="N IBTRND S IBTRND=$G(^IBT(356,D0,0)) I $P(IBTRND,U,20) I $P(IBTRND,U,24)!($P(IBTRND,U,25))!($P(IBTRND,U,26))!($P(IBTRND,U,27))"
+13 ;
+14 IF $GET(IBADM)
SET DIS(1)="I $P($G(^IBE(356.6,+$P($G(^IBT(356,D0,0)),U,18),0)),U,3)=1"
+15 ;
+16 ;
+17 ;initialize count variable
SET IBCNT=0
FOR I=24:1:27
SET IBCNT(I)=0
+18 SET DHIT="D SUB^IBTOLR"
+19 SET DIOEND="D FNL^IBTOLR"
+20 SET DHD="LIST OF VISITS FROM "_IBFR_" TO: "_IBTO_" REQUIRING REVIEWS"
+21 DO EN1^DIP
+22 WRITE !
+23 ;
END IF $DATA(ZTQUEUED)
SET ZTREQ="@"
QUIT
+1 DO ^%ZISC
+2 KILL D,I,J,X,Y,DIC,FLDS,BY,TO,FR,DIS,IBSORT,IBQUIT,IBCNT,IBHIT,DIOEND
+3 KILL IBFR,IBTO
+4 QUIT
+5 ;
SORT ; -- ask how they want it sorted
+1 NEW DIR
+2 SET DIR(0)="SOBA^H:HOSPITAL REVIEWS;I:INSURANCE REVIEWS;B:BOTH"
+3 SET DIR("A")="Include [H]ospital Reviews [I]nsurance Reviews [B]oth: "
+4 SET DIR("B")="B"
+5 SET DIR("?",1)="This report will list visits that are currently indicate that reviews"
+6 SET DIR("?",2)="are required. Indicate if you want visits that require Hospital Reviews, Insurance Reviews or Both"
+7 SET DIR("?",3)=" "
SET DIR("?")="The default is Both."
+8 DO ^DIR
KILL DIR
+9 SET IBSORT=Y
IF "HIB"'[Y!($DATA(DIRUT))
SET IBQUIT=1
QUIT
+10 WRITE !
+11 QUIT
+12 ;
ADM SET DIR(0)="Y"
SET DIR("A")="List Admissions Only"
SET DIR("B")="YES"
+1 SET DIR("?")="Answer Yes if you only want admissions listed, answer No if you want all visit types (outpatient, prescription, etc) listed"
+2 DO ^DIR
KILL DIR
+3 SET IBADM=Y
IF $DATA(DIRUT)
SET IBQUIT=1
+4 QUIT
+5 ;
ASK NEW IBBDT,IBEDT
+1 DO DATE^IBOUTL
+2 IF (IBBDT<1)!(IBEDT<1)
SET IBQUIT=1
QUIT
+3 SET FR=IBBDT_",?"
SET TO=IBEDT_",?"
+4 SET IBFR=$$DAT1^IBOUTL(IBBDT)
SET IBTO=$$DAT1^IBOUTL(IBEDT)
+5 QUIT
+6 ;
SUB ; -- do subcount
+1 NEW IBX,IBI
+2 SET IBX=$GET(^IBT(356,D0,0))
+3 FOR IBI=24:1:27
IF $PIECE(IBX,"^",IBI)
SET IBCNT(IBI)=IBCNT(IBI)+1
+4 SET IBCNT=IBCNT+1
+5 QUIT
+6 ;
FNL ; -- print sub counts
+1 if 'IBCNT
QUIT
+2 NEW IBPLUS
+3 IF $GET(IOM)<81
SET IBPLUS=4
+4 WRITE !?72,"----",?77," ---",?(86+$GET(IBPLUS)),"----",?(94+$GET(IBPLUS))," ---"
+5 WRITE !,"COUNT",?72,$JUSTIFY(IBCNT(24),4),?77,$JUSTIFY(IBCNT(25),4),?(86+$GET(IBPLUS)),$JUSTIFY(+IBCNT(26),4),?(94+$GET(IBPLUS)),$JUSTIFY(+IBCNT(27),4)
+6 QUIT