Query - Advanced Orientation (Associate) HAK1034.3
Query - Advanced Orientation (Associate) HAK1034.3
Query - Advanced Orientation (Associate) HAK1034.3
(Associate)
Prerequisites
1. It is highly recommended the following activities are completed prior to this activity:
Query – Basic Orientation (Associate)
Student instructions
1. If you have questions about this activity, please contact your instructor for assistance.
2. You will use the EHR Go queries tool to complete this activity. Your instructor has
provided you with a link to the Query – Advanced Orientation (AS) activity. Click on 2:
Launch EHR to launch the queries tool and begin this activity.
3. You’ve been granted access to certain data in the EHR to complete this activity. The
approved data has already been linked to the queries tool in the EHR.
4. Document your answers directly on this activity document as you complete the activity.
When you are finished, you will save this activity document to your device and upload
this activity document with your answers to your Learning Management System (LMS).
Introduction
The previous activity, Query - Basic Orientation, explored the fundamental concepts of querying
data. Queries with a single logical operator (i.e. AND) were used to determine the number of
Cesarean births. However, in many cases, queries need to use both AND and OR logical
operators. For example, how many Cesarean births occurred in high risk patients OR in patients
age 35 and older?
‘Birth outcome = Cesarean’ AND (‘Risk = High’ OR ‘Age at Time of Birth >= 35’)
The parentheses indicate the order it should be executed otherwise it may result in a different
answer. This is just like the order of operations in math!
In EHR Go, the group function is used to create a query with both logical operators. Any time a
query requires both an AND logical operator and an OR logical operator, the group function is
required. Important! In the EHR Go query tool, the group function, when needed, must be
added as the first step when building the query.
By adding a group, the AND logical operator can be used for one set of rules and the OR logical
operator can be used for another set of rules. This is also referred to as a nested query. The
image below shows how the group function would be used to build the example query.
2
The first part of the query that has the connector lines on the outside is referred to as the main
query. The second, or inner part of the query is known as the sub-condition.
This activity will take a deeper look at the birth outcomes dataset using both basic and
advanced queries.
The activity
Shoreline’s birth data revealed a cesarean section rate of 34.0%, which is 2.1% higher than the
national average of 31.9%. The medical director believes the Birth Center has a higher cesarean
section rate because they are the area’s only high-risk birth center. Being a high-risk birth
center means that Shoreline receives a higher percentage of high-risk births. She believes that
Shoreline’s high rate of cesarean section is related to the high-risk births and that cesarean
section results in a safer birth experience for these families. Shoreline's Public Relations officer
is happy to hear that Shoreline's high rate of cesarean may be related to a high rate of high-risk
patients, but she feels the public also needs to know that Shoreline is the safest place to give
birth.
You have been asked to gather data from the EHR database to support the development of a
comprehensive report that can be presented to the Shoreline Board of Directors.
Access the EHR queries tool and corresponding dataset under 2: Launch EHR. Click the New
Session button to launch the EHR. Follow the instructions to generate queries to answer the
questions in the next section.
3
Name the query ‘Birth Outcome’. You’ll be running various queries to answer the following
questions. For each question, run the query, then enter the Total record(s) result for the
answer. Note that there are often multiple ways to query the data to get the same result. For
grading purposes, enter your answers in the Answers section found later in this activity
document.
1. Of the 8379 births at Shoreline, how many were high risk pregnancies? 1603
2. Of the 8379 births at Shoreline, what percentage were high risk pregnancies? Round to
the nearest tenth.19.1
Enter the following rules to determine the number of high-risk pregnancies then select Query.
4
Note the Total Record(s) displayed. Using a calculator or other resource, divide that number by
the total number of births (8379). Multiply by 100 to convert to a percentage and round to the
nearest tenth.
3. Of the high-risk pregnancies, what percentage had a Cesarean birth? Round to the
nearest tenth.n 82.9%
Build on your existing query. Select Add rule and enter the following rule. Then select Query.
Note the Total Record(s). To calculate the percentage, divide that number by the total number
of high-risk pregnancies in your answer for question 1.
4. Of the low-risk pregnancies, what percentage had a Cesarean birth? Round to the
nearest tenth. 22.4%
Update your existing query by changing the risk value from High to Low. Then select Query.
Because there are only high or low risk births, we can assume that the total number of low-risk
births is the total number of births (8379) minus the number of high-risk births from question 1.
Use that information to compute the percentage.
5
5. Of the high-risk pregnancies, how many resulted in a death outcome (Deceased Mom-
Live birth, Deceased Mom-Still birth, or Still birth)? 31
6. What percentage of high-risk pregnancies resulted in a death outcome? Round to the
nearest tenth. 1.9%
This query involves both AND and OR criteria so the group function is required. The main query
will have the AND logical operator for the risk field and the subquery will have the OR logical
operator for the different birth outcomes.
The group function must be added at the beginning of the query. So first Close your existing
query and begin a New query. Enter any name for the query.
6
Query rule(s): ‘Birth outcome’ equal ‘Deceased Mom-Live Birth’
Now, select Add rule to the sub-condition and toggle the logical operator to OR.
7
Repeat Add rule for the sub-condition and add the final birth outcome. Then select Query.
7. Of the high-risk pregnancies that resulted in a death outcome, how many were
Cesarean? 25
8. What percentage of high-risk pregnancies that resulted in a death outcome were
Cesarean? Round to the nearest tenth. 80.6%
Build on your previous query. In this case, you’ll need to add another rule to the main
query. Select Add rule then enter the following:
8
Even though the new rule appears below the sub-condition, you can tell it is still part of the
main (AND logical operator) query because the connection line is on the outside.
Select Query and note the Total Record(s). Compute the percentage.
Shoreline’s board of directors has requested a report that includes all records from this final
query result. To protect patient identity, remove the patient names from the report.
In the Field(s) section, remove the First Name and Last Name fields.
9
Select Export Results to Excel. A report will download. This Excel file is the resulting dataset
that lists the details of the specific records you generated with your query. Note: This report
will not be submitted for grading and is only intended to provide an example of how data can
be exported from the EHR.
Questions
1. Of the 8379 births at Shoreline, how many were high-risk pregnancies? 1603
2. Of the 8379 births at Shoreline, what percentage were high-risk pregnancies? Round to
the nearest tenth. 19.1%
3. Of the high-risk pregnancies, what percentage had a Cesarean birth? Round to the
nearest tenth.82.9%
4. Of the low-risk pregnancies, what percentage had a Cesarean birth? Round to the
nearest tenth. 22.4%
5. Of the high-risk pregnancies, how many resulted in a death outcome (Deceased Mom-
Live birth, Deceased Mom-Still birth, or Still birth)? 31
6. What percentage of high-risk pregnancies resulted in a death outcome? Round to the
nearest tenth. 1.9%
7. Of the high-risk pregnancies that resulted in a death outcome, how many were
Cesarean? 25
8. What percentage of high-risk pregnancies that resulted in a death outcome were
Cesarean? Round to the nearest tenth. 80.6%
9. How does Shoreline’s rate of Cesarean births for low-risk pregnancies compare to the
national average of 31.9%?
I would first need the specific cesarean birth rate of Shoreline. If their rate is above 31.9%
that puts them above the national average. If it is less than the 31.9% it makes them below
the average. Due to us not having this information we are unable to provide a direct
comparison.
10
Learning objectives
1. Apply health informatics concepts to the management of health information (3)
2. Utilize technologies for health information management (3)
3. Calculate statistics for health care operations (3)
4. Manage data within a database system (5)
11