This project focuses on increasing the efficiency of a hospital's patient waitlist by creating an algorithm to generate an ordered list of 10 patients with the highest chance of accepting an appointment offer.

Overview

Patients-Facility Technical Interview

Requirements

This application was built on Node.JS v12.14. It has not been tested on other versions. You will also need a package manager (npm or yarn).

Running

First, you need to install all dependencies

$ npm install // or yarn

Second, you need to start the project by using the following command:

$ npm start // or yarn start

The application will run on port 3000. To execute it on another port, use the command:

$ SERVER_PORT=[port] npm start

To run the tests, use:

$ npm test

API

The application has only one route: GET /v1/patients-list

It expects two parameters:

  • lat number
  • long number

For example:

/v1/patients-list?lat=-26.5030&long=-155.1633

It will return 10 patients that will most likely attend the appointment in a facility that is located at latitude of -26.5030 and longitude of -155.1633

Problem Definition

A busy hospital has a list of patients waiting to see a doctor. The waitlist is created sequentially (e.g. patients are added in a fifo order) from the time the patient calls. Once there is an availability, the front desk calls each patient to offer the appointment in the order they were added to the waitlist. The staff member from the front desk has noticed that she wastes a lot of time trying to find a patient from the waitlist since they're often not available, don't pick up the phone, etc. She would like to generate a better list that will increase her chances of finding a patient in the first few calls.

Interview Task

Given patient demographics and behavioral data (see sample-data/patients.json), create an algorithm that will process a set of historical patient data and compute a score for each patient that (1 as the lowest, 10 as the highest) that represents the chance of a patient accepting the offer off the waitlist. Take in consideration that patients who have little behavior data should be randomly added to the top list as to give them a chance to be selected. Expose an api that takes a facility's location as input and returns an ordered list of 10 patients who will most likely accept the appointment offer.

Weighting Categories

Demographic

  • age (weighted 10%)
  • distance to practice (weighted 10%)

Behavior

  • number of accepted offers (weighted 30%)
  • number of cancelled offers (weighted 30%)
  • reply time (how long it took for patients to reply) (weighted 20%)

Patient Model

  • ID
  • Age (in years)
  • location
    • Lat
    • long
  • acceptedOffers (integer)
  • canceledOffers (integer)
  • averageReplyTime (integer, in seconds)

Deliverables

The code should be written as a Node.js as a library that anyone can import and use. It should contain documentation and unit tests that show your understanding of the problem. Once you're finished, submit a PR to this repo.

Authors

πŸ‘€ RWUBAKWANAYO

🀝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

πŸ“ License

This project is MIT licensed.

You might also like...

The Happy Devs Leaderboard allows users to submit their scores. The app then ranks them from highest scores to the lowest.

HAPPY DEVS LEADERBOARD The HAPPY DEVS LEADERBOARD app allows users to submit their scores to be ranked on the Leaderboard. Live Demo Live Demo Link Bu

Feb 10, 2022

A good web interface for youtube-dl that allows you to download arbitrary mixes of audio and video, including up to the highest quality such as 8K.

A good web interface for youtube-dl that allows you to download arbitrary mixes of audio and video, including up to the highest quality such as 8K.

πŸš€ youtube-dl-web A good web interface for youtube-dl that allows you to download arbitrary mixes of audio and video, including up to the highest qual

Dec 30, 2022

Crawler Crypto using NodeJS for performance with Elasticsearch DB for high efficiency.

Coin crawler - Coingecko version Crawler using NodeJS for performance with Elasticsearch DB for high efficiency. Requirements For development, you wil

Jan 20, 2022

An implementation of ERC1155D, a record setter for minting and transfer gas efficiency.

ERC1155D An implementation of ERC1155D, a record setter for minting and transfer gas efficiency. This contract is in alpha stage and has not been audi

Dec 26, 2022

This project will be using various AI and Rule Engine algorithm to detect various attack against a company!

This project will be using various AI and Rule Engine algorithm to detect various attack against a company!

πŸ“Œ Introduction This project will be using various AI and Rule Engine algorithm to detect various attack against a website! πŸ“Œ Mission After starting

Apr 29, 2022

This project is about Leaderboard list app, that allows users to add score to the list and refresh the list.

This project is about Leaderboard list app, that allows users to add score to the list and refresh the list.

Leaderboard This project is about Leaderboard list app, that allows users to add score to the list and refresh the list. Built With JavaScript HTML CS

Dec 19, 2021

"To Do List" is a minimalist project that displays a list of task and allows you to add and remove task from that list. Built with JavaScript

To Do List Structure Solo programming project for module 2 week 2 of the Microverse Program. Live Demo Live Demo Link "To Do List" is a minimalist pro

Mar 5, 2022

To-Do List project is the application for a to-do list, users can add and remove tasks from the to-do list. Mark tasks as completed.

To Do App To-Do List project is the application for a to-do list, users can add and remove tasks from the to-do list. Mark tasks as completed. Users c

Jul 21, 2022
Comments
  • Patients-Facility

    Patients-Facility

    In this PR we:

    • Includes documentation and unit tests
    • Takes in the facility's location as input
    • Computes a score for each patient (1-10)
    • Weighting categories based on demographics and behavior
    • Returns an ordered list of 10 patients most likely to accept the offer
    • Patient model includes ID, age, location, accepted offers, canceled offers, average reply time
    opened by RWUBAKWANAYO 0
Owner
Rwubakwanayo Olivier
A Full-Stack Software Developer with a love of React and Nodejs πŸ’». Interested in collaborating with others and eager to explore new opportunities! πŸ‘
Rwubakwanayo Olivier
Nest multiple blocks inside lists of any kind of list (ordered, unordered, no marker, etc), or do away with list markers and use it like a repeater!

Nest multiple blocks inside lists of any kind of list (ordered, unordered, no marker, etc), or do away with list markers and use it like a repeater!

Rani 15 Dec 26, 2022
pre-calculated list of similar Persian words ordered by rating and best match

similar-persian-words pre-calculated list of similar Persian words ordered by rating and best match. Install npm: npm install similar-persian-words Us

peyman farahmand 6 May 29, 2022
A CLI tool to generate barrels with ease, efficiency, and intelligence

JS-Barrels A CLI tool to generate barrels with ease, efficiency, and intelligence Usage npx js-barrels -d ./folder/to/generate/barrels/for Options -d,

Snehil K 6 Aug 17, 2022
Offer a translation system to your users! a plugin capable of translating your website, simply and efficiently!

TranslateForMe Offer a translation system to your users, a plugin capable of translating your website, simply and efficiently! View Demo Β· Report Bug

Eduardo Castro 3 Jan 12, 2022
This is just a script I put together to check and notify me via email (MailGun) when there's an earlier date before my initial appointment date. It doesn't handle rescheduling.

US-visa-appointment-notifier This is just a script I put together to check and notify me via email (MailGun) when there's an earlier date before my in

Theophilus Omoregbee 13 Jan 4, 2023
This plugin for Obsidian adds commands for increasing/decreasing the blockquote level of the current line or selection(s).

Blockquote Levels This plugin for Obsidian adds commands for increasing/decreasing the blockquote level of the current line or selection(s). Usage The

Carlo Zottmann 15 Dec 19, 2022
A tool for increasing the off-by-one bug in ordinal explorers

Breaker of jpegs A tool for increasing the off-by-one bug in ordinal explorers How to break inscription numbers On 2023-05-04 I introduced an off-by-o

null 63 Aug 9, 2023