Documente Academic
Documente Profesional
Documente Cultură
Part 1-
You are the new data analyst for Westborough Medical Associates. They have the data available for
March but are looking for some analysis. Based on the data available below, represent in sql queries how
you would provide them the data they are looking for. You can either use mysql or MSSQL query format.
NOB – New OB
AV – Annual Visit
CON – Consult
F/U – Follow Up
ESTOB – Established OB
NP – New Patient
EST – Established Patient
Procedure – Procedure
Diagnosis -
1) Practice wants a list of all unique patients with their most recent appointments. Represent this in
a query.
2) A) The clinic manager needs an overall encounter count for her month end numbers. What
query would get her this information?
B) The doctors are compensated based on the number of visits they have had for the reporting
time. Based on the information available provide the clinic manager a distinct count of
encounters for each doctor.
3) The OB/GYN staff is interested to get a list of all OB patients and have a follow up with them.
Provide this to them through your query.
4) The clinic is interested to know how many new patients they have had in the month. How would
you get them this data, along with the patient information?
5) Dr. Sam Willis (doctor Id 122) is looking to talk to all his patients who had an appointment
between March 1 and March 10. What query would you give him to fetch this list?
Note : the date field is a varchar, you will have to convert it to a suitable format at the query level
to bring in this information.
6) The Head Nurse is looking for all patients who have been diagnosed with chronic conditions like
Asthma and Diabetes. Can you provide her this info through your query? Note – The diagnosis
must be a primary assessment for each patient denoted by primaryasmt=1