Build a cohort of patients and calculate some metrics

Assignment Help Database Management System
Reference no: EM132380709

Assignment using SQL - Data Exercise

Please note, if you choose to alias tables in your code, we ask that you use descriptive aliases and not single letters.

This exercise will evaluate your ability to build a cohort of patients and calculate some metrics related to that cohort. You should have the following:

  • 5 datasets (all data you need is found within the provided datasets)
  • A data dictionary defining each dataset and its fields

If you would like to use a database for this exercise, use these instructions to set up a local Postgres database. Otherwise, you can load the datasets with your programming language of choice.

Instructions -

Part 1: Assemble the project cohort

The project goal is to identify patients seen for drug overdose, determine if they had an active opioid at the start of the encounter, and if they had any readmissions for drug overdose.

Your task is to assemble the study cohort by identifying encounters that meet the following criteria:

1. The patient's visit is an encounter for drug overdose

2. The hospital encounter occurs after July 15, 1999

3. The patient's age at time of encounter is between 18 and 35 (Patient is considered to be 35 until turning 36)

Part 2: Create additional fields

With your drug overdose encounter, create the following indicators:

1. DEATH_AT_VISIT_IND: 1 if patient died during the drug overdose encounter, 0 if the patient died at a different time

2. COUNT_CURRENT_MEDS: Count of active medications at the start of the drug overdose encounter

3. CURRENT_OPIOID_IND: 1 if the patient had at least one active medication at the start of the overdose encounter that is on the Opioids List (provided below)

4. READMISSION_90_DAY_IND: 1 if the visit resulted in a subsequent drug overdose readmission within 90 days, 0 if not

5. READMISSION_30_DAY_IND: 1 if the visit resulted in a subsequent drug overdose readmission within 30 days, 0 if not overdose encounter, 0 if not

6. FIRST_READMISSION_DATE: The date of the index visit's first readmission for drug overdose. Field should be left as N/A if no readmission for drug overdose within 90 days

Part 3: Export the data to a CSV file

Export a dataset containing these required fields:

Field name

Field Description

Data Type

PATIENT_ID

Patient identifier

Character String

ENCOUNTER_ID

Visit identifier

Character string

HOSPITAL_ENCOUNTER_DATE

Beginning of hospital encounter date

Date/time

AGE_AT_VISIT

Patient age at admission

Num

DEATH_AT_VISIT_IND

Indicator if the patient died during the drug overdose encounter. Leave N/A if patient has not died,

0 /1

COUNT_CURRENT_MEDS

Count of active medications at the start of the drug overdose encounter

Num

CURRENT_OPIOID_IND

if the patient had at least one active medication at the start of the overdose encounter that is on the Opioids List (provided below)

0/1

READMISSION_90_DAY_IND

Indicator if the visit resulted in a subsequent readmission within 90 days

0/1

READMISSION_30_DAY_IND

Indicator if the visit resulted in a subsequent readmission within 30 days

0/1

FIRST_READMISSION_DATE

Date of the first readmission for drug overdose within 90 days. Leave N/A if no readmissions for drug overdose within 90 days.

Date/time

Opioids List:

  • Hydromorphone 325Mg
  • Fentanyl - 100 MCG
  • Oxycodone-acetaminophen 100 Ml

Submission Guidelines

1. Data Exercise output dataset (.csv)

2. Data Exercise code (text file).

Attachment:- Assignment Files.rar

Reference no: EM132380709

Questions Cloud

Ethical challenge related to computer usage : Bill, a student worker, is using school database access to download music and movies against school policy.
Whistle-blowing-motivation-decentralization and group norms : Pick one of the following terms for your research: Whistle-blowing, motivation, decentralization, group norms, or needs.
Prepare journal entries to record the april transactions : During its first month of operation, the Leonard Landscaping Company, which, specializes in landscaping services, completed the following transactions.
Prepare the journal entry to record income taxes for 2017 : Starting with Income before income taxes, how income taxes are reported on the income statement. What is Bee's effective tax rate?
Build a cohort of patients and calculate some metrics : Data Exercise - This exercise will evaluate your ability to build a cohort of patients and calculate some metrics related to that cohort
Discusses the knapp commission hearings : Discusses the Knapp commission hearings: What impact do you feel that they have had on policing in modern times?
How the needs of stakeholders might change : Examine the knowledge areas and processes applied in the execution and closing stages of the project management life cycle
What business form would be best for club : He wants to take donations to support the club rather than sell stock. What business form would be best for this club?
Course corrections to keep budget on track moving forward : Discuss possible course corrections to keep the budget on track moving forward. You should incorporate financial management strategy into this response.

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd