We need to add the management of facilities (EHPAD) in our API REST to store and manage specific information for each facility. This will help distinguish between different entities and facilitate the management of patients and healthcare professionals within each facility.
Tasks to be completed
[x] Create the company data model
Attributes
id : Unique identifier for the facility
name : Name of the facility
address (Object)
contact (Object)
siret_number: SIRET number of the company
approval_number Approval number (if applicable)
[x] Create REST Endpoints for Company
[x] POST /companies : Create a new company
[x] GET /companies : Retrieve a list of all company
[x] GET /companies/{id} : Retrieve details of a specific company
[x] PUT /companies/{id}
[x] DELETE /companies/{id}
[x] Validation and data security
Implement validation to ensure required data is present and properly formatted
Secure the endpoints, to ensure only authorized users can create, update, or delete companies
[x] Unit and Integration Testing
Create tests to verify the correct functionality of each endpoint.
Ensure validations work correctly and errors are handled appropriately.
Acceptance Criteria:
The Company model is properly integrated and documented.
All REST endpoints function as expected and pass unit and integration tests.
We need to add the management of facilities (EHPAD) in our API REST to store and manage specific information for each facility. This will help distinguish between different entities and facilitate the management of patients and healthcare professionals within each facility.
Tasks to be completed
[x] Create the
company
data modelid
: Unique identifier for the facilityname
: Name of the facilityaddress
(Object)contact
(Object)siret_number
: SIRET number of the companyapproval_number
Approval number (if applicable)[x] Create REST Endpoints for
Company
POST /companies
: Create a new companyGET /companies
: Retrieve a list of all companyGET /companies/{id}
: Retrieve details of a specific companyPUT /companies/{id}
DELETE /companies/{id}
[x] Validation and data security
[x] Unit and Integration Testing
Acceptance Criteria:
Company
model is properly integrated and documented.