source: WorldVistAEHR/trunk/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBTOLR.m@ 846

Last change on this file since 846 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.5 KB
Line 
1IBTOLR ;ALB/AAS/BGA - LIST CLAIMS TRACKING LIST ENTRIES BEING TRACKED; 04-NOV-93
2 ;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
3 ;
4% ;
5 ; -- fileman print of random sample cases, etc.
6 W !!,"Print List of Visits Requiring Review",!!
7 ;
8 W !!,"You will need a 132 column printer for this report!",!!
9 D SORT G:$G(IBQUIT) END
10 D ADM G:$G(IBQUIT) END
11 D ASK G:$G(IBQUIT) END
12 S DIC="^IBT(356,",FLDS="[IBT LIST VISITS]",BY="[IBT LIST VISITS]"
13 ;
14 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))"
15 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)"
16 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))"
17 ;
18 I $G(IBADM) S DIS(1)="I $P($G(^IBE(356.6,+$P($G(^IBT(356,D0,0)),U,18),0)),U,3)=1"
19 ;
20 ;
21 S IBCNT=0 F I=24:1:27 S IBCNT(I)=0 ;initialize count variable
22 S DHIT="D SUB^IBTOLR"
23 S DIOEND="D FNL^IBTOLR"
24 S DHD="LIST OF VISITS FROM "_IBFR_" TO: "_IBTO_" REQUIRING REVIEWS"
25 D EN1^DIP
26 W !
27 ;
28END I $D(ZTQUEUED) S ZTREQ="@" Q
29 D ^%ZISC
30 K D,I,J,X,Y,DIC,FLDS,BY,TO,FR,DIS,IBSORT,IBQUIT,IBCNT,IBHIT,DIOEND
31 K IBFR,IBTO
32 Q
33 ;
34SORT ; -- ask how they want it sorted
35 N DIR
36 S DIR(0)="SOBA^H:HOSPITAL REVIEWS;I:INSURANCE REVIEWS;B:BOTH"
37 S DIR("A")="Include [H]ospital Reviews [I]nsurance Reviews [B]oth: "
38 S DIR("B")="B"
39 S DIR("?",1)="This report will list visits that are currently indicate that reviews"
40 S DIR("?",2)="are required. Indicate if you want visits that require Hospital Reviews, Insurance Reviews or Both"
41 S DIR("?",3)=" ",DIR("?")="The default is Both."
42 D ^DIR K DIR
43 S IBSORT=Y I "HIB"'[Y!($D(DIRUT)) S IBQUIT=1 Q
44 W !
45 Q
46 ;
47ADM S DIR(0)="Y",DIR("A")="List Admissions Only",DIR("B")="YES"
48 S DIR("?")="Answer Yes if you only want admissions listed, answer No if you want all visit types (outpatient, prescription, etc) listed"
49 D ^DIR K DIR
50 S IBADM=Y I $D(DIRUT) S IBQUIT=1
51 Q
52 ;
53ASK N IBBDT,IBEDT
54 D DATE^IBOUTL
55 I (IBBDT<1)!(IBEDT<1) S IBQUIT=1 Q
56 S FR=IBBDT_",?",TO=IBEDT_",?"
57 S IBFR=$$DAT1^IBOUTL(IBBDT),IBTO=$$DAT1^IBOUTL(IBEDT)
58 Q
59 ;
60SUB ; -- do subcount
61 N IBX,IBI
62 S IBX=$G(^IBT(356,D0,0))
63 F IBI=24:1:27 I $P(IBX,"^",IBI) S IBCNT(IBI)=IBCNT(IBI)+1
64 S IBCNT=IBCNT+1
65 Q
66 ;
67FNL ; -- print sub counts
68 Q:'IBCNT
69 N IBPLUS
70 I $G(IOM)<81 S IBPLUS=4
71 W !?72,"----",?77," ---",?(86+$G(IBPLUS)),"----",?(94+$G(IBPLUS))," ---"
72 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)
73 Q
Note: See TracBrowser for help on using the repository browser.