EphraimDev / hospital-checkout

This is used to calculate the amount a patient is due to pay when checking out of the hospital

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hospitality-checkout

This is used to check in and checkout customers

Installation Guide

  1. For linux run cp .env.example .env
  2. For windows run copy .env.example .env
  • Install dependencies * npm i*
  • Fill your database config in your .env. Please make use of mysql or postgres

Migrations

  • Run migrations using npm run migration

Seeding

  • Run seeder using npm run seed

Build project

  • Run npm run build

Start project

  • Run npm start

Documentation

Endpoints

Description Route Method Body Params Query Added Info
Staff Login /api/v1/staff/login POST email, password
Add Staff /api/v1/staff/create POST email, first_name, last_name, phone_number
Check In Customer /api/v1/reservations POST email, first_name, last_name, phone_number, room_type, room_number, checkout_time, amount_paid
All reservations /api/v1/reservations GET status, checking_time, checkout_time, room_type, room_number status should be running or checkedout
Single reservation /api/v1/reservations/:id GET id reservation id
Checkout reservation /api/v1/reservations/:id/checkout GET id reservation id
Pay overstay fee /api/v1/reservations/:id/pay POST overstay_fee id reservation id

Super Staff

Stack used

  • Nodejs
  • Typescript
  • Mysql/Postgresql

About

This is used to calculate the amount a patient is due to pay when checking out of the hospital


Languages

Language:TypeScript 86.5%Language:JavaScript 13.2%Language:Shell 0.3%