SpeedThink
MIS
Currently, I have Oracle version 8.1.7 and have the following SQL that has not worked:
Select pe.acct_no, pe.expected_reimbursement, pe.total_charges, ep.total_payments, pe.contract_no, pe.admit_date, pe.allowable, balance (computed), calculated_allowable(computed)
from patient_encounter pe, encounter_transactions et,
encounter_payor ep
where pe.contract_no = 'XA3'
"Pe.allowable" should be the sum of all payment amounts only for transaction codes in ('48005', '48006','48060'). Some accounts will have data for these transaction codes. Some will not.
The "Balance" is computed as expected_reimbursement less the "total payments."
What is the most expedient method to obtain the "allowable amount" and the "calculated allowable" amount (Calculated allowable is computed as "Total Charges" less the "Allowable" amount) in the same SQL query without using a limit local join within Brio Intelligence or running 2 to 3 additional SQL queries? SubQuery? Union?
Thanks in advance.
Select pe.acct_no, pe.expected_reimbursement, pe.total_charges, ep.total_payments, pe.contract_no, pe.admit_date, pe.allowable, balance (computed), calculated_allowable(computed)
from patient_encounter pe, encounter_transactions et,
encounter_payor ep
where pe.contract_no = 'XA3'
"Pe.allowable" should be the sum of all payment amounts only for transaction codes in ('48005', '48006','48060'). Some accounts will have data for these transaction codes. Some will not.
The "Balance" is computed as expected_reimbursement less the "total payments."
What is the most expedient method to obtain the "allowable amount" and the "calculated allowable" amount (Calculated allowable is computed as "Total Charges" less the "Allowable" amount) in the same SQL query without using a limit local join within Brio Intelligence or running 2 to 3 additional SQL queries? SubQuery? Union?
Thanks in advance.