Git Product home page Git Product logo

clinic-booking's Introduction

Clinic Booking REST API using Gin and Gorm

This is the code submission for Assessment #1 using Golang, GinGonic and GORM.

How to use:

$ go run .
ENDPOINT Requirement Access
POST("/public/signup") Takes name, email, password, role with unique email constraints and regex for admins and doctors N/A
POST("/public/login") Takes email, password, role and returns JWT Token. N/A
GET("/doctors") Returns list of all doctors in system All, but patients and doctors can only see name and email, while admins can see everything else
GET("/doctors/:id") Returns record of requested doctor All, but patients and doctors can only see name and email, while admins can see everything else
GET("/doctors/:id/schedule") Returns list of appointments along with associated patient All, but patients cannot see any patient info
POST("/doctors/:id/schedule") Book an appointment with a requested doctor, takes a given startTime and endTime Patients only
POST("/doctors/:id/slots") Takes a given day (UTC), returns string array of availabilities in a day for a requested doctor All, no restrictions
PATCH("/doctors/:id") Not required (part of CRUD) N/A
DELETE("/doctors/:id" ) Not required (part of CRUD) Admins only
POST("/doctors/most/count") Takes a given day (UTC), returns sorted list of doctors with most appointments Admins only
POST("/doctors/most/hours") Takes a given day (UTC), returns sorted list of doctors with 6+ hours Admins only
POST("/doctors/slots/all") Takes a given day (UTC), returns slots of all doctors on that day Admins and patients only
GET("/patients") Returns list of all patients in system Admins only
GET("/patients/:id") Returns record of requested patient in system Admins only
GET("/patients/:id/history") Returns list of PAST appointments for a requested patient All admins and doctors, and only the patient who owns the history
PATCH("/patients/:id") Not required (part of CRUD) N/A
DELETE("/patients/:id Not required (part of CRUD) Admins only
GET("/appointments/:id") Returns record of requested appointment All admins and only the doctor and only the patient who's booked
DELETE("/appointments/:id") Deletes record of requested appointment All admins and only the doctor who's booked for the appointment

End of api endpoints

clinic-booking's People

Contributors

rawansuww avatar rahmanfadhil avatar unicornlab-shehanaza avatar monkrus 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.