GithubHelp home page GithubHelp logo

abclinc's Introduction

ABClinic Project

There are various challenges that come with soring patients' data using the traditional file system method, some of which include the tedious process of retrieving patient records, and also risk of massive data loss in case of natural calamities like fire. To help solve this, we created a web application, ABClinic, that helps store patient records in a database, and retrieve the records in just a few clicks. This ensures safety of patient information (including previous and future visits, and their health records).

The project was created using React JS, a JavaScript library for creating front-end applications, and Flask, a minimalist Python framework for creating back-end applications.

How to get started

To contribute or have a local copy of this project in your development environment, follow the steps below:

  1. Fork this project to create your own copy in your own GitHub Account

  2. Clone the forked project using git clone [email protected]:your-username/ABClinc.git

  3. Navigate to the project's directory using your terminal or file explorer.

  4. Run pipenv install && pipenv shell at the root of the project directory to install the necessary libraries.

  5. Navigate into the server directory using cd server/

  6. Run flask db upgrade run the migrations and create the models and run python seed.py to insert some dummy data into the database.

  7. Create environment variables using the following commands:

export FLASK_APP=app.py
export FLASK_RUN_PORT=5555

This will have your Flask app running on port 5555

API Endpoints Available

  1. In a separate terminal, navigate into the client directory using the command cd client.
  2. Install the NPM packages using npm install
  3. Start the React server using the command npm start and this will start the application on localhost:3000

1. Patients

This is the endpoint for retrieving and adding patient details

GET /patients

Responses

{
  "first_name": string,
  "last_name": string,
  "gender": string,
  "age": integer,
  "phone_number": integer,
  "national_id": integer
}

Status Codes

Status Code Description
200 SUCCESSFUL
POST /patients
Parameter Type Description
first_name string Required. A patient's first name
last_name string Required, A patient's last name
gender string Required. A patient's gender
age integer Required. A patient's age
phone_number integer Required, A patient's phone number
national_id integer Required, A patient's national ID number

Responses

{
  "first_name": string,
  "last_name": string,
  "gender": string,
  "age": integer,
  "phone_number": integer,
  "national_id": integer
}

Status Codes

Status Code Description
201 CREATED

2. Patients By ID

This is the endpoint for retrieving, updating and deleting a particular patient's details.

GET /patients/PATIENT_ID

Responses

{
  "first_name": string,
  "last_name": string,
  "gender": string,
  "age": integer,
  "phone_number": integer,
  "national_id": integer
}

Status codes

Status Code Description
200 SUCCESSFUL
PATCH /patients/PATIENT_ID
Parameter Type Description
attribute attribute type Required. An attribute whose values are being updated

Responses

{
  "first_name": string,
  "last_name": string,
  "gender": string,
  "age": integer,
  "phone_number": integer,
  "national_id": integer
}

Status codes

Status Code Description
200 SUCCESSFUL
DELETE /patients/PATIENT_ID

Parameters

  • None

Responses

{
  "message": "patient deleted successfully"
}

Status codes

Status Code Description
200 SUCCESSFUL

2. Appointments

This is an endpoint for retrieving, updating and deleting appointments.

GET /appointments

Parameters

  • None

Responses

{
  "first_name": string,
  "last_name": string,
  "gender": string,
  "age": integer,
  "phone_number": integer,
  "national_id": integer
}

3. Appointments by ID

This is the endpoint for retrieving, updating, and deleting a specific appointment.

GET /appointments/APPOINTMENT_ID

Responses

{
  "date": string,
  "time": string,
  "status": string,
  "patient_id": integer,
  "patient_visit_id": integer
}

Status codes

Status Code Description
200 SUCCESSFUL
PATCH /patients/PATIENT_ID
Parameter Type Description
attribute attribute type Required. An attribute whose values are being updated

Responses

{
  "date": string,
  "time": string,
  "status": string,
  "patient_id": integer,
  "patient_visit_id": integer
}

Status codes

Status Code Description
200 SUCCESSFUL
DELETE /appointments/APPOINTMENT_ID

Parameters

  • None

Responses

{
  "message": "appointment deleted successfully"
}
  1. Open Postman or ThunderClient (VS Code extension) to try out the endpoints which include:
  • /patients
  • /patients/<int:id>
  • /appointments
  • /appointmments/<int:id>

Contributors

  1. Mercy Muriithi
  2. Joel Nyongesa
  3. Medrine Mulindi

Models

abclinc's People

Contributors

joelnyongesa avatar mercy2525 avatar mulindi123 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.