Skip to content

Commit

Permalink
Created using Colab
Browse files Browse the repository at this point in the history
  • Loading branch information
rayidghani committed Jun 29, 2024
1 parent 353d15f commit 9c32cef
Showing 1 changed file with 38 additions and 3 deletions.
41 changes: 38 additions & 3 deletions explore_emr.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"metadata": {
"colab": {
"provenance": [],
"authorship_tag": "ABX9TyMRTykI7jsSzlNiSW8lPrdu",
"authorship_tag": "ABX9TyP7oVBlkEgg7lPXKoi30T9g",
"include_colab_link": true
},
"kernelspec": {
Expand Down Expand Up @@ -122,6 +122,27 @@
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [],
"metadata": {
"id": "FDxz75GNOGjD"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"# Want other packages?\n",
"If you need to install any other python modules for your analysis, you can easily do so from a code block by prefixing your pip install command with an ! character. For instance:\n",
"\n",
"!pip install PyYAML"
],
"metadata": {
"id": "LKVfB0W7OC_h"
}
},
{
"cell_type": "markdown",
"source": [
Expand Down Expand Up @@ -159,6 +180,17 @@
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"# Querying the Database\n",
"\n",
"The code block above used the sqlalchemy module to create a connection to the database called db_engine. An easy way to run SQL queries against this database is to use the read_sql command provided by pandas. For instance, if you run the example below, it should return the rows fom the **patients** table:"
],
"metadata": {
"id": "sT5Kk9BQNypD"
}
},
{
"cell_type": "markdown",
"source": [
Expand Down Expand Up @@ -285,7 +317,10 @@
{
"cell_type": "markdown",
"source": [
"# Homework Assignment"
"# Homework Assignment\n",
"\n",
"---\n",
"\n"
],
"metadata": {
"id": "ggqBIwKJvoP4"
Expand All @@ -294,7 +329,7 @@
{
"cell_type": "markdown",
"source": [
"**Question 1: Diagnoses**\n",
"# **Question 1: Diagnoses**\n",
"\n",
"1A. What are the 10 most common diagnoses (names of the diagnosis - not just the code) in this sample data?\n",
"Hint: you'll need to look at the **icd_diagnoses** table to get diagnosis codes and the **d_icd_diagnoses** table to get the english descriptions."
Expand Down

0 comments on commit 9c32cef

Please sign in to comment.