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

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

initial load of WorldVistAEHR

File size: 2.3 KB
RevLine 
[613]1IBCNERP0 ;DAOU/BHS - IBCNE IIV STATISTICAL REPORT (cont'd) ;11-JUN-2002
2 ;;2.0;INTEGRATED BILLING;**184,271**;21-MAR-94
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5 ; IIV - Insurance Identification and Verification Interface
6 ;
7 ; PYR tag called by IBCNERP8
8 ;
9 ; Cannot be called from top of routine
10 Q
11 ;
12PYR(RTN,BDT,EDT,TOT) ; Determine Incoming Data
13 ; Input params: RTN-routine name for ^TMP($J), BDT-start dt/time,
14 ; EDT-end dt/time, **TOT-total records searched - used only for status
15 ; checks when the process is queued (passed by reference)
16 ; Output vars: Set ^TMP($J,RTN,"PYR",PAYER NAME,IEN of file 365.12)=""
17 N PIEN,PYR,CREATEDT,APPIEN,APPDATA
18 ;S BDT=$P(BDT,"."),EDT=$P(EDT,".")
19 S PIEN=0 F S PIEN=$O(^IBE(365.12,PIEN)) Q:'PIEN D
20 . S TOT=TOT+1
21 . S CREATEDT=$P($G(^IBE(365.12,PIEN,0)),U,4)
22 . I CREATEDT=""!(CREATEDT<BDT)!(CREATEDT>EDT) Q
23 . S PYR=$P($G(^IBE(365.12,PIEN,0)),U)
24 . Q:PYR="~NO PAYER" ; used internally only - not a real IIV payer
25 . ;
26 . ; Get Payer app multiple IEN
27 . S APPIEN=$$PYRAPP^IBCNEUT5("IIV",PIEN)
28 . ; Must have eIIV application
29 . I 'APPIEN Q
30 . S APPDATA=$G(^IBE(365.12,PIEN,1,APPIEN,0))
31 . ; Must be Nationally Active
32 . I '$P(APPDATA,U,2) Q
33 . ;
34 . S ^TMP($J,RTN,"PYR",PYR,PIEN)=""
35 Q
36 ;
37HEADER(HDRDATA,PGC,PXT,MAX,CRT,SITE,DTMRNG,MM) ; Print header info for each pg
38 ; Init vars
39 N CT,HDRCT,LIN,HDR
40 ;
41 ; Prompt to print next page for reports to the screen
42 I CRT,PGC>0,'$D(ZTQUEUED) D I PXT G HEADERX
43 . I MAX<51 F LIN=1:1:(MAX-$Y) W !
44 . S DIR(0)="E" D ^DIR K DIR
45 . I $D(DTOUT)!$D(DUOUT) S PXT=1 Q
46 I $D(ZTQUEUED),$$S^%ZTLOAD() S ZTSTOP=1 G HEADERX
47 ;
48 ; Update page ct
49 S PGC=PGC+1
50 ;
51 ; Update header based on MailMan message flag
52 S HDRCT=0
53 S HDRCT=HDRCT+1,HDRDATA(HDRCT)="IIV Statistical Report"_$$FO^IBCNEUT1($$FMTE^XLFDT($$NOW^XLFDT,1)_" Page: "_PGC,56,"R")
54 ;S HDRDATA(HDRCT)=$$FO^IBCNEUT1(SITE,(80-$L(SITE)\2)+$L(SITE),"R"),HDRCT=HDRCT+1
55 S HDR="Report Timeframe:"
56 S HDRCT=HDRCT+1,HDRDATA(HDRCT)=$$FO^IBCNEUT1(HDR,80-$L(HDR)\2+$L(HDR),"R")
57 S HDRCT=HDRCT+1,HDRDATA(HDRCT)=$$FO^IBCNEUT1(DTMRNG,(80-$L(DTMRNG)\2)+$L(DTMRNG),"R")
58 ;
59 I MM S HDRCT=HDRCT+1,HDRDATA(HDRCT)=""
60 ; Only write out Header for non-MailMan message output
61 I MM="" W @IOF F CT=1:1:HDRCT W !,?1,HDRDATA(CT)
62 ;
63HEADERX ; HEADER exit pt
64 Q
65 ;
Note: See TracBrowser for help on using the repository browser.