source: WorldVistAEHR/trunk/r/E_CLAIMS_MGMT_ENGINE-BPS/BPSOSCB.m@ 1005

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

initial load of WorldVistAEHR

File size: 1.8 KB
Line 
1BPSOSCB ;BHAM ISC/FCS/DRS/DLF - Prep for building BPS array ;06/01/2004
2 ;;1.0;E CLAIMS MGMT ENGINE;**1,5**;JUN 2004;Build 45
3 ;;Per VHA Directive 2004-038, this routine should not be modified.
4 ;----------------------------------------------------------------------
5 ; Called from BPSOSCA from BPSOSQG from BPSOSQ2
6 ; Setup BPS() array which contains all pertinent data to create
7 ; claim Submission Records for the current Billing Item Record:
8 ;
9 ; Input:
10 ; RXILIST needs to be defined - List of Transactions
11 ; Returns
12 ; BPS Formatted array containing data required to create claim
13 ; submission records. This array is shared by all BPSOSC*
14 ; routines and some of the BPSOSH routines as well.
15 ;----------------------------------------------------------------------
16 ;
17 Q
18BPS() ;
19 N IEN59,IEN5902,INDEX,ENTRY,VAINFO
20 ;
21 ; Set up some basic variables from first transaction
22 S IEN59=$O(RXILIST(""))
23 I IEN59="" Q "320^BPS Transaction not found in RXILIST"
24 ;
25 S IEN5902=$P(^BPST(IEN59,9),U,1)
26 I IEN5902="" Q "321^VA Insurer not determined"
27 ;
28 ; Set transaction multiple into VAINFO array and get top node of multiple
29 D GETS^DIQ(9002313.59,IEN59_",","902*","I","VAINFO")
30 ;
31 ; Set up BPS array for Patient, Insurer, Site and NCPDP record format data
32 D GETINFO^BPSOSCC(IEN59,IEN5902)
33 ;
34 ; Get medication and prescription data for each medication
35 S IEN59=""
36 F INDEX=1:1 S IEN59=$O(RXILIST(IEN59)) Q:'IEN59 D
37 . S IEN5902=$P(^BPST(IEN59,9),U,1)
38 . D MEDINFO^BPSOSCD(IEN59,IEN5902,INDEX)
39 ;
40 ; Set up BPS("RX",0)
41 S BPS("RX",0)=INDEX-1
42 I BPS("RX",0)=0 Q "322^No claims in RXILIST"
43 ;
44 ; If certification, get certification overrides
45 S IEN59=$O(RXILIST("")),IEN5902=$P(^BPST(IEN59,9),U,1)
46 S ENTRY=$$GET1^DIQ(9002313.59902,IEN5902_","_IEN59_",",902.23,"I")
47 I ENTRY,$D(^BPS(9002313.31,ENTRY)) D SETBPS^BPSOSC2(ENTRY)
48 ;
49 ; Quit with no error
50 Q 0
Note: See TracBrowser for help on using the repository browser.