MU SQL Objective 4: Medication CPOE

SQL for Objective 4: CPOE Medication

You will be prompted to enter the reporting period start and end date and the provider's OP ID number.

Report Usage Ideas

For more information about how this report is constructed, see Objective 7: Health Information Exchange.

Code

To highlight and copy the code below to your clipboard, simply click the Copy button.

select patno, date1, prescrib, purpose, case when purpose = 'Med - unformatted' then 'fail' else 'pass' end as determination from medications where p_addr_id = :provider and date1 between :start_date and :end_date
 and medications.purpose like 'Med%' and medications.purpose <> 'Med - reference only'