Giter Club home page Giter Club logo

rds_dev_interview's Introduction

General Instructions

  • Clone this repository
  • Complete the three exercises outlined in the 'Exercises' section below
  • Push your code to a new repository under your Github account
    • Make sure to set your repository to Private
    • Add georgm8 as a Collaborator in your repository settings
  • When pushing to your own repository please do not include any virtual environment folders or files (feel free to use a .gitignore for this)
  • Do not push to this repository under main or any other branch

Enivronment Setup Instructions

You can use the following instructions to create a virtual environment and install the required dependencies. However you may prefer to use your own environment manager (for example condas). The list of dependencies are specified in the requirements.txt file.

Windows

python3 -m venv venv
venv\Scripts\activate
pip install -r requirements.txt

Linux

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

The Flask app can then be run with the following command:

flask run

If you have problems running the app using the above command you can also try the following:

python app.py

Exercises

The app should be running at accessible via the url localhost:5000/patients. You will encounter an error when you first load this page, this is to be expected! Completion of the following exercises will enable the app to run correcly.

1. SQL Task

Open the query.sql file and write a SQL script that brings in the following information about each patients' inpatient spell. Make sure to only include patients that are not deceased:

  • Patient ID
  • Patients Gender
  • Patients Current Age
  • Admission Date
  • Discharge Date
  • Diagnosis
  • Diagnosis Code

The database is a SQLlite database contained within the database.db file in the projects root directory. You can view the database schema in the database_schema.pdf file. Note that the data within the database_schema.pdf file is not the same as the data contained within the database.

NB - You can navigate to localhost:5000/query to see the results of your query as you are constructing it.

Python Task

Open the app.py file. You will see that the def patients() function calls three other functions that are currently not implemented. Your task is to implement those functions:

  • def get_avg_age()
  • def get_common_diagnosis()
  • def get_inpatient_info()

Javascript Task

There is a dropdown selection menu to filter the patients displayed on the screen by gender. Please complete the javascript code so that the filter works correctly. I.e. if you select 'Female' from the dropdown option only Female patients should be displayed on the screen.

rds_dev_interview's People

Contributors

georgm8 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.