Giter Site home page Giter Site logo

fleshka4 / hospital-spring-project Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 51 KB

Implements automation of the hospital reception department through Java Spring Framework

Java 72.55% HTML 27.45%
html java postgresql spring spring-boot spring-data-jpa spring-security spring-security-jwt sql

hospital-spring-project's Introduction

Reception department of hospital

Introduction

This application implements this database scheme which represents the main idea of reception department of hospital. Patients are admitted to the hospital. They are examined, diagnosed and put in the ward for treatment

image

For convenience, the rest api and GUI are implemented in this project

REST API

Info

All get requests except /api/users/ and /api/roles are permitted to all. Get /api/users can user with role USER or ADMIN. Get /api/roles can user with role ADMIN. Post /api/roles can user with role ADMIN

Authorisation

POST-request /api/login to login and take jwt token. You should provide json like this:

{
	"username" : "admin",
  	"password" : "admin",
  	"role" : "admin"
}

Diagnosis

  • Get all diagnoses /api/diagnoses (GET-request)
  • Get diagnosis by id /api/diagnoses/{id} where id is your provided id (here and next use GET-request without curly braces)
  • Get diagnoses in ward /api/diagnoses/ward/{id} where id is ID of ward (GET-request)
  • Create diagnosis /api/diagnoses/add (POST-request). You should provide json:
{
	"name" : "diagnosis_name"
}
  • Create diagnosis /api/diagnoses/addwith?name=name_diagnosis (POST-request). name_diagnosis is your diagnosis name
  • Delete diagnosis by id /api/diagnoses/{id} (DELETE-request)

Ward

  • Get all wards /api/wards (GET-request)
  • Get ward by id /api/wards/{id} (GET-request)
  • Get wards with diagnosis /api/wards/diagnosis/{id} where id is ID of diagnosis (GET-request)
  • Get wards by max count greater than /api/wards/greater/{number} (GET-request)
  • Create ward /api/wards/add (POST-request). You should provide json:
{
	"name" : "ward_name",
	"maxCount" : "number"
}
  • Create ward /api/wards/addwith?name=name_ward&maxcount=number (POST-request). name_diagnosis is your ward name, number is your max count
  • Delete ward by id /api/wards/{id} (DELETE-request)

Person

  • Get all people /api/people (GET-request)
  • Get person by id /api/people/{id} (GET-request)
  • Get people by lastname /api/people/lastname/{lastname} (GET-request)
  • Get people by full name /api/people/search?firstname=your_firstname&lastname= your_lastname&middlename=your_middlename (GET-request)
  • Get number of people with diagnosis /api/people/numberwithdiagnosis/{id} by diagnosis id (GET-request)
  • Get number of people in ward /api/people/numberinward/{id} by ward id (GET-request)
  • Create person /api/people/add (POST-request). You should provide json:
{
	"firstName" : "firstName",
	"lastName" : "lastName",
	"middleName" : "middleName",
	"diagnosisId" : "diagnosisId",
	"wardId" : "wardId"
}
  • Create person /api/people/addwith?irstname=your_firstname&lastname= your_lastname&middlename=your_middlename (POST-request)
  • Update diagnosis by person id /api/people/{id}/diagnosis/{diagnosisId} (PATCH-request)
  • Update ward by person id /api/people/{id}/ward/{wardId} (PATCH-request)
  • Delete person by id /api/people/{id} (DELETE-request)

User

  • Get all users /api/users (GET-request)
  • Create user /api/users/add (POST-request). You should provide json:
{
	"username" : "username",
  	"password" : "password",
  	"role" : "role"
}

UserRole

  • Get all roles /api/roles (GET-request)
  • Create role /api/roles/add (POST-request). You should provide json:
{
  	"role" : "role"
}

GUI

Home page

home

Login page

login_page

People

people

Diagnoses

diagnoses

Wards

wards

Users

users

Add new person

new_person

Delete person

delete_person

Add new diagnosis

new_diagnosis

Add new ward

new_ward

hospital-spring-project's People

Contributors

fleshka4 avatar alekseimaslakov avatar dependabot[bot] 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.