We are going to build another hospital. This time we are going to work only on api's
Hospital - Way to access everything.
Patients - Holding patient information
Staff - Holding staff information.
Jobs - Current patients staff are attending, and their notes
Status - Holds the information on the patients status (released, waiting etc.)
Department - Holds information about different departments.
** All requests are get requests **
- /API/All
Returns everything. Each department, what staffmember is in that department, what patients are in it, the status of the
patients etc.
- /API/{id}
Returns everything with that id. (Patient, Staff, Job, Status, Departmnet etc.)
- /API/Patient/All
Returns a list of all the patients and their statuses.
- /API/Patient/{id}
Returns a select patient and their statuses.
- /API/Staff/All
Returns all information about all the staff.
- /API/Staff/{id}
Returns information about a specific staff member.
- /API/Department/All
Returns all information about all departments.
- /API/Department/{id}
Returns information about a specific department.
- /API/Jobs/All
Returns all informationa about all jobs
- /API/Jobs/{id}
Returns information about a specific job
- /API/Status/All
Returns all statuses
- /API/Status/{id}
Returns information about a specific status.
- /API/All
Returns all patients
- /API/{id}
Returns a specific patient
- /API/All
Returns all staff
- /API/{id}
Returns specific staff member.
- /API/All
Returns all departments.
- /API/{id}
Returns specific department.
- /API/All
Returns all jobs.
- /API/{id}
Returns specific job.
- /API/All
Returns all statuses.
- /API/{id}
Returns specific status.
CREATE TABLE patient (
id INT PRIMARY KEY AUTO_INCREMENT NOT NULL,
name VARCHAR(100),
address VARCHAR(250),
dob VARCHAR(10),
bloodType VARCHAR(3)
);
CREATE TABLE staff (
id INT PRIMARY KEY AUTO_INCREMENT NOT NULL,
name VARCHAR(100),
address VARCHAR(250),
dob VARCHAR(10),
date_started VARCHAR(10),
bloodType VARCHAR(3),
role VARCHAR(20)
);
CREATE TABLE department (
id INT PRIMARY KEY AUTO_INCREMENT NOT NULL,
name VARCHAR(100),
capacity INT,
status VARCHAR(6)
);
CREATE TABLE department_patient_link (
id INT PRIMARY KEY AUTO_INCREMENT NOT NULL,
departmentID INT,
patientID INT
);
CREATE TABLE job (
id INT PRIMARY KEY AUTO_INCREMENT NOT NULL,
staffID INT,
patientID INT,
description VARCHAR(500)
);
CREATE TABLE status (
id INT PRIMARY KEY AUTO_INCREMENT NOT NULL,
patientID INT,
status VARCHAR(100)
);
[
{
"id": 1,
"name" : "Emergency",
"capcity": 200,
"patientList": [1, 4, 6]
},
{
"id": 2,
"name": "Waiting",
"capcity": 100,
"patientList": [2, 3, 5]
}
]
{
"Search": 1,
"Department":
[
{
"id": 1,
"name" : "Emergency",
"capcity": 200,
"patientList": [1, 4, 6]
}
],
"Staff":
[
{
"id": 1,
"name": "some name",
"blah": "blah"
}
],
"Patient":
[
{
"id": 1,
"blah": "blah"
}
],
"Status":
[
{
"id": 1,
"blah": "blah"
}
],
"Job":
[
{
"id": 1,
"blah": "blah"
}
]
}
[
{
"id": 1,
"name": "Frank walker",
"address": "some address",
"dob": "01-01-0001",
"bloodType": "AB+",
"status": "waiting"
}
]
Everyone must use eureka from the beginning and everyone must use feign. If you don't know how to do either of those I will help you.
You must also use one of the databases. The same table will be on both, so there is no bottle necks.
If you dont have permission to the table, contact me and ill add you.
All API points must be as described as they will be tested.