You are here: Home Information for OSCAR Users EMR Resources Report Templates Billing Report Templates Billing Dx, age (Ontario Billing v2)
Personal tools
Document Actions

Billing Dx, age (Ontario Billing v2)

by David Chan last modified 2007-08-16 10:07

Reports patients by Billing Dx, age (Ontario Billing v2)

<report  title="Billing Dx Code Search by Patient Age " description="Reports patients by Billing Dx, age (Ontario Billing v2)" active="1">
<query>
select distinct b.demographic_no, d.last_name, d.first_name, d.year_of_birth,
d.address, d.postal, d.provider_no, d.phone, d.phone2


from billing_on_item bd, billing_on_cheader1 b, demographic d where bd.dx in ({multi_field}) and b.id = bd.ch1_id and d.demographic_no = b.demographic_no and b.status <> 'D' and
d.patient_status = 'AC' and datediff(now(), concat(d.year_of_birth, '-', d.month_of_birth, '-', d.date_of_birth))/365 >= {age}
order by d.provider_no, d.last_name, d.first_name;

</query>
<param id="multi_field" type="textlist" description="A comma-separated list of choices (just an example, can leave blank)">
</param>
<param id="age" type="text" description="Age of Population (From age)">
</param>
</report>