1 | IBCEPTC1 ;ALB/TMK - EDI PREV TRANSMITTED CLAIMS REPORT OUTPUT ;01/20/05
|
---|
2 | ;;2.0;INTEGRATED BILLING;**296,320**;21-MAR-94
|
---|
3 | ;
|
---|
4 | RPT(IBSORT,IBDT1,IBDT2) ; Output transmitted claims report
|
---|
5 | ; global ^TMP("IB_PREV_CLAIM",$J,srt1,srt2,ien of entry file 364)=""
|
---|
6 | N IBDA,IBIFN,IBPAGE,IBSTOP,IBHDR,IBS1,IBS2,Z,IBZ,IBREP
|
---|
7 | S (IBPAGE,IBSTOP)=0,IBPAGE(0)="",IBPAGE(1)="",IBREP="R"
|
---|
8 | S IBHDR="Transmitted Claims Report for period covering "_$$FMTE^XLFDT(IBDT1,1)_" thru "_$$FMTE^XLFDT(IBDT2,1)_$J("",14)_$$HTE^XLFDT($H,"1M"),IBHDR=IBHDR_$J("",124-$L(IBHDR))_"Page"
|
---|
9 | S IBS1="" F S IBS1=$O(^TMP("IB_PREV_CLAIM",$J,IBS1)) Q:IBS1="" D Q:IBSTOP
|
---|
10 | . ; First level sort
|
---|
11 | . D:($Y+6)>IOSL!'IBPAGE HDR(IBHDR,IBSORT,.IBPAGE,.IBSTOP) Q:IBSTOP
|
---|
12 | . S IBPAGE(1)=IBS1,IBPAGE(0)="" ; Hold data for hdr repeated on new pg
|
---|
13 | . D HDR1(IBSORT,IBS1,.IBPAGE,.IBSTOP) Q:IBSTOP
|
---|
14 | . ;
|
---|
15 | . S IBPAGE(0)=1
|
---|
16 | . S IBS2="" F S IBS2=$O(^TMP("IB_PREV_CLAIM",$J,IBS1,IBS2)) Q:IBS2=""!IBSTOP S IBDA=0 F S IBDA=$O(^TMP("IB_PREV_CLAIM",$J,IBS1,IBS2,IBDA)) Q:'IBDA!IBSTOP D
|
---|
17 | .. S IBIFN=+$G(^IBA(364,+IBDA,0))
|
---|
18 | .. ;
|
---|
19 | .. D:($Y+5)>IOSL!'IBPAGE HDR(IBHDR,IBSORT,.IBPAGE,.IBSTOP) Q:IBSTOP
|
---|
20 | .. D WRT^IBCEPTC2(IBS1,IBS2,IBDA,IBIFN,IBSORT,IBREP,"",.IBPAGE,.IBSTOP) Q:IBSTOP
|
---|
21 | . S IBPAGE(0)=""
|
---|
22 | ;
|
---|
23 | G:IBSTOP STOP
|
---|
24 | I 'IBPAGE D WRT^IBCEPTC2("NO PREVIOUSLY TRANSMITTED CLAIMS EXIST TO MATCH THE SEARCH CRITERIA SELECTED","",0,0,IBSORT,IBREP,IBHDR,0,0)
|
---|
25 | ;
|
---|
26 | I $E(IOST,1,2)["C-" K DIR S DIR(0)="E" D ^DIR K DIR
|
---|
27 | ;
|
---|
28 | STOP I $D(ZTQUEUED) S ZTREQ="@"
|
---|
29 | I '$D(ZTQUEUED) W ! D ^%ZISC
|
---|
30 | ;
|
---|
31 | Q
|
---|
32 | ;
|
---|
33 | HDR1(IBSORT,IBDATA,IBPAGE,IBSTOP) ; First level report sort headers
|
---|
34 | ; IBSORT = sort type
|
---|
35 | ; IBDATA = data at the 1st sort level
|
---|
36 | I ($Y+11)>IOSL D HDR(IBHDR,IBSORT,.IBPAGE,.IBSTOP) Q:IBSTOP
|
---|
37 | N Z,X,Y,Q
|
---|
38 | I IBSORT=1 D
|
---|
39 | . S Q="Batch Number: "_$P(IBDATA,U,2)_$S('$P(IBDATA,U,4):"",1:" ** This batch was rejected **")_$S('$P(IBDATA,U,3):"",1:" ** This batch was a test batch **")
|
---|
40 | . W !!,Q W:$G(IBPAGE(0)) $J("",120-$L(Q)),"(Continued)" W !,"Date Last Transmitted: ",$$FMTE^XLFDT(99999999-IBDATA,1)
|
---|
41 | . S Z="",$P(Z,"=",133)="" W !,Z
|
---|
42 | . W !,"Claim # Form Type Seq Status A/R Current Payer",$J("",13),"Payer Address",$J("",17),"Other Payer(s) Patient Name",!
|
---|
43 | ;
|
---|
44 | I IBSORT=2 D
|
---|
45 | . N IBZ,IBIFN
|
---|
46 | . S IBIFN=""
|
---|
47 | . I IBDATA'="" S IBIFN=+$G(^TMP("IB_PREV_CLAIM",$J,IBDATA))
|
---|
48 | . S Q="Current Payer: "_$P(IBDATA,U)
|
---|
49 | . D F^IBCEF("N-CURR INS CO FULL ADDRESS","IBZ",,IBIFN)
|
---|
50 | . S Q=Q_" "_$G(IBZ(1))_$S($G(IBZ(1))'="":",",1:"")_" "_$G(IBZ(4))_$S($G(IBZ(4))'="":",",1:"")_" "_$P($G(^DIC(5,+$G(IBZ(5)),0)),U,2)
|
---|
51 | . W !!,Q
|
---|
52 | . I $G(IBPAGE(0)) D
|
---|
53 | .. I $L(Q)>119 S Q="" W !
|
---|
54 | .. W $J("",120-$L(Q)),"(Continued)"
|
---|
55 | . S Z="",$P(Z,"=",133)="" W !,Z
|
---|
56 | . W !,"Claim # Form Type Seq Status A/R Other Payer(s)",$J("",6),"Patient Name",$J("",10),"Last Transmit Batch Number",!
|
---|
57 | ;
|
---|
58 | Q
|
---|
59 | ;
|
---|
60 | HDR(IBHDR,IBSORT,IBPAGE,IBSTOP) ; Report header
|
---|
61 | ;
|
---|
62 | N Z,DIR,X,Y
|
---|
63 | I IBPAGE D Q:IBSTOP
|
---|
64 | . I $E(IOST,1,2)["C-" K DIR S DIR(0)="E" D ^DIR K DIR S IBSTOP=('Y) Q:IBSTOP
|
---|
65 | . W @IOF
|
---|
66 | S IBPAGE=IBPAGE+1,Z=IBHDR_$J(IBPAGE,4)
|
---|
67 | W !,Z
|
---|
68 | W !,"** A claim may appear on this report multiple times if it has been transmitted more than once. **"
|
---|
69 | I IBSORT=2 D
|
---|
70 | . W !,"** T indicates the claim was transmitted as a test claim prior to turning on EDI live for the payer. **"
|
---|
71 | . W !,"** R indicates that the batch was rejected. **"
|
---|
72 | I IBPAGE>1,$G(IBPAGE(0)) D HDR1(IBSORT,IBPAGE(1),.IBPAGE,.IBSTOP)
|
---|
73 | Q
|
---|
74 | ;
|
---|