diff --git a/README.md b/README.md index 4037d2edf..55d09727a 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ _This project is still in early stages. For a more mature user interface of Open This project is based on React. To learn React, check out the [React documentation](https://reactjs.org/). To install the project dependencies, issue: - - npm i + npm i **It has to be done before any of the following activities** @@ -29,29 +29,32 @@ Examples: - you want to develop using real api instead of mocked: use this `.env.local` file - ``` - # .env.local - REACT_APP_USE_MOCK_API= - ``` +``` + # .env.local + REACT_APP_USE_MOCK_API= +``` - - then: `npm start` +then `npm start` - you want to connect your local dev environment to docker api: - ``` - # .env.local - REACT_APP_USE_MOCK_API= - REACT_APP_BASE_PATH=http://localhost:8080/oh-api - ``` - - then: `docker-compose up && npm start` + +``` + # .env.local + REACT_APP_USE_MOCK_API= + REACT_APP_BASE_PATH=http://localhost:8080/oh-api +``` + +then `docker-compose up database backend && npm start` ## Run local development environment - - npm start + npm start ## Run full stack environment locally You can run a full OH2 stack locally using [Docker](https://www.docker.com/) (required) using this command: -( - docker-compose up + + docker-compose up Then you can access to: @@ -61,7 +64,7 @@ Then you can access to: ## How to publish on Web Server - - npm run build:staging + npm run build:staging Then connect to the Intesys VPN and open FileZilla. @@ -82,39 +85,39 @@ Once you are logged in, go under /home/httpd/open-hospital/shared/public and rep Easy step: - - git push intesys-remote develop + git push intesys-remote develop Old method: - - npm run build:gh-pages - - git commit + npm run build:gh-pages + git commit - then +then - - git subtree push --prefix build intesys-oh gh-pages + git subtree push --prefix build intesys-oh gh-pages - or +or - - git subtree split --prefix build develop - - git push intesys-oh GIT_ID:gh-pages --force + git subtree split --prefix build develop + git push intesys-oh GIT_ID:gh-pages --force ## How to launch the application You can run a development build of the application by issuing: - - npm start + npm start ## How to run unit tests To run unit tests, issue: - - npm test + npm test ## How to launch the e2e tests Run: - - npm run e2e + npm run e2e it launches application in development mode and starts cypress, in a single process. @@ -123,10 +126,10 @@ it launches application in development mode and starts cypress, in a single proc If you want more control over **Cypress e2e tests**, use two different processes: one for serving the app (**process #1**) and one for running the Cypress Test Runner (**process #2**). You can launch it by issuing the following commands in two different intances of your terminal: //process #1 - - npm start + npm start //process #2 - - npm run cypress:open + npm run cypress:open Once the app is compiled and served, and the Cypress Test Runner is launched, click on _Run all specs_ diff --git a/api/oh.yaml b/api/oh.yaml index 74b59e8c1..dced99431 100644 --- a/api/oh.yaml +++ b/api/oh.yaml @@ -1,25 +1,25 @@ openapi: 3.0.1 info: - title: OH 2.0 Api Documentation - description: OH 2.0 Api Documentation + title: Open Hospital API Documentation + description: Open Hospital API Documentation contact: name: ApiInfo.DEFAULT_CONTACT license: - name: Apache 2.0 - url: https://www.apache.org/licenses/LICENSE-2.0 - version: '1.0' + name: GPL-3.0 license + url: https://github.com/informatici/openhospital-api?tab=GPL-3.0-1-ov-file#readme + version: 0.1.0 servers: - - url: http://localhost:8080 +- url: http://localhost:8080 security: - - bearerAuth: [] +- bearerAuth: [] paths: /wards: get: tags: - - Wards + - Wards operationId: getWards responses: - '200': + "200": description: OK content: application/json: @@ -28,10 +28,10 @@ paths: items: $ref: '#/components/schemas/WardDTO' security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Wards + - Wards operationId: updateWard requestBody: content: @@ -40,17 +40,17 @@ paths: $ref: '#/components/schemas/WardDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/WardDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Wards + - Wards operationId: newWard requestBody: content: @@ -59,26 +59,26 @@ paths: $ref: '#/components/schemas/WardDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/WardDTO' security: - - bearerAuth: [] + - bearerAuth: [] /visits/{visitID}: put: tags: - - Visit + - Visit operationId: updateVisit parameters: - - name: visitID - in: path - required: true - schema: - type: integer - format: int32 + - name: visitID + in: path + required: true + schema: + type: integer + format: int32 requestBody: content: application/json: @@ -86,21 +86,21 @@ paths: $ref: '#/components/schemas/VisitDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/VisitDTO' security: - - bearerAuth: [] + - bearerAuth: [] /vaccinetypes: get: tags: - - Vaccine Type + - Vaccine Type operationId: getVaccineType responses: - '200': + "200": description: OK content: application/json: @@ -109,10 +109,10 @@ paths: items: $ref: '#/components/schemas/VaccineTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Vaccine Type + - Vaccine Type operationId: updateVaccineType requestBody: content: @@ -121,17 +121,17 @@ paths: $ref: '#/components/schemas/VaccineTypeDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/VaccineTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Vaccine Type + - Vaccine Type operationId: newVaccineType requestBody: content: @@ -140,21 +140,21 @@ paths: $ref: '#/components/schemas/VaccineTypeDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/VaccineTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] /vaccines: get: tags: - - Vaccines + - Vaccines operationId: getVaccines responses: - '200': + "200": description: OK content: application/json: @@ -163,10 +163,10 @@ paths: items: $ref: '#/components/schemas/VaccineDTO' security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Vaccines + - Vaccines operationId: updateVaccine requestBody: content: @@ -175,17 +175,17 @@ paths: $ref: '#/components/schemas/VaccineDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/VaccineDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Vaccines + - Vaccines operationId: newVaccine requestBody: content: @@ -194,187 +194,180 @@ paths: $ref: '#/components/schemas/VaccineDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/VaccineDTO' security: - - bearerAuth: [] - /users: - get: - tags: - - Users - operationId: getUser - parameters: - - name: group_id - in: query - required: false - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/UserDTO' - security: - - bearerAuth: [] + - bearerAuth: [] + /usersettings/{id}: put: tags: - - Users - operationId: updateUser + - User Settings + operationId: updateUserSettings parameters: - - name: password - in: query - required: false - schema: - type: boolean - default: false + - name: id + in: path + required: true + schema: + type: integer + format: int32 requestBody: content: application/json: schema: - $ref: '#/components/schemas/UserDTO' + $ref: '#/components/schemas/UserSettingDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: - type: boolean + $ref: '#/components/schemas/UserSettingDTO' security: - - bearerAuth: [] - post: + - bearerAuth: [] + delete: tags: - - Users - operationId: newUser - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UserDTO' + - User Settings + operationId: deleteUserSetting + parameters: + - name: id + in: path required: true + schema: + type: integer + format: int32 responses: - '200': - description: OK - content: - application/json: - schema: - type: boolean + "204": + description: No Content security: - - bearerAuth: [] - /users/settings/{id}: + - bearerAuth: [] + /users/{username}: get: tags: - - Users - operationId: getUserSettingById + - Users + operationId: getUserByName parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int32 + - name: username + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/UserSettingDTO' + $ref: '#/components/schemas/UserDTO' security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Users - operationId: updateUserSettings + - Users + operationId: updateUser parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int32 + - name: username + in: path + required: true + schema: + type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/UserSettingDTO' + $ref: '#/components/schemas/UserDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/UserSettingDTO' + $ref: '#/components/schemas/UserDTO' security: - - bearerAuth: [] + - bearerAuth: [] delete: tags: - - Users - operationId: deleteUserSetting + - Users + operationId: deleteUser parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int32 + - name: username + in: path + required: true + schema: + type: string responses: - '200': - description: OK - content: - application/json: - schema: - type: boolean + "204": + description: No Content security: - - bearerAuth: [] - /users/groups: + - bearerAuth: [] + /users/me: get: tags: - - Users - operationId: getUserGroup + - Users + operationId: retrieveProfileByCurrentLoggedInUser responses: - '200': + "200": description: OK content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/UserGroupDTO' + $ref: '#/components/schemas/UserProfileDTO' security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Users - operationId: updateUserGroup + - Users + operationId: updateProfile requestBody: content: application/json: schema: - $ref: '#/components/schemas/UserGroupDTO' + $ref: '#/components/schemas/UserDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: - type: boolean + $ref: '#/components/schemas/UserProfileDTO' security: - - bearerAuth: [] - post: + - bearerAuth: [] + /usergroups/{group_code}: + get: tags: - - Users - operationId: newUserGroup + - User Groups + operationId: getUserGroup + parameters: + - name: group_code + in: path + required: true + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/UserGroupDTO' + security: + - bearerAuth: [] + put: + tags: + - User Groups + operationId: updateUserGroup + parameters: + - name: group_code + in: path + required: true + schema: + type: string requestBody: content: application/json: @@ -382,28 +375,43 @@ paths: $ref: '#/components/schemas/UserGroupDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: - type: boolean + $ref: '#/components/schemas/UserGroupDTO' + security: + - bearerAuth: [] + delete: + tags: + - User Groups + operationId: deleteGroup + parameters: + - name: group_code + in: path + required: true + schema: + type: string + responses: + "204": + description: No Content security: - - bearerAuth: [] + - bearerAuth: [] /suppliers: get: tags: - - Suppliers + - Suppliers operationId: getSuppliers parameters: - - name: exclude_deleted - in: query - required: false - schema: - type: boolean - default: true + - name: exclude_deleted + in: query + required: false + schema: + type: boolean + default: true responses: - '200': + "200": description: OK content: application/json: @@ -412,10 +420,10 @@ paths: items: $ref: '#/components/schemas/SupplierDTO' security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Suppliers + - Suppliers operationId: updateSupplier requestBody: content: @@ -424,17 +432,17 @@ paths: $ref: '#/components/schemas/SupplierDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/SupplierDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Suppliers + - Suppliers operationId: saveSupplier requestBody: content: @@ -443,26 +451,26 @@ paths: $ref: '#/components/schemas/SupplierDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/SupplierDTO' security: - - bearerAuth: [] + - bearerAuth: [] /pricesothers/{id}: put: tags: - - Others Price + - Others Price operationId: updatePricesOthers parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int32 + - name: id + in: path + required: true + schema: + type: integer + format: int32 requestBody: content: application/json: @@ -470,46 +478,46 @@ paths: $ref: '#/components/schemas/PricesOthersDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/PricesOthersDTO' security: - - bearerAuth: [] + - bearerAuth: [] delete: tags: - - Others Price + - Others Price operationId: deletePricesOthers parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int32 + - name: id + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /pricelists/{id}: put: tags: - - Price Lists + - Price Lists operationId: updatePriceLists parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int32 + - name: id + in: path + required: true + schema: + type: integer + format: int32 requestBody: content: application/json: @@ -517,45 +525,45 @@ paths: $ref: '#/components/schemas/PriceListDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/PriceListDTO' security: - - bearerAuth: [] + - bearerAuth: [] delete: tags: - - Price Lists + - Price Lists operationId: deletePriceList parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int32 + - name: id + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /pregnanttreatmenttypes/{code}: put: tags: - - Pregnant Treatment Types + - Pregnant Treatment Types operationId: updatePregnantTreatmentTypes parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string requestBody: content: application/json: @@ -563,112 +571,45 @@ paths: $ref: '#/components/schemas/PregnantTreatmentTypeDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/PregnantTreatmentTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] delete: tags: - - Pregnant Treatment Types + - Pregnant Treatment Types operationId: deletePregnantTreatmentType parameters: - - name: code - in: path - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - type: boolean - security: - - bearerAuth: [] - /permissions/{id}: - get: - tags: - - Permissions - operationId: retrievePermissionById - parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int32 - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/PermissionDTO' - security: - - bearerAuth: [] - put: - tags: - - Permissions - operationId: updatePermission - parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int32 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PermissionDTO' + - name: code + in: path required: true + schema: + type: string responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/PermissionDTO' - security: - - bearerAuth: [] - delete: - tags: - - Permissions - operationId: deletePermission - parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int32 - responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /patientvaccines/{code}: put: tags: - - Patient Vaccines + - Patient Vaccines operationId: updatePatientVaccinet parameters: - - name: code - in: path - required: true - schema: - type: integer - format: int32 + - name: code + in: path + required: true + schema: + type: integer + format: int32 requestBody: content: application/json: @@ -676,66 +617,66 @@ paths: $ref: '#/components/schemas/PatientVaccineDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/PatientVaccineDTO' security: - - bearerAuth: [] + - bearerAuth: [] delete: tags: - - Patient Vaccines + - Patient Vaccines operationId: deletePatientVaccine parameters: - - name: code - in: path - required: true - schema: - type: integer - format: int32 + - name: code + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /patients/{code}: get: tags: - - Patients + - Patients operationId: getPatient parameters: - - name: code - in: path - required: true - schema: - type: integer - format: int32 + - name: code + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/PatientDTO' security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Patients + - Patients operationId: updatePatient parameters: - - name: code - in: path - required: true - schema: - type: integer - format: int32 + - name: code + in: path + required: true + schema: + type: integer + format: int32 requestBody: content: application/json: @@ -743,66 +684,66 @@ paths: $ref: '#/components/schemas/PatientDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/PatientDTO' security: - - bearerAuth: [] + - bearerAuth: [] delete: tags: - - Patients + - Patients operationId: deletePatient parameters: - - name: code - in: path - required: true - schema: - type: integer - format: int32 + - name: code + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /patientconsensus/{patientId}: get: tags: - - Patient Consensus + - Patient Consensus operationId: getPatientConsensus parameters: - - name: patientId - in: path - required: true - schema: - type: integer - format: int32 + - name: patientId + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/PatientConsensusDTO' security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Patient Consensus + - Patient Consensus operationId: updatePatientConsensus parameters: - - name: patientId - in: path - required: true - schema: - type: integer - format: int32 + - name: patientId + in: path + required: true + schema: + type: integer + format: int32 requestBody: content: application/json: @@ -810,25 +751,25 @@ paths: $ref: '#/components/schemas/PatientConsensusDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/PatientConsensusDTO' security: - - bearerAuth: [] + - bearerAuth: [] /operationtypes/{code}: put: tags: - - Operations Types + - Operations Types operationId: updateOperationTypes parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string requestBody: content: application/json: @@ -836,63 +777,63 @@ paths: $ref: '#/components/schemas/OperationTypeDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/OperationTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] delete: tags: - - Operations Types + - Operations Types operationId: deleteOperationType parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /operations/{code}: get: tags: - - Operations + - Operations operationId: getOperationByCode parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/OperationDTO' security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Operations + - Operations operationId: updateOperation parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string requestBody: content: application/json: @@ -900,37 +841,37 @@ paths: $ref: '#/components/schemas/OperationDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/OperationDTO' security: - - bearerAuth: [] + - bearerAuth: [] delete: tags: - - Operations + - Operations operationId: deleteOperation parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /operations/rows: put: tags: - - Operations + - Operations operationId: updateOperationRow requestBody: content: @@ -939,7 +880,7 @@ paths: $ref: '#/components/schemas/OperationRowDTO' required: true responses: - '200': + "200": description: OK content: application/json: @@ -947,10 +888,10 @@ paths: type: integer format: int32 security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Operations + - Operations operationId: newOperationRow requestBody: content: @@ -959,26 +900,26 @@ paths: $ref: '#/components/schemas/OperationRowDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/OperationRowDTO' security: - - bearerAuth: [] + - bearerAuth: [] /opds/{code}: put: tags: - - Opds + - Opds operationId: updateOpd parameters: - - name: code - in: path - required: true - schema: - type: integer - format: int32 + - name: code + in: path + required: true + schema: + type: integer + format: int32 requestBody: content: application/json: @@ -986,46 +927,46 @@ paths: $ref: '#/components/schemas/OpdDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/OpdDTO' security: - - bearerAuth: [] + - bearerAuth: [] delete: tags: - - Opds + - Opds operationId: deleteOpd parameters: - - name: code - in: path - required: true - schema: - type: integer - format: int32 + - name: code + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /opds/rows/{code}: put: tags: - - Opds + - Opds operationId: updateOpdWithOperationRow parameters: - - name: code - in: path - required: true - schema: - type: integer - format: int32 + - name: code + in: path + required: true + schema: + type: integer + format: int32 requestBody: content: application/json: @@ -1033,21 +974,21 @@ paths: $ref: '#/components/schemas/OpdWithOperationRowDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/OpdWithOperationRowDTO' security: - - bearerAuth: [] + - bearerAuth: [] /medstockmovementtypes: get: tags: - - Medical Stock Movement Type + - Medical Stock Movement Type operationId: getMedicalDsrStockMovementType responses: - '200': + "200": description: OK content: application/json: @@ -1056,10 +997,10 @@ paths: items: $ref: '#/components/schemas/MovementTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Medical Stock Movement Type + - Medical Stock Movement Type operationId: updateMedicalDsrStockMovementType requestBody: content: @@ -1068,17 +1009,17 @@ paths: $ref: '#/components/schemas/MovementTypeDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/MovementTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Medical Stock Movement Type + - Medical Stock Movement Type operationId: newMedicalDsrStockMovementType requestBody: content: @@ -1087,21 +1028,21 @@ paths: $ref: '#/components/schemas/MovementTypeDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/MovementTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] /medicaltypes: get: tags: - - Medical Types + - Medical Types operationId: getMedicalTypes responses: - '200': + "200": description: OK content: application/json: @@ -1110,10 +1051,10 @@ paths: items: $ref: '#/components/schemas/MedicalTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Medical Types + - Medical Types operationId: updateMedicalType requestBody: content: @@ -1122,17 +1063,17 @@ paths: $ref: '#/components/schemas/MedicalTypeDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/MedicalTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Medical Types + - Medical Types operationId: createMedicalType requestBody: content: @@ -1141,31 +1082,31 @@ paths: $ref: '#/components/schemas/MedicalTypeDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/MedicalTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] /medicals: get: tags: - - Medicals + - Medicals operationId: getMedicals parameters: - - name: sort_by - in: query - required: false - schema: - type: string - enum: - - NONE - - CODE - - NAME + - name: sort_by + in: query + required: false + schema: + type: string + enum: + - NONE + - CODE + - NAME responses: - '200': + "200": description: OK content: application/json: @@ -1174,18 +1115,18 @@ paths: items: $ref: '#/components/schemas/MedicalDTO' security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Medicals + - Medicals operationId: updateMedical parameters: - - name: ignore_similar - in: query - required: false - schema: - type: boolean - default: false + - name: ignore_similar + in: query + required: false + schema: + type: boolean + default: false requestBody: content: application/json: @@ -1193,25 +1134,25 @@ paths: $ref: '#/components/schemas/MedicalDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/MedicalDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Medicals + - Medicals operationId: newMedical parameters: - - name: ignore_similar - in: query - required: false - schema: - type: boolean - default: false + - name: ignore_similar + in: query + required: false + schema: + type: boolean + default: false requestBody: content: application/json: @@ -1219,18 +1160,18 @@ paths: $ref: '#/components/schemas/MedicalDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/MedicalDTO' security: - - bearerAuth: [] + - bearerAuth: [] /malnutritions: put: tags: - - Malnutritions + - Malnutritions operationId: updateMalnutrition requestBody: content: @@ -1239,17 +1180,17 @@ paths: $ref: '#/components/schemas/MalnutritionDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/MalnutritionDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Malnutritions + - Malnutritions operationId: newMalnutrition requestBody: content: @@ -1258,66 +1199,66 @@ paths: $ref: '#/components/schemas/MalnutritionDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/MalnutritionDTO' security: - - bearerAuth: [] + - bearerAuth: [] delete: tags: - - Malnutritions + - Malnutritions operationId: deleteMalnutrition parameters: - - name: code - in: query - required: true - schema: - type: integer - format: int32 + - name: code + in: query + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /laboratories/{code}: get: tags: - - Laboratories + - Laboratories operationId: getExamById parameters: - - name: code - in: path - required: true - schema: - type: integer - format: int32 + - name: code + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/LaboratoryDTO' security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Laboratories + - Laboratories operationId: updateLaboratory parameters: - - name: code - in: path - required: true - schema: - type: integer - format: int32 + - name: code + in: path + required: true + schema: + type: integer + format: int32 requestBody: content: application/json: @@ -1325,91 +1266,91 @@ paths: $ref: '#/components/schemas/LabWithRowsDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] delete: tags: - - Laboratories + - Laboratories operationId: deleteExam parameters: - - name: code - in: path - required: true - schema: - type: integer - format: int32 + - name: code + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /laboratories/examRequest/{code}: put: tags: - - Laboratories + - Laboratories operationId: updateExamRequest parameters: - - name: code - in: path - required: true - schema: - type: integer - format: int32 - - name: status - in: query - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: integer + format: int32 + - name: status + in: query + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] delete: tags: - - Laboratories + - Laboratories operationId: deleteExamRequest parameters: - - name: code - in: path - required: true - schema: - type: integer - format: int32 + - name: code + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /hospitals/{code}: put: tags: - - Hospitals + - Hospitals operationId: updateHospital parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string requestBody: content: application/json: @@ -1417,25 +1358,25 @@ paths: $ref: '#/components/schemas/HospitalDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/HospitalDTO' security: - - bearerAuth: [] + - bearerAuth: [] /examtypes/{code}: put: tags: - - Exam Types + - Exam Types operationId: updateExamType parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string requestBody: content: application/json: @@ -1443,44 +1384,44 @@ paths: $ref: '#/components/schemas/ExamTypeDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/ExamTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] delete: tags: - - Exam Types + - Exam Types operationId: deleteExamType parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /exams/{code}: put: tags: - - Exams + - Exams operationId: updateExams parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string requestBody: content: application/json: @@ -1488,65 +1429,65 @@ paths: $ref: '#/components/schemas/ExamDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/ExamDTO' security: - - bearerAuth: [] + - bearerAuth: [] delete: tags: - - Exams + - Exams operationId: deleteExam_1 parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /examinations/{id}: get: tags: - - Examinations + - Examinations operationId: getByID parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int32 + - name: id + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/PatientExaminationDTO' security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Examinations + - Examinations operationId: updateExamination parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int32 + - name: id + in: path + required: true + schema: + type: integer + format: int32 requestBody: content: application/json: @@ -1554,21 +1495,21 @@ paths: $ref: '#/components/schemas/PatientExaminationDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /diseasetypes: get: tags: - - Disease Types + - Disease Types operationId: getAllDiseaseTypes responses: - '200': + "200": description: OK content: application/json: @@ -1577,10 +1518,10 @@ paths: items: $ref: '#/components/schemas/DiseaseTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Disease Types + - Disease Types operationId: updateDiseaseType requestBody: content: @@ -1589,17 +1530,17 @@ paths: $ref: '#/components/schemas/DiseaseTypeDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/DiseaseTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Disease Types + - Disease Types operationId: newDiseaseType requestBody: content: @@ -1608,18 +1549,18 @@ paths: $ref: '#/components/schemas/DiseaseTypeDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/DiseaseTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] /diseases: put: tags: - - Diseases + - Diseases operationId: updateDisease requestBody: content: @@ -1628,17 +1569,17 @@ paths: $ref: '#/components/schemas/DiseaseDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/DiseaseDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Diseases + - Diseases operationId: newDisease requestBody: content: @@ -1647,21 +1588,21 @@ paths: $ref: '#/components/schemas/DiseaseDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/DiseaseDTO' security: - - bearerAuth: [] + - bearerAuth: [] /dischargetypes: get: tags: - - DischargeType + - DischargeType operationId: getDischargeTypes responses: - '200': + "200": description: OK content: application/json: @@ -1670,10 +1611,10 @@ paths: items: $ref: '#/components/schemas/DischargeTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - DischargeType + - DischargeType operationId: updateDischargeTypet requestBody: content: @@ -1682,17 +1623,17 @@ paths: $ref: '#/components/schemas/DischargeTypeDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/DischargeTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - DischargeType + - DischargeType operationId: newDischargeType requestBody: content: @@ -1701,21 +1642,21 @@ paths: $ref: '#/components/schemas/DischargeTypeDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/DischargeTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] /deliverytypes: get: tags: - - Delivery Type + - Delivery Type operationId: getDeliveryTypes responses: - '200': + "200": description: OK content: application/json: @@ -1724,10 +1665,10 @@ paths: items: $ref: '#/components/schemas/DeliveryTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Delivery Type + - Delivery Type operationId: updateDeliveryTypes requestBody: content: @@ -1736,17 +1677,17 @@ paths: $ref: '#/components/schemas/DeliveryTypeDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/DeliveryTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Delivery Type + - Delivery Type operationId: newDeliveryType requestBody: content: @@ -1755,21 +1696,21 @@ paths: $ref: '#/components/schemas/DeliveryTypeDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/DeliveryTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] /deliveryresulttypes: get: tags: - - Delivery Result Type + - Delivery Result Type operationId: getDeliveryResultTypes responses: - '200': + "200": description: OK content: application/json: @@ -1778,10 +1719,10 @@ paths: items: $ref: '#/components/schemas/DeliveryResultTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Delivery Result Type + - Delivery Result Type operationId: updateDeliveryResultTypes requestBody: content: @@ -1790,17 +1731,17 @@ paths: $ref: '#/components/schemas/DeliveryResultTypeDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/DeliveryResultTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Delivery Result Type + - Delivery Result Type operationId: newDeliveryResultType requestBody: content: @@ -1809,46 +1750,46 @@ paths: $ref: '#/components/schemas/DeliveryResultTypeDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/DeliveryResultTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] /bills/{id}: get: tags: - - Bills + - Bills operationId: getBill parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int32 + - name: id + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/BillDTO' security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Bills + - Bills operationId: updateBill parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int32 + - name: id + in: path + required: true + schema: + type: integer + format: int32 requestBody: content: application/json: @@ -1856,41 +1797,41 @@ paths: $ref: '#/components/schemas/FullBillDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/FullBillDTO' security: - - bearerAuth: [] + - bearerAuth: [] delete: tags: - - Bills + - Bills operationId: deleteBill parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int32 + - name: id + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /agetypes: get: tags: - - AgeTypes + - AgeTypes operationId: getAllAgeTypes responses: - '200': + "200": description: OK content: application/json: @@ -1899,10 +1840,10 @@ paths: items: $ref: '#/components/schemas/AgeTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - AgeTypes + - AgeTypes operationId: updateAgeType requestBody: content: @@ -1911,21 +1852,21 @@ paths: $ref: '#/components/schemas/AgeTypeDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/AgeTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] /admissiontypes: get: tags: - - AdmissionTypes + - AdmissionTypes operationId: getAdmissionTypes responses: - '200': + "200": description: OK content: application/json: @@ -1934,10 +1875,10 @@ paths: items: $ref: '#/components/schemas/AdmissionTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - AdmissionTypes + - AdmissionTypes operationId: updateAdmissionTypes requestBody: content: @@ -1946,17 +1887,17 @@ paths: $ref: '#/components/schemas/AdmissionTypeDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/AdmissionTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - AdmissionTypes + - AdmissionTypes operationId: newAdmissionType requestBody: content: @@ -1965,61 +1906,61 @@ paths: $ref: '#/components/schemas/AdmissionTypeDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/AdmissionTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] /admissions: get: tags: - - Admissions + - Admissions operationId: getAdmissions parameters: - - name: admissionrange - in: query - required: true - schema: - type: array - items: - type: string - - name: page - in: query - required: false - schema: - type: integer - format: int32 - default: 0 - - name: size - in: query - required: false - schema: - type: integer - format: int32 - default: 80 - - name: paged - in: query - required: false - schema: - type: boolean - default: false - responses: - '200': + - name: admissionrange + in: query + required: true + schema: + type: array + items: + type: string + - name: page + in: query + required: false + schema: + type: integer + format: int32 + default: 0 + - name: size + in: query + required: false + schema: + type: integer + format: int32 + default: 80 + - name: paged + in: query + required: false + schema: + type: boolean + default: false + responses: + "400": + description: Bad Request + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/PageAdmissionDTO' - '400': - description: Bad Request security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Admissions + - Admissions operationId: updateAdmissions requestBody: content: @@ -2028,19 +1969,19 @@ paths: $ref: '#/components/schemas/AdmissionDTO' required: true responses: - '200': + "400": + description: Bad Request + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/AdmissionDTO' - '400': - description: Bad Request security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Admissions + - Admissions operationId: newAdmissions requestBody: content: @@ -2049,20 +1990,20 @@ paths: $ref: '#/components/schemas/AdmissionDTO' required: true responses: - '200': + "400": + description: Bad Request + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/AdmissionDTO' - '400': - description: Bad Request security: - - bearerAuth: [] + - bearerAuth: [] /visits: post: tags: - - Visit + - Visit operationId: newVisit requestBody: content: @@ -2071,18 +2012,18 @@ paths: $ref: '#/components/schemas/VisitDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/VisitDTO' security: - - bearerAuth: [] + - bearerAuth: [] /visits/insertList: post: tags: - - Visit + - Visit operationId: newVisits requestBody: content: @@ -2093,21 +2034,21 @@ paths: $ref: '#/components/schemas/VisitDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] - /users/settings: + - bearerAuth: [] + /usersettings: get: tags: - - Users + - User Settings operationId: getUserSettings responses: - '200': + "200": description: OK content: application/json: @@ -2116,10 +2057,10 @@ paths: items: $ref: '#/components/schemas/UserSettingDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Users + - User Settings operationId: newUserSettings requestBody: content: @@ -2128,18 +2069,142 @@ paths: $ref: '#/components/schemas/UserSettingDTO' required: true responses: - '200': - description: OK + "201": + description: Created content: application/json: schema: $ref: '#/components/schemas/UserSettingDTO' security: - - bearerAuth: [] + - bearerAuth: [] + /users: + get: + tags: + - Users + operationId: getUser + parameters: + - name: group_id + in: query + required: false + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/UserDTO' + security: + - bearerAuth: [] + post: + tags: + - Users + operationId: newUser + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UserDTO' + required: true + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/UserDTO' + security: + - bearerAuth: [] + /usergroups: + get: + tags: + - User Groups + operationId: getUserGroups + responses: + "200": + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/UserGroupDTO' + security: + - bearerAuth: [] + post: + tags: + - User Groups + operationId: newUserGroup + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UserGroupDTO' + required: true + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/UserGroupDTO' + security: + - bearerAuth: [] + /usergroups/{group_code}/permissions/{id}: + post: + tags: + - User Groups + operationId: assignPermission + parameters: + - name: group_code + in: path + required: true + schema: + type: string + - name: id + in: path + required: true + schema: + type: integer + format: int32 + responses: + "201": + description: Created + content: + application/json: + schema: + type: integer + format: int32 + security: + - bearerAuth: [] + delete: + tags: + - User Groups + operationId: revokePermission + parameters: + - name: group_code + in: path + required: true + schema: + type: string + - name: id + in: path + required: true + schema: + type: integer + format: int32 + responses: + "204": + description: No Content + security: + - bearerAuth: [] /therapies: post: tags: - - Therapies + - Therapies operationId: newTherapy requestBody: content: @@ -2148,18 +2213,18 @@ paths: $ref: '#/components/schemas/TherapyRowDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/TherapyRowDTO' security: - - bearerAuth: [] + - bearerAuth: [] /therapies/replace: post: tags: - - Therapies + - Therapies operationId: replaceTherapies requestBody: content: @@ -2170,18 +2235,18 @@ paths: $ref: '#/components/schemas/TherapyRowDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/TherapyRow' security: - - bearerAuth: [] + - bearerAuth: [] /therapies/meds-out-of-stock: post: tags: - - Therapies + - Therapies operationId: getMedicalsOutOfStock requestBody: content: @@ -2192,7 +2257,7 @@ paths: $ref: '#/components/schemas/TherapyDTO' required: true responses: - '200': + "200": description: OK content: application/json: @@ -2201,11 +2266,11 @@ paths: items: $ref: '#/components/schemas/MedicalDTO' security: - - bearerAuth: [] + - bearerAuth: [] /therapies/from-rows: post: tags: - - Therapies + - Therapies operationId: getTherapies requestBody: content: @@ -2216,7 +2281,7 @@ paths: $ref: '#/components/schemas/TherapyRowDTO' required: true responses: - '200': + "200": description: OK content: application/json: @@ -2225,11 +2290,11 @@ paths: items: $ref: '#/components/schemas/TherapyDTO' security: - - bearerAuth: [] + - bearerAuth: [] /therapies/from-row: post: tags: - - Therapies + - Therapies operationId: getTherapy requestBody: content: @@ -2238,32 +2303,88 @@ paths: $ref: '#/components/schemas/TherapyRowDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/TherapyDTO' security: - - bearerAuth: [] + - bearerAuth: [] + /stockmovements/discharge: + post: + tags: + - Stock Movements + operationId: newMultipleDischargingMovements + parameters: + - name: ref + in: query + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/MovementDTO' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + type: boolean + security: + - bearerAuth: [] + /stockmovements/charge: + post: + tags: + - Stock Movements + operationId: newMultipleChargingMovements + parameters: + - name: ref + in: query + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/MovementDTO' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + type: boolean + security: + - bearerAuth: [] /sms: get: tags: - - SMS + - SMS operationId: getAll parameters: - - name: dateFrom - in: query - required: true - schema: - type: string - - name: dateTo - in: query - required: true - schema: - type: string + - name: dateFrom + in: query + required: true + schema: + type: string + - name: dateTo + in: query + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: @@ -2272,18 +2393,18 @@ paths: items: $ref: '#/components/schemas/SmsDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - SMS + - SMS operationId: saveSms parameters: - - name: split - in: query - required: false - schema: - type: boolean - default: false + - name: split + in: query + required: false + schema: + type: boolean + default: false requestBody: content: application/json: @@ -2291,18 +2412,18 @@ paths: $ref: '#/components/schemas/SmsDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /sms/delete: post: tags: - - SMS + - SMS operationId: deleteSms requestBody: content: @@ -2313,21 +2434,21 @@ paths: $ref: '#/components/schemas/SmsDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /pricesothers: get: tags: - - Others Price + - Others Price operationId: getPricesOthers responses: - '200': + "200": description: OK content: application/json: @@ -2336,10 +2457,10 @@ paths: items: $ref: '#/components/schemas/PricesOthersDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Others Price + - Others Price operationId: newPricesOthers requestBody: content: @@ -2348,21 +2469,21 @@ paths: $ref: '#/components/schemas/PricesOthersDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/PricesOthersDTO' security: - - bearerAuth: [] + - bearerAuth: [] /pricelists: get: tags: - - Price Lists + - Price Lists operationId: getPriceLists responses: - '200': + "200": description: OK content: application/json: @@ -2371,10 +2492,10 @@ paths: items: $ref: '#/components/schemas/PriceListDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Price Lists + - Price Lists operationId: newPriceList requestBody: content: @@ -2383,21 +2504,21 @@ paths: $ref: '#/components/schemas/PriceListDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/PriceListDTO' security: - - bearerAuth: [] + - bearerAuth: [] /pregnanttreatmenttypes: get: tags: - - Pregnant Treatment Types + - Pregnant Treatment Types operationId: getPregnantTreatmentTypes responses: - '200': + "200": description: OK content: application/json: @@ -2406,10 +2527,10 @@ paths: items: $ref: '#/components/schemas/PregnantTreatmentTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Pregnant Treatment Types + - Pregnant Treatment Types operationId: newPregnantTreatmentType requestBody: content: @@ -2418,53 +2539,18 @@ paths: $ref: '#/components/schemas/PregnantTreatmentTypeDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/PregnantTreatmentTypeDTO' security: - - bearerAuth: [] - /permissions: - get: - tags: - - Permissions - operationId: retrieveAllPermissions - responses: - '200': - description: OK - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/PermissionDTO' - security: - - bearerAuth: [] - post: - tags: - - Permissions - operationId: insertPermission - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PermissionDTO' - required: true - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/PermissionDTO' - security: - - bearerAuth: [] + - bearerAuth: [] /patientvaccines: post: tags: - - Patient Vaccines + - Patient Vaccines operationId: newPatientVaccine requestBody: content: @@ -2473,46 +2559,46 @@ paths: $ref: '#/components/schemas/PatientVaccineDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/PatientVaccineDTO' security: - - bearerAuth: [] + - bearerAuth: [] /patients: get: tags: - - Patients + - Patients operationId: getPatients parameters: - - name: page - in: query - required: false - schema: - type: integer - format: int32 - default: 0 - - name: size - in: query - required: false - schema: - type: integer - format: int32 - default: 80 + - name: page + in: query + required: false + schema: + type: integer + format: int32 + default: 0 + - name: size + in: query + required: false + schema: + type: integer + format: int32 + default: 80 responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/PagePatientDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Patients + - Patients operationId: newPatient requestBody: content: @@ -2521,21 +2607,21 @@ paths: $ref: '#/components/schemas/PatientDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/PatientDTO' security: - - bearerAuth: [] + - bearerAuth: [] /operationtypes: get: tags: - - Operations Types + - Operations Types operationId: getOperationTypes responses: - '200': + "200": description: OK content: application/json: @@ -2544,10 +2630,10 @@ paths: items: $ref: '#/components/schemas/OperationTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Operations Types + - Operations Types operationId: newOperationType requestBody: content: @@ -2556,21 +2642,21 @@ paths: $ref: '#/components/schemas/OperationTypeDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/OperationTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] /operations: get: tags: - - Operations + - Operations operationId: getOperations responses: - '200': + "200": description: OK content: application/json: @@ -2579,10 +2665,10 @@ paths: items: $ref: '#/components/schemas/OperationDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Operations + - Operations operationId: newOperation requestBody: content: @@ -2591,18 +2677,18 @@ paths: $ref: '#/components/schemas/OperationDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/OperationDTO' security: - - bearerAuth: [] + - bearerAuth: [] /operations/rows/search/opd: post: tags: - - Operations + - Operations operationId: getOperationRowsByOpd requestBody: content: @@ -2611,7 +2697,7 @@ paths: $ref: '#/components/schemas/OpdDTO' required: true responses: - '200': + "200": description: OK content: application/json: @@ -2620,11 +2706,11 @@ paths: items: $ref: '#/components/schemas/OperationRowDTO' security: - - bearerAuth: [] + - bearerAuth: [] /opds: post: tags: - - Opds + - Opds operationId: newOpd requestBody: content: @@ -2633,18 +2719,18 @@ paths: $ref: '#/components/schemas/OpdDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/OpdDTO' security: - - bearerAuth: [] + - bearerAuth: [] /opds/rows: post: tags: - - Opds + - Opds operationId: newOpdWithOperationRow requestBody: content: @@ -2653,18 +2739,18 @@ paths: $ref: '#/components/schemas/OpdWithOperationRowDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/OpdWithOperationRowDTO' security: - - bearerAuth: [] + - bearerAuth: [] /medicalstockward/movements: post: tags: - - Medical Stock Ward + - Medical Stock Ward operationId: newMovementWard requestBody: content: @@ -2673,25 +2759,25 @@ paths: $ref: '#/components/schemas/MovementWardDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /medicalstockmovements/discharge: post: tags: - - Stock Movements - operationId: newMultipleDischargingMovements + - Stock Movements + operationId: newMultipleDischargingMovements_1 parameters: - - name: ref - in: query - required: true - schema: - type: string + - name: ref + in: query + required: true + schema: + type: string requestBody: content: application/json: @@ -2701,25 +2787,25 @@ paths: $ref: '#/components/schemas/MovementDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /medicalstockmovements/charge: post: tags: - - Stock Movements - operationId: newMultipleChargingMovements + - Stock Movements + operationId: newMultipleChargingMovements_1 parameters: - - name: ref - in: query - required: true - schema: - type: string + - name: ref + in: query + required: true + schema: + type: string requestBody: content: application/json: @@ -2729,49 +2815,49 @@ paths: $ref: '#/components/schemas/MovementDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /laboratories: get: tags: - - Laboratories + - Laboratories operationId: getLaboratory parameters: - - name: oneWeek - in: query - required: true - schema: - type: boolean - - name: page - in: query - required: true - schema: - type: integer - format: int32 - - name: size - in: query - required: true - schema: - type: integer - format: int32 + - name: oneWeek + in: query + required: true + schema: + type: boolean + - name: page + in: query + required: true + schema: + type: integer + format: int32 + - name: size + in: query + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/PageLabWithRowsDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Laboratories + - Laboratories operationId: newLaboratory requestBody: content: @@ -2780,18 +2866,18 @@ paths: $ref: '#/components/schemas/LabWithRowsDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /laboratories/insertList: post: tags: - - Laboratories + - Laboratories operationId: newLaboratory2 requestBody: content: @@ -2802,21 +2888,21 @@ paths: $ref: '#/components/schemas/LabWithRowsDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /laboratories/examRequest: get: tags: - - Laboratories + - Laboratories operationId: getLaboratoryExamRequest responses: - '200': + "200": description: OK content: application/json: @@ -2825,10 +2911,10 @@ paths: items: $ref: '#/components/schemas/LaboratoryDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Laboratories + - Laboratories operationId: newExamRequest requestBody: content: @@ -2837,21 +2923,21 @@ paths: $ref: '#/components/schemas/LaboratoryDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /examtypes: get: tags: - - Exam Types + - Exam Types operationId: getExamTypes responses: - '200': + "200": description: OK content: application/json: @@ -2860,10 +2946,10 @@ paths: items: $ref: '#/components/schemas/ExamTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Exam Types + - Exam Types operationId: newExamType requestBody: content: @@ -2872,21 +2958,21 @@ paths: $ref: '#/components/schemas/ExamTypeDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/ExamTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] /exams: get: tags: - - Exams + - Exams operationId: getExams responses: - '200': + "200": description: OK content: application/json: @@ -2895,10 +2981,10 @@ paths: items: $ref: '#/components/schemas/ExamDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Exams + - Exams operationId: newExam requestBody: content: @@ -2907,21 +2993,21 @@ paths: $ref: '#/components/schemas/ExamDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/ExamDTO' security: - - bearerAuth: [] + - bearerAuth: [] /examrows: get: tags: - - Exam Rows + - Exam Rows operationId: getExamRows responses: - '200': + "200": description: OK content: application/json: @@ -2930,10 +3016,10 @@ paths: items: $ref: '#/components/schemas/ExamRowDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Exam Rows + - Exam Rows operationId: newExamRow requestBody: content: @@ -2942,18 +3028,18 @@ paths: $ref: '#/components/schemas/ExamRowDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/ExamRowDTO' security: - - bearerAuth: [] + - bearerAuth: [] /examinations: post: tags: - - Examinations + - Examinations operationId: newPatientExamination requestBody: content: @@ -2962,38 +3048,38 @@ paths: $ref: '#/components/schemas/PatientExaminationDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /bills: get: tags: - - Bills + - Bills operationId: searchBills_1 parameters: - - name: datefrom - in: query - required: true - schema: - type: string - - name: dateto - in: query - required: true - schema: - type: string - - name: patient_code - in: query - required: false - schema: - type: integer - format: int32 + - name: datefrom + in: query + required: true + schema: + type: string + - name: dateto + in: query + required: true + schema: + type: string + - name: patient_code + in: query + required: false + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: @@ -3002,10 +3088,10 @@ paths: items: $ref: '#/components/schemas/BillDTO' security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Bills + - Bills operationId: newBill requestBody: content: @@ -3014,18 +3100,18 @@ paths: $ref: '#/components/schemas/FullBillDTO' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/FullBillDTO' security: - - bearerAuth: [] + - bearerAuth: [] /bills/search/by/payments: post: tags: - - Bills + - Bills operationId: searchBillsByPayments requestBody: content: @@ -3036,7 +3122,7 @@ paths: $ref: '#/components/schemas/BillPaymentsDTO' required: true responses: - '200': + "200": description: OK content: application/json: @@ -3045,23 +3131,23 @@ paths: items: $ref: '#/components/schemas/BillDTO' security: - - bearerAuth: [] + - bearerAuth: [] /bills/search/by/item: post: tags: - - Bills + - Bills operationId: searchBills parameters: - - name: datefrom - in: query - required: true - schema: - type: string - - name: dateto - in: query - required: true - schema: - type: string + - name: datefrom + in: query + required: true + schema: + type: string + - name: dateto + in: query + required: true + schema: + type: string requestBody: content: application/json: @@ -3069,7 +3155,7 @@ paths: $ref: '#/components/schemas/BillItemsDTO' required: true responses: - '200': + "200": description: OK content: application/json: @@ -3078,20 +3164,40 @@ paths: items: $ref: '#/components/schemas/BillDTO' security: - - bearerAuth: [] + - bearerAuth: [] + /auth/refresh-token: + post: + tags: + - Login + operationId: refreshToken + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TokenRefreshRequest' + required: true + responses: + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/LoginResponse' + security: + - bearerAuth: [] /auth/logout: post: tags: - - Login + - Login description: Logout the current user. operationId: logout responses: - '200': + "200": description: OK /auth/login: post: tags: - - Login + - Login operationId: authenticateUser requestBody: content: @@ -3100,26 +3206,26 @@ paths: $ref: '#/components/schemas/LoginRequest' required: true responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/LoginResponse' security: - - bearerAuth: [] + - bearerAuth: [] /admissions/discharge: post: tags: - - Admissions + - Admissions operationId: dischargePatient parameters: - - name: patientCode - in: query - required: true - schema: - type: integer - format: int32 + - name: patientCode + in: query + required: true + schema: + type: integer + format: int32 requestBody: content: application/json: @@ -3127,23 +3233,23 @@ paths: $ref: '#/components/schemas/AdmissionDTO' required: true responses: - '200': + "400": + description: Bad Request + "200": description: OK content: application/json: schema: type: boolean - '400': - description: Bad Request security: - - bearerAuth: [] + - bearerAuth: [] /wardsNoMaternity: get: tags: - - Wards + - Wards operationId: getWardsNoMaternity responses: - '200': + "200": description: OK content: application/json: @@ -3152,20 +3258,20 @@ paths: items: $ref: '#/components/schemas/WardDTO' security: - - bearerAuth: [] + - bearerAuth: [] /wards/occupation/{code}: get: tags: - - Wards + - Wards operationId: getCurrentOccupation parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: @@ -3173,61 +3279,61 @@ paths: type: integer format: int32 security: - - bearerAuth: [] + - bearerAuth: [] /wards/check/{code}: get: tags: - - Wards + - Wards operationId: checkWardCode parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /wards/check/maternity/{createIfNotExist}: get: tags: - - Wards + - Wards operationId: checkWardMaternityCode parameters: - - name: createIfNotExist - in: path - required: true - schema: - type: boolean + - name: createIfNotExist + in: path + required: true + schema: + type: boolean responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /visits/patient/{patID}: get: tags: - - Visit + - Visit operationId: getVisit parameters: - - name: patID - in: path - required: true - schema: - type: integer - format: int32 + - name: patID + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: @@ -3236,40 +3342,40 @@ paths: items: $ref: '#/components/schemas/VisitDTO' security: - - bearerAuth: [] + - bearerAuth: [] /vaccinetypes/check/{code}: get: tags: - - Vaccine Type + - Vaccine Type operationId: checkVaccineTypeCode parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /vaccines/type-code/{vaccineTypeCode}: get: tags: - - Vaccines + - Vaccines operationId: getVaccinesByVaccineTypeCode parameters: - - name: vaccineTypeCode - in: path - required: true - schema: - type: string + - name: vaccineTypeCode + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: @@ -3278,214 +3384,336 @@ paths: items: $ref: '#/components/schemas/VaccineDTO' security: - - bearerAuth: [] + - bearerAuth: [] /vaccines/check/{code}: get: tags: - - Vaccines + - Vaccines operationId: checkVaccineCode parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] - /users/{username}: + - bearerAuth: [] + /usersettings/{configName}: get: tags: - - Users - operationId: getUserByName + - User Settings + operationId: getUserSettingByUser parameters: - - name: username - in: path - required: true - schema: - type: string - responses: - '200': + - name: configName + in: path + required: true + schema: + type: string + responses: + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/UserDTO' + $ref: '#/components/schemas/UserSettingDTO' + security: + - bearerAuth: [] + /users/{username}/permissions: + get: + tags: + - Users + operationId: retrievePermissionsByUsername + parameters: + - name: username + in: path + required: true + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PermissionDTO' + security: + - bearerAuth: [] + /therapies/{code_patient}: + get: + tags: + - Therapies + operationId: getTherapyRows + parameters: + - name: code_patient + in: path + required: true + schema: + type: integer + format: int32 + responses: + "200": + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TherapyRowDTO' security: - - bearerAuth: [] + - bearerAuth: [] delete: tags: - - Users - operationId: deleteUser + - Therapies + operationId: deleteAllTherapies parameters: - - name: username - in: path - required: true - schema: - type: string + - name: code_patient + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] - /users/{userName}/settings/{configName}: + - bearerAuth: [] + /suppliers/{id}: get: tags: - - Users - operationId: getUserSettingByUser + - Suppliers + operationId: getSuppliers_1 parameters: - - name: userName - in: path - required: true - schema: - type: string - - name: configName - in: path - required: true - schema: - type: string + - name: id + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/UserSettingDTO' + $ref: '#/components/schemas/SupplierDTO' security: - - bearerAuth: [] - /users/permissions: + - bearerAuth: [] + /stockmovements: get: tags: - - Users - operationId: retrievePermissionsByCurrentLoggedInUser + - Stock Movements + operationId: getMovements responses: - '200': + "200": description: OK content: application/json: schema: type: array items: - $ref: '#/components/schemas/LitePermissionDTO' + $ref: '#/components/schemas/MovementDTO' security: - - bearerAuth: [] - /users/permissions/username/{username}: + - bearerAuth: [] + /stockmovements/{ref}: get: tags: - - Users - operationId: retrievePermissionsByUsername + - Stock Movements + operationId: getMovements_1 parameters: - - name: username - in: path - required: true - schema: - type: string + - name: ref + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: schema: type: array items: - $ref: '#/components/schemas/LitePermissionDTO' + $ref: '#/components/schemas/MovementDTO' security: - - bearerAuth: [] - /users/me: + - bearerAuth: [] + /stockmovements/lot/{med_code}: get: tags: - - Users - operationId: retrieveProfileByCurrentLoggedInUser + - Stock Movements + operationId: getLotByMedical + parameters: + - name: med_code + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/UserProfileDTO' + type: array + items: + $ref: '#/components/schemas/LotDTO' security: - - bearerAuth: [] - /therapies/{code_patient}: + - bearerAuth: [] + /stockmovements/filter/v2: get: tags: - - Therapies - operationId: getTherapyRows + - Stock Movements + operationId: getMovements_2 parameters: - - name: code_patient - in: path - required: true - schema: - type: integer - format: int32 + - name: med_code + in: query + required: false + schema: + type: integer + format: int32 + - name: med_type + in: query + required: false + schema: + type: string + - name: ward_id + in: query + required: false + schema: + type: string + - name: mov_type + in: query + required: false + schema: + type: string + - name: mov_from + in: query + required: false + schema: + type: string + format: date-time + - name: mov_to + in: query + required: false + schema: + type: string + format: date-time + - name: lot_prep_from + in: query + required: false + schema: + type: string + format: date-time + - name: lot_prep_to + in: query + required: false + schema: + type: string + format: date-time + - name: lot_due_from + in: query + required: false + schema: + type: string + format: date-time + - name: lot_due_to + in: query + required: false + schema: + type: string + format: date-time responses: - '200': + "200": description: OK content: application/json: schema: type: array items: - $ref: '#/components/schemas/TherapyRowDTO' + $ref: '#/components/schemas/MovementDTO' security: - - bearerAuth: [] - delete: + - bearerAuth: [] + /stockmovements/filter/v1: + get: tags: - - Therapies - operationId: deleteAllTherapies + - Stock Movements + operationId: getMovements_3 parameters: - - name: code_patient - in: path - required: true - schema: - type: integer - format: int32 + - name: ward_id + in: query + required: true + schema: + type: string + - name: from + in: query + required: true + schema: + type: string + format: date-time + - name: to + in: query + required: true + schema: + type: string + format: date-time responses: - '200': + "200": description: OK content: application/json: schema: - type: boolean + type: array + items: + $ref: '#/components/schemas/MovementDTO' security: - - bearerAuth: [] - /suppliers/{id}: + - bearerAuth: [] + /stockmovements/critical/check: get: tags: - - Suppliers - operationId: getSuppliers_1 + - Stock Movements + operationId: alertCriticalQuantity parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int32 + - name: med_code + in: query + required: true + schema: + type: integer + format: int32 + - name: qty + in: query + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/SupplierDTO' + type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /reports/exams-list: get: tags: - - Reports + - Reports operationId: printExamsListPdf responses: - '200': + "200": description: OK content: application/json: @@ -3495,14 +3723,14 @@ paths: type: string format: byte security: - - bearerAuth: [] + - bearerAuth: [] /reports/diseases-list: get: tags: - - Reports + - Reports operationId: printDiseasesListPdf responses: - '200': + "200": description: OK content: application/json: @@ -3512,14 +3740,14 @@ paths: type: string format: byte security: - - bearerAuth: [] + - bearerAuth: [] /pricelists/prices: get: tags: - - Price Lists + - Price Lists operationId: getPrices responses: - '200': + "200": description: OK content: application/json: @@ -3528,74 +3756,111 @@ paths: items: $ref: '#/components/schemas/PriceDTO' security: - - bearerAuth: [] + - bearerAuth: [] /pricelists/duplicate/{id}: get: tags: - - Price Lists + - Price Lists operationId: copyList parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int64 + - name: id + in: path + required: true + schema: + type: integer + format: int64 responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /pricelists/duplicate/byfactor/{id}: get: tags: - - Price Lists + - Price Lists operationId: copyByFactorAndStep parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int64 - - name: factor - in: query - required: true - schema: - type: number - format: double - - name: step - in: query - required: true - schema: - type: number - format: double + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: factor + in: query + required: true + schema: + type: number + format: double + - name: step + in: query + required: true + schema: + type: number + format: double responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] + /permissions: + get: + tags: + - Permissions + operationId: retrieveAllPermissions + responses: + "200": + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PermissionDTO' + security: + - bearerAuth: [] + /permissions/{id}: + get: + tags: + - Permissions + operationId: retrievePermissionById + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int32 + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PermissionDTO' + security: + - bearerAuth: [] /permissions/userGroupCode/{userGroupCode}: get: tags: - - Permissions - operationId: retrievePermissionsByUserGroupcode + - Permissions + operationId: retrievePermissionsByUserGroupCode parameters: - - name: userGroupCode - in: path - required: true - schema: - type: string + - name: userGroupCode + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: @@ -3604,40 +3869,40 @@ paths: items: $ref: '#/components/schemas/PermissionDTO' security: - - bearerAuth: [] + - bearerAuth: [] /permissions/name/{name}: get: tags: - - Permissions + - Permissions operationId: retrievePermissionByName parameters: - - name: name - in: path - required: true - schema: - type: string + - name: name + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/PermissionDTO' security: - - bearerAuth: [] + - bearerAuth: [] /patientvaccines/week: get: tags: - - Patient Vaccines + - Patient Vaccines operationId: getPatientVaccines parameters: - - name: oneWeek - in: query - required: false - schema: - type: boolean + - name: oneWeek + in: query + required: false + schema: + type: boolean responses: - '200': + "200": description: OK content: application/json: @@ -3646,21 +3911,21 @@ paths: items: $ref: '#/components/schemas/PatientVaccineDTO' security: - - bearerAuth: [] + - bearerAuth: [] /patientvaccines/progyear/{year}: get: tags: - - Patient Vaccines + - Patient Vaccines operationId: getProgYear parameters: - - name: year - in: path - required: true - schema: - type: integer - format: int32 + - name: year + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: @@ -3668,54 +3933,54 @@ paths: type: integer format: int32 security: - - bearerAuth: [] + - bearerAuth: [] /patientvaccines/filter: get: tags: - - Patient Vaccines + - Patient Vaccines operationId: getPatientVaccinesByDatesRanges parameters: - - name: vaccineTypeCode - in: query - required: true - schema: - type: string - - name: vaccineCode - in: query - required: true - schema: - type: string - - name: dateFrom - in: query - required: true - schema: - type: string - format: date - - name: dateTo - in: query - required: true - schema: - type: string - format: date - - name: sex - in: query - required: true - schema: - type: string - - name: ageFrom - in: query - required: true - schema: - type: integer - format: int32 - - name: ageTo - in: query - required: true - schema: - type: integer - format: int32 + - name: vaccineTypeCode + in: query + required: true + schema: + type: string + - name: vaccineCode + in: query + required: true + schema: + type: string + - name: dateFrom + in: query + required: true + schema: + type: string + format: date + - name: dateTo + in: query + required: true + schema: + type: string + format: date + - name: sex + in: query + required: true + schema: + type: string + - name: ageFrom + in: query + required: true + schema: + type: integer + format: int32 + - name: ageTo + in: query + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: @@ -3724,39 +3989,39 @@ paths: items: $ref: '#/components/schemas/PatientVaccineDTO' security: - - bearerAuth: [] + - bearerAuth: [] /patients/search: get: tags: - - Patients + - Patients operationId: searchPatient parameters: - - name: firstName - in: query - required: false - schema: - type: string - default: '' - - name: secondName - in: query - required: false - schema: - type: string - default: '' - - name: birthDate - in: query - required: false - schema: - type: string - format: date-time - - name: address - in: query - required: false - schema: - type: string - default: '' + - name: firstName + in: query + required: false + schema: + type: string + default: "" + - name: secondName + in: query + required: false + schema: + type: string + default: "" + - name: birthDate + in: query + required: false + schema: + type: string + format: date-time + - name: address + in: query + required: false + schema: + type: string + default: "" responses: - '200': + "200": description: OK content: application/json: @@ -3765,14 +4030,14 @@ paths: items: $ref: '#/components/schemas/PatientDTO' security: - - bearerAuth: [] + - bearerAuth: [] /patients/nextcode: get: tags: - - Patients + - Patients operationId: getPatientNextCode responses: - '200': + "200": description: OK content: application/json: @@ -3780,41 +4045,41 @@ paths: type: integer format: int32 security: - - bearerAuth: [] + - bearerAuth: [] /patients/merge: get: tags: - - Patients + - Patients operationId: mergePatients parameters: - - name: mergedcode - in: query - required: true - schema: - type: integer - format: int32 - - name: code2 - in: query - required: true - schema: - type: integer - format: int32 + - name: mergedcode + in: query + required: true + schema: + type: integer + format: int32 + - name: code2 + in: query + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /patients/cities: get: tags: - - Patients + - Patients operationId: getPatientCities responses: - '200': + "200": description: OK content: application/json: @@ -3823,41 +4088,41 @@ paths: items: type: string security: - - bearerAuth: [] + - bearerAuth: [] /patients/all: get: tags: - - Patients + - Patients operationId: getPatientAll parameters: - - name: code - in: query - required: true - schema: - type: integer - format: int32 + - name: code + in: query + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/PatientDTO' security: - - bearerAuth: [] + - bearerAuth: [] /operations/search/type: get: tags: - - Operations + - Operations operationId: getOperationByTypeDescription parameters: - - name: typeDescription - in: query - required: true - schema: - type: string + - name: typeDescription + in: query + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: @@ -3866,21 +4131,21 @@ paths: items: $ref: '#/components/schemas/OperationDTO' security: - - bearerAuth: [] + - bearerAuth: [] /operations/rows/search/patient: get: tags: - - Operations + - Operations operationId: getOperationRowsByPatient parameters: - - name: patientCode - in: query - required: true - schema: - type: integer - format: int32 + - name: patientCode + in: query + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: @@ -3889,21 +4154,21 @@ paths: items: $ref: '#/components/schemas/OperationRowDTO' security: - - bearerAuth: [] + - bearerAuth: [] /operations/rows/search/admission: get: tags: - - Operations + - Operations operationId: getOperationRowsByAdmt parameters: - - name: admissionId - in: query - required: true - schema: - type: integer - format: int32 + - name: admissionId + in: query + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: @@ -3912,20 +4177,20 @@ paths: items: $ref: '#/components/schemas/OperationRowDTO' security: - - bearerAuth: [] + - bearerAuth: [] /opds/weekly: get: tags: - - Opds + - Opds operationId: getOpdToDayOrWeek parameters: - - name: oneWeek - in: query - required: false - schema: - type: boolean + - name: oneWeek + in: query + required: false + schema: + type: boolean responses: - '200': + "200": description: OK content: application/json: @@ -3934,114 +4199,114 @@ paths: items: $ref: '#/components/schemas/OpdDTO' security: - - bearerAuth: [] + - bearerAuth: [] /opds/search: get: tags: - - Opds + - Opds operationId: getOpdByDates parameters: - - name: dateFrom - in: query - required: true - schema: - type: string - - name: dateTo - in: query - required: true - schema: - type: string - - name: diseaseTypeCode - in: query - required: false - schema: - type: string - - name: diseaseCode - in: query - required: false - schema: - type: string - - name: ageFrom - in: query - required: false - schema: - type: integer - format: int32 - default: 0 - - name: ageTo - in: query - required: false - schema: - type: integer - format: int32 - default: 200 - - name: sex - in: query - required: false - schema: - type: string - default: A - - name: newPatient - in: query - required: false - schema: - type: string - default: A - - name: patientCode - in: query - required: false - schema: - type: integer - format: int32 - default: 0 - - name: page - in: query - required: false - schema: - type: integer - format: int32 - default: 0 - - name: size - in: query - required: false - schema: - type: integer - format: int32 - default: 80 - - name: paged - in: query - required: false - schema: - type: boolean - default: false - - name: wardCode - in: query - required: false - schema: - type: string + - name: dateFrom + in: query + required: true + schema: + type: string + - name: dateTo + in: query + required: true + schema: + type: string + - name: diseaseTypeCode + in: query + required: false + schema: + type: string + - name: diseaseCode + in: query + required: false + schema: + type: string + - name: ageFrom + in: query + required: false + schema: + type: integer + format: int32 + default: 0 + - name: ageTo + in: query + required: false + schema: + type: integer + format: int32 + default: 200 + - name: sex + in: query + required: false + schema: + type: string + default: A + - name: newPatient + in: query + required: false + schema: + type: string + default: A + - name: patientCode + in: query + required: false + schema: + type: integer + format: int32 + default: 0 + - name: page + in: query + required: false + schema: + type: integer + format: int32 + default: 0 + - name: size + in: query + required: false + schema: + type: integer + format: int32 + default: 80 + - name: paged + in: query + required: false + schema: + type: boolean + default: false + - name: wardCode + in: query + required: false + schema: + type: string responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/PageOpdDTO' security: - - bearerAuth: [] + - bearerAuth: [] /opds/patient/{pcode}: get: tags: - - Opds + - Opds operationId: getOpdByPatient parameters: - - name: pcode - in: path - required: true - schema: - type: integer - format: int32 + - name: pcode + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: @@ -4050,69 +4315,69 @@ paths: items: $ref: '#/components/schemas/OpdWithOperationRowDTO' security: - - bearerAuth: [] + - bearerAuth: [] /opds/last/{patientCode}: get: tags: - - Opds + - Opds operationId: getLastOpd parameters: - - name: patientCode - in: path - required: true - schema: - type: integer - format: int32 + - name: patientCode + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/OpdDTO' security: - - bearerAuth: [] + - bearerAuth: [] /opds/check/progyear: get: tags: - - Opds + - Opds operationId: isExistOpdNum parameters: - - name: opdNum - in: query - required: true - schema: - type: integer - format: int32 - - name: year - in: query - required: true - schema: - type: integer - format: int32 + - name: opdNum + in: query + required: true + schema: + type: integer + format: int32 + - name: year + in: query + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /opds/ProgYear/{year}: get: tags: - - Opds + - Opds operationId: getProgYear_1 parameters: - - name: year - in: path - required: true - schema: - type: integer - format: int32 + - name: year + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: @@ -4120,99 +4385,99 @@ paths: type: integer format: int32 security: - - bearerAuth: [] + - bearerAuth: [] /medstockmovementtypes/{code}: get: tags: - - Medical Stock Movement Type + - Medical Stock Movement Type operationId: getMovementType parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/MovementTypeDTO' security: - - bearerAuth: [] + - bearerAuth: [] delete: tags: - - Medical Stock Movement Type + - Medical Stock Movement Type operationId: deleteMedicalDsrStockMovementType parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /medstockmovementtypes/check/{code}: get: tags: - - Medical Stock Movement Type + - Medical Stock Movement Type operationId: isCodeUsed parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /medicaltypes/check/{code}: get: tags: - - Medical Types + - Medical Types operationId: isCodeUsed_1 parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /medicalstockward/{ward_code}: get: tags: - - Medical Stock Ward + - Medical Stock Ward operationId: getMedicalsWard parameters: - - name: ward_code - in: path - required: true - schema: - type: string + - name: ward_code + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: @@ -4221,32 +4486,32 @@ paths: items: $ref: '#/components/schemas/MedicalWardDTO' security: - - bearerAuth: [] + - bearerAuth: [] /medicalstockward/movements/{ward_code}: get: tags: - - Medical Stock Ward + - Medical Stock Ward operationId: getMovementWard parameters: - - name: ward_code - in: path - required: true - schema: - type: string - - name: from - in: query - required: true - schema: - type: string - format: date - - name: to - in: query - required: true - schema: - type: string - format: date + - name: ward_code + in: path + required: true + schema: + type: string + - name: from + in: query + required: true + schema: + type: string + format: date + - name: to + in: query + required: true + schema: + type: string + format: date responses: - '200': + "200": description: OK content: application/json: @@ -4255,32 +4520,32 @@ paths: items: $ref: '#/components/schemas/MovementWardDTO' security: - - bearerAuth: [] + - bearerAuth: [] /medicalstockward/movements/to/{target_ward_code}: get: tags: - - Medical Stock Ward + - Medical Stock Ward operationId: getWardMovementsToWard parameters: - - name: target_ward_code - in: path - required: true - schema: - type: string - - name: from - in: query - required: true - schema: - type: string - format: date-time - - name: to - in: query - required: true - schema: - type: string - format: date-time + - name: target_ward_code + in: path + required: true + schema: + type: string + - name: from + in: query + required: true + schema: + type: string + format: date-time + - name: to + in: query + required: true + schema: + type: string + format: date-time responses: - '200': + "200": description: OK content: application/json: @@ -4289,26 +4554,26 @@ paths: items: $ref: '#/components/schemas/MovementWardDTO' security: - - bearerAuth: [] + - bearerAuth: [] /medicalstockward/current/{ward_code}: get: tags: - - Medical Stock Ward + - Medical Stock Ward operationId: getCurrentQuantityInWard parameters: - - name: ward_code - in: path - required: true - schema: - type: string - - name: med_id - in: query - required: true - schema: - type: integer - format: int32 + - name: ward_code + in: path + required: true + schema: + type: string + - name: med_id + in: query + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: @@ -4316,14 +4581,14 @@ paths: type: integer format: int32 security: - - bearerAuth: [] + - bearerAuth: [] /medicalstockmovements: get: tags: - - Stock Movements - operationId: getMovements + - Stock Movements + operationId: getMovements_4 responses: - '200': + "200": description: OK content: application/json: @@ -4332,20 +4597,20 @@ paths: items: $ref: '#/components/schemas/MovementDTO' security: - - bearerAuth: [] + - bearerAuth: [] /medicalstockmovements/{ref}: get: tags: - - Stock Movements - operationId: getMovements_1 + - Stock Movements + operationId: getMovements_5 parameters: - - name: ref - in: path - required: true - schema: - type: string + - name: ref + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: @@ -4354,21 +4619,21 @@ paths: items: $ref: '#/components/schemas/MovementDTO' security: - - bearerAuth: [] + - bearerAuth: [] /medicalstockmovements/lot/{med_code}: get: tags: - - Stock Movements - operationId: getLotByMedical + - Stock Movements + operationId: getLotByMedical_1 parameters: - - name: med_code - in: path - required: true - schema: - type: integer - format: int32 + - name: med_code + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: @@ -4377,72 +4642,72 @@ paths: items: $ref: '#/components/schemas/LotDTO' security: - - bearerAuth: [] + - bearerAuth: [] /medicalstockmovements/filter/v2: get: tags: - - Stock Movements - operationId: getMovements_2 + - Stock Movements + operationId: getMovements_6 parameters: - - name: med_code - in: query - required: false - schema: - type: integer - format: int32 - - name: med_type - in: query - required: false - schema: - type: string - - name: ward_id - in: query - required: false - schema: - type: string - - name: mov_type - in: query - required: false - schema: - type: string - - name: mov_from - in: query - required: false - schema: - type: string - format: date-time - - name: mov_to - in: query - required: false - schema: - type: string - format: date-time - - name: lot_prep_from - in: query - required: false - schema: - type: string - format: date-time - - name: lot_prep_to - in: query - required: false - schema: - type: string - format: date-time - - name: lot_due_from - in: query - required: false - schema: - type: string - format: date-time - - name: lot_due_to - in: query - required: false - schema: - type: string - format: date-time + - name: med_code + in: query + required: false + schema: + type: integer + format: int32 + - name: med_type + in: query + required: false + schema: + type: string + - name: ward_id + in: query + required: false + schema: + type: string + - name: mov_type + in: query + required: false + schema: + type: string + - name: mov_from + in: query + required: false + schema: + type: string + format: date-time + - name: mov_to + in: query + required: false + schema: + type: string + format: date-time + - name: lot_prep_from + in: query + required: false + schema: + type: string + format: date-time + - name: lot_prep_to + in: query + required: false + schema: + type: string + format: date-time + - name: lot_due_from + in: query + required: false + schema: + type: string + format: date-time + - name: lot_due_to + in: query + required: false + schema: + type: string + format: date-time responses: - '200': + "200": description: OK content: application/json: @@ -4451,32 +4716,32 @@ paths: items: $ref: '#/components/schemas/MovementDTO' security: - - bearerAuth: [] + - bearerAuth: [] /medicalstockmovements/filter/v1: get: tags: - - Stock Movements - operationId: getMovements_3 + - Stock Movements + operationId: getMovements_7 parameters: - - name: ward_id - in: query - required: true - schema: - type: string - - name: from - in: query - required: true - schema: - type: string - format: date-time - - name: to - in: query - required: true - schema: - type: string - format: date-time + - name: ward_id + in: query + required: true + schema: + type: string + - name: from + in: query + required: true + schema: + type: string + format: date-time + - name: to + in: query + required: true + schema: + type: string + format: date-time responses: - '200': + "200": description: OK content: application/json: @@ -4485,105 +4750,105 @@ paths: items: $ref: '#/components/schemas/MovementDTO' security: - - bearerAuth: [] + - bearerAuth: [] /medicalstockmovements/critical/check: get: tags: - - Stock Movements - operationId: alertCriticalQuantity + - Stock Movements + operationId: alertCriticalQuantity_1 parameters: - - name: med_code - in: query - required: true - schema: - type: integer - format: int32 - - name: qty - in: query - required: true - schema: - type: integer - format: int32 + - name: med_code + in: query + required: true + schema: + type: integer + format: int32 + - name: qty + in: query + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /medicals/{code}: get: tags: - - Medicals + - Medicals operationId: getMedical parameters: - - name: code - in: path - required: true - schema: - type: integer - format: int32 + - name: code + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/MedicalDTO' security: - - bearerAuth: [] + - bearerAuth: [] delete: tags: - - Medicals + - Medicals operationId: deleteMedical parameters: - - name: code - in: path - required: true - schema: - type: integer - format: int32 + - name: code + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /medicals/filter: get: tags: - - Medicals + - Medicals operationId: filterMedicals parameters: - - name: desc - in: query - required: false - schema: - type: string - - name: type - in: query - required: false - schema: - type: string - - name: critical - in: query - required: false - schema: - type: boolean - default: false - - name: name_sorted - in: query - required: false - schema: - type: boolean - default: false + - name: desc + in: query + required: false + schema: + type: string + - name: type + in: query + required: false + schema: + type: string + - name: critical + in: query + required: false + schema: + type: boolean + default: false + - name: name_sorted + in: query + required: false + schema: + type: boolean + default: false responses: - '200': + "200": description: OK content: application/json: @@ -4592,20 +4857,20 @@ paths: items: $ref: '#/components/schemas/MedicalDTO' security: - - bearerAuth: [] + - bearerAuth: [] /malnutritions/{id_admission}: get: tags: - - Malnutritions + - Malnutritions operationId: getMalnutrition parameters: - - name: id_admission - in: path - required: true - schema: - type: string + - name: id_admission + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: @@ -4614,35 +4879,35 @@ paths: items: $ref: '#/components/schemas/MalnutritionDTO' security: - - bearerAuth: [] + - bearerAuth: [] /malnutritions/last/{id_patient}: get: tags: - - Malnutritions + - Malnutritions operationId: getLastMalnutrition parameters: - - name: id_patient - in: path - required: true - schema: - type: integer - format: int32 + - name: id_patient + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/MalnutritionDTO' security: - - bearerAuth: [] + - bearerAuth: [] /laboratories/materials: get: tags: - - Laboratories + - Laboratories operationId: getMaterials responses: - '200': + "200": description: OK content: application/json: @@ -4651,106 +4916,106 @@ paths: items: type: string security: - - bearerAuth: [] + - bearerAuth: [] /laboratories/exams: get: tags: - - Laboratories + - Laboratories operationId: getLaboratoryForPrint parameters: - - name: examName - in: query - required: false - schema: - type: string - default: '' - - name: dateFrom - in: query - required: true - schema: - type: string - - name: dateTo - in: query - required: true - schema: - type: string - - name: patientCode - in: query - required: false - schema: - type: integer - format: int32 - default: 0 - - name: status - in: query - required: false - schema: - type: string - default: '' - - name: page - in: query - required: false - schema: - type: integer - format: int32 - default: 0 - - name: size - in: query - required: false - schema: - type: integer - format: int32 - default: 80 - - name: paged - in: query - required: false - schema: - type: boolean - default: false - responses: - '200': + - name: examName + in: query + required: false + schema: + type: string + default: "" + - name: dateFrom + in: query + required: true + schema: + type: string + - name: dateTo + in: query + required: true + schema: + type: string + - name: patientCode + in: query + required: false + schema: + type: integer + format: int32 + default: 0 + - name: status + in: query + required: false + schema: + type: string + default: "" + - name: page + in: query + required: false + schema: + type: integer + format: int32 + default: 0 + - name: size + in: query + required: false + schema: + type: integer + format: int32 + default: 80 + - name: paged + in: query + required: false + schema: + type: boolean + default: false + responses: + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/PageLabWithRowsDTO' security: - - bearerAuth: [] + - bearerAuth: [] /laboratories/exams/{code}: get: tags: - - Laboratories + - Laboratories operationId: getExamWithRowsById parameters: - - name: code - in: path - required: true - schema: - type: integer - format: int32 + - name: code + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/LabWithRowsDTO' security: - - bearerAuth: [] + - bearerAuth: [] /laboratories/examRequest/patient/{patId}: get: tags: - - Laboratories + - Laboratories operationId: getLaboratoryExamRequest_1 parameters: - - name: patId - in: path - required: true - schema: - type: integer - format: int32 + - name: patId + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: @@ -4759,21 +5024,21 @@ paths: items: $ref: '#/components/schemas/LaboratoryDTO' security: - - bearerAuth: [] + - bearerAuth: [] /laboratories/byPatientId/{patId}: get: tags: - - Laboratories + - Laboratories operationId: getLaboratory_1 parameters: - - name: patId - in: path - required: true - schema: - type: integer - format: int32 + - name: patId + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: @@ -4782,48 +5047,48 @@ paths: items: $ref: '#/components/schemas/LabWithRowsDTO' security: - - bearerAuth: [] + - bearerAuth: [] /hospitals: get: tags: - - Hospitals + - Hospitals operationId: getHospital responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/HospitalDTO' security: - - bearerAuth: [] + - bearerAuth: [] /hospitals/currencyCode: get: tags: - - Hospitals + - Hospitals operationId: getHospitalCurrencyCode responses: - '200': + "200": description: OK content: application/json: schema: type: string security: - - bearerAuth: [] + - bearerAuth: [] /exams/description/{description}: get: tags: - - Exams + - Exams operationId: getExams_1 parameters: - - name: description - in: path - required: true - schema: - type: string + - name: description + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: @@ -4832,21 +5097,21 @@ paths: items: $ref: '#/components/schemas/ExamDTO' security: - - bearerAuth: [] + - bearerAuth: [] /examrows/{code}: get: tags: - - Exam Rows + - Exam Rows operationId: getExamRowsByCode parameters: - - name: code - in: path - required: true - schema: - type: integer - format: int32 + - name: code + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: @@ -4855,46 +5120,46 @@ paths: items: $ref: '#/components/schemas/ExamRowDTO' security: - - bearerAuth: [] + - bearerAuth: [] delete: tags: - - Exam Rows + - Exam Rows operationId: deleteExam_2 parameters: - - name: code - in: path - required: true - schema: - type: integer - format: int32 + - name: code + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /examrows/search: get: tags: - - Exam Rows + - Exam Rows operationId: getExamRowsByCodeAndDescription parameters: - - name: code - in: query - required: true - schema: - type: integer - format: int32 - - name: description - in: query - required: true - schema: - type: string + - name: code + in: query + required: true + schema: + type: integer + format: int32 + - name: description + in: query + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: @@ -4903,20 +5168,20 @@ paths: items: $ref: '#/components/schemas/ExamRowDTO' security: - - bearerAuth: [] + - bearerAuth: [] /examrows/byExamCode/{examCode}: get: tags: - - Exam Rows + - Exam Rows operationId: getExamRowsByExamCode parameters: - - name: examCode - in: path - required: true - schema: - type: string + - name: examCode + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: @@ -4925,111 +5190,111 @@ paths: items: $ref: '#/components/schemas/ExamRowDTO' security: - - bearerAuth: [] + - bearerAuth: [] /examinations/lastNByPatId: get: tags: - - Examinations + - Examinations operationId: getLastNByPatID parameters: - - name: limit - in: query - required: true - schema: - type: integer - format: int32 - - name: patId - in: query - required: true - schema: - type: integer - format: int32 + - name: limit + in: query + required: true + schema: + type: integer + format: int32 + - name: patId + in: query + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/PagePatientExaminationDTO' security: - - bearerAuth: [] + - bearerAuth: [] /examinations/lastByPatientId/{patId}: get: tags: - - Examinations + - Examinations operationId: getLastByPatientId parameters: - - name: patId - in: path - required: true - schema: - type: integer - format: int32 + - name: patId + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/PatientExaminationDTO' security: - - bearerAuth: [] + - bearerAuth: [] /examinations/fromLastPatientExamination/{id}: get: tags: - - Examinations + - Examinations operationId: getFromLastPatientExamination parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int32 + - name: id + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/PatientExaminationDTO' security: - - bearerAuth: [] + - bearerAuth: [] /examinations/defaultPatientExamination: get: tags: - - Examinations + - Examinations operationId: getDefaultPatientExamination parameters: - - name: patId - in: query - required: true - schema: - type: integer - format: int32 + - name: patId + in: query + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/PatientExaminationDTO' security: - - bearerAuth: [] + - bearerAuth: [] /examinations/byPatientId/{patId}: get: tags: - - Examinations + - Examinations operationId: getByPatientId parameters: - - name: patId - in: path - required: true - schema: - type: integer - format: int32 + - name: patId + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: @@ -5038,39 +5303,39 @@ paths: items: $ref: '#/components/schemas/PatientExaminationDTO' security: - - bearerAuth: [] + - bearerAuth: [] /diseases/{code}: get: tags: - - Diseases + - Diseases operationId: getDiseaseByCode parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/DiseaseDTO' security: - - bearerAuth: [] + - bearerAuth: [] delete: tags: - - Diseases + - Diseases operationId: deleteDisease parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: @@ -5079,14 +5344,14 @@ paths: additionalProperties: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /diseases/opd: get: tags: - - Diseases + - Diseases operationId: getDiseasesOpd responses: - '200': + "200": description: OK content: application/json: @@ -5095,20 +5360,20 @@ paths: items: $ref: '#/components/schemas/DiseaseDTO' security: - - bearerAuth: [] + - bearerAuth: [] /diseases/opd/{typecode}: get: tags: - - Diseases + - Diseases operationId: getDiseasesOpdByCode parameters: - - name: typecode - in: path - required: true - schema: - type: string + - name: typecode + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: @@ -5117,14 +5382,14 @@ paths: items: $ref: '#/components/schemas/DiseaseDTO' security: - - bearerAuth: [] + - bearerAuth: [] /diseases/ipd/out: get: tags: - - Diseases + - Diseases operationId: getDiseasesIpdOut responses: - '200': + "200": description: OK content: application/json: @@ -5133,20 +5398,20 @@ paths: items: $ref: '#/components/schemas/DiseaseDTO' security: - - bearerAuth: [] + - bearerAuth: [] /diseases/ipd/out/{typecode}: get: tags: - - Diseases + - Diseases operationId: getDiseasesIpdOutByCode parameters: - - name: typecode - in: path - required: true - schema: - type: string + - name: typecode + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: @@ -5155,14 +5420,14 @@ paths: items: $ref: '#/components/schemas/DiseaseDTO' security: - - bearerAuth: [] + - bearerAuth: [] /diseases/ipd/in: get: tags: - - Diseases + - Diseases operationId: getDiseasesIpdIn responses: - '200': + "200": description: OK content: application/json: @@ -5171,20 +5436,20 @@ paths: items: $ref: '#/components/schemas/DiseaseDTO' security: - - bearerAuth: [] + - bearerAuth: [] /diseases/ipd/in/{typecode}: get: tags: - - Diseases + - Diseases operationId: getDiseasesIpdInByCode parameters: - - name: typecode - in: path - required: true - schema: - type: string + - name: typecode + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: @@ -5193,14 +5458,14 @@ paths: items: $ref: '#/components/schemas/DiseaseDTO' security: - - bearerAuth: [] + - bearerAuth: [] /diseases/both: get: tags: - - Diseases + - Diseases operationId: getDiseases responses: - '200': + "200": description: OK content: application/json: @@ -5209,20 +5474,20 @@ paths: items: $ref: '#/components/schemas/DiseaseDTO' security: - - bearerAuth: [] + - bearerAuth: [] /diseases/both/{typecode}: get: tags: - - Diseases + - Diseases operationId: getDiseases_1 parameters: - - name: typecode - in: path - required: true - schema: - type: string + - name: typecode + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: @@ -5231,14 +5496,14 @@ paths: items: $ref: '#/components/schemas/DiseaseDTO' security: - - bearerAuth: [] + - bearerAuth: [] /diseases/all: get: tags: - - Diseases + - Diseases operationId: getAllDiseases responses: - '200': + "200": description: OK content: application/json: @@ -5247,21 +5512,21 @@ paths: items: $ref: '#/components/schemas/DiseaseDTO' security: - - bearerAuth: [] + - bearerAuth: [] /bills/pending: get: tags: - - Bills + - Bills operationId: getPendingBills parameters: - - name: patient_code - in: query - required: true - schema: - type: integer - format: int32 + - name: patient_code + in: query + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: @@ -5270,21 +5535,21 @@ paths: items: $ref: '#/components/schemas/BillDTO' security: - - bearerAuth: [] + - bearerAuth: [] /bills/pending/affiliate: get: tags: - - Bills + - Bills operationId: getPendingBillsAffiliate parameters: - - name: patient_code - in: query - required: true - schema: - type: integer - format: int32 + - name: patient_code + in: query + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: @@ -5293,31 +5558,31 @@ paths: items: $ref: '#/components/schemas/BillDTO' security: - - bearerAuth: [] + - bearerAuth: [] /bills/payments: get: tags: - - Bills + - Bills operationId: searchBillsPayments parameters: - - name: datefrom - in: query - required: true - schema: - type: string - - name: dateto - in: query - required: true - schema: - type: string - - name: patient_code - in: query - required: false - schema: - type: integer - format: int32 + - name: datefrom + in: query + required: true + schema: + type: string + - name: dateto + in: query + required: true + schema: + type: string + - name: patient_code + in: query + required: false + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: @@ -5326,21 +5591,21 @@ paths: items: $ref: '#/components/schemas/BillPaymentsDTO' security: - - bearerAuth: [] + - bearerAuth: [] /bills/payments/{bill_id}: get: tags: - - Bills + - Bills operationId: getPaymentsByBillId parameters: - - name: bill_id - in: path - required: true - schema: - type: integer - format: int32 + - name: bill_id + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: @@ -5349,14 +5614,14 @@ paths: items: $ref: '#/components/schemas/BillPaymentsDTO' security: - - bearerAuth: [] + - bearerAuth: [] /bills/items: get: tags: - - Bills + - Bills operationId: getDistinctItems responses: - '200': + "200": description: OK content: application/json: @@ -5365,21 +5630,21 @@ paths: items: $ref: '#/components/schemas/BillItemsDTO' security: - - bearerAuth: [] + - bearerAuth: [] /bills/items/{bill_id}: get: tags: - - Bills + - Bills operationId: getItems parameters: - - name: bill_id - in: path - required: true - schema: - type: integer - format: int32 + - name: bill_id + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: @@ -5388,42 +5653,42 @@ paths: items: $ref: '#/components/schemas/BillItemsDTO' security: - - bearerAuth: [] + - bearerAuth: [] /agetypes/{index}: get: tags: - - AgeTypes + - AgeTypes operationId: getAgeTypeByIndex parameters: - - name: index - in: path - required: true - schema: - type: integer - format: int32 + - name: index + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/AgeType' security: - - bearerAuth: [] + - bearerAuth: [] /agetypes/code: get: tags: - - AgeTypes + - AgeTypes operationId: getAgeTypeCodeByAge parameters: - - name: age - in: query - required: true - schema: - type: integer - format: int32 + - name: age + in: query + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: @@ -5432,21 +5697,23 @@ paths: additionalProperties: type: string security: - - bearerAuth: [] + - bearerAuth: [] /admissions/patient/{patientCode}: get: tags: - - Admissions + - Admissions operationId: getAdmissions_1 parameters: - - name: patientCode - in: path - required: true - schema: - type: integer - format: int32 + - name: patientCode + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "400": + description: Bad Request + "200": description: OK content: application/json: @@ -5454,145 +5721,145 @@ paths: type: array items: $ref: '#/components/schemas/AdmissionDTO' - '400': - description: Bad Request security: - - bearerAuth: [] + - bearerAuth: [] /admissions/getNextProgressiveIdInYear: get: tags: - - Admissions + - Admissions operationId: getNextYProg parameters: - - name: wardcode - in: query - required: true - schema: - type: string + - name: wardcode + in: query + required: true + schema: + type: string responses: - '200': + "400": + description: Bad Request + "200": description: OK content: application/json: schema: type: integer format: int32 - '400': - description: Bad Request security: - - bearerAuth: [] + - bearerAuth: [] /admissions/getBedsOccupationInWard: get: tags: - - Admissions + - Admissions operationId: getUsedWardBed parameters: - - name: wardid - in: query - required: true - schema: - type: string + - name: wardid + in: query + required: true + schema: + type: string responses: - '200': + "400": + description: Bad Request + "200": description: OK content: application/json: schema: type: integer format: int32 - '400': - description: Bad Request security: - - bearerAuth: [] + - bearerAuth: [] /admissions/discharges: get: tags: - - Admissions + - Admissions operationId: getDischarges parameters: - - name: dischargerange - in: query - required: true - schema: - type: array - items: - type: string - - name: page - in: query - required: false - schema: - type: integer - format: int32 - default: 0 - - name: size - in: query - required: false - schema: - type: integer - format: int32 - default: 80 - responses: - '200': + - name: dischargerange + in: query + required: true + schema: + type: array + items: + type: string + - name: page + in: query + required: false + schema: + type: integer + format: int32 + default: 0 + - name: size + in: query + required: false + schema: + type: integer + format: int32 + default: 80 + responses: + "400": + description: Bad Request + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/PageAdmissionDTO' - '400': - description: Bad Request security: - - bearerAuth: [] + - bearerAuth: [] /admissions/current: get: tags: - - Admissions + - Admissions operationId: getCurrentAdmission parameters: - - name: patientCode - in: query - required: true - schema: - type: integer - format: int32 + - name: patientCode + in: query + required: true + schema: + type: integer + format: int32 responses: - '200': + "400": + description: Bad Request + "200": description: OK content: application/json: schema: $ref: '#/components/schemas/AdmissionDTO' - '400': - description: Bad Request security: - - bearerAuth: [] + - bearerAuth: [] /admissions/admittedPatients: get: tags: - - Admissions + - Admissions operationId: getAdmittedPatients parameters: - - name: searchterms - in: query - required: false - schema: + - name: searchterms + in: query + required: false + schema: + type: string + default: "" + - name: admissionrange + in: query + required: false + schema: + type: array + items: + type: string + - name: dischargerange + in: query + required: false + schema: + type: array + items: type: string - default: '' - - name: admissionrange - in: query - required: false - schema: - type: array - items: - type: string - - name: dischargerange - in: query - required: false - schema: - type: array - items: - type: string responses: - '200': + "400": + description: Bad Request + "200": description: OK content: application/json: @@ -5600,165 +5867,143 @@ paths: type: array items: $ref: '#/components/schemas/AdmittedPatientDTO' - '400': - description: Bad Request security: - - bearerAuth: [] + - bearerAuth: [] /wards/{code}: delete: tags: - - Wards + - Wards operationId: deleteWard parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /visits/delete/{patID}: delete: tags: - - Visit + - Visit operationId: deleteVisitsRelatedToPatient parameters: - - name: patID - in: path - required: true - schema: - type: integer - format: int32 + - name: patID + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /vaccinetypes/{code}: delete: tags: - - Vaccine Type + - Vaccine Type operationId: deleteVaccineType parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /vaccines/{code}: delete: tags: - - Vaccines + - Vaccines operationId: deleteVaccine parameters: - - name: code - in: path - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - type: boolean - security: - - bearerAuth: [] - /users/groups/{group_code}: - delete: - tags: - - Users - operationId: deleteGroup - parameters: - - name: group_code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /operations/rows/{code}: delete: tags: - - Operations + - Operations operationId: deleteOperationRow parameters: - - name: code - in: path - required: true - schema: - type: integer - format: int32 + - name: code + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /medicaltypes/{code}: delete: tags: - - Medical Types + - Medical Types operationId: deleteMedicalType parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /diseasetypes/{code}: delete: tags: - - Disease Types + - Disease Types operationId: deleteDiseaseType parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: @@ -5767,119 +6012,119 @@ paths: additionalProperties: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /dischargetypes/{code}: delete: tags: - - DischargeType + - DischargeType operationId: deleteDischargeType parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /deliverytypes/{code}: delete: tags: - - Delivery Type + - Delivery Type operationId: deleteDeliveryType parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /deliveryresulttypes/{code}: delete: tags: - - Delivery Result Type + - Delivery Result Type operationId: deleteDeliveryResultType parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /admissiontypes/{code}: delete: tags: - - AdmissionTypes + - AdmissionTypes operationId: deleteAdmissionType parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string responses: - '200': + "200": description: OK content: application/json: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /admissions/{id}: delete: tags: - - Admissions + - Admissions operationId: deleteAdmissionType_1 parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int32 + - name: id + in: path + required: true + schema: + type: integer + format: int32 responses: - '200': + "400": + description: Bad Request + "200": description: OK content: application/json: schema: type: boolean - '400': - description: Bad Request security: - - bearerAuth: [] + - bearerAuth: [] components: schemas: WardDTO: required: - - beds - - description - - docs - - nurs - - visitDuration + - beds + - description + - docs + - nurs + - visitDuration type: object properties: code: @@ -5919,24 +6164,24 @@ components: description: lock format: int32 example: 0 - pharmacy: + female: type: boolean male: type: boolean - female: - type: boolean opd: type: boolean + pharmacy: + type: boolean PatientDTO: required: - - age - - bloodType - - city - - fatherName - - firstName - - motherName - - secondName - - sex + - age + - bloodType + - city + - fatherName + - firstName + - motherName + - secondName + - sex type: object properties: code: @@ -5959,7 +6204,7 @@ components: birthDate: type: string description: Birth date - example: '1979-05-01' + example: 1979-05-01 age: type: integer description: Age @@ -5968,19 +6213,19 @@ components: agetype: type: string description: Age type - example: 'null' + example: "null" sex: type: string description: Sex example: M enum: - - M - - F + - M + - F address: maxLength: 50 type: string description: Address - example: Via Roma, 12 + example: "Via Roma, 12" city: maxLength: 50 type: string @@ -5993,7 +6238,7 @@ components: maxLength: 50 type: string description: Telephone - example: '+393456789012' + example: "+393456789012" note: maxLength: 65535 type: string @@ -6006,11 +6251,11 @@ components: example: Roberta mother: type: string - description: Mother's status (D=dead, A=alive) + description: "Mother's status (D=dead, A=alive)" example: A enum: - - D - - A + - D + - A fatherName: maxLength: 50 type: string @@ -6018,38 +6263,38 @@ components: example: Giuseppe father: type: string - description: Father's status (D=dead, A=alive) + description: "Father's status (D=dead, A=alive)" example: D enum: - - D - - A + - D + - A bloodType: type: string - description: Blood type (0-/+, A-/+ , B-/+, AB-/+) + description: "Blood type (0-/+, A-/+ , B-/+, AB-/+)" example: A+ enum: - - 0- - - 0+ - - A- - - A+ - - B- - - B+ - - AB- - - AB+ + - 0- + - 0+ + - A- + - A+ + - B- + - B+ + - AB- + - AB+ hasInsurance: type: string - description: HasInsurance (Y=Yes, N=no) - example: 'N' + description: "HasInsurance (Y=Yes, N=no)" + example: "N" enum: - - 'Y' - - 'N' + - "Y" + - "N" parentTogether: type: string - description: Parent together (Y=Yes, N=no) - example: 'N' + description: "Parent together (Y=Yes, N=no)" + example: "N" enum: - - 'Y' - - 'N' + - "Y" + - "N" taxCode: maxLength: 30 type: string @@ -6084,8 +6329,8 @@ components: description: Status example: I enum: - - I - - O + - I + - O consensusFlag: type: boolean description: Consensus flag @@ -6097,8 +6342,8 @@ components: description: Class representing a patient VisitDTO: required: - - date - - patient + - date + - patient type: object properties: visitID: @@ -6110,7 +6355,7 @@ components: date: type: string description: Date of the visit - example: '2020-03-19T14:58:00' + example: 2020-03-19T14:58:00 note: maxLength: 65535 type: string @@ -6131,8 +6376,8 @@ components: description: Class representing a vaccine type VaccineTypeDTO: required: - - code - - description + - code + - description type: object properties: code: @@ -6148,34 +6393,77 @@ components: description: Class representing a vaccine type VaccineDTO: required: - - code - - description - - vaccineType + - code + - description + - vaccineType type: object properties: code: maxLength: 10 type: string description: Code of the vaccine - example: '1' + example: "1" description: maxLength: 50 type: string - description: Description of the vaccine - example: BCG - vaccineType: - $ref: '#/components/schemas/VaccineTypeDTO' - lock: + description: Description of the vaccine + example: BCG + vaccineType: + $ref: '#/components/schemas/VaccineTypeDTO' + lock: + type: integer + description: Lock + format: int32 + example: 0 + description: Class representing a vaccine + UserSettingDTO: + required: + - configName + - configValue + - id + - user + type: object + properties: + id: + type: integer + description: The id of the setting (must be unique) + format: int32 + example: 1 + configName: + maxLength: 50 + type: string + description: The name of the setting + example: dashboard + user: + type: string + description: The name of the user + example: admin + configValue: + maxLength: 65535 + type: string + description: The value of the user + PermissionDTO: + required: + - description + - id + type: object + properties: + name: + type: string + id: type: integer - description: Lock + description: The permission id format: int32 - example: 0 - description: Class representing a vaccine + description: + maxLength: 255 + type: string + description: The permission description + description: List of group's permissions UserDTO: required: - - passwd - - userGroupName - - userName + - passwd + - userGroupName + - userName type: object properties: userName: @@ -6197,7 +6485,7 @@ components: example: Lab chief technician UserGroupDTO: required: - - code + - code type: object properties: code: @@ -6210,44 +6498,32 @@ components: type: string description: The description of the group example: Staff members working in the laboratory + permissions: + type: array + description: List of group's permissions + items: + $ref: '#/components/schemas/PermissionDTO' description: The user's group - UserSettingDTO: - required: - - configName - - configValue - - id - - user + UserProfileDTO: type: object properties: - id: - type: integer - description: The id of the setting (must be unique) - format: int32 - example: 1 - configName: - maxLength: 50 - type: string - description: The name of the setting - example: dashboard - user: - type: string - description: The name of the user - example: admin - configValue: - maxLength: 65535 + userName: type: string - description: The value of the user + permissions: + type: array + items: + type: string + userGroup: + $ref: '#/components/schemas/UserGroupDTO' SupplierDTO: required: - - supId - - supName + - supId + - supName type: object properties: supId: type: integer - description: The supplier's ID format: int32 - example: 111 supName: maxLength: 100 type: string @@ -6257,22 +6533,22 @@ components: maxLength: 150 type: string description: The supplier's address - example: 25 Rue Ministre, Dschang + example: "25 Rue Ministre, Dschang" supTaxcode: maxLength: 50 type: string description: The supplier's tax code - example: '5221' + example: "5221" supPhone: maxLength: 20 type: string description: The supplier's phone - example: '+237654120145' + example: "+237654120145" supFax: maxLength: 20 type: string description: The supplier's fax number - example: '+237654120145' + example: "+237654120145" supEmail: maxLength: 100 type: string @@ -6284,11 +6560,11 @@ components: description: The supplier's notes PricesOthersDTO: required: - - code - - daily - - description - - ipdInclude - - opdInclude + - code + - daily + - description + - ipdInclude + - opdInclude type: object properties: id: @@ -6351,8 +6627,8 @@ components: description: Class representing a price list PregnantTreatmentTypeDTO: required: - - code - - description + - code + - description type: object properties: code: @@ -6368,35 +6644,12 @@ components: format: int32 readOnly: true description: Class representing a pregnant treatment type - PermissionDTO: - required: - - description - - id - - userGroupIds - type: object - properties: - name: - type: string - id: - type: integer - description: The permission id - format: int32 - description: - maxLength: 255 - type: string - description: The permission description - userGroupIds: - type: array - description: The user group id - items: - type: string - description: The user group id PatientVaccineDTO: required: - - patient - - progr - - vaccine - - vaccineDate + - patient + - progr + - vaccine + - vaccineDate type: object properties: code: @@ -6425,7 +6678,7 @@ components: readOnly: true PatientConsensusDTO: required: - - patientId + - patientId type: object properties: consensusFlag: @@ -6441,8 +6694,8 @@ components: description: Class representing a patient consensus OperationTypeDTO: required: - - code - - description + - code + - description type: object properties: code: @@ -6455,10 +6708,10 @@ components: description: The operation type OperationDTO: required: - - code - - description - - major - - type + - code + - description + - major + - type type: object properties: code: @@ -6482,10 +6735,10 @@ components: example: 0 AdmissionDTO: required: - - admDate - - admitted - - deleted - - type + - admDate + - admitted + - deleted + - type type: object properties: id: @@ -6501,7 +6754,7 @@ components: type: type: string description: Type of admission - example: 'N' + example: "N" ward: $ref: '#/components/schemas/WardDTO' patient: @@ -6527,7 +6780,7 @@ components: opResult: type: string description: 'Operation result value is ''P'' or ''N'' ' - example: 'N' + example: "N" disDate: type: string description: Discharge date @@ -6580,8 +6833,8 @@ components: example: 0 deleted: type: string - description: 'Flag record deleted, values are ''Y'' OR ''N'' ' - example: 'N' + description: "Flag record deleted, values are 'Y' OR 'N' " + example: "N" yprog: type: integer format: int32 @@ -6590,8 +6843,8 @@ components: description: The admission AdmissionTypeDTO: required: - - code - - description + - code + - description type: object properties: code: @@ -6606,15 +6859,15 @@ components: description: Admission type BillDTO: required: - - amount - - balance - - date - - listName - - patName - - patientTrue - - status - - update - - user + - amount + - balance + - date + - listName + - patName + - patientTrue + - status + - update + - user type: object properties: id: @@ -6628,11 +6881,11 @@ components: date: type: string description: Date of bill creation - example: '2020-03-19T14:58:00.000Z' + example: 2020-03-19T14:58:00.000Z update: type: string description: Date of bill updated - example: '2020-03-19T14:58:00.000Z' + example: 2020-03-19T14:58:00.000Z listName: maxLength: 50 type: string @@ -6670,8 +6923,8 @@ components: description: Class representing a bill DeliveryResultTypeDTO: required: - - code - - description + - code + - description type: object properties: code: @@ -6686,14 +6939,14 @@ components: description: Delivery result type DeliveryTypeDTO: required: - - code - - description + - code + - description type: object properties: code: type: string description: Code of the delivery type - example: 'N' + example: "N" description: maxLength: 50 type: string @@ -6702,8 +6955,8 @@ components: description: Delivery type DischargeTypeDTO: required: - - code - - description + - code + - description type: object properties: code: @@ -6718,19 +6971,19 @@ components: description: DisChargeType DiseaseDTO: required: - - code - - description - - diseaseType - - ipdInInclude - - ipdOutInclude - - opdInclude + - code + - description + - diseaseType + - ipdInInclude + - ipdOutInclude + - opdInclude type: object properties: code: maxLength: 10 type: string description: Disease code - example: '99' + example: "99" description: maxLength: 50 type: string @@ -6761,8 +7014,8 @@ components: description: Class representing a disease DiseaseTypeDTO: required: - - code - - description + - code + - description type: object properties: code: @@ -6776,11 +7029,11 @@ components: description: Class representing a disease type OpdDTO: required: - - age - - newPatient - - note - - sex - - ward + - age + - newPatient + - note + - sex + - ward type: object properties: code: @@ -6814,7 +7067,7 @@ components: ageType: type: string description: Age type - example: 'null' + example: "null" note: maxLength: 65535 type: string @@ -6834,7 +7087,7 @@ components: newPatient: type: string description: New(N) or Reattendance(R) patient - example: 'N' + example: "N" referralFrom: type: string description: Referral from another unit @@ -6875,10 +7128,10 @@ components: description: The opd OperationRowDTO: required: - - opDate - - opResult - - operation - - prescriber + - opDate + - opResult + - operation + - prescriber type: object properties: id: @@ -6926,9 +7179,9 @@ components: $ref: '#/components/schemas/OperationRowDTO' MovementTypeDTO: required: - - code - - description - - type + - code + - description + - type type: object properties: code: @@ -6944,11 +7197,11 @@ components: type: type: string description: Type of the movement type - example: '-' + example: "-" MedicalTypeDTO: required: - - code - - description + - code + - description type: object properties: code: @@ -7013,10 +7266,10 @@ components: example: 0 MalnutritionDTO: required: - - admission - - dateSupp - - height - - weight + - admission + - dateSupp + - height + - weight type: object properties: code: @@ -7027,11 +7280,11 @@ components: dateSupp: type: string description: The date of this malnutrition control - example: '1979-05-01T11:20:33' + example: 1979-05-01T11:20:33 dateConf: type: string description: The date of the next malnutrition control - example: '1979-05-01T11:20:33' + example: 1979-05-01T11:20:33 admission: $ref: '#/components/schemas/AdmissionDTO' height: @@ -7056,7 +7309,7 @@ components: maxLength: 10 type: string description: Exam Code - example: '01.01' + example: "01.01" description: maxLength: 100 type: string @@ -7144,10 +7397,10 @@ components: inOutPatient: type: string description: Laboratory Patient InOut - example: '0' + example: "0" enum: - - I - - O + - I + - O age: type: integer description: Laboratory Patient Age @@ -7161,11 +7414,11 @@ components: description: Laboratory status example: DRAFT enum: - - draft - - open - - done - - invalid - - deleted + - draft + - open + - done + - invalid + - deleted HospitalDTO: type: object properties: @@ -7216,8 +7469,8 @@ components: example: 0 PatientExaminationDTO: required: - - patientCode - - pex_date + - patientCode + - pex_date type: object properties: pex_ID: @@ -7228,7 +7481,7 @@ components: pex_date: type: string description: Date of Patient Examination - example: '2020-03-19T14:58:00.000Z' + example: 2020-03-19T14:58:00.000Z patientCode: type: integer description: Patient Examination Code @@ -7270,12 +7523,12 @@ components: description: Patient ausculation example: normal enum: - - normal - - wheezes - - rhonchi - - crackles - - stridor - - bronchial + - normal + - wheezes + - rhonchi + - crackles + - stridor + - bronchial pex_hgt: type: integer description: Hemo Glucose Test @@ -7289,14 +7542,14 @@ components: description: Diuresis description example: physiological enum: - - physiological - - oliguria - - anuria - - frequent - - nocturia - - stranguria - - hematuria - - pyuria + - physiological + - oliguria + - anuria + - frequent + - nocturia + - stranguria + - hematuria + - pyuria pex_note: maxLength: 2000 type: string @@ -7306,18 +7559,18 @@ components: description: Bowel Function example: regular enum: - - constipation - - regular - - diarrheal - - irregular + - constipation + - regular + - diarrheal + - irregular BillItemsDTO: required: - - itemAmount - - itemDescription - - itemDisplayCode - - itemId - - itemQuantity - - priceId + - itemAmount + - itemDescription + - itemDisplayCode + - itemId + - itemQuantity + - priceId type: object properties: id: @@ -7330,7 +7583,7 @@ components: priceId: type: string description: The price Id - example: '104' + example: "104" itemDescription: type: string description: Item description @@ -7352,7 +7605,7 @@ components: itemId: type: string description: Item id - example: '3' + example: "3" hashCode: type: integer format: int32 @@ -7362,10 +7615,10 @@ components: description: Class representing a billItem BillPaymentsDTO: required: - - amount - - billId - - date - - user + - amount + - billId + - date + - user type: object properties: id: @@ -7379,7 +7632,7 @@ components: type: string description: Date of payment format: date-time - example: '2020-03-19T14:58:00Z' + example: 2020-03-19T14:58:00Z amount: type: number description: The payment amount @@ -7396,8 +7649,8 @@ components: description: Class representing a billPayment FullBillDTO: required: - - bill - - billItems + - bill + - billItems type: object properties: bill: @@ -7414,9 +7667,9 @@ components: $ref: '#/components/schemas/BillPaymentsDTO' AgeTypeDTO: required: - - description - - from - - to + - description + - from + - to type: object properties: code: @@ -7439,16 +7692,16 @@ components: description: Class representing an age type which is typically a range TherapyRowDTO: required: - - endDate - - freqInDay - - freqInPeriod - - medicalId - - notifyInt - - patID - - qty - - smsInt - - startDate - - unitID + - endDate + - freqInDay + - freqInPeriod + - medicalId + - notifyInt + - patID + - qty + - smsInt + - startDate + - unitID type: object properties: therapyID: @@ -7498,29 +7751,28 @@ components: example: Sample note notifyInt: type: integer - description: >- - the notify flag: 1 if the notification need to be activated, 0 - otherwise + description: "the notify flag: 1 if the notification need to be activated,\ + \ 0 otherwise" format: int32 example: 0 smsInt: type: integer - description: 'The sms flag: 1 if sms need to be sent to patient, 0 otherwise' + description: "The sms flag: 1 if sms need to be sent to patient, 0 otherwise" format: int32 example: 0 Patient: required: - - age - - birthDate - - bloodType - - city - - deleted - - fatherName - - firstName - - motherName - - name - - secondName - - sex + - age + - birthDate + - bloodType + - city + - deleted + - fatherName + - firstName + - motherName + - name + - secondName + - sex type: object properties: createdBy: @@ -7663,12 +7915,6 @@ components: alpha: type: integer format: int32 - rgb: - type: integer - format: int32 - transparency: - type: integer - format: int32 colorSpace: type: object properties: @@ -7680,39 +7926,12 @@ components: format: int32 cs_sRGB: type: boolean - xormode: - type: object - properties: - red: - type: integer - format: int32 - green: - type: integer - format: int32 - blue: - type: integer - format: int32 - alpha: - type: integer - format: int32 rgb: type: integer format: int32 transparency: type: integer format: int32 - colorSpace: - type: object - properties: - type: - type: integer - format: int32 - numComponents: - type: integer - format: int32 - cs_sRGB: - type: boolean - writeOnly: true font: type: object properties: @@ -7730,6 +7949,8 @@ components: type: object family: type: string + fontName: + type: string transform: type: object properties: @@ -7756,9 +7977,6 @@ components: format: int32 identity: type: boolean - determinant: - type: number - format: double toRotation: type: number format: double @@ -7767,34 +7985,35 @@ components: type: integer format: int32 writeOnly: true - psname: - type: string - fontName: - type: string - size2D: - type: number - format: float - plain: - type: boolean + determinant: + type: number + format: double bold: type: boolean italic: type: boolean - transformed: - type: boolean numGlyphs: type: integer format: int32 missingGlyphCode: type: integer format: int32 + italicAngle: + type: number + format: float + transformed: + type: boolean + plain: + type: boolean + psname: + type: string + size2D: + type: number + format: float availableAttributes: type: array items: type: object - italicAngle: - type: number - format: float fontMetrics: type: object properties: @@ -7815,6 +8034,8 @@ components: type: object family: type: string + fontName: + type: string transform: type: object properties: @@ -7841,9 +8062,6 @@ components: format: int32 identity: type: boolean - determinant: - type: number - format: double toRotation: type: number format: double @@ -7852,37 +8070,35 @@ components: type: integer format: int32 writeOnly: true - psname: - type: string - fontName: - type: string - size2D: - type: number - format: float - plain: - type: boolean + determinant: + type: number + format: double bold: type: boolean italic: type: boolean - transformed: - type: boolean numGlyphs: type: integer format: int32 missingGlyphCode: type: integer format: int32 + italicAngle: + type: number + format: float + transformed: + type: boolean + plain: + type: boolean + psname: + type: string + size2D: + type: number + format: float availableAttributes: type: array items: type: object - italicAngle: - type: number - format: float - height: - type: integer - format: int32 ascent: type: integer format: int32 @@ -7892,6 +8108,17 @@ components: leading: type: integer format: int32 + height: + type: integer + format: int32 + maxDescent: + type: integer + format: int32 + widths: + type: array + items: + type: integer + format: int32 fontRenderContext: type: object properties: @@ -7921,9 +8148,6 @@ components: format: int32 identity: type: boolean - determinant: - type: number - format: double toRotation: type: number format: double @@ -7932,12 +8156,15 @@ components: type: integer format: int32 writeOnly: true - transformed: - type: boolean + determinant: + type: number + format: double antiAliasingHint: type: object fractionalMetricsHint: type: object + transformed: + type: boolean antiAliased: type: boolean transformType: @@ -7946,9 +8173,6 @@ components: maxAscent: type: integer format: int32 - maxDescent: - type: integer - format: int32 maxDecent: type: integer format: int32 @@ -7956,18 +8180,13 @@ components: maxAdvance: type: integer format: int32 - widths: - type: array - items: - type: integer - format: int32 clipBounds: type: object properties: x: type: number format: double - 'y': + "y": type: number format: double width: @@ -7984,7 +8203,7 @@ components: x: type: number format: double - 'y': + "y": type: number format: double size: @@ -8001,22 +8220,16 @@ components: properties: empty: type: boolean - 'y': - type: number - format: double - x: + width: type: number format: double height: type: number format: double - width: - type: number - format: double - minX: + "y": type: number format: double - minY: + x: type: number format: double maxX: @@ -8031,27 +8244,27 @@ components: centerY: type: number format: double + minX: + type: number + format: double + minY: + type: number + format: double rect: type: object properties: empty: type: boolean - 'y': - type: number - format: double - x: + width: type: number format: double height: type: number format: double - width: - type: number - format: double - minX: + "y": type: number format: double - minY: + x: type: number format: double maxX: @@ -8066,13 +8279,13 @@ components: centerY: type: number format: double + minX: + type: number + format: double + minY: + type: number + format: double writeOnly: true - minX: - type: number - format: double - minY: - type: number - format: double maxX: type: number format: double @@ -8085,6 +8298,45 @@ components: centerY: type: number format: double + minX: + type: number + format: double + minY: + type: number + format: double + xormode: + type: object + properties: + red: + type: integer + format: int32 + green: + type: integer + format: int32 + blue: + type: integer + format: int32 + alpha: + type: integer + format: int32 + colorSpace: + type: object + properties: + type: + type: integer + format: int32 + numComponents: + type: integer + format: int32 + cs_sRGB: + type: boolean + rgb: + type: integer + format: int32 + transparency: + type: integer + format: int32 + writeOnly: true clip: type: object properties: @@ -8094,7 +8346,7 @@ components: x: type: number format: double - 'y': + "y": type: number format: double width: @@ -8111,7 +8363,7 @@ components: x: type: number format: double - 'y': + "y": type: number format: double size: @@ -8128,22 +8380,16 @@ components: properties: empty: type: boolean - 'y': - type: number - format: double - x: + width: type: number format: double height: type: number format: double - width: - type: number - format: double - minX: + "y": type: number format: double - minY: + x: type: number format: double maxX: @@ -8158,27 +8404,27 @@ components: centerY: type: number format: double + minX: + type: number + format: double + minY: + type: number + format: double rect: type: object properties: empty: type: boolean - 'y': - type: number - format: double - x: + width: type: number format: double height: type: number format: double - width: - type: number - format: double - minX: + "y": type: number format: double - minY: + x: type: number format: double maxX: @@ -8193,13 +8439,13 @@ components: centerY: type: number format: double + minX: + type: number + format: double + minY: + type: number + format: double writeOnly: true - minX: - type: number - format: double - minY: - type: number - format: double maxX: type: number format: double @@ -8212,27 +8458,27 @@ components: centerY: type: number format: double + minX: + type: number + format: double + minY: + type: number + format: double bounds2D: type: object properties: empty: type: boolean - 'y': - type: number - format: double - x: + width: type: number format: double height: type: number format: double - width: - type: number - format: double - minX: + "y": type: number format: double - minY: + x: type: number format: double maxX: @@ -8247,13 +8493,19 @@ components: centerY: type: number format: double + minX: + type: number + format: double + minY: + type: number + format: double clipRect: type: object properties: x: type: number format: double - 'y': + "y": type: number format: double width: @@ -8270,7 +8522,7 @@ components: x: type: number format: double - 'y': + "y": type: number format: double size: @@ -8287,22 +8539,16 @@ components: properties: empty: type: boolean - 'y': - type: number - format: double - x: + width: type: number format: double height: type: number format: double - width: - type: number - format: double - minX: + "y": type: number format: double - minY: + x: type: number format: double maxX: @@ -8317,27 +8563,27 @@ components: centerY: type: number format: double + minX: + type: number + format: double + minY: + type: number + format: double rect: type: object properties: empty: type: boolean - 'y': - type: number - format: double - x: + width: type: number format: double height: type: number format: double - width: - type: number - format: double - minX: + "y": type: number format: double - minY: + x: type: number format: double maxX: @@ -8352,13 +8598,13 @@ components: centerY: type: number format: double + minX: + type: number + format: double + minY: + type: number + format: double writeOnly: true - minX: - type: number - format: double - minY: - type: number - format: double maxX: type: number format: double @@ -8371,19 +8617,25 @@ components: centerY: type: number format: double + minX: + type: number + format: double + minY: + type: number + format: double deprecated: true TherapyRow: required: - - endDate - - freqInDay - - freqInPeriod - - medicalId - - notifyInt - - patient - - qty - - smsInt - - startDate - - unitID + - endDate + - freqInDay + - freqInPeriod + - medicalId + - notifyInt + - patient + - qty + - smsInt + - startDate + - unitID type: object properties: createdBy: @@ -8433,10 +8685,10 @@ components: smsInt: type: integer format: int32 - notify: - type: boolean sms: type: boolean + notify: + type: boolean medical: type: integer format: int32 @@ -8457,8 +8709,8 @@ components: type: array description: The dates of the therapy example: - - '2022-01-01T10:00:00' - - '2022-01-02T15:30:00' + - 2022-01-01T10:00:00 + - 2022-01-02T15:30:00 items: type: string description: The dates of the therapy @@ -8485,24 +8737,84 @@ components: example: Sample note notify: type: boolean - description: >- - The notify flag: true if the notification need to be activated, - false otherwise + description: "The notify flag: true if the notification need to be activated,\ + \ false otherwise" example: false sms: type: boolean - description: >- - The sms flag: true if sms need to be sent to patient, false - otherwise + description: "The sms flag: true if sms need to be sent to patient, false\ + \ otherwise" example: false + LotDTO: + required: + - code + - dueDate + - preparationDate + type: object + properties: + code: + maxLength: 50 + type: string + description: The lot's code + example: LT001 + preparationDate: + type: string + description: The preparation date + example: 2020-06-24 + dueDate: + type: string + description: The due date + example: 2021-06-24 + cost: + type: number + description: The lot's code + example: 750 + description: The lot + MovementDTO: + required: + - date + - medical + - quantity + - refNo + - type + type: object + properties: + code: + type: integer + description: The movement code + format: int32 + example: 1 + medical: + $ref: '#/components/schemas/MedicalDTO' + type: + $ref: '#/components/schemas/MovementTypeDTO' + ward: + $ref: '#/components/schemas/WardDTO' + lot: + $ref: '#/components/schemas/LotDTO' + date: + type: string + description: The movement date + example: 2020-06-24 + quantity: + type: integer + description: The movement's medical quantity + format: int32 + example: 50 + supplier: + $ref: '#/components/schemas/SupplierDTO' + refNo: + type: string + description: The movement reference + example: MVN152445 SmsDTO: required: - - module - - smsDate - - smsDateSched - - smsNumber - - smsText - - smsUser + - module + - smsDate + - smsDateSched + - smsNumber + - smsText + - smsUser type: object properties: smsId: @@ -8517,12 +8829,12 @@ components: smsDateSched: type: string description: SMS scheduled date - example: '2020-07-28T00:00:00' + example: 2020-07-28T00:00:00 smsNumber: maxLength: 45 type: string description: SMS target phone number - example: '+237671302313' + example: "+237671302313" smsText: maxLength: 160 type: string @@ -8531,7 +8843,7 @@ components: smsDateSent: type: string description: SMS sent date - example: '2020-07-28T00:00:00' + example: 2020-07-28T00:00:00 smsUser: maxLength: 50 type: string @@ -8548,11 +8860,11 @@ components: description: SMS module Id MovementWardDTO: required: - - date - - description - - quantity - - units - - ward + - date + - description + - quantity + - units + - ward type: object properties: code: @@ -8566,7 +8878,7 @@ components: type: string description: The movement ward's date format: date - example: '2020-06-07' + example: 2020-06-07 patient: $ref: '#/components/schemas/PatientDTO' age: @@ -8576,7 +8888,8 @@ components: example: 21 weight: type: number - description: The patient's weight in case the movement is associated to a patient + description: The patient's weight in case the movement is associated to + a patient format: float example: 75 description: @@ -8598,68 +8911,6 @@ components: $ref: '#/components/schemas/WardDTO' wardFrom: $ref: '#/components/schemas/WardDTO' - LotDTO: - required: - - code - - dueDate - - preparationDate - type: object - properties: - code: - maxLength: 50 - type: string - description: The lot's code - example: LT001 - preparationDate: - type: string - description: The preparation date - example: '2020-06-24' - dueDate: - type: string - description: The due date - example: '2021-06-24' - cost: - type: number - description: The lot's code - example: 750 - description: The lot - MovementDTO: - required: - - date - - medical - - quantity - - refNo - - type - type: object - properties: - code: - type: integer - description: The movement code - format: int32 - example: 1 - medical: - $ref: '#/components/schemas/MedicalDTO' - type: - $ref: '#/components/schemas/MovementTypeDTO' - ward: - $ref: '#/components/schemas/WardDTO' - lot: - $ref: '#/components/schemas/LotDTO' - date: - type: string - description: The movement date - example: '2020-06-24' - quantity: - type: integer - description: The movement's medical quantity - format: int32 - example: 50 - supplier: - $ref: '#/components/schemas/SupplierDTO' - refNo: - type: string - description: The movement reference - example: MVN152445 ExamRowDTO: type: object properties: @@ -8674,26 +8925,20 @@ components: example: NEGATIVE exam: $ref: '#/components/schemas/ExamDTO' - LoginRequest: - required: - - password - - username + TokenRefreshRequest: type: object properties: - username: - type: string - description: User Name - example: admin - password: + refreshToken: type: string - description: Password of user - example: admin LoginResponse: type: object properties: token: type: string description: Token + refreshToken: + type: string + description: RefreshToken type: type: string description: Type of Token @@ -8703,29 +8948,27 @@ components: description: User name example: admin description: Class representing a Login response - LitePermissionDTO: + LoginRequest: + required: + - password + - username type: object properties: - name: + username: type: string - UserProfileDTO: - type: object - properties: - userName: + description: User Name + example: admin + password: type: string - permissions: - type: array - items: - type: string - userGroup: - $ref: '#/components/schemas/UserGroupDTO' + description: Password of user + example: admin PriceDTO: required: - - description - - group - - item - - list - - price + - description + - group + - item + - list + - price type: object properties: id: @@ -8759,10 +9002,10 @@ components: description: Class representing a prices PriceList: required: - - code - - currency - - description - - name + - code + - currency + - description + - name type: object properties: createdBy: @@ -8847,8 +9090,8 @@ components: example: 89 MedicalWardIdDTO: required: - - medical - - ward + - medical + - ward type: object properties: ward: @@ -8877,9 +9120,9 @@ components: $ref: '#/components/schemas/PageInfoDTO' AgeType: required: - - description - - from - - to + - description + - from + - to type: object properties: createdBy: diff --git a/cypress/integrations/admin_activities/hospital/edit_hospital.cy.ts b/cypress/integrations/admin_activities/hospital/edit_hospital.cy.ts new file mode 100644 index 000000000..389641541 --- /dev/null +++ b/cypress/integrations/admin_activities/hospital/edit_hospital.cy.ts @@ -0,0 +1,48 @@ +/// + +const STARTS_PATH = "/admin"; + +describe("Edit Hospital Activity specs", () => { + it("should render the ui", () => { + cy.authenticate(STARTS_PATH); + cy.dataCy("hospital-infos").click(); + cy.dataCy("edit-hospital").click(); + cy.dataCy("activity-title").contains("Edit hospital"); + }); + + it("should fail to edit the hospitalInfo", () => { + cy.byId("description").clear().type("FAIL"); + cy.byId("email").clear().type("luke@hospital.com"); + cy.dataCy("submit-form").click(); + cy.dataCy("dialog-info").should("not.exist"); + cy.dataCy("info-box").contains("Invalid payload"); + }); + + it("should successfully save hospital infos changes", () => { + cy.byId("description").clear().type("St. LUKE Hospital"); + cy.byId("email").clear().type("luke@hospital.com"); + cy.byId("currencyCod").clear().type("FCFA"); + cy.dataCy("submit-form").click(); + cy.dataCy("dialog-info").contains("updated successfully"); + cy.dataCy("approve-dialog").click(); + }); + + it("should redirect after hospital info update", () => { + cy.dataCy("activity-title").contains("Wards"); + }); + + it("should cancel the discard of the hospital infos", () => { + cy.dataCy("edit-hospital").first().click(); + cy.dataCy("cancel-form").click(); + cy.dataCy("dialog-info").contains("lost"); + cy.dataCy("close-dialog").click().click(); + cy.dataCy("dialog-info").should("not.be.visible"); + }); + + it("should cancel the update of the hospital infos", () => { + cy.dataCy("cancel-form").click(); + cy.dataCy("dialog-info").contains("lost"); + cy.dataCy("approve-dialog").click(); + cy.dataCy("activity-title").contains("Wards"); + }); +}); diff --git a/cypress/integrations/admin_activities/wards_activities/add_ward_activity.cy.ts b/cypress/integrations/admin_activities/wards_activities/add_ward_activity.cy.ts index e2f4a3ab5..16a9de629 100644 --- a/cypress/integrations/admin_activities/wards_activities/add_ward_activity.cy.ts +++ b/cypress/integrations/admin_activities/wards_activities/add_ward_activity.cy.ts @@ -14,7 +14,7 @@ describe("Add Ward Activity specs", () => { }); it("should fail to create a new ward", () => { - cy.byId("code").type("FAIL"); + cy.byId("code").type("FL"); cy.byId("description").type("Children ward"); cy.byId("email").type("children.ward@oh.com"); cy.byId("telephone").type("698123234"); diff --git a/docker-compose.yaml b/docker-compose.yaml index ed5559afe..306d544c0 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -15,7 +15,7 @@ x-mariadb: &mariadb-env MARIADB_ROOT_PASSWORD: root MARIADB_USER: isf MARIADB_PASSWORD: isf123 - OH_DEMO_LANG: en + OH_DB_LANG: en x-ui: &ui-env <<: *repository-args PUBLIC_URL: / @@ -73,7 +73,7 @@ services: environment: *mariadb-env ports: - "3306:3306" - command: mysqld --sql_mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" --lower_case_table_names=1 + command: mysqld --sql_mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" --lower_case_table_names=1 --explicit_defaults_for_timestamp=OFF networks: - openhospital diff --git a/docker/Dockerfile.backend b/docker/Dockerfile.backend index 12fed0e4a..ebe3576f2 100644 --- a/docker/Dockerfile.backend +++ b/docker/Dockerfile.backend @@ -29,4 +29,4 @@ RUN --mount=type=cache,target=/root/.m2 mvn clean install -DskipTests=true # CMD mvn spring-boot:run WORKDIR /openhospital-api/target -CMD java -cp "openhospital-api-0.1.0.jar:rsc/:static/" org.springframework.boot.loader.JarLauncher \ No newline at end of file +CMD java -cp "openhospital-api-0.1.0.jar:rsc/:static/" org.springframework.boot.loader.launch.JarLauncher \ No newline at end of file diff --git a/docker/Dockerfile.database b/docker/Dockerfile.database index d14edf71b..ff1ed5940 100644 --- a/docker/Dockerfile.database +++ b/docker/Dockerfile.database @@ -1,5 +1,7 @@ FROM mariadb:10.6.11 +ARG OH_DB_LANG=en + ARG GITHUB_ORG=informatici ARG OH_CORE_BRANCH=develop ARG MARIADB_PORT @@ -7,11 +9,6 @@ ARG MARIADB_DATABASE ARG MARIADB_ROOT_PASSWORD ARG MARIADB_USER ARG MARIADB_PASSWORD -ARG OH_DEMO_LANG -# ENV MYSQL_DATABASE=oh -# ENV MYSQL_ROOT_PASSWORD=root -# ENV MYSQL_USER=isf -# ENV MYSQL_PASSWORD=isf123 RUN apt-get update RUN apt-get install git -y @@ -22,8 +19,8 @@ EXPOSE 3306 RUN cp sql/step_01_create_structure.sql /docker-entrypoint-initdb.d/ RUN cp sql/step_02_dump_menu.sql /docker-entrypoint-initdb.d/ -RUN cp sql/step_03_dump_default_data_en.sql /docker-entrypoint-initdb.d/ -#RUN cp sql/step_04_all_following_steps.sql /docker-entrypoint-initdb.d/ +RUN cp sql/step_03_dump_default_data_${OH_DB_LANG}.sql /docker-entrypoint-initdb.d/ +#COPY sql/step_04_all_following_steps.sql /docker-entrypoint-initdb.d/ RUN cp sql/step_05_update_menu_i18n.sql /docker-entrypoint-initdb.d/ RUN cp sql/step_06_opd_extended.sql /docker-entrypoint-initdb.d/ RUN cp sql/step_07_modifiche_matiri.sql /docker-entrypoint-initdb.d/ @@ -39,7 +36,11 @@ RUN cp sql/step_7* /docker-entrypoint-initdb.d/ RUN cp sql/step_8* /docker-entrypoint-initdb.d/ RUN cp sql/step_9* /docker-entrypoint-initdb.d/ RUN cp sql/step_a1* /docker-entrypoint-initdb.d/ -RUN mkdir data_en && cp sql/data_en/* data_en/ +RUN mkdir data_${OH_DB_LANG} && cp sql/data_${OH_DB_LANG}/* data_${OH_DB_LANG}/ +RUN cp sql/step_03_dump_vaccine_data_${OH_DB_LANG}.sql /docker-entrypoint-initdb.d/step_z100_dump_vaccine_data_${OH_DB_LANG}.sql +RUN cp sql/step_03_dump_dicomtype_data_${OH_DB_LANG}.sql /docker-entrypoint-initdb.d/step_z101_dump_dicomtype_data_${OH_DB_LANG}.sql + +# optional steps #RUN cp sql/delete_all_data.sql /docker-entrypoint-initdb.d/step_9990_delete_all_data.sql #RUN cp sql/load_demo_data.sql /docker-entrypoint-initdb.d/step_9991_load_demo_data.sql #RUN cp sql/extra/reset_admin_password_strong.sql /docker-entrypoint-initdb.d/step_9992_reset_admin_password_strong.sql \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 286d83a23..f656f3e63 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "open-hospital", "version": "0.1.0", "dependencies": { + "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@date-io/date-fns": "^1.3.13", "@emotion/react": "^11.13.0", "@emotion/styled": "^11.13.0", @@ -104,8 +105,8 @@ "start-server-and-test": "^2.0.3", "storybook": "^7.6.15", "storybook-addon-material-ui": "^0.9.0-alpha.24", - "typescript": "^5.2.2", - "webpack": "^5.76.0" + "typescript": "^5.2.0", + "webpack": "^5.94.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -312,7 +313,6 @@ "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==", - "dev": true, "dependencies": { "@babel/types": "^7.22.5" }, @@ -376,7 +376,6 @@ "version": "7.23.10", "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.10.tgz", "integrity": "sha512-2XpP2XhkXzgxecPNEEK8Vz8Asj9aRxt08oKOqtiZoqV2UGZ5T+EkyP9sXQ9nwMxBIG34a7jmasVqoMop7VdPUw==", - "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.22.5", "@babel/helper-environment-visitor": "^7.22.20", @@ -399,7 +398,6 @@ "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, "bin": { "semver": "bin/semver.js" } @@ -450,7 +448,6 @@ "version": "7.22.20", "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", - "dev": true, "engines": { "node": ">=6.9.0" } @@ -459,7 +456,6 @@ "version": "7.23.0", "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", - "dev": true, "dependencies": { "@babel/template": "^7.22.15", "@babel/types": "^7.23.0" @@ -484,7 +480,6 @@ "version": "7.23.0", "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz", "integrity": "sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==", - "dev": true, "dependencies": { "@babel/types": "^7.23.0" }, @@ -526,7 +521,6 @@ "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz", "integrity": "sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==", - "dev": true, "dependencies": { "@babel/types": "^7.22.5" }, @@ -538,7 +532,6 @@ "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", - "dev": true, "engines": { "node": ">=6.9.0" } @@ -564,7 +557,6 @@ "version": "7.22.20", "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz", "integrity": "sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw==", - "dev": true, "dependencies": { "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-member-expression-to-functions": "^7.22.15", @@ -593,7 +585,6 @@ "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz", "integrity": "sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==", - "dev": true, "dependencies": { "@babel/types": "^7.22.5" }, @@ -605,7 +596,6 @@ "version": "7.22.6", "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", - "dev": true, "dependencies": { "@babel/types": "^7.22.5" }, @@ -683,7 +673,6 @@ "version": "7.23.9", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.9.tgz", "integrity": "sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA==", - "dev": true, "bin": { "parser": "bin/babel-parser.js" }, @@ -843,10 +832,17 @@ } }, "node_modules/@babel/plugin-proposal-private-property-in-object": { - "version": "7.21.0-placeholder-for-preset-env.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", - "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", - "dev": true, + "version": "7.21.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.11.tgz", + "integrity": "sha512-0QZ8qP/3RLDVBwBFoWAwCtgcDZJVwA5LUJRZU8x2YFfKNuFq161wK3cuGrALu5yiPu+vzwTAg/sMWVNeWeNyaw==", + "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-property-in-object instead.", + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-create-class-features-plugin": "^7.21.0", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + }, "engines": { "node": ">=6.9.0" }, @@ -1104,7 +1100,6 @@ "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", - "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" }, @@ -2170,6 +2165,19 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-proposal-private-property-in-object": { + "version": "7.21.0-placeholder-for-preset-env.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", + "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/preset-env/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -2412,7 +2420,6 @@ "version": "7.23.9", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.23.9.tgz", "integrity": "sha512-+xrD2BWLpvHKNmX2QbpdpsBaWnRxahMwJjO+KZk2JOElj5nSmKezyS1B4u+QbHMTX69t4ukm6hh9lsYQ7GHCKA==", - "dev": true, "dependencies": { "@babel/code-frame": "^7.23.5", "@babel/parser": "^7.23.9", @@ -4710,33 +4717,33 @@ } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/source-map": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", - "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", "dev": true, "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" } }, "node_modules/@jridgewell/source-map/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" @@ -4749,9 +4756,9 @@ "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.22", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.22.tgz", - "integrity": "sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", @@ -7549,12 +7556,6 @@ "node": ">=0.10.0" } }, - "node_modules/@storybook/builder-webpack5/node_modules/es-module-lexer": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.1.tgz", - "integrity": "sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==", - "dev": true - }, "node_modules/@storybook/builder-webpack5/node_modules/fork-ts-checker-webpack-plugin": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-8.0.0.tgz", @@ -10182,20 +10183,10 @@ "@types/json-schema": "*" } }, - "node_modules/@types/eslint-scope": { - "version": "3.7.4", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", - "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", - "dev": true, - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, "node_modules/@types/estree": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.0.tgz", - "integrity": "sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true }, "node_modules/@types/express": { @@ -11072,148 +11063,148 @@ } }, "node_modules/@webassemblyjs/ast": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", - "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", + "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", "dev": true, "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + "@webassemblyjs/helper-numbers": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6" } }, "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", - "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", "dev": true }, "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", - "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", "dev": true }, "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", - "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", + "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", "dev": true }, "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", - "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", + "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", "dev": true, "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/floating-point-hex-parser": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", "@xtuc/long": "4.2.2" } }, "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", - "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", "dev": true }, "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", - "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", + "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/wasm-gen": "1.12.1" } }, "node_modules/@webassemblyjs/ieee754": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", - "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", + "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", "dev": true, "dependencies": { "@xtuc/ieee754": "^1.2.0" } }, "node_modules/@webassemblyjs/leb128": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", - "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", + "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", "dev": true, "dependencies": { "@xtuc/long": "4.2.2" } }, "node_modules/@webassemblyjs/utf8": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", - "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", + "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", "dev": true }, "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", - "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", + "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/helper-wasm-section": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-opt": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "@webassemblyjs/wast-printer": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/helper-wasm-section": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-opt": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1", + "@webassemblyjs/wast-printer": "1.12.1" } }, "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", - "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", + "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" } }, "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", - "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", + "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1" } }, "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", - "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", + "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" } }, "node_modules/@webassemblyjs/wast-printer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", - "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", + "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/ast": "1.12.1", "@xtuc/long": "4.2.2" } }, @@ -11336,10 +11327,10 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-import-assertions": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", - "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", + "node_modules/acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", "dev": true, "peerDependencies": { "acorn": "^8" @@ -11968,12 +11959,12 @@ } }, "node_modules/axios": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", - "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", "dev": true, "dependencies": { - "follow-redirects": "^1.15.4", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -12558,9 +12549,9 @@ "license": "MIT" }, "node_modules/body-parser": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", - "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", "dev": true, "dependencies": { "bytes": "3.1.2", @@ -12571,7 +12562,7 @@ "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.11.0", + "qs": "6.13.0", "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" @@ -12618,12 +12609,12 @@ "dev": true }, "node_modules/body-parser/node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", "dev": true, "dependencies": { - "side-channel": "^1.0.4" + "side-channel": "^1.0.6" }, "engines": { "node": ">=0.6" @@ -12670,11 +12661,11 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -12912,9 +12903,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001587", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001587.tgz", - "integrity": "sha512-HMFNotUmLXn71BQxg8cijvqxnIAofforZOwGsxyXJ0qugTdspUF4sPSJ2vhgprHCB996tIDzEq1ubumPDV8ULA==", + "version": "1.0.30001666", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001666.tgz", + "integrity": "sha512-gD14ICmoV5ZZM1OdzPWmpx+q4GyefaK06zi8hmfHV5xe4/2nOQX3+Dw5o+fSqOws2xVwL9j+anOPFwHzdEdV4g==", "dev": true, "funding": [ { @@ -12929,7 +12920,8 @@ "type": "github", "url": "https://github.com/sponsors/ai" } - ] + ], + "license": "CC-BY-4.0" }, "node_modules/canvg": { "version": "3.0.10", @@ -14750,9 +14742,9 @@ } }, "node_modules/dompurify": { - "version": "2.4.5", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.4.5.tgz", - "integrity": "sha512-jggCCd+8Iqp4Tsz0nIvpcb22InKEBrGz5dw3EQJMs8HPJDsKbFIO3STYtAvCfDx26Muevn1MHVI0XxjgFfmiSA==", + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.5.6.tgz", + "integrity": "sha512-zUTaUBO8pY4+iJMPE1B9XlO2tXVYIcEA4SNGtvDELzTSCQO7RzH+j7S180BmhmJId78lqGU2z19vgVx2Sxs/PQ==", "optional": true }, "node_modules/domutils": { @@ -14895,9 +14887,9 @@ } }, "node_modules/editorconfig/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" @@ -14989,9 +14981,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz", - "integrity": "sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ==", + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", "dev": true, "dependencies": { "graceful-fs": "^4.2.4", @@ -15201,9 +15193,9 @@ } }, "node_modules/es-module-lexer": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", - "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", + "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", "dev": true }, "node_modules/es-set-tostringtag": { @@ -16375,37 +16367,37 @@ } }, "node_modules/express": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", - "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/express/-/express-4.20.0.tgz", + "integrity": "sha512-pLdae7I6QqShF5PnNTCVn4hI91Dx0Grkn2+IAsMTgMIKuQVte2dN9PeGSSAME2FR8anOhVA62QDIUaWVfEXVLw==", "dev": true, "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.2", + "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", "finalhandler": "1.2.0", "fresh": "0.5.2", "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", + "merge-descriptors": "1.0.3", "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", + "path-to-regexp": "0.1.10", "proxy-addr": "~2.0.7", "qs": "6.11.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", + "send": "0.19.0", + "serve-static": "1.16.0", "setprototypeof": "1.2.0", "statuses": "2.0.1", "type-is": "~1.6.18", @@ -16431,6 +16423,15 @@ "ms": "2.0.0" } }, + "node_modules/express/node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/express/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -16438,9 +16439,9 @@ "dev": true }, "node_modules/express/node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", + "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==", "dev": true }, "node_modules/express/node_modules/qs": { @@ -16740,9 +16741,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -16857,9 +16858,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", + "version": "1.15.8", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.8.tgz", + "integrity": "sha512-xgrmBhBToVKay1q2Tao5LI26B83UhrB/vM1avwVSDzt8rx3rO6AizBAaF46EgksTVr+rFTQaqZZ9MVBfUe4nig==", "dev": true, "funding": [ { @@ -17211,6 +17212,19 @@ "dev": true, "license": "ISC" }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -17564,9 +17578,9 @@ } }, "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, "node_modules/graphemer": { @@ -18899,9 +18913,9 @@ } }, "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -23384,16 +23398,6 @@ "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", "dev": true }, - "node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/lz-string": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", @@ -23428,9 +23432,9 @@ } }, "node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -23527,10 +23531,13 @@ } }, "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", - "dev": true + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/merge-stream": { "version": "2.0.0", @@ -23555,12 +23562,12 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -28004,9 +28011,9 @@ } }, "node_modules/rollup": { - "version": "2.79.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", - "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", + "version": "2.79.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.2.tgz", + "integrity": "sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -28248,9 +28255,9 @@ } }, "node_modules/schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "dependencies": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -28284,12 +28291,9 @@ } }, "node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", - "dependencies": { - "lru-cache": "^6.0.0" - }, + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "bin": { "semver": "bin/semver.js" }, @@ -28298,9 +28302,9 @@ } }, "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", "dev": true, "dependencies": { "debug": "2.6.9", @@ -28355,9 +28359,9 @@ "dev": true }, "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, "dependencies": { "randombytes": "^2.1.0" @@ -28442,9 +28446,9 @@ } }, "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.0.tgz", + "integrity": "sha512-pDLK8zwl2eKaYrs8mrPZBJua4hMplRWJ1tIFksVC3FtBEBnl8dxgeHtsaMS8DhS9i4fLObaon6ABoc4/hQGdPA==", "dev": true, "dependencies": { "encodeurl": "~1.0.2", @@ -28456,6 +28460,63 @@ "node": ">= 0.8.0" } }, + "node_modules/serve-static/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/serve-static/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/serve-static/node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/serve-static/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/serve-static/node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dev": true, + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/set-function-length": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.1.tgz", @@ -28537,14 +28598,18 @@ } }, "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dev": true, "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -29849,13 +29914,13 @@ } }, "node_modules/terser": { - "version": "5.14.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz", - "integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==", + "version": "5.31.6", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.6.tgz", + "integrity": "sha512-PQ4DAriWzKj+qgehQ7LK5bQqCFNMmlhjR2PFFLuqGCpuCAauxemVBWwWOxo3UIwWQx8+Pr61Df++r76wDmkQBg==", "dev": true, "dependencies": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, @@ -29867,16 +29932,16 @@ } }, "node_modules/terser-webpack-plugin": { - "version": "5.3.5", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.5.tgz", - "integrity": "sha512-AOEDLDxD2zylUGf/wxHxklEkOe2/r+seuyOWujejFrIxHf11brA1/dWQNIgXa1c6/Wkxgu7zvv0JhOWfc2ELEA==", + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", + "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", "dev": true, "dependencies": { - "@jridgewell/trace-mapping": "^0.3.14", + "@jridgewell/trace-mapping": "^0.3.20", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.0", - "terser": "^5.14.1" + "serialize-javascript": "^6.0.1", + "terser": "^5.26.0" }, "engines": { "node": ">= 10.13.0" @@ -30895,9 +30960,9 @@ } }, "node_modules/watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", + "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", "dev": true, "dependencies": { "glob-to-regexp": "^0.4.1", @@ -30935,34 +31000,33 @@ } }, "node_modules/webpack": { - "version": "5.76.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.0.tgz", - "integrity": "sha512-l5sOdYBDunyf72HW8dF23rFtWq/7Zgvt/9ftMof71E/yUb1YLOBmTgA2K4vQthB3kotMrSj609txVE0dnr2fjA==", + "version": "5.94.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz", + "integrity": "sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==", "dev": true, "dependencies": { - "@types/eslint-scope": "^3.7.3", - "@types/estree": "^0.0.51", - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/wasm-edit": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", "acorn": "^8.7.1", - "acorn-import-assertions": "^1.7.6", - "browserslist": "^4.14.5", + "acorn-import-attributes": "^1.9.5", + "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.10.0", - "es-module-lexer": "^0.9.0", + "enhanced-resolve": "^5.17.1", + "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", + "graceful-fs": "^4.2.11", "json-parse-even-better-errors": "^2.3.1", "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", - "schema-utils": "^3.1.0", + "schema-utils": "^3.2.0", "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.1.3", - "watchpack": "^2.4.0", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", "webpack-sources": "^3.2.3" }, "bin": { @@ -31239,12 +31303,6 @@ "node": ">=10.13.0" } }, - "node_modules/webpack/node_modules/@types/estree": { - "version": "0.0.51", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", - "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", - "dev": true - }, "node_modules/webpack/node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -31900,6 +31958,7 @@ }, "node_modules/yallist": { "version": "4.0.0", + "dev": true, "license": "ISC" }, "node_modules/yaml": { diff --git a/package.json b/package.json index 617ef226f..46eef8123 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { + "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@date-io/date-fns": "^1.3.13", "@emotion/react": "^11.13.0", "@emotion/styled": "^11.13.0", @@ -143,7 +144,7 @@ "storybook": "^7.6.15", "storybook-addon-material-ui": "^0.9.0-alpha.24", "typescript": "^5.2.2", - "webpack": "^5.76.0" + "webpack": "^5.94.0" }, "_moduleAliases": { "@": "./dist" diff --git a/src/components/Private.js b/src/components/Private.js index db8471287..49aa091bb 100644 --- a/src/components/Private.js +++ b/src/components/Private.js @@ -1,12 +1,11 @@ import React from "react"; -import { Navigate, Outlet, useLocation } from "react-router-dom"; +import { Navigate, Outlet } from "react-router-dom"; import { PATHS } from "../consts"; import { isAuthenticated } from "../libraries/authUtils/isAuthenticated"; import { useAuthentication } from "../libraries/authUtils/useAuthentication"; export const Private = () => { useAuthentication(); - const { pathname } = useLocation(); return isAuthenticated() ? : ; }; diff --git a/src/components/accessories/admin/diseases/Diseases.tsx b/src/components/accessories/admin/diseases/Diseases.tsx index b4343deba..f50fff46e 100644 --- a/src/components/accessories/admin/diseases/Diseases.tsx +++ b/src/components/accessories/admin/diseases/Diseases.tsx @@ -37,14 +37,11 @@ export const Diseases = () => { }); }; - const handleViewChange = useCallback( - (event: any, value: any) => { - if (!isEmpty(value)) { - setView(value); - } - }, - [view] - ); + const handleViewChange = useCallback((event: any, value: any) => { + if (!isEmpty(value)) { + setView(value); + } + }, []); const predicate = useCallback( (disease: DiseaseDTO) => { diff --git a/src/components/accessories/admin/exams/examsTable/ExamsTable.tsx b/src/components/accessories/admin/exams/examsTable/ExamsTable.tsx index 50835219b..419e607ac 100644 --- a/src/components/accessories/admin/exams/examsTable/ExamsTable.tsx +++ b/src/components/accessories/admin/exams/examsTable/ExamsTable.tsx @@ -48,7 +48,7 @@ export const ExamsTable = ({ onDelete, onEdit, headerActions }: IOwnProps) => { const filters: TFilterField[] = [ { - key: "type", + key: "examtype", label: t("exam.examtype"), type: "select", options: examTypesOptions, @@ -124,7 +124,10 @@ export const ExamsTable = ({ onDelete, onEdit, headerActions }: IOwnProps) => { onDelete={onDelete} headerActions={headerActions} filterColumns={filters} - rawData={data ?? []} + rawData={(data ?? []).map((exam) => ({ + ...exam, + examtype: exam.examtype?.code, + }))} manualFilter={false} rowKey="code" /> diff --git a/src/components/accessories/admin/hospital/editHospital/EditHospital.tsx b/src/components/accessories/admin/hospital/editHospital/EditHospital.tsx new file mode 100644 index 000000000..0a902508c --- /dev/null +++ b/src/components/accessories/admin/hospital/editHospital/EditHospital.tsx @@ -0,0 +1,44 @@ +import { useAppDispatch, useAppSelector } from "libraries/hooks/redux"; +import React, { useEffect } from "react"; +import { useTranslation } from "react-i18next"; +import { useNavigate } from "react-router"; +import { updateHospital } from "state/hospital"; +import { PATHS } from "../../../../../consts"; +import { HospitalDTO } from "../../../../../generated"; +import HospitalForm from "../hospitalForm/HospitalForm"; +import { getInitialFields } from "../hospitalForm/consts"; + +export const EditHospital = () => { + const dispatch = useAppDispatch(); + const { t } = useTranslation(); + + const hospital = useAppSelector((state) => state.hospital.getHospital.data); + const update = useAppSelector((state) => state.hospital.updateHospital); + + const navigate = useNavigate(); + + const handleSubmit = (value: HospitalDTO) => { + dispatch( + updateHospital({ + code: hospital!.code!!, + hospitalDTO: { ...hospital, ...value }, + }) + ); + }; + + useEffect(() => { + if (!hospital) { + navigate(PATHS.admin); + } + }, [navigate, hospital]); + + return ( + + ); +}; diff --git a/src/components/accessories/admin/hospital/editHospital/index.ts b/src/components/accessories/admin/hospital/editHospital/index.ts new file mode 100644 index 000000000..8c2ff285b --- /dev/null +++ b/src/components/accessories/admin/hospital/editHospital/index.ts @@ -0,0 +1 @@ +export * from "./EditHospital"; diff --git a/src/components/accessories/admin/hospital/hospitalForm/HospitalForm.tsx b/src/components/accessories/admin/hospital/hospitalForm/HospitalForm.tsx new file mode 100644 index 000000000..f13e8884e --- /dev/null +++ b/src/components/accessories/admin/hospital/hospitalForm/HospitalForm.tsx @@ -0,0 +1,232 @@ +import { useFormik } from "formik"; +import { useAppDispatch, useAppSelector } from "libraries/hooks/redux"; +import { get, has } from "lodash"; +import React, { FC, useEffect, useMemo, useRef, useState } from "react"; +import { useTranslation } from "react-i18next"; +import { useNavigate } from "react-router"; +import { object, string } from "yup"; +import checkIcon from "../../../../../assets/check-icon.png"; +import warningIcon from "../../../../../assets/warning-icon.png"; +import { PATHS } from "../../../../../consts"; +import { + formatAllFieldValues, + getFromFields, +} from "../../../../../libraries/formDataHandling/functions"; +import { updateHospitalReset } from "../../../../../state/hospital"; +import Button from "../../../button/Button"; +import ConfirmationDialog from "../../../confirmationDialog/ConfirmationDialog"; +import InfoBox from "../../../infoBox/InfoBox"; +import TextField from "../../../textField/TextField"; +import "./styles.scss"; +import { IHospitalFormProps } from "./types"; + +const HospitalForm: FC = ({ + fields, + onSubmit, + submitButtonLabel, + resetButtonLabel, + isLoading, +}) => { + const dispatch = useAppDispatch(); + const { t } = useTranslation(); + const navigate = useNavigate(); + const infoBoxRef = useRef(null); + const [openDiscardConfirmation, setOpenDiscardConfirmation] = useState(false); + + const hospitalStore = useAppSelector((state) => state.hospital); + + const errorMessage = useMemo( + () => + hospitalStore.updateHospital.error?.message ?? t("common.somethingwrong"), + [t, hospitalStore.updateHospital.error?.message] + ); + + const initialValues = getFromFields(fields, "value"); + + const validationSchema = object({ + description: string().required(t("common.required")), + address: string().notRequired(), + city: string().notRequired(), + fax: string().notRequired(), + telephone: string().notRequired(), + email: string().notRequired().email(t("validations.email")), + currencyCod: string().notRequired(), + }); + + const formik = useFormik({ + initialValues, + validationSchema, + enableReinitialize: true, + onSubmit: (values) => { + const formattedValues = formatAllFieldValues(fields, values); + onSubmit(formattedValues as any); + }, + }); + + const isValid = (fieldName: string): boolean => { + return has(formik.touched, fieldName) && has(formik.errors, fieldName); + }; + + const getErrorText = (fieldName: string): string => { + return has(formik.touched, fieldName) + ? (get(formik.errors, fieldName) as string) + : ""; + }; + + const handleDiscardConfirmation = () => { + setOpenDiscardConfirmation(false); + navigate(-1); + }; + + useEffect(() => { + return () => { + dispatch(updateHospitalReset()); + }; + }, []); + + return ( +
+
+
+
+ +
+
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ setOpenDiscardConfirmation(false)} + /> + {hospitalStore.updateHospital.status === "FAIL" && ( +
+ +
+ )} + { + navigate(PATHS.admin); + }} + handleSecondaryButtonClick={() => ({})} + /> + +
+ ); +}; + +export default HospitalForm; diff --git a/src/components/accessories/admin/hospital/hospitalForm/consts.ts b/src/components/accessories/admin/hospital/hospitalForm/consts.ts new file mode 100644 index 000000000..8118c33cd --- /dev/null +++ b/src/components/accessories/admin/hospital/hospitalForm/consts.ts @@ -0,0 +1,15 @@ +import { HospitalFormFieldName } from "."; +import { HospitalDTO } from "../../../../../generated"; +import { TFields } from "../../../../../libraries/formDataHandling/types"; + +export const getInitialFields: ( + hospital: HospitalDTO | undefined +) => TFields = (hospital) => ({ + description: { type: "text", value: hospital?.description ?? "" }, + address: { type: "text", value: hospital?.address ?? "" }, + city: { type: "text", value: hospital?.city ?? "" }, + telephone: { type: "text", value: hospital?.telephone ?? "" }, + fax: { type: "text", value: hospital?.fax ?? "" }, + email: { type: "text", value: hospital?.email ?? "" }, + currencyCod: { type: "text", value: hospital?.currencyCod ?? "" }, +}); diff --git a/src/components/accessories/admin/hospital/hospitalForm/index.ts b/src/components/accessories/admin/hospital/hospitalForm/index.ts new file mode 100644 index 000000000..f98448f8d --- /dev/null +++ b/src/components/accessories/admin/hospital/hospitalForm/index.ts @@ -0,0 +1,2 @@ +export * from "./HospitalForm"; +export * from "./types"; diff --git a/src/components/accessories/admin/hospital/hospitalForm/styles.scss b/src/components/accessories/admin/hospital/hospitalForm/styles.scss new file mode 100644 index 000000000..a0ca81274 --- /dev/null +++ b/src/components/accessories/admin/hospital/hospitalForm/styles.scss @@ -0,0 +1,85 @@ +@import "../../../../../styles/variables"; +@import "../../../../../../node_modules/susy/sass/susy"; + +.hospitalForm { + display: inline-block; + flex-direction: column; + align-items: center; + width: 100%; + + .formInsertMode { + margin: 0px 0px 20px; + } + + .row { + justify-content: space-between; + } + + .hospitalForm__item { + margin: 7px 0px; + padding: 0px 15px; + width: 50%; + @include susy-media($narrow) { + padding: 0px 10px; + } + @include susy-media($tablet_land) { + padding: 0px 10px; + } + @include susy-media($medium-up) { + width: 25%; + } + @include susy-media($tablet_port) { + width: 50%; + } + @include susy-media($smartphone) { + width: 100%; + } + .textField, + .selectField { + width: 100%; + } + + &.fullWidth { + width: 100%; + } + + &.halfWidth { + width: 50%; + @include susy-media($smartphone) { + width: 100%; + } + } + &.thirdWidth { + width: 33%; + @include susy-media($smartphone) { + width: 100%; + } + } + } + + .hospitalForm__buttonSet { + display: flex; + margin-top: 25px; + padding: 0px 15px; + gap: 4px; + flex-direction: row-reverse; + @include susy-media($smartphone_small) { + display: block; + } + + .submit_button, + .discard_button { + .MuiButton-label { + font-size: smaller; + letter-spacing: 1px; + font-weight: 600; + } + button { + @include susy-media($smartphone_small) { + width: 100%; + margin-top: 10px; + } + } + } + } +} diff --git a/src/components/accessories/admin/hospital/hospitalForm/types.ts b/src/components/accessories/admin/hospital/hospitalForm/types.ts new file mode 100644 index 000000000..ffb0f8623 --- /dev/null +++ b/src/components/accessories/admin/hospital/hospitalForm/types.ts @@ -0,0 +1,19 @@ +import { HospitalDTO } from "../../../../../generated"; +import { TFields } from "../../../../../libraries/formDataHandling/types"; + +export interface IHospitalFormProps { + fields: TFields; + onSubmit: (adm: HospitalDTO) => void; + submitButtonLabel: string; + resetButtonLabel: string; + isLoading: boolean; +} + +export type HospitalFormFieldName = + | "description" + | "address" + | "city" + | "telephone" + | "fax" + | "email" + | "currencyCod"; diff --git a/src/components/accessories/admin/hospital/index.ts b/src/components/accessories/admin/hospital/index.ts new file mode 100644 index 000000000..ab01c1d62 --- /dev/null +++ b/src/components/accessories/admin/hospital/index.ts @@ -0,0 +1 @@ +export * from "./editHospital"; diff --git a/src/components/accessories/admin/operations/Operations.tsx b/src/components/accessories/admin/operations/Operations.tsx index 3b4e0cffc..01c07fb92 100644 --- a/src/components/accessories/admin/operations/Operations.tsx +++ b/src/components/accessories/admin/operations/Operations.tsx @@ -2,6 +2,7 @@ import { useAppDispatch } from "libraries/hooks/redux"; import React, { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { useNavigate } from "react-router"; +import { getOperationTypes } from "state/types/operations"; import { PATHS } from "../../../../consts"; import { OperationDTO } from "../../../../generated"; import { @@ -20,6 +21,7 @@ export const Operations = () => { useEffect(() => { dispatch(getOperations()); + dispatch(getOperationTypes()); return () => { dispatch(deleteOperationReset()); diff --git a/src/components/accessories/admin/suppliers/editSupplier/EditSupplier.tsx b/src/components/accessories/admin/suppliers/editSupplier/EditSupplier.tsx index 4f40afb3e..40f67bf29 100644 --- a/src/components/accessories/admin/suppliers/editSupplier/EditSupplier.tsx +++ b/src/components/accessories/admin/suppliers/editSupplier/EditSupplier.tsx @@ -24,7 +24,7 @@ export const EditSupplier = () => { if (state?.supId !== Number(id)) { navigate(PATHS.admin_suppliers); } - }, [id, state]); + }, [id, navigate, state]); return ( = ({ fields, onSubmit, diff --git a/src/components/accessories/admin/types/TypesAdmin.tsx b/src/components/accessories/admin/types/TypesAdmin.tsx index 1b439a9cf..fc1c40d32 100644 --- a/src/components/accessories/admin/types/TypesAdmin.tsx +++ b/src/components/accessories/admin/types/TypesAdmin.tsx @@ -1,6 +1,6 @@ import { useAppSelector } from "libraries/hooks/redux"; import { sortBy } from "lodash"; -import React, { useEffect, useState } from "react"; +import React, { useEffect, useMemo, useState } from "react"; import { useTranslation } from "react-i18next"; import { Outlet, useLocation, useNavigate } from "react-router"; import { PATHS } from "../../../../consts"; @@ -16,7 +16,11 @@ const TypesAdmin = () => { const { t } = useTranslation(); const location = useLocation(); const navigate = useNavigate(); - const defaultTypeOption: TypeOption = { label: "", value: "" }; + const defaultTypeOption: TypeOption = useMemo( + () => ({ label: "", value: "" }), + [] + ); + const [selectedOption, setSelectedOption] = useState(defaultTypeOption); const mode = useAppSelector((state) => state.types.config.mode); @@ -57,7 +61,7 @@ const TypesAdmin = () => { setSelectedOption(defaultTypeOption); } } - }, [location]); + }, [defaultTypeOption, location, typeOptions]); const handleTypeChange = (value: string) => { if (value?.length > 0) { diff --git a/src/components/accessories/admin/users/newUser/validation.test.ts b/src/components/accessories/admin/users/newUser/validation.test.ts index d10e4597f..cf00897e9 100644 --- a/src/components/accessories/admin/users/newUser/validation.test.ts +++ b/src/components/accessories/admin/users/newUser/validation.test.ts @@ -1,8 +1,8 @@ -import { passwordRules } from "./validation"; +import { passwordRules, userNameRules } from "./validation"; describe("password rules", () => { it("should pass when all rules are matched", () => { - expect(passwordRules.test("ThisPassw0rdIsCorrect")); + expect(passwordRules.test("ThisPassw0rdIsCorrect")).toBeTruthy(); }); it("should be 5 characters long", () => { expect(passwordRules.test("aA4")).toBeFalsy(); @@ -17,3 +17,22 @@ describe("password rules", () => { expect(passwordRules.test("ThisPasswordIsNotCorrect")).toBeFalsy(); }); }); + +describe("userName rules", () => { + it("should pass", () => { + expect(userNameRules.test("johndoe")).toBeTruthy(); + expect(userNameRules.test("johndoe42")).toBeTruthy(); + expect(userNameRules.test("42")).toBeTruthy(); + expect(userNameRules.test("john.doe")).toBeTruthy(); + expect(userNameRules.test("john-doe")).toBeTruthy(); + expect(userNameRules.test("john_doe")).toBeTruthy(); + }); + it("should filter out", () => { + expect(userNameRules.test("Johndoe")).toBeFalsy(); + expect(userNameRules.test("johnDoe")).toBeFalsy(); + expect(userNameRules.test("john doe")).toBeFalsy(); + expect(userNameRules.test("john/doe")).toBeFalsy(); + expect(userNameRules.test("すず")).toBeFalsy(); + expect(userNameRules.test("j̵̨̨̧͖̠̩̤̗̟̲̯̭̫̰͆͛̏͛͒́̂̔̅͘͘̚̕͝͝ȯ̵̫̭̮̖̀̓̾̉͋͋̌̇͘h̶̡̢̡̜̻̥͙̳͉̰̟̬͚̍̃̽̎͒̋̄̔͋͘͝͝ͅn̷̜̠̰͍̤̰̺̠͌̌̒͑̓̌̂̒͗͒͗̐͝͝͠")).toBeFalsy(); + }); +}); diff --git a/src/components/accessories/admin/users/newUser/validation.ts b/src/components/accessories/admin/users/newUser/validation.ts index 54b219eb7..3e13775c8 100644 --- a/src/components/accessories/admin/users/newUser/validation.ts +++ b/src/components/accessories/admin/users/newUser/validation.ts @@ -1,13 +1,19 @@ -import { object, string, ref } from "yup"; -import { UserGroupDTO } from "../../../../../generated"; import { TFunction } from "react-i18next"; +import { object, ref, string } from "yup"; +import { UserGroupDTO } from "../../../../../generated"; import { FormProps } from "./NewUser"; // min 5 characters, 1 upper case letter, 1 lower case letter, 1 numeric digit. export const passwordRules = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{5,}$/; +export const userNameRules = /^[a-z0-9-._]+$/; + export const userSchema = (t: TFunction<"translation">) => object().shape({ - userName: string().min(2).required(t("user.validateUserName")), + userName: string() + .min(2) + .max(50) + .matches(userNameRules, t("user.validateUserNameRegex")) + .required(t("user.validateUserName")), userGroupName: object({ code: string().required(t("user.validateUserNeedsGroup")), desc: string(), diff --git a/src/components/accessories/admin/users/usersTable/UsersTable.tsx b/src/components/accessories/admin/users/usersTable/UsersTable.tsx index 2aa37b877..5109d80ca 100644 --- a/src/components/accessories/admin/users/usersTable/UsersTable.tsx +++ b/src/components/accessories/admin/users/usersTable/UsersTable.tsx @@ -10,6 +10,7 @@ import InfoBox from "../../../infoBox/InfoBox"; import Table from "../../../table/Table"; import { TFilterField } from "../../../table/filter/types"; +import { getUserGroups } from "state/usergroups"; import classes from "./UsersTable.module.scss"; interface IOwnProps { @@ -24,6 +25,7 @@ export const UsersTable = ({ headerActions, onEdit }: IOwnProps) => { useEffect(() => { dispatch(getUsers({})); + dispatch(getUserGroups()); }, [dispatch]); const header = ["userName", "userGroupName", "desc"]; @@ -34,8 +36,21 @@ export const UsersTable = ({ headerActions, onEdit }: IOwnProps) => { desc: t("user.description"), }; const order = ["userName", "userGroupName", "desc"]; + const userGroupOptions = useAppSelector( + (state) => + state.usergroups.groupList.data?.map((item) => ({ + value: item.code ?? "", + label: item.desc ?? item.code ?? "", + })) ?? [] + ); const filters: TFilterField[] = [ + { + key: "userGroupName", + label: t("user.groups"), + type: "select", + options: userGroupOptions, + }, { key: "userName", label: t("user.username"), type: "text" }, ]; @@ -79,7 +94,10 @@ export const UsersTable = ({ headerActions, onEdit }: IOwnProps) => { filterColumns={filters} manualFilter={false} isCollapsabile={false} - rawData={data} + rawData={(data ?? []).map((user) => ({ + ...user, + userGroupName: user.userGroupName?.code, + }))} rowKey="userName" headerActions={headerActions} onEdit={canUpdate ? onEdit: undefined} diff --git a/src/components/accessories/admin/wards/wardForm/WardForm.tsx b/src/components/accessories/admin/wards/wardForm/WardForm.tsx index 8fbdef39e..f1773af1a 100644 --- a/src/components/accessories/admin/wards/wardForm/WardForm.tsx +++ b/src/components/accessories/admin/wards/wardForm/WardForm.tsx @@ -11,6 +11,7 @@ import React, { } from "react"; import { useTranslation } from "react-i18next"; import { useNavigate } from "react-router"; +import { FIELD_VALIDATION } from "types"; import { number, object, string } from "yup"; import checkIcon from "../../../../../assets/check-icon.png"; import warningIcon from "../../../../../assets/warning-icon.png"; @@ -49,8 +50,8 @@ const WardForm: FC = ({ const errorMessage = useMemo( () => (creationMode - ? wardStore.create.error?.message - : wardStore.update.error?.message) ?? t("common.somethingwrong"), + ? t(wardStore.create.error?.message) + : t(wardStore.update.error?.message)) ?? t("common.somethingwrong"), [ creationMode, t, @@ -62,7 +63,9 @@ const WardForm: FC = ({ const initialValues = getFromFields(fields, "value"); const validationSchema = object({ - code: string().required(t("common.required")), + code: string() + .max(3, t("validations.maxLength", { max: 3 })) + .required(t("common.required")), description: string().required(t("common.required")), email: string().email(t("validations.email")), beds: number().min(0, t("validations.min", { min: 0 })), @@ -133,6 +136,7 @@ const WardForm: FC = ({ onBlur={formik.handleBlur} type="text" disabled={isLoading || !creationMode} + required={FIELD_VALIDATION.REQUIRED} />
@@ -145,6 +149,7 @@ const WardForm: FC = ({ onBlur={formik.handleBlur} type="text" disabled={isLoading} + required={FIELD_VALIDATION.REQUIRED} />
diff --git a/src/components/accessories/admin/wards/wardTable/WardTable.tsx b/src/components/accessories/admin/wards/wardTable/WardTable.tsx index 331aed61e..fffdd40b3 100644 --- a/src/components/accessories/admin/wards/wardTable/WardTable.tsx +++ b/src/components/accessories/admin/wards/wardTable/WardTable.tsx @@ -6,7 +6,7 @@ import { useTranslation } from "react-i18next"; import checkIcon from "../../../../../assets/check-icon.png"; import { WardDTO } from "../../../../../generated"; import { scrollToElement } from "../../../../../libraries/uiUtils/scrollToElement"; -import { deleteWardReset } from "../../../../../state/ward"; +import { deleteWardReset, getWards } from "../../../../../state/ward"; import ConfirmationDialog from "../../../confirmationDialog/ConfirmationDialog"; import InfoBox from "../../../infoBox/InfoBox"; import { TFilterField } from "../../../table/filter/types"; @@ -72,7 +72,14 @@ export const WardTable: FunctionComponent = ({ if (deleteWard.status === "FAIL") { scrollToElement(infoBoxRef.current); } - }, [deleteWard.status]); + + if ( + deleteWard.status === "SUCCESS" || + deleteWard.status === "SUCCESS_EMPTY" + ) { + dispatch(getWards()); + } + }, [deleteWard.status, dispatch]); const formatDataToDisplay = (data: WardDTO[]) => { return data.map((item) => { diff --git a/src/components/accessories/admission/PatientAdmission.tsx b/src/components/accessories/admission/PatientAdmission.tsx index 60923f644..63d193c86 100644 --- a/src/components/accessories/admission/PatientAdmission.tsx +++ b/src/components/accessories/admission/PatientAdmission.tsx @@ -1,7 +1,9 @@ import { useAppDispatch, useAppSelector } from "libraries/hooks/redux"; import { isEmpty } from "lodash"; -import React, { FC, useEffect, useMemo, useRef, useState } from "react"; +import React, { FC, useEffect, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; +import { useParams } from "react-router"; +import { getPatient } from "state/patients"; import checkIcon from "../../../assets/check-icon.png"; import { AdmissionDTO, PatientDTOStatusEnum } from "../../../generated"; import { usePermission } from "../../../libraries/permissionUtils/usePermission"; @@ -10,11 +12,11 @@ import { createAdmission, createAdmissionReset, getCurrentAdmission, + getCurrentAdmissionReset, updateAdmission, updateAdmissionReset, } from "../../../state/admissions"; import { getLastOpd } from "../../../state/opds"; -import { getPatient } from "../../../state/patients"; import { IState } from "../../../types"; import ConfirmationDialog from "../confirmationDialog/ConfirmationDialog"; import { CurrentAdmission } from "../currentAdmission/CurrentAdmission"; @@ -29,6 +31,8 @@ const PatientAdmission: FC = () => { const { t } = useTranslation(); const dispatch = useAppDispatch(); const canCreate = usePermission("admissions.create"); + const canUpdate = usePermission("admissions.update"); + const { id } = useParams(); const infoBoxRef = useRef(null); const [shouldResetForm, setShouldResetForm] = useState(false); const [creationMode, setCreationMode] = useState(true); @@ -52,10 +56,6 @@ const PatientAdmission: FC = () => { (state: IState) => state.admissions.currentAdmissionByPatientId.data ); - const currentAdmissionStatus = useAppSelector( - (state: IState) => state.admissions.currentAdmissionByPatientId.status - ); - const createStatus = useAppSelector( (state) => state.admissions.createAdmission.status ); @@ -81,14 +81,9 @@ const PatientAdmission: FC = () => { useEffect(() => { if (patientCode && creationMode) { - dispatch(getLastOpd(patientCode ?? -1)); + dispatch(getLastOpd(parseInt(id!!))); } - }, [dispatch, patientCode, creationMode]); - - const open = useMemo(() => { - if (creationMode) return showForm && canCreate; - return showForm; - }, [showForm, canCreate, creationMode]); + }, [dispatch, patientCode, creationMode, id]); const fields = useFields(admissionToEdit, lastOpd?.disease); @@ -143,31 +138,27 @@ const PatientAdmission: FC = () => { }, [dispatch]); useEffect(() => { - if (!creationMode) { - setShowForm(true); - } else if ( - creationMode && - currentAdmissionStatus !== "SUCCESS" && - currentAdmissionStatus !== "IDLE" && - !currentAdmission - ) { - setShowForm(true); - } else setShowForm(false); - }, [currentAdmissionStatus, currentAdmission, creationMode]); + if (creationMode && !!currentAdmission) { + setShowForm(false); + } else setShowForm(true); + }, [currentAdmission, creationMode]); useEffect(() => { if (activityTransitionState === "TO_RESET") { - dispatch(getPatient((patient?.code ?? 0).toString())); - setCreationMode(true); - setAdmissionToEdit(undefined); dispatch(createAdmissionReset()); dispatch(updateAdmissionReset()); - dispatch(getCurrentAdmission(patient?.code)); setShouldUpdateTable(true); setShouldResetForm(true); } }, [dispatch, patient, activityTransitionState]); + useEffect(() => { + if (createStatus === "SUCCESS" || updateStatus === "SUCCESS") { + dispatch(getPatient(id!!)); + dispatch(getCurrentAdmission(parseInt(id!!))); + } + }, [createStatus, dispatch, id, updateStatus]); + const resetFormCallback = () => { setCreationMode(true); setShouldResetForm(false); @@ -178,8 +169,11 @@ const PatientAdmission: FC = () => { }; useEffect(() => { - dispatch(getCurrentAdmission(patient?.code)); - }, [patient, dispatch]); + dispatch(getCurrentAdmission(parseInt(id!!))); + return () => { + dispatch(getCurrentAdmissionReset()); + }; + }, [dispatch, id]); const onEdit = (row: AdmissionDTO) => { setAdmissionToEdit(row); @@ -196,8 +190,10 @@ const PatientAdmission: FC = () => { {patient?.status === PatientDTOStatusEnum.I && ( )} - {!open && } - {open && ( + {!showForm && currentAdmission && ( + + )} + {showForm && (creationMode ? canCreate : canUpdate) && ( = ({ breadcrumbMap }) => { ); useEffect(() => { dispatch(getHospital()); - }, [dispatch, getHospital]); + }, [dispatch]); const hospital = useAppSelector( (state) => state.hospital.getHospital.data diff --git a/src/components/accessories/appHeader/types.ts b/src/components/accessories/appHeader/types.ts index 055367823..3e69449eb 100644 --- a/src/components/accessories/appHeader/types.ts +++ b/src/components/accessories/appHeader/types.ts @@ -1,5 +1,4 @@ import { TUserCredentials } from "../../../state/main/types"; -import { TAPIResponseStatus } from "../../../state/types"; export type TBreadcrumbMap = Record; diff --git a/src/components/accessories/autocompleteField/AutocompleteField.tsx b/src/components/accessories/autocompleteField/AutocompleteField.tsx index 10c34b728..95459a7da 100644 --- a/src/components/accessories/autocompleteField/AutocompleteField.tsx +++ b/src/components/accessories/autocompleteField/AutocompleteField.tsx @@ -11,7 +11,6 @@ import _ from "lodash"; import React, { ChangeEvent, FC, - Fragment, useCallback, useEffect, useState, @@ -76,6 +75,7 @@ const AutocompleteField: FC = ({ } }; + // eslint-disable-next-line react-hooks/exhaustive-deps const debounceUpdate = useCallback( debounce((value: any) => { setValue(value); @@ -111,16 +111,6 @@ const AutocompleteField: FC = ({ return option.label; }; - const isSelected = (option: DefaultOptionType, v: DefaultOptionType) => { - return option.value === v.value; - }; - - const rendOption = (props: any, option: DefaultOptionType | string) => { - return ( - {typeof option === "string" ? option : option.label} - ); - }; - const filter = createFilterOptions({ limit: options_limit, }); diff --git a/src/components/accessories/billTable/BillTable.tsx b/src/components/accessories/billTable/BillTable.tsx index cf9f52aa9..30b37c00f 100644 --- a/src/components/accessories/billTable/BillTable.tsx +++ b/src/components/accessories/billTable/BillTable.tsx @@ -91,7 +91,7 @@ export const BillTable: FC = ({ fields }) => { dispatch(searchBills(filter)); break; } - }, [filter]); + }, [dispatch, filter]); const { setFieldValue, handleBlur } = formik; diff --git a/src/components/accessories/billrecords/BillRecords.tsx b/src/components/accessories/billrecords/BillRecords.tsx index 35ccee08f..52804c3b6 100644 --- a/src/components/accessories/billrecords/BillRecords.tsx +++ b/src/components/accessories/billrecords/BillRecords.tsx @@ -67,7 +67,7 @@ const BillRecords = () => { dispatch(deleteBillReset()); dispatch(payBillReset()); dispatch(closeBillReset()); - }, []); + }, [dispatch]); useEffect(() => { if (patient && patient.code) { @@ -275,7 +275,7 @@ const BillRecords = () => { }} handleSecondaryButtonClick={() => ({})} /> - + ); }; diff --git a/src/components/accessories/billsRecap/BillsRecap.tsx b/src/components/accessories/billsRecap/BillsRecap.tsx index 34db36a43..955b50e2a 100644 --- a/src/components/accessories/billsRecap/BillsRecap.tsx +++ b/src/components/accessories/billsRecap/BillsRecap.tsx @@ -12,14 +12,7 @@ import { } from "chart.js"; import { useAppDispatch, useAppSelector } from "libraries/hooks/redux"; import moment from "moment"; -import React, { - FC, - useCallback, - useEffect, - useMemo, - useRef, - useState, -} from "react"; +import React, { FC, useCallback, useEffect, useMemo, useState } from "react"; import { Bar, Doughnut, Line, Pie } from "react-chartjs-2"; import { useTranslation } from "react-i18next"; import { getBillsByYear, searchBills } from "../../../state/bills"; @@ -98,6 +91,7 @@ export const BillsRecap: FC = () => { useEffect(() => { dispatch(searchBills(filter as TFilterValues)); + // eslint-disable-next-line react-hooks/exhaustive-deps }, [dispatch]); useEffect(() => { @@ -188,7 +182,7 @@ export const BillsRecap: FC = () => { ], }; }, - [summaryCurrentYear] + [summaryCurrentYear, t] ); const paymentsVariationsData = useMemo(() => { @@ -206,7 +200,7 @@ export const BillsRecap: FC = () => { { label: t("bill.payments"), data: - labels.length != 0 + labels.length !== 0 ? labels.map( (item) => summaryCurrentYear.paymentsByMonthsOfYear[item] ?? 0 ) @@ -217,7 +211,7 @@ export const BillsRecap: FC = () => { { label: t("bill.debts"), data: - labels.length != 0 + labels.length !== 0 ? labels.map( (item) => summaryCurrentYear.debtsByMonthsOfYear[item] ?? 0 ) @@ -227,6 +221,7 @@ export const BillsRecap: FC = () => { }, ], }; + // eslint-disable-next-line react-hooks/exhaustive-deps }, [summaryCurrentYear]); const getOptionsFromYears = (years: number[]) => { @@ -237,7 +232,6 @@ export const BillsRecap: FC = () => { }; }); }; - const infoBoxRef = useRef(null); return (
diff --git a/src/components/accessories/button/Button.tsx b/src/components/accessories/button/Button.tsx index 964238b57..d2a8493d5 100644 --- a/src/components/accessories/button/Button.tsx +++ b/src/components/accessories/button/Button.tsx @@ -11,10 +11,11 @@ const Button: FunctionComponent = ({ disabled, dataCy, onClick, + className, }) => { return ( ) => void; } diff --git a/src/components/accessories/currentAdmission/currentAdmissionForm/CurrentAdmissionForm.tsx b/src/components/accessories/currentAdmission/currentAdmissionForm/CurrentAdmissionForm.tsx index f5eb3f185..a1570fefe 100644 --- a/src/components/accessories/currentAdmission/currentAdmissionForm/CurrentAdmissionForm.tsx +++ b/src/components/accessories/currentAdmission/currentAdmissionForm/CurrentAdmissionForm.tsx @@ -13,17 +13,15 @@ import { AdmissionTypeDTO, DiseaseDTO, DiseaseTypeDTO, - WardDTO + WardDTO, } from "../../../../generated"; import { differenceInDays, formatAllFieldValues, - getFromFields + getFromFields, } from "../../../../libraries/formDataHandling/functions"; import { updateAdmissionReset } from "../../../../state/admissions"; -import { - getPatient -} from "../../../../state/patients"; +import { getPatient } from "../../../../state/patients"; import { IState } from "../../../../types"; import AutocompleteField from "../../autocompleteField/AutocompleteField"; import Button from "../../button/Button"; @@ -130,9 +128,9 @@ export const CurrentAdmissionForm: FunctionComponent = ({ } onDiscard(); } - }, [dispatch, activityTransitionState]); + }, [dispatch, activityTransitionState, patient, onDiscard]); - const { setFieldValue, resetForm, handleBlur } = formik; + const { setFieldValue, handleBlur } = formik; const isValid = (fieldName: string): boolean => { return has(formik.touched, fieldName) && has(formik.errors, fieldName); @@ -154,7 +152,7 @@ export const CurrentAdmissionForm: FunctionComponent = ({ ).toString(); setFieldValue("bedDays", days); }, - [setFieldValue] + [formik, setFieldValue] ); const onBlurCallback = useCallback( diff --git a/src/components/accessories/currentAdmission/currentAdmissionForm/consts.ts b/src/components/accessories/currentAdmission/currentAdmissionForm/consts.ts index 4763bff7f..61ac129d2 100644 --- a/src/components/accessories/currentAdmission/currentAdmissionForm/consts.ts +++ b/src/components/accessories/currentAdmission/currentAdmissionForm/consts.ts @@ -1,4 +1,4 @@ -import { AdmissionDTO, PatientDTO } from "../../../../generated"; +import { AdmissionDTO } from "../../../../generated"; import { parseDate } from "../../../../libraries/formDataHandling/functions"; import { TFields } from "../../../../libraries/formDataHandling/types"; import { TCurrentAdmissionFieldName } from "./types"; diff --git a/src/components/accessories/dashboard/admissions/Admissions.tsx b/src/components/accessories/dashboard/admissions/Admissions.tsx index c8674658e..d2e74c7f3 100644 --- a/src/components/accessories/dashboard/admissions/Admissions.tsx +++ b/src/components/accessories/dashboard/admissions/Admissions.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from "@mui/lab"; +import { Skeleton } from "@mui/material"; import { useAppDispatch } from "libraries/hooks/redux"; import React, { FC, useEffect } from "react"; import { useTranslation } from "react-i18next"; @@ -25,10 +25,12 @@ export const Admissions: FC = ({ period }) => { dispatch(getAgeTypes()); dispatch(getAdmissionTypes()); dispatch(getWards()); - }, [dispatch]); + }, [dispatch, period]); + useEffect(() => { dispatch(getAdmissions({ admissionrange: period })); - }, [period]); + }, [period, dispatch]); + const { admissionStatus, admissionTypeStatus, diff --git a/src/components/accessories/dashboard/admissions/admissionByAgeType/AdmissionByAgeType.tsx b/src/components/accessories/dashboard/admissions/admissionByAgeType/AdmissionByAgeType.tsx index a5b065f9b..eb043d99e 100644 --- a/src/components/accessories/dashboard/admissions/admissionByAgeType/AdmissionByAgeType.tsx +++ b/src/components/accessories/dashboard/admissions/admissionByAgeType/AdmissionByAgeType.tsx @@ -1,4 +1,3 @@ -import { Skeleton } from "@mui/lab"; import { useAppDispatch } from "libraries/hooks/redux"; import React, { FC, useEffect, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; @@ -13,6 +12,7 @@ import { TDashboardComponentProps } from "../../layouts/types"; import { DataSummary } from "../../summary/DataSummary"; import { IOwnProps } from "../types"; +import { Skeleton } from "@mui/material"; import "../../card/styles.scss"; export const AdmissionsByAgeType: FC = ({ @@ -30,7 +30,7 @@ export const AdmissionsByAgeType: FC = ({ useEffect(() => { dispatch(getAdmissions({ admissionrange: period })); - }, [period]); + }, [period, dispatch]); const { total, success, status, ageTypeStatus, data, csvData } = useAdmByAgeTypeData(); diff --git a/src/components/accessories/dashboard/admissions/admissionBySex/AdmissionBySex.tsx b/src/components/accessories/dashboard/admissions/admissionBySex/AdmissionBySex.tsx index c4277bffa..53cd078b5 100644 --- a/src/components/accessories/dashboard/admissions/admissionBySex/AdmissionBySex.tsx +++ b/src/components/accessories/dashboard/admissions/admissionBySex/AdmissionBySex.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from "@mui/lab"; +import { Skeleton } from "@mui/material"; import { useAppDispatch } from "libraries/hooks/redux"; import React, { FC, useEffect, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; diff --git a/src/components/accessories/dashboard/admissions/admissionByTypes/AdmissionByTypes.tsx b/src/components/accessories/dashboard/admissions/admissionByTypes/AdmissionByTypes.tsx index 1dec1ccdc..f50267c97 100644 --- a/src/components/accessories/dashboard/admissions/admissionByTypes/AdmissionByTypes.tsx +++ b/src/components/accessories/dashboard/admissions/admissionByTypes/AdmissionByTypes.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from "@mui/lab"; +import { Skeleton } from "@mui/material"; import { useAppDispatch } from "libraries/hooks/redux"; import React, { FC, useEffect, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; @@ -25,13 +25,12 @@ export const AdmissionsByTypes: FC = ({ const admtcardRef = useRef(null); useEffect(() => { - //dispatch(getAdmissions({ admissionrange: period })); dispatch(getAdmissionTypes()); }, [dispatch]); useEffect(() => { dispatch(getAdmissions({ admissionrange: period })); - }, [period]); + }, [period, dispatch]); const { total, success, status, admissionTypeStatus, data, csvData } = useAdmByAdmTypeData(); diff --git a/src/components/accessories/dashboard/admissions/admissionByWards/AdmissionByWards.tsx b/src/components/accessories/dashboard/admissions/admissionByWards/AdmissionByWards.tsx index 738f359c7..7f4ff2517 100644 --- a/src/components/accessories/dashboard/admissions/admissionByWards/AdmissionByWards.tsx +++ b/src/components/accessories/dashboard/admissions/admissionByWards/AdmissionByWards.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from "@mui/lab"; +import { Skeleton } from "@mui/material"; import { useAppDispatch } from "libraries/hooks/redux"; import React, { FC, useEffect, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; @@ -25,13 +25,12 @@ export const AdmissionsByWards: FC = ({ const cardRef = useRef(null); useEffect(() => { - //dispatch(getAdmissions({ admissionrange: period })); dispatch(getWards()); }, [dispatch]); useEffect(() => { dispatch(getAdmissions({ admissionrange: period })); - }, [period]); + }, [period, dispatch]); const { total, success, status, wardStatus, data, csvData } = useAdmByAdmWardData(); diff --git a/src/components/accessories/dashboard/admissions/useData.ts b/src/components/accessories/dashboard/admissions/useData.ts index 792781e45..d51204d29 100644 --- a/src/components/accessories/dashboard/admissions/useData.ts +++ b/src/components/accessories/dashboard/admissions/useData.ts @@ -1,15 +1,6 @@ -import { useMemo, useState } from "react"; -import { useTranslation } from "react-i18next"; import { useAppSelector } from "libraries/hooks/redux"; -import { - AdmissionDTO, - WardDTO, - AdmissionTypeDTO, - AgeTypeDTO, -} from "../../../../generated"; +import { useTranslation } from "react-i18next"; import { colorGen } from "../../../../libraries/uiUtils/colorGenerator"; -import { TAPIResponseStatus } from "../../../../state/types"; -import { IState } from "../../../../types"; export const useData = () => { const { t } = useTranslation(); diff --git a/src/components/accessories/dashboard/card/DashboardCard.tsx b/src/components/accessories/dashboard/card/DashboardCard.tsx index 9f494f3df..0f0d253a7 100644 --- a/src/components/accessories/dashboard/card/DashboardCard.tsx +++ b/src/components/accessories/dashboard/card/DashboardCard.tsx @@ -38,16 +38,20 @@ export const DashboardCard: React.FC = ({ if (sizeChangeHandler && cardBodyRef.current) { resizeObserver.observe(cardBodyRef.current); } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [cardBodyRef]); // Remove the observer on component unmount useEffect(() => { + const currentRef = cardBodyRef.current; + return () => { - if (sizeChangeHandler && cardBodyRef.current) { - resizeObserver.unobserve(cardBodyRef.current); + if (sizeChangeHandler && currentRef) { + resizeObserver.unobserve(currentRef); resizeObserver.disconnect(); } }; + // eslint-disable-next-line react-hooks/exhaustive-deps }, []); const getTitle = () => { diff --git a/src/components/accessories/dashboard/dashboardContent/filter/DashboardFilter.tsx b/src/components/accessories/dashboard/dashboardContent/filter/DashboardFilter.tsx index e115b0ed6..d96a929ae 100644 --- a/src/components/accessories/dashboard/dashboardContent/filter/DashboardFilter.tsx +++ b/src/components/accessories/dashboard/dashboardContent/filter/DashboardFilter.tsx @@ -27,6 +27,7 @@ export const DashboardFilter: FC = ({ onPeriodChange }) => { useEffect(() => { onPeriodChange([range[0], range[1]]); + // eslint-disable-next-line react-hooks/exhaustive-deps }, [range]); const handleViewChange = useCallback( @@ -36,6 +37,7 @@ export const DashboardFilter: FC = ({ onPeriodChange }) => { setSelection("current"); } }, + // eslint-disable-next-line react-hooks/exhaustive-deps [view] ); @@ -45,7 +47,7 @@ export const DashboardFilter: FC = ({ onPeriodChange }) => { setSelection(value as TPeriodType); } }, - [selection] + [setSelection] ); const onIconClickHandler = useCallback( @@ -66,6 +68,7 @@ export const DashboardFilter: FC = ({ onPeriodChange }) => { setSelection("custom"); setOpen(false); }, + // eslint-disable-next-line react-hooks/exhaustive-deps [dateRange] ); @@ -78,7 +81,7 @@ export const DashboardFilter: FC = ({ onPeriodChange }) => { setSelection("custom"); setOpen(false); }, - [dateRange] + [setDateRange, setSelection, setView] ); return ( diff --git a/src/components/accessories/dashboard/dashboardContent/filter/usePeriodOptions.ts b/src/components/accessories/dashboard/dashboardContent/filter/usePeriodOptions.ts index 7551d4fd2..cd3213cc9 100644 --- a/src/components/accessories/dashboard/dashboardContent/filter/usePeriodOptions.ts +++ b/src/components/accessories/dashboard/dashboardContent/filter/usePeriodOptions.ts @@ -1,8 +1,8 @@ +import { DateRange } from "@mui/lab/DateRangePicker"; import moment from "moment"; -import { useState, useMemo } from "react"; -import { TViewType, TPeriodType } from "./types"; +import { useMemo, useState } from "react"; import { getCachedPeriod } from "./consts"; -import { DateRange } from "@mui/lab/DateRangePicker"; +import { TPeriodType, TViewType } from "./types"; export const usePeriodOptions = () => { const cachedPeriod = getCachedPeriod(); @@ -64,7 +64,7 @@ export const usePeriodOptions = () => { return `${moment(range[0]).format("yyyy-MM-DD")} - ${moment( range[1] ).format("yyyy-MM-DD")}`; - }, [dateRange, view, selection]); + }, [range]); return { view, diff --git a/src/components/accessories/dashboard/discharges/Discharges.tsx b/src/components/accessories/dashboard/discharges/Discharges.tsx index f2dbd83ca..4092bcd8d 100644 --- a/src/components/accessories/dashboard/discharges/Discharges.tsx +++ b/src/components/accessories/dashboard/discharges/Discharges.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from "@mui/lab"; +import { Skeleton } from "@mui/material"; import { useAppDispatch } from "libraries/hooks/redux"; import React, { FC, useEffect } from "react"; import { useTranslation } from "react-i18next"; @@ -38,11 +38,11 @@ export const Discharges: FC = ({ period }) => { dispatch(getAgeTypes()); dispatch(getDischargeTypes()); dispatch(getWards()); - }, [dispatch]); + }, [dispatch, period]); useEffect(() => { dispatch(getDischarges({ dischargerange: period })); - }, [period]); + }, [period, dispatch]); return ( <> diff --git a/src/components/accessories/dashboard/discharges/dischargesByAgeTypes/DischargesByAgeTypes.tsx b/src/components/accessories/dashboard/discharges/dischargesByAgeTypes/DischargesByAgeTypes.tsx index 85c839f98..ad2da2c2d 100644 --- a/src/components/accessories/dashboard/discharges/dischargesByAgeTypes/DischargesByAgeTypes.tsx +++ b/src/components/accessories/dashboard/discharges/dischargesByAgeTypes/DischargesByAgeTypes.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from "@mui/lab"; +import { Skeleton } from "@mui/material"; import { useAppDispatch } from "libraries/hooks/redux"; import React, { FC, useEffect, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; diff --git a/src/components/accessories/dashboard/discharges/dischargesBySex/DischargesBySex.tsx b/src/components/accessories/dashboard/discharges/dischargesBySex/DischargesBySex.tsx index 7ac1ab75a..870fdc8c9 100644 --- a/src/components/accessories/dashboard/discharges/dischargesBySex/DischargesBySex.tsx +++ b/src/components/accessories/dashboard/discharges/dischargesBySex/DischargesBySex.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from "@mui/lab"; +import { Skeleton } from "@mui/material"; import { useAppDispatch } from "libraries/hooks/redux"; import React, { FC, useEffect, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; diff --git a/src/components/accessories/dashboard/discharges/dischargesByTypes/DischargesByTypes.tsx b/src/components/accessories/dashboard/discharges/dischargesByTypes/DischargesByTypes.tsx index f92cd6abe..e54d6eba0 100644 --- a/src/components/accessories/dashboard/discharges/dischargesByTypes/DischargesByTypes.tsx +++ b/src/components/accessories/dashboard/discharges/dischargesByTypes/DischargesByTypes.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from "@mui/lab"; +import { Skeleton } from "@mui/material"; import { useAppDispatch } from "libraries/hooks/redux"; import React, { FC, useEffect, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; diff --git a/src/components/accessories/dashboard/discharges/dischargesByWards/DischargesByWards.tsx b/src/components/accessories/dashboard/discharges/dischargesByWards/DischargesByWards.tsx index bc2d57829..667b54c20 100644 --- a/src/components/accessories/dashboard/discharges/dischargesByWards/DischargesByWards.tsx +++ b/src/components/accessories/dashboard/discharges/dischargesByWards/DischargesByWards.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from "@mui/lab"; +import { Skeleton } from "@mui/material"; import { useAppDispatch } from "libraries/hooks/redux"; import React, { FC, useEffect, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; @@ -26,11 +26,11 @@ export const DischargesByWards: FC = ({ useEffect(() => { dispatch(getDischarges({ dischargerange: period })); dispatch(getWards()); - }, [dispatch]); + }, [dispatch, period]); useEffect(() => { dispatch(getDischarges({ dischargerange: period })); - }, [period]); + }, [period, dispatch]); const { total, success, status, wardStatus, data, csvData } = useDisByWardData(); diff --git a/src/components/accessories/dashboard/discharges/useData.ts b/src/components/accessories/dashboard/discharges/useData.ts index 1f14144cf..d00b32448 100644 --- a/src/components/accessories/dashboard/discharges/useData.ts +++ b/src/components/accessories/dashboard/discharges/useData.ts @@ -1,15 +1,6 @@ -import { useMemo, useState } from "react"; -import { useTranslation } from "react-i18next"; import { useAppSelector } from "libraries/hooks/redux"; -import { - AdmissionDTO, - WardDTO, - AdmissionTypeDTO, - AgeTypeDTO, -} from "../../../../generated"; +import { useTranslation } from "react-i18next"; import { colorGen } from "../../../../libraries/uiUtils/colorGenerator"; -import { TAPIResponseStatus } from "../../../../state/types"; -import { IState } from "../../../../types"; export const useData = () => { const { t } = useTranslation(); diff --git a/src/components/accessories/dashboard/layouts/consts.ts b/src/components/accessories/dashboard/layouts/consts.ts index 74a62c6f3..d93973b06 100644 --- a/src/components/accessories/dashboard/layouts/consts.ts +++ b/src/components/accessories/dashboard/layouts/consts.ts @@ -171,7 +171,7 @@ export function removeDoubles(input1: Layouts, input2: Layouts): Layouts { Object.keys(input1).forEach((breakpoint) => { let breakpointConfig = input1[breakpoint].filter((layout) => { - return !input2[breakpoint].some((layout1) => layout1.i == layout.i); + return !input2[breakpoint].some((layout1) => layout1.i === layout.i); }); cleanInput[breakpoint] = breakpointConfig; @@ -211,7 +211,7 @@ export function isEmptyLayout(input: Layouts): boolean { nbWidgets += input[breakpoint] ? input[breakpoint].length : 0; }); - return nbWidgets == 0; + return nbWidgets === 0; } /** @@ -332,7 +332,7 @@ export function generateLayout( breakpoint: LayoutBreakpoints, dashboards?: string[] ): Layout[] { - if (!dashboards || dashboards.length == 0) { + if (!dashboards || dashboards.length === 0) { dashboards = allowedDashboards(); } @@ -345,8 +345,8 @@ export function generateLayout( i: dashboardKey, w: 6, h: 3, - x: index % 2 == 0 ? 0 : 6, - y: index % 2 == 0 ? 0 : 2, + x: index % 2 === 0 ? 0 : 6, + y: index % 2 === 0 ? 0 : 2, minW: 4, minH: 3, //maxW: 12, @@ -361,8 +361,8 @@ export function generateLayout( i: dashboardKey, w: 6, h: 3, - x: index % 2 == 0 ? 0 : 6, - y: index % 2 == 0 ? 0 : 2, + x: index % 2 === 0 ? 0 : 6, + y: index % 2 === 0 ? 0 : 2, minW: 6, minH: 3, //maxW: 12, @@ -377,8 +377,8 @@ export function generateLayout( i: dashboardKey, w: 6, h: 3, - x: index % 2 == 0 ? 0 : 6, - y: index % 2 == 0 ? 0 : 2, + x: index % 2 === 0 ? 0 : 6, + y: index % 2 === 0 ? 0 : 2, minW: 6, minH: 3, //maxW: 2, @@ -394,7 +394,7 @@ export function generateLayout( w: 12, h: 3, x: 0, - y: index % 2 == 0 ? 0 : 2, + y: index % 2 === 0 ? 0 : 2, minW: 12, minH: 3, //maxW: 2, @@ -410,8 +410,8 @@ export function generateLayout( i: dashboardKey, w: 4, h: 3, - x: index % 3 == 0 ? 8 : index % 2 == 0 ? 0 : 4, - y: index % 2 == 0 ? 0 : 2, + x: index % 3 === 0 ? 8 : index % 2 === 0 ? 0 : 4, + y: index % 2 === 0 ? 0 : 2, minW: 3, minH: 3, //maxW: 12, diff --git a/src/components/accessories/dashboard/layouts/container/GridLayoutContainer.tsx b/src/components/accessories/dashboard/layouts/container/GridLayoutContainer.tsx index 30a73664d..e6a93685a 100644 --- a/src/components/accessories/dashboard/layouts/container/GridLayoutContainer.tsx +++ b/src/components/accessories/dashboard/layouts/container/GridLayoutContainer.tsx @@ -71,7 +71,7 @@ const GridLayoutContainer: FC = () => { useEffect(() => { dispatch(getLayouts(userCredentials?.username!)); setMounted(true); - }, []); + }, [dispatch, userCredentials]); const onRetry = () => { dispatch(getLayouts(userCredentials?.username!)); diff --git a/src/components/accessories/dashboard/opds/Opds.tsx b/src/components/accessories/dashboard/opds/Opds.tsx index 79a4e9608..1e47dd368 100644 --- a/src/components/accessories/dashboard/opds/Opds.tsx +++ b/src/components/accessories/dashboard/opds/Opds.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from "@mui/lab"; +import { Skeleton } from "@mui/material"; import { useAppDispatch } from "libraries/hooks/redux"; import React, { FC, useEffect } from "react"; import { useTranslation } from "react-i18next"; @@ -23,15 +23,8 @@ export const Opds: FC = ({ period }) => { ); dispatch(getAgeTypes()); }, [dispatch, period]); - const { - ageTypeStatus, - opdStatus, - dataByAgeType, - dataBySex, - success, - total, - opds, - } = useData(); + const { ageTypeStatus, opdStatus, dataByAgeType, dataBySex, success, total } = + useData(); return ( <> diff --git a/src/components/accessories/dashboard/opds/opdByAgeTypes/OpdByAgeTypes.tsx b/src/components/accessories/dashboard/opds/opdByAgeTypes/OpdByAgeTypes.tsx index 46a1e59ba..a29b40f22 100644 --- a/src/components/accessories/dashboard/opds/opdByAgeTypes/OpdByAgeTypes.tsx +++ b/src/components/accessories/dashboard/opds/opdByAgeTypes/OpdByAgeTypes.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from "@mui/lab"; +import { Skeleton } from "@mui/material"; import { useAppDispatch } from "libraries/hooks/redux"; import React, { FC, useEffect, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; diff --git a/src/components/accessories/dashboard/opds/opdsBySex/OpdBySex.tsx b/src/components/accessories/dashboard/opds/opdsBySex/OpdBySex.tsx index 51a1c322b..50e09736e 100644 --- a/src/components/accessories/dashboard/opds/opdsBySex/OpdBySex.tsx +++ b/src/components/accessories/dashboard/opds/opdsBySex/OpdBySex.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from "@mui/lab"; +import { Skeleton } from "@mui/material"; import { useAppDispatch } from "libraries/hooks/redux"; import React, { FC, useEffect, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; diff --git a/src/components/accessories/dashboard/opds/useData.ts b/src/components/accessories/dashboard/opds/useData.ts index 1e62f63e7..ca9997e1d 100644 --- a/src/components/accessories/dashboard/opds/useData.ts +++ b/src/components/accessories/dashboard/opds/useData.ts @@ -1,8 +1,5 @@ -import { useTranslation } from "react-i18next"; import { useAppSelector } from "libraries/hooks/redux"; -import { AgeTypeDTO, OpdDTO } from "../../../../generated"; -import { TAPIResponseStatus } from "../../../../state/types"; -import { IState } from "../../../../types"; +import { useTranslation } from "react-i18next"; export const useData = () => { const { t } = useTranslation(); diff --git a/src/components/accessories/dateRangeField/DateRangeField.tsx b/src/components/accessories/dateRangeField/DateRangeField.tsx index 2b3b0beae..c88753606 100644 --- a/src/components/accessories/dateRangeField/DateRangeField.tsx +++ b/src/components/accessories/dateRangeField/DateRangeField.tsx @@ -15,10 +15,6 @@ const DateRangeField: FunctionComponent = ({ }) => { const { t } = useTranslation(); - const onChangeHandler = (value: any) => { - onChange(value); - }; - const validationSchema = object({ from: string() .required(t("common.required")) diff --git a/src/components/accessories/dateRangeField/types.ts b/src/components/accessories/dateRangeField/types.ts index a8130e4b8..a916d6f51 100644 --- a/src/components/accessories/dateRangeField/types.ts +++ b/src/components/accessories/dateRangeField/types.ts @@ -1,8 +1,7 @@ -import { DatePicker } from "@mui/x-date-pickers"; -import { ComponentType } from "react"; -import { FIELD_VALIDATION } from "../../../types"; import { DateRange } from "@mui/lab/DateRangePicker"; import { TextFieldProps } from "@mui/material"; +import { ComponentType } from "react"; +import { FIELD_VALIDATION } from "../../../types"; export interface IProps { fieldName?: string; diff --git a/src/components/accessories/discharge/PatientDischarge.tsx b/src/components/accessories/discharge/PatientDischarge.tsx index 2b6ce049a..c922a96bb 100644 --- a/src/components/accessories/discharge/PatientDischarge.tsx +++ b/src/components/accessories/discharge/PatientDischarge.tsx @@ -94,6 +94,7 @@ const PatientDischarge: FC = () => { setShouldResetForm(true); setActivityTransitionState("IDLE"); } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [dispatch, activityTransitionState]); const resetFormCallback = () => { diff --git a/src/components/accessories/discharge/dischargeForm/DischargeForm.tsx b/src/components/accessories/discharge/dischargeForm/DischargeForm.tsx index 410a5718b..437a662c6 100644 --- a/src/components/accessories/discharge/dischargeForm/DischargeForm.tsx +++ b/src/components/accessories/discharge/dischargeForm/DischargeForm.tsx @@ -152,6 +152,7 @@ const DischargeForm: FC = ({ ).toString(); setFieldValue("bedDays", days); }, + // eslint-disable-next-line react-hooks/exhaustive-deps [setFieldValue, admission] ); @@ -172,7 +173,7 @@ const DischargeForm: FC = ({ setFieldValue(fieldName, value); formik.setFieldTouched(fieldName, false); }, - [setFieldValue, handleBlur] + [handleBlur, setFieldValue, formik] ); const [openResetConfirmation, setOpenResetConfirmation] = useState(false); diff --git a/src/components/accessories/feedback/OHFeedback.tsx b/src/components/accessories/feedback/OHFeedback.tsx index d96a69912..1b32eab44 100644 --- a/src/components/accessories/feedback/OHFeedback.tsx +++ b/src/components/accessories/feedback/OHFeedback.tsx @@ -37,7 +37,7 @@ const OHFeedback: FC = () => { ); return (
- + diff --git a/src/components/accessories/hospitalInfo/HospitalInfo.tsx b/src/components/accessories/hospitalInfo/HospitalInfo.tsx index 4afd42d2e..d1d9b9448 100644 --- a/src/components/accessories/hospitalInfo/HospitalInfo.tsx +++ b/src/components/accessories/hospitalInfo/HospitalInfo.tsx @@ -12,7 +12,7 @@ export const HospitalInfo: FC = () => { const { t } = useTranslation(); useEffect(() => { dispatch(getHospital()); - }, [dispatch, getHospital]); + }, [dispatch]); const hospital = useAppSelector( (state) => state.hospital.getHospital.data diff --git a/src/components/accessories/laboratory/Exams.tsx b/src/components/accessories/laboratory/Exams.tsx index 94049ee00..2ebac108d 100644 --- a/src/components/accessories/laboratory/Exams.tsx +++ b/src/components/accessories/laboratory/Exams.tsx @@ -1,6 +1,13 @@ import { CircularProgress } from "@mui/material"; import { useAppDispatch, useAppSelector } from "libraries/hooks/redux"; -import React, { FC, Fragment, useEffect, useMemo, useRef, useState } from "react"; +import React, { + FC, + Fragment, + useEffect, + useMemo, + useRef, + useState, +} from "react"; import { useTranslation } from "react-i18next"; import { Route, Routes, useLocation, useNavigate } from "react-router"; import checkIcon from "../../../assets/check-icon.png"; @@ -78,11 +85,11 @@ export const Exams: FC = () => { return () => { dispatch(deleteLabReset()); }; - }, []); + }, [dispatch, fields]); useEffect(() => { dispatch(searchLabs({ ...filter, paged: true })); - }, [filter]); + }, [dispatch, filter]); useEffect(() => { const refresh = ( @@ -91,7 +98,7 @@ export const Exams: FC = () => { if (refresh) { dispatch(searchLabs({ ...filter, paged: true })); } - }, [location]); + }, [dispatch, filter, location]); const onSubmit = (values: TFilterValues) => { setFilter({ ...values, page: 0, size: filter.size }); @@ -123,12 +130,12 @@ export const Exams: FC = () => { }; const onDelete = (code: number | undefined) => { - setDeletedObjCode(`${code}` ?? ""); + setDeletedObjCode(code === undefined ? "" : `${code}`); dispatch(deleteLab(code)); }; const onCancel = (code: number | undefined) => { - setCanceledObjCode(`${code}` ?? ""); + setCanceledObjCode(code === undefined ? "" : `${code}`); dispatch(cancelLab(code)); }; const onPageChange = (e: any, page: number) => handlePageChange(e, page - 1); @@ -157,7 +164,7 @@ export const Exams: FC = () => { if (changeStatus === "SUCCESS") { dispatch(searchLabs({ ...filter, paged: true })); } - }, [changeStatus]); + }, [changeStatus, dispatch, filter]); /** * I commented the following lignes because they were causing issue with filter. @@ -258,6 +265,7 @@ export const Exams: FC = () => { )} ); + // eslint-disable-next-line react-hooks/exhaustive-deps }, [status, fields, data, filter, dispatch, labStore, showStatusChangeModal]); return ( diff --git a/src/components/accessories/laboratory/examForm/ExamForm.tsx b/src/components/accessories/laboratory/examForm/ExamForm.tsx index d37b1f8ea..d00570ba2 100644 --- a/src/components/accessories/laboratory/examForm/ExamForm.tsx +++ b/src/components/accessories/laboratory/examForm/ExamForm.tsx @@ -81,7 +81,7 @@ const ExamForm: FC = ({ setShouldResetForm(true); handleReset(); } - }, [dispatch, activityTransitionState]); + }, [dispatch, activityTransitionState, handleReset]); const patient = useAppSelector( (state: IState) => state.patients.selectedPatient.data @@ -135,13 +135,13 @@ const ExamForm: FC = ({ } }; - const resetFormCallback = () => { + const resetFormCallback = useCallback(() => { setShouldResetForm(false); dispatch(createLabReset()); dispatch(updateLabReset()); setActivityTransitionState("IDLE"); scrollToElement(null); - }; + }, [dispatch]); const rowTableHeaders: Array<{ label: string; @@ -192,19 +192,6 @@ const ExamForm: FC = ({ } else return []; }; - const materialsOptionsSelector = (materials: string[] | undefined) => { - if (materials) { - return materials.map((item) => { - let label = item ? t(item) : ""; - return { - value: item ?? "", - label: - (label.length > 30 && label.slice(0, 30) + "...") || (label ?? ""), - }; - }); - } else return []; - }; - const examList = useAppSelector((state: IState) => state.exams.examList.data); const examRowOptionsSelector = (state: IState) => { @@ -243,8 +230,9 @@ const ExamForm: FC = ({ setFieldValue(fieldName, value); formik.setFieldTouched(fieldName); }, - [setFieldValue] + [formik, setFieldValue] ); + useEffect(() => { if (initialValues["exam"] !== "") { setCurrentExamCode(initialValues["exam"]); diff --git a/src/components/accessories/laboratory/examRequestForm/ExamRequestForm.tsx b/src/components/accessories/laboratory/examRequestForm/ExamRequestForm.tsx index 8a2053e86..eb587d753 100644 --- a/src/components/accessories/laboratory/examRequestForm/ExamRequestForm.tsx +++ b/src/components/accessories/laboratory/examRequestForm/ExamRequestForm.tsx @@ -40,7 +40,6 @@ const ExamRequestForm: FC = ({ const dispatch = useAppDispatch(); const [patientData, setPatientData] = useState({} as PatientDTO); const exams = useAppSelector((state: IState) => state.exams.examList.data); - const [currentExamCode, setCurrentExamCode] = useState(""); const infoBoxRef = useRef(null); const selectedPatient = useAppSelector( (state: IState) => state.patients.selectedPatient.data @@ -91,7 +90,7 @@ const ExamRequestForm: FC = ({ dispatch(createLabRequestReset()); setShouldResetForm(true); } - }, [dispatch, activityTransitionState]); + }, [dispatch, activityTransitionState, handleSuccess]); const onClose = () => { if (handleSuccess) handleSuccess(true); @@ -135,11 +134,11 @@ const ExamRequestForm: FC = ({ }, }); - const resetFormCallback = () => { + const resetFormCallback = useCallback(() => { setShouldResetForm(false); dispatch(createLabRequestReset()); setActivityTransitionState("IDLE"); - }; + }, [dispatch]); const { setFieldValue, handleBlur, resetForm } = formik; @@ -147,7 +146,6 @@ const ExamRequestForm: FC = ({ if (shouldResetForm) { resetForm(); resetFormCallback(); - setCurrentExamCode(""); } }, [shouldResetForm, resetForm, resetFormCallback]); @@ -170,9 +168,6 @@ const ExamRequestForm: FC = ({ handleBlur(e); if (typeof value === "string") { setFieldValue(fieldName, value); - if (fieldName === "exam") { - setCurrentExamCode(value); - } } else { setFieldValue(fieldName, value?.code ?? ""); setPatientData(value as PatientDTO); diff --git a/src/components/accessories/laboratory/filter/ExamFilterForm.tsx b/src/components/accessories/laboratory/filter/ExamFilterForm.tsx index d94a6e07e..a69272151 100644 --- a/src/components/accessories/laboratory/filter/ExamFilterForm.tsx +++ b/src/components/accessories/laboratory/filter/ExamFilterForm.tsx @@ -204,7 +204,7 @@ export const ExamFilterForm: FC = ({ setFieldValue("dateTo", end); } }, - [formik] + [formik, setFieldValue] ); const isValid = (fieldName: string): boolean => { @@ -235,7 +235,7 @@ export const ExamFilterForm: FC = ({ : setFieldValue(fieldName, value?.code ?? ""); } }, - [setFieldValue, handleBlur] + [handleBlur, examStatusOptions, setFieldValue] ); return ( diff --git a/src/components/accessories/laboratory/filter/types.ts b/src/components/accessories/laboratory/filter/types.ts index 4c76a464f..790467cb9 100644 --- a/src/components/accessories/laboratory/filter/types.ts +++ b/src/components/accessories/laboratory/filter/types.ts @@ -1,4 +1,3 @@ -import { LaboratoryDTOStatusEnum } from "../../../../generated"; import { TFields } from "../../../../libraries/formDataHandling/types"; export interface IExamFilterProps { diff --git a/src/components/accessories/menuItem/MenuItem.tsx b/src/components/accessories/menuItem/MenuItem.tsx index 3e5177cdd..6347ca63d 100644 --- a/src/components/accessories/menuItem/MenuItem.tsx +++ b/src/components/accessories/menuItem/MenuItem.tsx @@ -14,6 +14,7 @@ interface IOwnProps { label: string; selected?: boolean; expandedContent?: ReactNode; + dataCy?: string; onClick: () => void; } @@ -23,11 +24,13 @@ export const MenuItem = ({ label, selected, expandedContent, + dataCy, onClick, }: IOwnProps) => { const [expanded, setExpanded] = useState(false); const menu = (
diff --git a/src/components/accessories/opds/Opds.tsx b/src/components/accessories/opds/Opds.tsx index 03ece738b..5c1a3e686 100644 --- a/src/components/accessories/opds/Opds.tsx +++ b/src/components/accessories/opds/Opds.tsx @@ -27,7 +27,7 @@ export const Opds: FC = () => { useEffect(() => { dispatch(searchOpds({ ...filter, paged: false })); - }, [filter]); + }, [dispatch, filter]); useEffect(() => { setFilter((previous) => ({ ...previous, page: page })); @@ -49,7 +49,7 @@ export const Opds: FC = () => { dispatch(getDiseasesOpd()); dispatch(getDiseaseTypes()); dispatch(getWards()); - }, []); + }, [dispatch]); return ( diff --git a/src/components/accessories/opds/filter/OpdFilterForm.tsx b/src/components/accessories/opds/filter/OpdFilterForm.tsx index d661608e5..74aec53ec 100644 --- a/src/components/accessories/opds/filter/OpdFilterForm.tsx +++ b/src/components/accessories/opds/filter/OpdFilterForm.tsx @@ -162,7 +162,7 @@ export const OpdFilterForm: FC = ({ }); const initialValues = getFromFields(fields, "value"); - const [filter, setFilter] = useState(initialValues as TFilterValues); + const formik = useFormik({ initialValues, validationSchema, @@ -173,7 +173,6 @@ export const OpdFilterForm: FC = ({ values ) as TFilterValues; onSubmit(formattedValues); - setFilter(formattedValues); }, }); @@ -259,7 +258,7 @@ export const OpdFilterForm: FC = ({ setFieldValue("dateTo", end); } }, - [formik] + [formik, setFieldValue] ); const isValid = (fieldName: string): boolean => { @@ -300,7 +299,7 @@ export const OpdFilterForm: FC = ({ formik.setFieldValue("diseaseCode", ""); } }, - [setFieldValue, handleBlur] + [handleBlur, setFieldValue, formik] ); const newPatientOptions = [ @@ -351,7 +350,7 @@ export const OpdFilterForm: FC = ({ {t("opd.general")}
-
+
= ({ options={newPatientOptions} />
+ +
+ +
= ({ options={diseaseOptions} />
-
- -
diff --git a/src/components/accessories/opds/filter/styles.scss b/src/components/accessories/opds/filter/styles.scss index db5414a6f..23a4798f5 100644 --- a/src/components/accessories/opds/filter/styles.scss +++ b/src/components/accessories/opds/filter/styles.scss @@ -40,7 +40,7 @@ justify-content: space-between; .filterOpdForm__item { - margin-right: 5px; + margin-right: 2px; align-items: center; width: 100%; .dateField, @@ -60,6 +60,9 @@ .fullWidth { width: 100%; } + .halfWidth { + width: 49%; + } } } .filterForm__buttonSet { diff --git a/src/components/accessories/opds/types.ts b/src/components/accessories/opds/types.ts index 46ba4d31c..e69de29bb 100644 --- a/src/components/accessories/opds/types.ts +++ b/src/components/accessories/opds/types.ts @@ -1 +0,0 @@ -import { TFields } from "../../../libraries/formDataHandling/types"; diff --git a/src/components/accessories/patientAutocomplete/PatientAutocomplete.tsx b/src/components/accessories/patientAutocomplete/PatientAutocomplete.tsx index 1feb68575..3dcea7982 100644 --- a/src/components/accessories/patientAutocomplete/PatientAutocomplete.tsx +++ b/src/components/accessories/patientAutocomplete/PatientAutocomplete.tsx @@ -38,7 +38,7 @@ const PatientAutocomplete: FC = ({ onBlur, ...props }) => { firstName: inputValue, } as TValues) ); - }, [inputValue]); + }, [dispatch, inputValue]); const handleOnInputChange = (event: any, value: string) => { if (value === "") setValue(undefined); diff --git a/src/components/accessories/patientBooking/PatientBooking.tsx b/src/components/accessories/patientBooking/PatientBooking.tsx index 444afe3fe..e2ccbd62e 100644 --- a/src/components/accessories/patientBooking/PatientBooking.tsx +++ b/src/components/accessories/patientBooking/PatientBooking.tsx @@ -15,7 +15,7 @@ const PatientBooking = () => { const [bookingTransitionState, setActivityTransitionState] = useState("IDLE"); - const { isLoading, hasSucceeded, hasFailed } = useAppSelector((state) => ({ + const { isLoading, hasFailed } = useAppSelector((state) => ({ isLoading: false, hasSucceeded: true, hasFailed: false, diff --git a/src/components/accessories/patientExams/ExamForm/ExamForm.tsx b/src/components/accessories/patientExams/ExamForm/ExamForm.tsx index 40b8715aa..ae93c8991 100644 --- a/src/components/accessories/patientExams/ExamForm/ExamForm.tsx +++ b/src/components/accessories/patientExams/ExamForm/ExamForm.tsx @@ -106,27 +106,6 @@ const ExamForm: FC = ({ examRowOptionsSelector(state) ); - const materialsLoading = useAppSelector( - (state: IState) => state.laboratories.materials.status === "LOADING" - ); - - const materialsOptionsSelector = (materials: string[] | undefined) => { - if (materials) { - return materials.map((item) => { - let label = item ? t(item) : ""; - return { - value: item ?? "", - label: - (label.length > 30 && label.slice(0, 30) + "...") || (label ?? ""), - }; - }); - } else return []; - }; - - const materialsList = useAppSelector( - (state: IState) => state.laboratories.materials.data - ); - const formik = useFormik({ initialValues, validationSchema, @@ -148,8 +127,9 @@ const ExamForm: FC = ({ setFieldValue(fieldName, value); formik.setFieldTouched(fieldName); }, - [setFieldValue] + [formik, setFieldValue] ); + useEffect(() => { if (initialValues["exam"] !== "") { setCurrentExamCode(initialValues["exam"]); @@ -157,7 +137,7 @@ const ExamForm: FC = ({ if (labToEdit) { formik.setFieldValue("result", labToEdit.result); } - }, [initialValues]); + }, [formik, initialValues, labToEdit]); useEffect(() => { if (currentExamCode) { diff --git a/src/components/accessories/patientExams/PatientExams.tsx b/src/components/accessories/patientExams/PatientExams.tsx index 190faef5f..3a2a967dd 100644 --- a/src/components/accessories/patientExams/PatientExams.tsx +++ b/src/components/accessories/patientExams/PatientExams.tsx @@ -33,8 +33,8 @@ import ConfirmationDialog from "../confirmationDialog/ConfirmationDialog"; import InfoBox from "../infoBox/InfoBox"; import { initialRequestFields } from "../laboratory/consts"; import ExamRequestForm from "../laboratory/examRequestForm/ExamRequestForm"; -import { initialFields } from "./consts"; import ExamForm from "./ExamForm/ExamForm"; +import { initialFields } from "./consts"; import PatientExamRequestsTable from "./patientExamRequestsTable/PatientExamRequestsTable"; import PatientExamsTable from "./patientExamsTable/PatientExamsTable"; import "./styles.scss"; @@ -101,12 +101,9 @@ const PatientExams: FC = () => { ) as string; const exams = useAppSelector((state: IState) => state.exams.examList.data); - const onSuccess = useCallback( - (shoudlReset: boolean) => { - setShouldUpdateRequestsTable(shoudlReset); - }, - [dispatch] - ); + const onSuccess = useCallback((shoudlReset: boolean) => { + setShouldUpdateRequestsTable(shoudlReset); + }, []); const onSubmit = (lab: LaboratoryDTO, rows: string[]) => { setShouldResetForm(false); @@ -153,12 +150,12 @@ const PatientExams: FC = () => { scrollToElement(null); }; const onDelete = (code: number | undefined) => { - setDeletedObjCode(`${code}` ?? ""); + setDeletedObjCode(code === undefined ? "" : `${code}`); dispatch(deleteLab(code)); }; const onCancel = (code: number | undefined) => { - setCanceledObjCode(`${code}` ?? ""); + setCanceledObjCode(code === undefined ? "" : `${code}`); dispatch(cancelLab(code)); }; diff --git a/src/components/accessories/patientExams/examRowTable/ExamRowTable.tsx b/src/components/accessories/patientExams/examRowTable/ExamRowTable.tsx index 71aa63d11..ada2220e2 100644 --- a/src/components/accessories/patientExams/examRowTable/ExamRowTable.tsx +++ b/src/components/accessories/patientExams/examRowTable/ExamRowTable.tsx @@ -33,10 +33,12 @@ const ExamRowTable: FC = ({ debounceUpdate(value); }; + // eslint-disable-next-line react-hooks/exhaustive-deps const debounceUpdate = useCallback( debounce((value: string) => onBlur(value), 100), [] ); + return ( = ({ handleCancel, }) => { const { t } = useTranslation(); - const canUpdate = usePermission("laboratories.update"); const canCancel = usePermission("laboratories.delete"); const infoBoxRef = useRef(null); @@ -53,7 +52,7 @@ const PatientExamRequestsTable: FunctionComponent = ({ useEffect(() => { if (shouldUpdateTable || patientCode) dispatch(getLabsRequestByPatientId(patientCode)); - }, [patientCode, shouldUpdateTable]); + }, [dispatch, patientCode, shouldUpdateTable]); const formatDataToDisplay = (data: LaboratoryDTO[]) => { return data.map((item) => { @@ -78,12 +77,6 @@ const PatientExamRequestsTable: FunctionComponent = ({ t("common.somethingwrong") ) as string; - const onEdit = (row: any) => { - if (handleEdit) { - handleEdit(data?.find((item) => item.code === row.code)); - } - }; - const onCancel = (row: any) => { if (handleCancel) { handleCancel(row.code); diff --git a/src/components/accessories/patientExams/patientExamsTable/PatientExamsTable.tsx b/src/components/accessories/patientExams/patientExamsTable/PatientExamsTable.tsx index b6b85b018..a1c75f29f 100644 --- a/src/components/accessories/patientExams/patientExamsTable/PatientExamsTable.tsx +++ b/src/components/accessories/patientExams/patientExamsTable/PatientExamsTable.tsx @@ -4,7 +4,6 @@ import React, { FunctionComponent, useEffect, useRef } from "react"; import { useTranslation } from "react-i18next"; import { LabWithRowsDTO } from "../../../../generated"; import { renderDateTime } from "../../../../libraries/formatUtils/dataFormatting"; -import { usePermission } from "../../../../libraries/permissionUtils/usePermission"; import { getLabsByPatientId } from "../../../../state/laboratories"; import InfoBox from "../../infoBox/InfoBox"; import { statusLabel } from "../../laboratory/table/ExamTable"; @@ -22,8 +21,6 @@ const PatientExamsTable: FunctionComponent = ({ handleDelete, }) => { const { t } = useTranslation(); - const canUpdate = usePermission("exams.update"); - const canDelete = usePermission("exams.delete"); const infoBoxRef = useRef(null); const header = ["date", "exam", "status"]; @@ -91,21 +88,6 @@ const PatientExamsTable: FunctionComponent = ({ t("common.somethingwrong") ) as string; - const labData = useAppSelector( - (state) => state.laboratories.labsByPatientId.data - ); - - const onEdit = (row: any) => { - handleEdit( - labData?.find((item) => item.laboratoryDTO?.code === row.code) - ?.laboratoryDTO - ); - }; - - const onDelete = (row: any) => { - handleDelete(row.code); - }; - return (
{t("lab.previousentries")}
diff --git a/src/components/accessories/patientExams/types.ts b/src/components/accessories/patientExams/types.ts index 2e8d3f55c..fc0b19794 100644 --- a/src/components/accessories/patientExams/types.ts +++ b/src/components/accessories/patientExams/types.ts @@ -1,4 +1,4 @@ -import { MedicalDTO, PatientDTO, TherapyRowDTO } from "../../../generated"; +import { TherapyRowDTO } from "../../../generated"; export interface IStateProps { isLoading: boolean; diff --git a/src/components/accessories/patientExtraData/patientExtraData.tsx b/src/components/accessories/patientExtraData/patientExtraData.tsx index e88f95940..33a00ea1c 100644 --- a/src/components/accessories/patientExtraData/patientExtraData.tsx +++ b/src/components/accessories/patientExtraData/patientExtraData.tsx @@ -75,6 +75,7 @@ export const PatientExtraData: FunctionComponent = ({ formik.resetForm(); setActivityTransitionState("IDLE"); } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [dispatch, activityTransitionState]); const discardChanges = () => { diff --git a/src/components/accessories/patientNewBill/PatientNewBill.tsx b/src/components/accessories/patientNewBill/PatientNewBill.tsx index a60852f2e..1e7738675 100644 --- a/src/components/accessories/patientNewBill/PatientNewBill.tsx +++ b/src/components/accessories/patientNewBill/PatientNewBill.tsx @@ -34,10 +34,8 @@ const PatientNewBill: FC = () => { const [openPayment, setOpenPayment] = useState(true); const { - fullBill, bill, billItems, - billPayments, itemsRowData, billTotal, paymentTotal, @@ -46,19 +44,15 @@ const PatientNewBill: FC = () => { status, saveBill, setItemToEdit, - handleBillEdit, handleAddItem, handleEditItem, handleAddPayment, handleDeleteItem, - handleDeletePayment, } = useFullBill(); const { showItemPicker, showPaymentDialog, - openSaveDialog, - handleSaveDialog, handleItemPicker, handlePaymentDialog, } = useDialogStatus(); @@ -81,10 +75,13 @@ const PatientNewBill: FC = () => { const resetItemFormCallback = () => {}; - const handleTableEdit = useCallback((row: any) => { - setItemToEdit(row); - handleItemPicker(); - }, []); + const handleTableEdit = useCallback( + (row: any) => { + setItemToEdit(row); + handleItemPicker(); + }, + [handleItemPicker, setItemToEdit] + ); const handlePayment = (values: Record) => { handleAddPayment(values); @@ -102,7 +99,7 @@ const PatientNewBill: FC = () => { if (status === "SUCCESS") { navigate(`/details/${patient.code ?? ""}/billsrecord`); } - }, [status]); + }, [navigate, patient.code, status]); const classes = useStyles(); @@ -110,7 +107,7 @@ const PatientNewBill: FC = () => { <>
- {billItems.length != 0 && ( + {billItems.length !== 0 && (
setOpenPayment(!openPayment)}> @@ -130,11 +127,11 @@ const PatientNewBill: FC = () => { )}
- {billTotal == 0 && ( + {billTotal === 0 && ( {t("bill.clicktoadditem")} )}
- {billItems.length != 0 && ( + {billItems.length !== 0 && ( {
- {billTotal == 0 && ( + {billTotal === 0 && (
{t("bill.nopendingbill")}
@@ -169,7 +166,7 @@ const PatientNewBill: FC = () => {
)}
- + { const { patient } = useSelectedPatient(); const user = useCurrentUser(); - const { data: pendings, status: pendingStatus } = usePendingBills( - patient.code ?? 0 - ); + const { data: pendings } = usePendingBills(patient.code ?? 0); const creationMode = useMemo(() => !(pendings?.length > 0), [pendings]); const status = useAppSelector((state: IState) => @@ -78,16 +75,16 @@ export const useFullBill = () => { creationMode ? dispatch(newBill(fullBill)) : dispatch(updateBill({ id: bill.id ?? 0, fullBillDTO: fullBill })); - }, [fullBill, creationMode, dispatch]); + }, [creationMode, dispatch, fullBill, bill]); const { prices } = useItemPrices(pendings[0]?.bill?.listId); const itemsRowData = useMemo(() => { return billItems.map((item) => { const priceDTO = prices.find( - (e) => (e.id ?? 0).toString() == item.priceId || e.item == item.itemId + (e) => (e.id ?? 0).toString() === item.priceId || e.item === item.itemId ); const groupLabel = Object.entries(ItemGroups).find( - (e) => e[1].id == priceDTO?.group + (e) => e[1].id === priceDTO?.group ); return { id: item.id, @@ -100,12 +97,13 @@ export const useFullBill = () => { itemAmount: item.itemAmount, }; }); - }, [billItems]); + }, [billItems, prices, t]); const handleBillEdit = useCallback( (billDTO: BillDTO) => setBill({ ...billDTO }), - [bill] + [] ); + const handleAddPayment = useCallback( (values: Record) => setBillPayments([ @@ -118,19 +116,19 @@ export const useFullBill = () => { user: user as any, }, ]), - [billPayments] + [bill, billPayments, user] ); const handleAddItem = useCallback( (itemDTO: BillItemsDTO) => { itemDTO.billId = bill.id; setBillItems([...billItems, itemDTO]); }, - [billItems] + [bill, billItems] ); const handleEditItem = useCallback( (itemDTO: BillItemsDTO) => { const items = billItems.map((item) => - item.id == itemDTO.id ? itemDTO : item + item.id === itemDTO.id ? itemDTO : item ); setBillItems([...items]); setItemToEdit(undefined); @@ -139,14 +137,14 @@ export const useFullBill = () => { ); const handleDeletePayment = useCallback( (paymentDTO: BillPaymentsDTO) => { - let payments = billPayments.filter((value) => value.id != paymentDTO.id); + let payments = billPayments.filter((value) => value.id !== paymentDTO.id); setBillPayments([...payments]); }, [billPayments] ); const handleDeleteItem = useCallback( (item: any) => { - let items = billItems.filter((value) => value.id != item.id); + let items = billItems.filter((value) => value.id !== item.id); setBillItems([...items]); }, [billItems] @@ -155,17 +153,19 @@ export const useFullBill = () => { setFullBill(() => { return { ...fullBill, billDTO: bill }; }); - }, [bill]); + }, [bill, fullBill]); + useEffect(() => { setFullBill(() => { return { ...fullBill, billItemsDTO: billItems }; }); - }, [billItems]); + }, [billItems, fullBill]); + useEffect(() => { setFullBill(() => { return { ...fullBill, billPaymentsDTO: billPayments }; }); - }, [billPayments]); + }, [billPayments, fullBill]); useEffect(() => { if (!creationMode) { @@ -174,7 +174,7 @@ export const useFullBill = () => { setBillItems([...(fullBill.billItems ?? [])]); setBillPayments([...(fullBill.billPayments ?? [])]); } - }, [creationMode, patient]); + }, [creationMode, patient, pendings]); const billTotal = useMemo(() => { return billItems @@ -194,13 +194,13 @@ export const useFullBill = () => { amount: billTotal, balance: billTotal - paymentTotal, })); - }, [billTotal, paymentTotal]); + }, [bill, billTotal, paymentTotal]); useEffect(() => { if (status === "SUCCESS") { creationMode ? dispatch(newBillReset()) : dispatch(updateBillReset()); } - }, [status]); + }, [creationMode, dispatch, status]); return { fullBill, diff --git a/src/components/accessories/patientNewBill/hooks/item.hooks.ts b/src/components/accessories/patientNewBill/hooks/item.hooks.ts index da7df2289..deaca3f91 100644 --- a/src/components/accessories/patientNewBill/hooks/item.hooks.ts +++ b/src/components/accessories/patientNewBill/hooks/item.hooks.ts @@ -1,10 +1,8 @@ -import { argv } from "process"; -import { useEffect } from "react"; import { useAppDispatch, useAppSelector } from "libraries/hooks/redux"; -import { MedicalDTO, ExamDTO, OperationDTO } from "../../../../generated"; +import { useEffect } from "react"; +import { OperationDTO } from "../../../../generated"; import { getExams } from "../../../../state/exams"; import { getMedicals } from "../../../../state/medicals"; -import { IState } from "../../../../types"; export const useItems = () => { const dispatch = useAppDispatch(); diff --git a/src/components/accessories/patientNewBill/hooks/pending_bill.hooks.ts b/src/components/accessories/patientNewBill/hooks/pending_bill.hooks.ts index 98195584d..a89d233a6 100644 --- a/src/components/accessories/patientNewBill/hooks/pending_bill.hooks.ts +++ b/src/components/accessories/patientNewBill/hooks/pending_bill.hooks.ts @@ -1,6 +1,5 @@ -import { useEffect } from "react"; import { useAppDispatch, useAppSelector } from "libraries/hooks/redux"; -import { FullBillDTO } from "../../../../generated"; +import { useEffect } from "react"; import { getPendingBills } from "../../../../state/bills"; import { IState } from "../../../../types"; diff --git a/src/components/accessories/patientNewBill/hooks/price.hooks.ts b/src/components/accessories/patientNewBill/hooks/price.hooks.ts index 43f0c5a66..55889a106 100644 --- a/src/components/accessories/patientNewBill/hooks/price.hooks.ts +++ b/src/components/accessories/patientNewBill/hooks/price.hooks.ts @@ -1,7 +1,5 @@ -import { useEffect, useMemo, useState } from "react"; import { useAppDispatch, useAppSelector } from "libraries/hooks/redux"; -import { PriceDTO } from "../../../../generated/models/PriceDTO"; -import { PriceListDTO } from "../../../../generated/models/PriceListDTO"; +import { useEffect, useMemo } from "react"; import { getPriceLists } from "../../../../state/prices"; import { IState } from "../../../../types"; import { ItemGroups } from "../consts"; @@ -20,17 +18,18 @@ export const usePriceLists = () => { }; export const useItemPrices = (idList?: number) => { - const dispatch = useAppDispatch(); const listId = useMemo(() => idList ?? 0, [idList]); const prices = useAppSelector((state: IState) => - (state.prices.getPrices?.data ?? []).filter((e) => e.list?.id == listId) + (state.prices.getPrices?.data ?? []).filter((e) => e.list?.id === listId) ); const examsOptionsSelector = (state: IState) => { return state.prices.getPrices.data ? state.prices.getPrices.data - .filter((e) => e.group == ItemGroups.exam.id && e.list?.id == listId) + .filter( + (e) => e.group === ItemGroups.exam.id && e.list?.id === listId + ) .map((item) => { return { value: item.item ?? "", @@ -44,7 +43,7 @@ export const useItemPrices = (idList?: number) => { return state.prices.getPrices.data ? state.prices.getPrices.data .filter( - (e) => e.group == ItemGroups.medical.id && e.list?.id == listId + (e) => e.group === ItemGroups.medical.id && e.list?.id === listId ) .map((item) => { return { @@ -59,7 +58,7 @@ export const useItemPrices = (idList?: number) => { return state.prices.getPrices.data ? state.prices.getPrices.data .filter( - (e) => e.group == ItemGroups.surgery.id && e.list?.id == listId + (e) => e.group === ItemGroups.surgery.id && e.list?.id === listId ) .map((item) => { return { diff --git a/src/components/accessories/patientNewBill/itemPicker/BillItemPicker.tsx b/src/components/accessories/patientNewBill/itemPicker/BillItemPicker.tsx index a49196c31..8cd574c07 100644 --- a/src/components/accessories/patientNewBill/itemPicker/BillItemPicker.tsx +++ b/src/components/accessories/patientNewBill/itemPicker/BillItemPicker.tsx @@ -37,19 +37,19 @@ const BillItemPickerForm: FC = ({ const handleFormSubmit = useCallback( (values: Record) => { const id = - itemToEdit == undefined + itemToEdit === undefined ? (items.map((e) => e.id).sort()[items.length - 1] ?? 0) + 1 : itemToEdit?.id; let item: any = { id: id }; item.itemQuantity = values?.itemQuantity; - if (itemType == ItemGroups.other.id) { + if (itemType === ItemGroups.other.id) { item.itemAmount = values?.itemAmount; item.itemDescription = values?.itemDescription; onSubmit(item, itemToEdit === undefined ? true : false); return; } let priceDTO: PriceDTO | undefined = prices.find( - (e) => e?.item == values?.itemId + (e) => e?.item === values?.itemId ); if (priceDTO) { @@ -61,7 +61,7 @@ const BillItemPickerForm: FC = ({ onSubmit(item, itemToEdit === undefined ? true : false); } }, - [itemType] + [itemToEdit, itemType, items, onSubmit, prices] ); const { @@ -75,21 +75,18 @@ const BillItemPickerForm: FC = ({ values, } = useItemFormik(fields, itemType, items, itemToEdit, handleFormSubmit); - const handleItemTypeChange = useCallback( - (e: any, value: string) => { - setItemType(value); - }, - [itemType] - ); + const handleItemTypeChange = useCallback((e: any, value: string) => { + setItemType(value); + }, []); const options = useMemo(() => { return ( - (itemType == ItemGroups.medical.id && medicalsOptions) || - (itemType == ItemGroups.exam.id && examsOptions) || - (itemType == ItemGroups.surgery.id && surgeriesOptions) || + (itemType === ItemGroups.medical.id && medicalsOptions) || + (itemType === ItemGroups.exam.id && examsOptions) || + (itemType === ItemGroups.surgery.id && surgeriesOptions) || [] ); - }, [itemType]); + }, [examsOptions, itemType, medicalsOptions, surgeriesOptions]); return (
= ({ > } label={t("bill.medical")} labelPlacement="top" /> } label={t("bill.exam")} labelPlacement="top" /> } label={t("bill.surgery")} labelPlacement="top" /> } label={t("bill.other")} labelPlacement="top" @@ -138,7 +135,7 @@ const BillItemPickerForm: FC = ({
- {itemType != ItemGroups.other.id && ( + {itemType !== ItemGroups.other.id && ( = ({ isLoading={false} /> )} - {itemType == ItemGroups.other.id && ( + {itemType === ItemGroups.other.id && ( <> { - if (itemType == ItemGroups.other.id) { + if (itemType === ItemGroups.other.id) { return object({ itemAmount: number() .required(t("common.required")) @@ -35,10 +35,10 @@ export const useItemFormik = ( test: (value) => { const item = items.find( (e) => - e.itemDescription?.toLocaleLowerCase() == - value?.toLocaleLowerCase() + e.itemDescription?.toLocaleLowerCase() === + (value as string)?.toLocaleLowerCase() ); - return item == null || itemToEdit != undefined; + return item == null || itemToEdit !== undefined; }, }) .required(t("common.required")), @@ -49,8 +49,8 @@ export const useItemFormik = ( name: "item", message: t("bill.itemalreadypresent"), test: (value) => { - const item = items.find((e) => e.itemId == value); - return item == null || itemToEdit != undefined; + const item = items.find((e) => e.itemId === value); + return item == null || itemToEdit !== undefined; }, }), itemQuantity: number() @@ -58,15 +58,16 @@ export const useItemFormik = ( name: "quantity", message: t("common.lessthan", { value: "1" }), test: (value) => { - if (itemType == ItemGroups.medical.id) return true; + if (itemType === ItemGroups.medical.id) return true; return value > 1 ? false : true; }, }) .min(1, t("common.greaterthan", { value: "1" })), }); - }, [itemType]); + }, [itemToEdit, itemType, items, t]); + const initialValues = useMemo(() => { - if (itemToEdit != undefined) { + if (itemToEdit !== undefined) { return getFromFields( { itemAmount: { @@ -90,7 +91,7 @@ export const useItemFormik = ( ); } return getFromFields(fields, "value"); - }, [itemToEdit]); + }, [fields, itemToEdit]); const formik = useFormik({ initialValues, @@ -107,7 +108,6 @@ export const useItemFormik = ( getFieldProps, values, resetForm, - handleChange, handleBlur, handleSubmit, isValid: isFormValid, @@ -122,7 +122,7 @@ export const useItemFormik = ( handleBlur(e); setFieldValue(fieldName, value); }, - [handleBlur, handleChange] + [handleBlur, setFieldValue] ); const isValid = (fieldName: string): boolean => { diff --git a/src/components/accessories/patientOPD/patientOPDForm/PatientOPDForm.tsx b/src/components/accessories/patientOPD/patientOPDForm/PatientOPDForm.tsx index 840379b19..567627d4e 100644 --- a/src/components/accessories/patientOPD/patientOPDForm/PatientOPDForm.tsx +++ b/src/components/accessories/patientOPD/patientOPDForm/PatientOPDForm.tsx @@ -35,10 +35,7 @@ import { useTranslation } from "react-i18next"; import { object, string } from "yup"; import checkIcon from "../../../../assets/check-icon.png"; import warningIcon from "../../../../assets/warning-icon.png"; -import { - OpdWithOperationRowDTO, - OperationRowDTO -} from "../../../../generated"; +import { OpdWithOperationRowDTO, OperationRowDTO } from "../../../../generated"; import { renderDate } from "../../../../libraries/formatUtils/dataFormatting"; import { formatAllFieldValues, @@ -175,6 +172,7 @@ const PatientOPDForm: FunctionComponent = ({ setFieldValue(fieldName, value); formik.setFieldTouched(fieldName); }, + // eslint-disable-next-line react-hooks/exhaustive-deps [setFieldValue] ); @@ -323,6 +321,7 @@ const PatientOPDForm: FunctionComponent = ({ } : opRowToEdit ); + // eslint-disable-next-line react-hooks/exhaustive-deps }, [operationCreationMode, opRowToEdit]); const handleUpdateOperationRow = @@ -357,7 +356,7 @@ const PatientOPDForm: FunctionComponent = ({ if (idx > -1) ops.splice(idx, 1); setOperationRows(() => [...ops]); } - }, [changeStatus]); + }, [changeStatus, deletedObjCode, operationRows]); return ( <> diff --git a/src/components/accessories/patientOPD/patientOPDTable/PatientOPDTable.tsx b/src/components/accessories/patientOPD/patientOPDTable/PatientOPDTable.tsx index bf700c0b4..088f1b735 100644 --- a/src/components/accessories/patientOPD/patientOPDTable/PatientOPDTable.tsx +++ b/src/components/accessories/patientOPD/patientOPDTable/PatientOPDTable.tsx @@ -8,6 +8,7 @@ import { usePermission } from "../../../../libraries/permissionUtils/usePermissi import { getOpdsWithOperationRows } from "../../../../state/opds"; import InfoBox from "../../infoBox/InfoBox"; import Table from "../../table/Table"; + interface IOwnProps { shouldUpdateTable: boolean; handleEdit: (row: any) => void; diff --git a/src/components/accessories/patientOperation/PatientOperation.tsx b/src/components/accessories/patientOperation/PatientOperation.tsx index 1f305e683..c64678e9f 100644 --- a/src/components/accessories/patientOperation/PatientOperation.tsx +++ b/src/components/accessories/patientOperation/PatientOperation.tsx @@ -140,6 +140,7 @@ const PatientOperation: FC = ({ opd, onSuccess }) => { } : opRowToEdit ); + // eslint-disable-next-line react-hooks/exhaustive-deps }, [creationMode]); return ( diff --git a/src/components/accessories/patientOperation/consts.ts b/src/components/accessories/patientOperation/consts.ts index fa4a4bc3b..a8187735f 100644 --- a/src/components/accessories/patientOperation/consts.ts +++ b/src/components/accessories/patientOperation/consts.ts @@ -1,5 +1,4 @@ import moment from "moment"; -import { parseDate } from "../../../libraries/formDataHandling/functions"; import { TFields } from "../../../libraries/formDataHandling/types"; import { OperationRowFormFieldName } from "./operationForm/types"; diff --git a/src/components/accessories/patientOperation/operationForm/OperationRowForm.tsx b/src/components/accessories/patientOperation/operationForm/OperationRowForm.tsx index 43166ffff..57ded70a9 100644 --- a/src/components/accessories/patientOperation/operationForm/OperationRowForm.tsx +++ b/src/components/accessories/patientOperation/operationForm/OperationRowForm.tsx @@ -51,9 +51,6 @@ const OperationRowForm: FC = ({ }; const initialValues = getFromFields(fields, "value"); - const currentAdmission = useAppSelector( - (state: IState) => state.admissions.currentAdmissionByPatientId.data - ); const validationSchema = object({ operation: string().required(t("common.required")), @@ -97,7 +94,7 @@ const OperationRowForm: FC = ({ formik.setFieldTouched(fieldName); formik.validateField(fieldName); }, - [setFieldValue] + [formik, setFieldValue] ); const isValid = (fieldName: string): boolean => { diff --git a/src/components/accessories/patientPicker/PatientPicker.tsx b/src/components/accessories/patientPicker/PatientPicker.tsx index 3bd9297de..d5e9398e2 100644 --- a/src/components/accessories/patientPicker/PatientPicker.tsx +++ b/src/components/accessories/patientPicker/PatientPicker.tsx @@ -135,7 +135,7 @@ const PatientPicker: FC = ({ useEffect(() => { const pat = patientData?.find((item) => item.code === fieldValue); pat ? setValue(pat) : setValue(initialValue ?? ({} as any)); - }, [fieldValue]); + }, [fieldValue, initialValue, patientData]); const handleOnBlur = (e: React.FocusEvent) => { if (value) onBlur(e, value); diff --git a/src/components/accessories/patientTherapy/patientTherapyTable/PatientTherapyTable.tsx b/src/components/accessories/patientTherapy/patientTherapyTable/PatientTherapyTable.tsx index 67a3afbfd..94fab2329 100644 --- a/src/components/accessories/patientTherapy/patientTherapyTable/PatientTherapyTable.tsx +++ b/src/components/accessories/patientTherapy/patientTherapyTable/PatientTherapyTable.tsx @@ -101,10 +101,6 @@ const PatientTherapyTable: FunctionComponent = ({ (state) => state.therapies.therapiesByPatientId.status ); - const onDelete = (row: TherapyRowDTO) => { - handleDelete(row.therapyID); - }; - const onEdit = (row: TherapyRowDTO) => { handleEdit(data.find((item) => item.therapyID === row.therapyID)); }; diff --git a/src/components/accessories/patientTherapy/therapyForm/TherapyForm.tsx b/src/components/accessories/patientTherapy/therapyForm/TherapyForm.tsx index 5e903c2d3..e07f9c5b6 100644 --- a/src/components/accessories/patientTherapy/therapyForm/TherapyForm.tsx +++ b/src/components/accessories/patientTherapy/therapyForm/TherapyForm.tsx @@ -118,6 +118,7 @@ const TherapyForm: FC = ({ ); computeEndDate(formik.values.startDate); }, + // eslint-disable-next-line react-hooks/exhaustive-deps [formik] ); @@ -129,6 +130,7 @@ const TherapyForm: FC = ({ formik.setFieldTouched(fieldName); } }, + // eslint-disable-next-line react-hooks/exhaustive-deps [formik] ); @@ -148,7 +150,7 @@ const TherapyForm: FC = ({ formik.handleBlur(e); setFieldValue(fieldName, value); }, - [setFieldValue, handleBlur] + [formik, setFieldValue] ); const [openResetConfirmation, setOpenResetConfirmation] = useState(false); diff --git a/src/components/accessories/patientTherapy/therapyForm/types.ts b/src/components/accessories/patientTherapy/therapyForm/types.ts index 558f5b256..4f4566774 100644 --- a/src/components/accessories/patientTherapy/therapyForm/types.ts +++ b/src/components/accessories/patientTherapy/therapyForm/types.ts @@ -1,4 +1,4 @@ -import { PatientDTO, TherapyRowDTO } from "../../../../generated"; +import { TherapyRowDTO } from "../../../../generated"; import { TFields } from "../../../../libraries/formDataHandling/types"; interface ITherapyProps { diff --git a/src/components/accessories/patientTriage/PatientTriage.tsx b/src/components/accessories/patientTriage/PatientTriage.tsx index 5ce192757..8e38daede 100644 --- a/src/components/accessories/patientTriage/PatientTriage.tsx +++ b/src/components/accessories/patientTriage/PatientTriage.tsx @@ -79,13 +79,13 @@ const PatientTriage: FC = () => { if (status === "SUCCESS" && patientDataCode) { dispatch(getLastByPatientId(patientDataCode)); } - }, [status]); + }, [dispatch, patientDataCode, status]); useEffect(() => { if (deleteStatus === "SUCCESS" && patientDataCode) { dispatch(getLastByPatientId(patientDataCode)); } - }, [deleteStatus]); + }, [deleteStatus, dispatch, patientDataCode]); useEffect(() => { dispatch(createExaminationReset()); @@ -109,7 +109,7 @@ const PatientTriage: FC = () => { dispatch(getLastByPatientId(patientDataCode)); dispatch(getDefaultPatientExamination(patientDataCode)); } - }, [patientDataCode]); + }, [dispatch, patientDataCode]); const onSubmit = (triage: PatientExaminationDTO) => { setShouldResetForm(false); diff --git a/src/components/accessories/patientTriage/patientTriageForm/PatientTriageForm.tsx b/src/components/accessories/patientTriage/patientTriageForm/PatientTriageForm.tsx index 57ac59fe4..8107d9f3e 100644 --- a/src/components/accessories/patientTriage/patientTriageForm/PatientTriageForm.tsx +++ b/src/components/accessories/patientTriage/patientTriageForm/PatientTriageForm.tsx @@ -128,7 +128,7 @@ const PatientTriageForm: FunctionComponent = ({ setFieldValue(fieldName, value); formik.setFieldTouched(fieldName); }, - [setFieldValue] + [formik, setFieldValue] ); const isValid = (fieldName: string): boolean => { diff --git a/src/components/accessories/patientTriage/patientTriageTable/PatientTriageTable.tsx b/src/components/accessories/patientTriage/patientTriageTable/PatientTriageTable.tsx index f34a16e44..e60f353a5 100644 --- a/src/components/accessories/patientTriage/patientTriageTable/PatientTriageTable.tsx +++ b/src/components/accessories/patientTriage/patientTriageTable/PatientTriageTable.tsx @@ -96,10 +96,6 @@ const PatientTriageTable: FunctionComponent = ({ t("common.somethingwrong") ) as string; - const onDelete = (row: PatientExaminationDTO) => { - handleDelete(row.pex_ID); - }; - return (
{t("examination.previousentries")}
diff --git a/src/components/accessories/patientVisit/patientVisit.tsx b/src/components/accessories/patientVisit/patientVisit.tsx index de06acde9..01b672c2d 100644 --- a/src/components/accessories/patientVisit/patientVisit.tsx +++ b/src/components/accessories/patientVisit/patientVisit.tsx @@ -36,8 +36,6 @@ const PatientVisit: FunctionComponent = () => { const [creationMode, setCreationMode] = useState(true); - const [showModal, setShowModal] = useState(false); - const changeStatus = useAppSelector((state) => { /* Apart from "IDLE" create and update cannot reach "LOADING", "SUCCESS" and "FAIL" @@ -112,10 +110,6 @@ const PatientVisit: FunctionComponent = () => { scrollToElement(null); }; - const addOperationCallback = () => { - setShowModal(true); - }; - const onEdit: (row: VisitDTO) => void = (row) => { setVisitToEdit(row); setCreationMode(false); @@ -141,7 +135,7 @@ const PatientVisit: FunctionComponent = () => { isLoading={changeStatus === "LOADING"} shouldResetForm={shouldResetForm} resetFormCallback={resetFormCallback} - addOperationCallback={addOperationCallback} + addOperationCallback={() => {}} /> {changeStatus === "FAIL" && (
diff --git a/src/components/accessories/paymentsTable/PaymentsTable.tsx b/src/components/accessories/paymentsTable/PaymentsTable.tsx index 6e97d7aef..2d1f19de0 100644 --- a/src/components/accessories/paymentsTable/PaymentsTable.tsx +++ b/src/components/accessories/paymentsTable/PaymentsTable.tsx @@ -92,7 +92,7 @@ export const PaymentsTable: FC = ({ fields }) => { useEffect(() => { dispatch(searchPayments(initialValues as TFilterValues)); - }, [fields]); + }, [dispatch, fields, initialValues]); const { setFieldValue, handleBlur } = formik; diff --git a/src/components/accessories/profilePicture/ProfilePicture.tsx b/src/components/accessories/profilePicture/ProfilePicture.tsx index 843481382..1de796c80 100644 --- a/src/components/accessories/profilePicture/ProfilePicture.tsx +++ b/src/components/accessories/profilePicture/ProfilePicture.tsx @@ -30,10 +30,7 @@ import Webcam from "../../accessories/webcam/Webcam"; import { ProfilePictureCropper } from "../profilePictureCropper/ProfilePictureCropper"; import "./styles.scss"; import { IProps } from "./types"; -import { - extractPictureFromSelection, - preprocessImage -} from "./utils"; +import { extractPictureFromSelection, preprocessImage } from "./utils"; export const ProfilePicture: FunctionComponent = ({ isEditable, @@ -81,7 +78,7 @@ export const ProfilePicture: FunctionComponent = ({ setFromFileSystem(false); openCropper(); } - }, [pictureToResize]); + }, [fromFileSystem, pictureToResize, showModal]); const pictureInputRef = useRef(null); @@ -122,6 +119,7 @@ export const ProfilePicture: FunctionComponent = ({ preprocessImage(setPicture, image, setShowError); closeModal(); }, + // eslint-disable-next-line react-hooks/exhaustive-deps [setPicture] ); diff --git a/src/components/accessories/profilePicture/utils.ts b/src/components/accessories/profilePicture/utils.ts index ef5ee634f..a88a21e64 100644 --- a/src/components/accessories/profilePicture/utils.ts +++ b/src/components/accessories/profilePicture/utils.ts @@ -1,7 +1,6 @@ -import { ChangeEvent, Dispatch, SetStateAction } from "react"; import imageCompression from "browser-image-compression"; +import { ChangeEvent, Dispatch, SetStateAction } from "react"; import { MAX_FILE_UPLOAD_SIZE } from "./consts"; -import { pick } from "lodash"; const createPreview = (img: HTMLImageElement) => { const canvas = document.createElement("canvas"); diff --git a/src/components/accessories/table/Table.tsx b/src/components/accessories/table/Table.tsx index f5bd9d6ea..324886ace 100644 --- a/src/components/accessories/table/Table.tsx +++ b/src/components/accessories/table/Table.tsx @@ -37,10 +37,10 @@ import { import { TOrder } from "../../../libraries/sortUtils/types"; import Button from "../button/Button"; import ConfirmationDialog from "../confirmationDialog/ConfirmationDialog"; +import TableBodyRow from "./TableBodyRow"; import { FilterButton } from "./filter/FilterButton"; import { TFilterValues } from "./filter/types"; import "./styles.scss"; -import TableBodyRow from "./TableBodyRow"; import { IProps, TActions } from "./types"; const Table: FunctionComponent = ({ @@ -348,6 +348,7 @@ const Table: FunctionComponent = ({ if (onFilterChange && !manualFilter) { onFilterChange(filters); } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [filters]); return ( @@ -399,7 +400,7 @@ const Table: FunctionComponent = ({ field={filterField} onChange={(value) => setFilters((previous) => ({ - ...filters, + ...previous, [filterField.key]: value, })) } diff --git a/src/components/accessories/table/filter/FilterButton.tsx b/src/components/accessories/table/filter/FilterButton.tsx index 7c00a6e9b..edf2d24b3 100644 --- a/src/components/accessories/table/filter/FilterButton.tsx +++ b/src/components/accessories/table/filter/FilterButton.tsx @@ -101,6 +101,12 @@ export const FilterButton = ({ field, onChange }: IOwnProps) => { useEffect(() => { formik.submitForm(); + const submit = setTimeout(() => { + formik.submitForm(); + }, 250); + + return () => clearInterval(submit); + // eslint-disable-next-line react-hooks/exhaustive-deps }, [formik.values]); return ( diff --git a/src/components/accessories/tabs/RouterTabs.tsx b/src/components/accessories/tabs/RouterTabs.tsx index c094f9c49..36bcc7ece 100644 --- a/src/components/accessories/tabs/RouterTabs.tsx +++ b/src/components/accessories/tabs/RouterTabs.tsx @@ -30,7 +30,7 @@ const RouterTabs: FunctionComponent = ({ config, defaultRoute }) => { if (!mobile) { return tabs.map((item, index) => { const path = item.path!; - return tabs.length == 1 ? ( + return tabs.length === 1 ? ( <> ) : (
{ if (item.checkPermissions) { const checkPermissions = asArray(item.checkPermissions); return checkPermissions.find((permission) => - permissions.includes(permission) + permissions.includes(permission as TPermission) ); } return true; diff --git a/src/components/activities/adminActivity/SideMenu/SideMenu.module.scss b/src/components/activities/adminActivity/SideMenu/SideMenu.module.scss index 7f9c69479..d002276a1 100644 --- a/src/components/activities/adminActivity/SideMenu/SideMenu.module.scss +++ b/src/components/activities/adminActivity/SideMenu/SideMenu.module.scss @@ -20,6 +20,14 @@ gap: 8px; } +.editButton { + color: black !important; + background-color: white !important; + &:hover { + background-color: gray !important; + } +} + .item { display: flex; flex-direction: column; diff --git a/src/components/activities/adminActivity/SideMenu/SideMenu.tsx b/src/components/activities/adminActivity/SideMenu/SideMenu.tsx index a3b6e55f6..81c8b9806 100644 --- a/src/components/activities/adminActivity/SideMenu/SideMenu.tsx +++ b/src/components/activities/adminActivity/SideMenu/SideMenu.tsx @@ -10,10 +10,12 @@ import { People, SupervisedUserCircle, } from "@mui/icons-material"; +import { PATHS } from "consts"; import React, { ReactNode, useCallback } from "react"; import { useTranslation } from "react-i18next"; import { useLocation, useNavigate } from "react-router"; import { useAppSelector } from "../../../../libraries/hooks/redux"; +import Button from "../../../accessories/button/Button"; import { MenuItem } from "../../../accessories/menuItem"; import { IAdminSection } from "../types"; import classes from "./SideMenu.module.scss"; @@ -86,6 +88,7 @@ const SideMenu = () => { ))}
{t("nav.hospital")}
} label={t(`nav.hospitalInfo`)} onClick={() => {}} @@ -102,6 +105,17 @@ const SideMenu = () => { {entry[1] ?? "---"}
))} +
} /> diff --git a/src/components/activities/editPatientActivity/EditPatientActivity.tsx b/src/components/activities/editPatientActivity/EditPatientActivity.tsx index f73ae8524..d291558e1 100644 --- a/src/components/activities/editPatientActivity/EditPatientActivity.tsx +++ b/src/components/activities/editPatientActivity/EditPatientActivity.tsx @@ -50,7 +50,7 @@ const EditPatientActivity = () => { if (isEmpty(patient.data) && patient.status === "IDLE" && id) { dispatch(getPatient(id)); } - }, [patient, id, getPatient]); + }, [patient, id, dispatch]); const breadcrumbMap = { [t("nav.patients")]: PATHS.patients, @@ -81,10 +81,6 @@ const EditPatientActivity = () => { }, }) ); - else - console.error( - 'The Patient: PatientDTO object must have a "code" property.' - ); }; const [activityTransitionState, setActivityTransitionState] = @@ -96,10 +92,9 @@ const EditPatientActivity = () => { if (isEmpty(patient.data) && patient.status === "IDLE") { getPatient(id!); } - }, [patient, id, getPatient]); + }, [patient, id]); useEffect(() => { - console.log(activityTransitionState); if (activityTransitionState === "TO_PATIENT") { getPatient(id!); updatePatientReset(); @@ -108,7 +103,7 @@ const EditPatientActivity = () => { setOpenConfirmationMessage(false); setActivityTransitionState("IDLE"); } - }, [activityTransitionState, updatePatientReset, getPatient, id]); + }, [activityTransitionState, id]); useEffect(() => { setOpenConfirmationMessage(hasSucceeded); diff --git a/src/components/activities/laboratoryActivity/LaboratoryActivity.tsx b/src/components/activities/laboratoryActivity/LaboratoryActivity.tsx index 9f5a69e92..a028f0d0d 100644 --- a/src/components/activities/laboratoryActivity/LaboratoryActivity.tsx +++ b/src/components/activities/laboratoryActivity/LaboratoryActivity.tsx @@ -27,7 +27,7 @@ const LaboratoryActivity: FC = () => { return { [t("nav.laboratory")]: PATHS.laboratory, }; - }, [location]); + }, [location.pathname, t]); const userCredentials = useAppSelector( (state) => state.main.authentication.data diff --git a/src/components/activities/newPatientActivity/NewPatientActivity.tsx b/src/components/activities/newPatientActivity/NewPatientActivity.tsx index 72b298d56..6542af7c5 100644 --- a/src/components/activities/newPatientActivity/NewPatientActivity.tsx +++ b/src/components/activities/newPatientActivity/NewPatientActivity.tsx @@ -60,7 +60,7 @@ const NewPatientActivity: FunctionComponent = ({ useEffect(() => { dispatch(getPatientReset()); - }, []); + }, [dispatch]); useEffect(() => { if ( @@ -68,16 +68,16 @@ const NewPatientActivity: FunctionComponent = ({ activityTransitionState === "TO_DASHBOARD" || activityTransitionState === "TO_PATIENT_DASHBOARD" ) { + const code = patient?.code; dispatch(createPatientReset()); setShouldResetForm(true); + if (activityTransitionState === "TO_PATIENT_DASHBOARD" && !!code) { + navigate(`${PATHS.patients_details}/${code}`, { + replace: true, + }); + } } - }, [activityTransitionState, createPatientReset]); - - useEffect(() => { - if (activityTransitionState === "TO_PATIENT_DASHBOARD" && patient?.code) { - navigate(`/patients/details/${patient?.code}`, { replace: true }); - } - }, [patient, activityTransitionState, createPatientReset]); + }, [activityTransitionState, dispatch, navigate, patient?.code]); const infoBoxRef = useRef(null); useEffect(() => { @@ -97,8 +97,6 @@ const NewPatientActivity: FunctionComponent = ({ switch (activityTransitionState) { case "TO_DASHBOARD": return ; - case "TO_PATIENT_DASHBOARD": - return ; default: return (
diff --git a/src/components/activities/newPatientActivity/types.ts b/src/components/activities/newPatientActivity/types.ts index c682e0979..3fa083d29 100644 --- a/src/components/activities/newPatientActivity/types.ts +++ b/src/components/activities/newPatientActivity/types.ts @@ -1,4 +1,3 @@ -import { PatientDTO } from "../../../generated"; import { TUserCredentials } from "../../../state/main/types"; export interface IOwnProps { diff --git a/src/components/activities/patientDetailsActivity/InPatientDashboardMenu.tsx b/src/components/activities/patientDetailsActivity/InPatientDashboardMenu.tsx index 3d121c567..1fbcd0042 100644 --- a/src/components/activities/patientDetailsActivity/InPatientDashboardMenu.tsx +++ b/src/components/activities/patientDetailsActivity/InPatientDashboardMenu.tsx @@ -10,7 +10,7 @@ import { } from "@mui/icons-material"; import React, { FunctionComponent, useCallback } from "react"; import { useTranslation } from "react-i18next"; -import { useLocation, useNavigate } from "react-router"; +import { useNavigate } from "react-router"; import Arrow from "../../../assets/arrow-w.svg"; import { Permission } from "../../../libraries/permissionUtils/Permission"; import "./styles.scss"; @@ -27,7 +27,6 @@ const InPatientDashboardMenu: FunctionComponent = ({ }) => { const { t } = useTranslation(); - const { pathname } = useLocation(); const navigate = useNavigate(); const isActive = (value: string) => { diff --git a/src/components/activities/patientDetailsActivity/OutPatientDashboardMenu.tsx b/src/components/activities/patientDetailsActivity/OutPatientDashboardMenu.tsx index bfa339129..3e4de4957 100644 --- a/src/components/activities/patientDetailsActivity/OutPatientDashboardMenu.tsx +++ b/src/components/activities/patientDetailsActivity/OutPatientDashboardMenu.tsx @@ -8,7 +8,7 @@ import { } from "@mui/icons-material"; import React, { FunctionComponent, useCallback } from "react"; import { useTranslation } from "react-i18next"; -import { useLocation, useNavigate } from "react-router"; +import { useNavigate } from "react-router"; import Arrow from "../../../assets/arrow-w.svg"; import "./styles.scss"; import { IUserSection } from "./types"; @@ -28,7 +28,6 @@ const OutPatientDashboardMenu: FunctionComponent = ({ return value === userSection ? "active" : "default"; }; - const { pathname } = useLocation(); const navigate = useNavigate(); const changeUserSection = useCallback( @@ -36,7 +35,7 @@ const OutPatientDashboardMenu: FunctionComponent = ({ setUserSection(section); navigate(`${section}`, { replace: true }); }, - [navigate, pathname, setUserSection] + [navigate, setUserSection] ); return ( diff --git a/src/components/activities/patientDetailsActivity/PatientDetailsActivity.tsx b/src/components/activities/patientDetailsActivity/PatientDetailsActivity.tsx index 0b3507712..9401185de 100644 --- a/src/components/activities/patientDetailsActivity/PatientDetailsActivity.tsx +++ b/src/components/activities/patientDetailsActivity/PatientDetailsActivity.tsx @@ -17,7 +17,7 @@ import { PatientDTOStatusEnum } from "../../../generated"; import { renderDate } from "../../../libraries/formatUtils/dataFormatting"; import { Permission } from "../../../libraries/permissionUtils/Permission"; import { scrollToElement } from "../../../libraries/uiUtils/scrollToElement"; -import { getPatient } from "../../../state/patients"; +import { getPatient, getPatientReset } from "../../../state/patients"; import { Accordion, AccordionDetails, @@ -57,6 +57,12 @@ const PatientDetailsActivity = () => { } }, [patient, id, dispatch]); + useEffect(() => { + return () => { + dispatch(getPatientReset()); + }; + }, [dispatch]); + const breadcrumbMap = { [t("nav.patients")]: PATHS.patients, [t("nav.searchpatient")]: PATHS.patients_search, diff --git a/src/components/activities/searchPatientActivity/PatientSearchItem.tsx b/src/components/activities/searchPatientActivity/PatientSearchItem.tsx index 55379330c..cf3581e98 100644 --- a/src/components/activities/searchPatientActivity/PatientSearchItem.tsx +++ b/src/components/activities/searchPatientActivity/PatientSearchItem.tsx @@ -24,7 +24,7 @@ const PatientSearchItem: FunctionComponent = ({ navigate(`/patients/details/${patient.code}`); } } - }, [activityTransitionState, getPatientSuccessCallback, patient]); + }, [activityTransitionState, getPatientSuccessCallback, navigate, patient]); const patientDate = renderDate(patient.birthDate ?? ""); diff --git a/src/components/activities/searchPatientActivity/types.ts b/src/components/activities/searchPatientActivity/types.ts index c35e85394..b695e9020 100644 --- a/src/components/activities/searchPatientActivity/types.ts +++ b/src/components/activities/searchPatientActivity/types.ts @@ -1,6 +1,6 @@ import { PatientDTO } from "../../../generated"; import { TUserCredentials } from "../../../state/main/types"; -import { IAction, TAPIResponseStatus } from "../../../state/types"; +import { TAPIResponseStatus } from "../../../state/types"; export interface IStateProps { userCredentials: TUserCredentials; diff --git a/src/consts.ts b/src/consts.ts index 1974a2ef9..e895d8c37 100644 --- a/src/consts.ts +++ b/src/consts.ts @@ -73,4 +73,5 @@ export const PATHS = { admin_admissions_types: "/admin/types/admissions", admin_admissions_types_new: "/admin/types/admissions/new", admin_admissions_types_edit: "/admin/types/admissions/:code/edit", + admin_hospital_edit: "/admin/hospital/edit", }; diff --git a/src/generated/.openapi-generator/FILES b/src/generated/.openapi-generator/FILES index 057f67774..e64020890 100644 --- a/src/generated/.openapi-generator/FILES +++ b/src/generated/.openapi-generator/FILES @@ -35,6 +35,8 @@ apis\SMSApi.ts apis\StockMovementsApi.ts apis\SuppliersApi.ts apis\TherapiesApi.ts +apis\UserGroupsApi.ts +apis\UserSettingsApi.ts apis\UsersApi.ts apis\VaccineTypeApi.ts apis\VaccinesApi.ts @@ -62,7 +64,6 @@ models\FullBillDTO.ts models\HospitalDTO.ts models\LabWithRowsDTO.ts models\LaboratoryDTO.ts -models\LitePermissionDTO.ts models\LoginRequest.ts models\LoginResponse.ts models\LotDTO.ts @@ -116,6 +117,7 @@ models\SupplierDTO.ts models\TherapyDTO.ts models\TherapyRow.ts models\TherapyRowDTO.ts +models\TokenRefreshRequest.ts models\UserDTO.ts models\UserGroupDTO.ts models\UserProfileDTO.ts diff --git a/src/generated/apis/AdmissionTypesApi.ts b/src/generated/apis/AdmissionTypesApi.ts index 7cd200d75..d17cf02ed 100644 --- a/src/generated/apis/AdmissionTypesApi.ts +++ b/src/generated/apis/AdmissionTypesApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/AdmissionsApi.ts b/src/generated/apis/AdmissionsApi.ts index 9d21017b7..21fc6e4fa 100644 --- a/src/generated/apis/AdmissionsApi.ts +++ b/src/generated/apis/AdmissionsApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/AgeTypesApi.ts b/src/generated/apis/AgeTypesApi.ts index 3c4f6039b..6129e939b 100644 --- a/src/generated/apis/AgeTypesApi.ts +++ b/src/generated/apis/AgeTypesApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/BillsApi.ts b/src/generated/apis/BillsApi.ts index 99f8dbc49..530dd2604 100644 --- a/src/generated/apis/BillsApi.ts +++ b/src/generated/apis/BillsApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/DeliveryResultTypeApi.ts b/src/generated/apis/DeliveryResultTypeApi.ts index 2fb981be8..2e8c0007a 100644 --- a/src/generated/apis/DeliveryResultTypeApi.ts +++ b/src/generated/apis/DeliveryResultTypeApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/DeliveryTypeApi.ts b/src/generated/apis/DeliveryTypeApi.ts index c790848b3..cd5beab74 100644 --- a/src/generated/apis/DeliveryTypeApi.ts +++ b/src/generated/apis/DeliveryTypeApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/DischargeTypeApi.ts b/src/generated/apis/DischargeTypeApi.ts index 24f642ae5..2fb9743d1 100644 --- a/src/generated/apis/DischargeTypeApi.ts +++ b/src/generated/apis/DischargeTypeApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/DiseaseTypesApi.ts b/src/generated/apis/DiseaseTypesApi.ts index eab00a017..9f0a757ce 100644 --- a/src/generated/apis/DiseaseTypesApi.ts +++ b/src/generated/apis/DiseaseTypesApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/DiseasesApi.ts b/src/generated/apis/DiseasesApi.ts index 4bc6c1876..0e11a4134 100644 --- a/src/generated/apis/DiseasesApi.ts +++ b/src/generated/apis/DiseasesApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/ExamRowsApi.ts b/src/generated/apis/ExamRowsApi.ts index 174efbd62..4a4fccea1 100644 --- a/src/generated/apis/ExamRowsApi.ts +++ b/src/generated/apis/ExamRowsApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/ExamTypesApi.ts b/src/generated/apis/ExamTypesApi.ts index b2e99376d..7c6aa04bd 100644 --- a/src/generated/apis/ExamTypesApi.ts +++ b/src/generated/apis/ExamTypesApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/ExaminationsApi.ts b/src/generated/apis/ExaminationsApi.ts index 1a4770aea..919c777d4 100644 --- a/src/generated/apis/ExaminationsApi.ts +++ b/src/generated/apis/ExaminationsApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/ExamsApi.ts b/src/generated/apis/ExamsApi.ts index 40af44a78..28e37b638 100644 --- a/src/generated/apis/ExamsApi.ts +++ b/src/generated/apis/ExamsApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/HospitalsApi.ts b/src/generated/apis/HospitalsApi.ts index 10db836f2..3013d624d 100644 --- a/src/generated/apis/HospitalsApi.ts +++ b/src/generated/apis/HospitalsApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/LaboratoriesApi.ts b/src/generated/apis/LaboratoriesApi.ts index 92569326e..c82b7ebf3 100644 --- a/src/generated/apis/LaboratoriesApi.ts +++ b/src/generated/apis/LaboratoriesApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/LoginApi.ts b/src/generated/apis/LoginApi.ts index 6e58d3efa..47ead5458 100644 --- a/src/generated/apis/LoginApi.ts +++ b/src/generated/apis/LoginApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,12 +16,17 @@ import { BaseAPI, HttpHeaders, throwIfNullOrUndefined, OperationOpts, RawAjaxRes import { LoginRequest, LoginResponse, + TokenRefreshRequest, } from '../models'; export interface AuthenticateUserRequest { loginRequest: LoginRequest; } +export interface RefreshTokenRequest { + tokenRefreshRequest: TokenRefreshRequest; +} + /** * no description */ @@ -64,4 +69,24 @@ export class LoginApi extends BaseAPI { }, opts?.responseOpts); }; + /** + */ + refreshToken({ tokenRefreshRequest }: RefreshTokenRequest): Observable + refreshToken({ tokenRefreshRequest }: RefreshTokenRequest, opts?: OperationOpts): Observable> + refreshToken({ tokenRefreshRequest }: RefreshTokenRequest, opts?: OperationOpts): Observable> { + throwIfNullOrUndefined(tokenRefreshRequest, 'tokenRefreshRequest', 'refreshToken'); + + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), + }; + + return this.request({ + url: '/auth/refresh-token', + method: 'POST', + headers, + body: tokenRefreshRequest, + }, opts?.responseOpts); + }; + } diff --git a/src/generated/apis/MalnutritionsApi.ts b/src/generated/apis/MalnutritionsApi.ts index 8a2f3b77e..e8d207ecb 100644 --- a/src/generated/apis/MalnutritionsApi.ts +++ b/src/generated/apis/MalnutritionsApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/MedicalStockMovementTypeApi.ts b/src/generated/apis/MedicalStockMovementTypeApi.ts index 66c327c64..1540eac5b 100644 --- a/src/generated/apis/MedicalStockMovementTypeApi.ts +++ b/src/generated/apis/MedicalStockMovementTypeApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/MedicalStockWardApi.ts b/src/generated/apis/MedicalStockWardApi.ts index 27c2a4923..fa566992a 100644 --- a/src/generated/apis/MedicalStockWardApi.ts +++ b/src/generated/apis/MedicalStockWardApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/MedicalTypesApi.ts b/src/generated/apis/MedicalTypesApi.ts index cc2df1619..4b376c2fc 100644 --- a/src/generated/apis/MedicalTypesApi.ts +++ b/src/generated/apis/MedicalTypesApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/MedicalsApi.ts b/src/generated/apis/MedicalsApi.ts index 15cfc919c..0769ae0ba 100644 --- a/src/generated/apis/MedicalsApi.ts +++ b/src/generated/apis/MedicalsApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/OpdsApi.ts b/src/generated/apis/OpdsApi.ts index 12b356051..cea986161 100644 --- a/src/generated/apis/OpdsApi.ts +++ b/src/generated/apis/OpdsApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/OperationsApi.ts b/src/generated/apis/OperationsApi.ts index 2deac60fd..608e6e2af 100644 --- a/src/generated/apis/OperationsApi.ts +++ b/src/generated/apis/OperationsApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/OperationsTypesApi.ts b/src/generated/apis/OperationsTypesApi.ts index d8bf85f20..066bd16f9 100644 --- a/src/generated/apis/OperationsTypesApi.ts +++ b/src/generated/apis/OperationsTypesApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/OthersPriceApi.ts b/src/generated/apis/OthersPriceApi.ts index c98a161a7..cf2c878fe 100644 --- a/src/generated/apis/OthersPriceApi.ts +++ b/src/generated/apis/OthersPriceApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/PatientConsensusApi.ts b/src/generated/apis/PatientConsensusApi.ts index 9e08c936d..d6c5020d8 100644 --- a/src/generated/apis/PatientConsensusApi.ts +++ b/src/generated/apis/PatientConsensusApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/PatientVaccinesApi.ts b/src/generated/apis/PatientVaccinesApi.ts index 789d35790..8a8126561 100644 --- a/src/generated/apis/PatientVaccinesApi.ts +++ b/src/generated/apis/PatientVaccinesApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/PatientsApi.ts b/src/generated/apis/PatientsApi.ts index f1b8676c4..93fc140b8 100644 --- a/src/generated/apis/PatientsApi.ts +++ b/src/generated/apis/PatientsApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/PermissionsApi.ts b/src/generated/apis/PermissionsApi.ts index e7b733a45..18e60e094 100644 --- a/src/generated/apis/PermissionsApi.ts +++ b/src/generated/apis/PermissionsApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -17,14 +17,6 @@ import { PermissionDTO, } from '../models'; -export interface DeletePermissionRequest { - id: number; -} - -export interface InsertPermissionRequest { - permissionDTO: PermissionDTO; -} - export interface RetrievePermissionByIdRequest { id: number; } @@ -33,58 +25,15 @@ export interface RetrievePermissionByNameRequest { name: string; } -export interface RetrievePermissionsByUserGroupcodeRequest { +export interface RetrievePermissionsByUserGroupCodeRequest { userGroupCode: string; } -export interface UpdatePermissionRequest { - id: number; - permissionDTO: PermissionDTO; -} - /** * no description */ export class PermissionsApi extends BaseAPI { - /** - */ - deletePermission({ id }: DeletePermissionRequest): Observable - deletePermission({ id }: DeletePermissionRequest, opts?: OperationOpts): Observable> - deletePermission({ id }: DeletePermissionRequest, opts?: OperationOpts): Observable> { - throwIfNullOrUndefined(id, 'id', 'deletePermission'); - - const headers: HttpHeaders = { - ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), - }; - - return this.request({ - url: '/permissions/{id}'.replace('{id}', encodeURI(id)), - method: 'DELETE', - headers, - }, opts?.responseOpts); - }; - - /** - */ - insertPermission({ permissionDTO }: InsertPermissionRequest): Observable - insertPermission({ permissionDTO }: InsertPermissionRequest, opts?: OperationOpts): Observable> - insertPermission({ permissionDTO }: InsertPermissionRequest, opts?: OperationOpts): Observable> { - throwIfNullOrUndefined(permissionDTO, 'permissionDTO', 'insertPermission'); - - const headers: HttpHeaders = { - 'Content-Type': 'application/json', - ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), - }; - - return this.request({ - url: '/permissions', - method: 'POST', - headers, - body: permissionDTO, - }, opts?.responseOpts); - }; - /** */ retrieveAllPermissions(): Observable> @@ -139,10 +88,10 @@ export class PermissionsApi extends BaseAPI { /** */ - retrievePermissionsByUserGroupcode({ userGroupCode }: RetrievePermissionsByUserGroupcodeRequest): Observable> - retrievePermissionsByUserGroupcode({ userGroupCode }: RetrievePermissionsByUserGroupcodeRequest, opts?: OperationOpts): Observable>> - retrievePermissionsByUserGroupcode({ userGroupCode }: RetrievePermissionsByUserGroupcodeRequest, opts?: OperationOpts): Observable | RawAjaxResponse>> { - throwIfNullOrUndefined(userGroupCode, 'userGroupCode', 'retrievePermissionsByUserGroupcode'); + retrievePermissionsByUserGroupCode({ userGroupCode }: RetrievePermissionsByUserGroupCodeRequest): Observable> + retrievePermissionsByUserGroupCode({ userGroupCode }: RetrievePermissionsByUserGroupCodeRequest, opts?: OperationOpts): Observable>> + retrievePermissionsByUserGroupCode({ userGroupCode }: RetrievePermissionsByUserGroupCodeRequest, opts?: OperationOpts): Observable | RawAjaxResponse>> { + throwIfNullOrUndefined(userGroupCode, 'userGroupCode', 'retrievePermissionsByUserGroupCode'); const headers: HttpHeaders = { ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), @@ -155,25 +104,4 @@ export class PermissionsApi extends BaseAPI { }, opts?.responseOpts); }; - /** - */ - updatePermission({ id, permissionDTO }: UpdatePermissionRequest): Observable - updatePermission({ id, permissionDTO }: UpdatePermissionRequest, opts?: OperationOpts): Observable> - updatePermission({ id, permissionDTO }: UpdatePermissionRequest, opts?: OperationOpts): Observable> { - throwIfNullOrUndefined(id, 'id', 'updatePermission'); - throwIfNullOrUndefined(permissionDTO, 'permissionDTO', 'updatePermission'); - - const headers: HttpHeaders = { - 'Content-Type': 'application/json', - ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), - }; - - return this.request({ - url: '/permissions/{id}'.replace('{id}', encodeURI(id)), - method: 'PUT', - headers, - body: permissionDTO, - }, opts?.responseOpts); - }; - } diff --git a/src/generated/apis/PregnantTreatmentTypesApi.ts b/src/generated/apis/PregnantTreatmentTypesApi.ts index 09474df30..8e7ad3018 100644 --- a/src/generated/apis/PregnantTreatmentTypesApi.ts +++ b/src/generated/apis/PregnantTreatmentTypesApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/PriceListsApi.ts b/src/generated/apis/PriceListsApi.ts index d0618035c..969f8c3df 100644 --- a/src/generated/apis/PriceListsApi.ts +++ b/src/generated/apis/PriceListsApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/ReportsApi.ts b/src/generated/apis/ReportsApi.ts index c13cf2f00..858692616 100644 --- a/src/generated/apis/ReportsApi.ts +++ b/src/generated/apis/ReportsApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/SMSApi.ts b/src/generated/apis/SMSApi.ts index 5df572a84..81f523242 100644 --- a/src/generated/apis/SMSApi.ts +++ b/src/generated/apis/SMSApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/StockMovementsApi.ts b/src/generated/apis/StockMovementsApi.ts index e12592d16..c3691b134 100644 --- a/src/generated/apis/StockMovementsApi.ts +++ b/src/generated/apis/StockMovementsApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -23,10 +23,19 @@ export interface AlertCriticalQuantityRequest { qty: number; } +export interface AlertCriticalQuantity1Request { + medCode: number; + qty: number; +} + export interface GetLotByMedicalRequest { medCode: number; } +export interface GetLotByMedical1Request { + medCode: number; +} + export interface GetMovements1Request { ref: string; } @@ -50,16 +59,49 @@ export interface GetMovements3Request { to: string; } +export interface GetMovements5Request { + ref: string; +} + +export interface GetMovements6Request { + medCode?: number; + medType?: string; + wardId?: string; + movType?: string; + movFrom?: string; + movTo?: string; + lotPrepFrom?: string; + lotPrepTo?: string; + lotDueFrom?: string; + lotDueTo?: string; +} + +export interface GetMovements7Request { + wardId: string; + from: string; + to: string; +} + export interface NewMultipleChargingMovementsRequest { ref: string; movementDTO: Array; } +export interface NewMultipleChargingMovements1Request { + ref: string; + movementDTO: Array; +} + export interface NewMultipleDischargingMovementsRequest { ref: string; movementDTO: Array; } +export interface NewMultipleDischargingMovements1Request { + ref: string; + movementDTO: Array; +} + /** * no description */ @@ -82,6 +124,31 @@ export class StockMovementsApi extends BaseAPI { 'qty': qty, }; + return this.request({ + url: '/stockmovements/critical/check', + method: 'GET', + headers, + query, + }, opts?.responseOpts); + }; + + /** + */ + alertCriticalQuantity1({ medCode, qty }: AlertCriticalQuantity1Request): Observable + alertCriticalQuantity1({ medCode, qty }: AlertCriticalQuantity1Request, opts?: OperationOpts): Observable> + alertCriticalQuantity1({ medCode, qty }: AlertCriticalQuantity1Request, opts?: OperationOpts): Observable> { + throwIfNullOrUndefined(medCode, 'medCode', 'alertCriticalQuantity1'); + throwIfNullOrUndefined(qty, 'qty', 'alertCriticalQuantity1'); + + const headers: HttpHeaders = { + ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), + }; + + const query: HttpQuery = { // required parameters are used directly since they are already checked by throwIfNullOrUndefined + 'med_code': medCode, + 'qty': qty, + }; + return this.request({ url: '/medicalstockmovements/critical/check', method: 'GET', @@ -101,6 +168,24 @@ export class StockMovementsApi extends BaseAPI { ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), }; + return this.request>({ + url: '/stockmovements/lot/{med_code}'.replace('{med_code}', encodeURI(medCode)), + method: 'GET', + headers, + }, opts?.responseOpts); + }; + + /** + */ + getLotByMedical1({ medCode }: GetLotByMedical1Request): Observable> + getLotByMedical1({ medCode }: GetLotByMedical1Request, opts?: OperationOpts): Observable>> + getLotByMedical1({ medCode }: GetLotByMedical1Request, opts?: OperationOpts): Observable | RawAjaxResponse>> { + throwIfNullOrUndefined(medCode, 'medCode', 'getLotByMedical1'); + + const headers: HttpHeaders = { + ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), + }; + return this.request>({ url: '/medicalstockmovements/lot/{med_code}'.replace('{med_code}', encodeURI(medCode)), method: 'GET', @@ -118,7 +203,7 @@ export class StockMovementsApi extends BaseAPI { }; return this.request>({ - url: '/medicalstockmovements', + url: '/stockmovements', method: 'GET', headers, }, opts?.responseOpts); @@ -136,7 +221,7 @@ export class StockMovementsApi extends BaseAPI { }; return this.request>({ - url: '/medicalstockmovements/{ref}'.replace('{ref}', encodeURI(ref)), + url: '/stockmovements/{ref}'.replace('{ref}', encodeURI(ref)), method: 'GET', headers, }, opts?.responseOpts); @@ -166,7 +251,7 @@ export class StockMovementsApi extends BaseAPI { if (lotDueTo != null) { query['lot_due_to'] = (lotDueTo as any).toISOString(); } return this.request>({ - url: '/medicalstockmovements/filter/v2', + url: '/stockmovements/filter/v2', method: 'GET', headers, query, @@ -192,6 +277,98 @@ export class StockMovementsApi extends BaseAPI { 'to': (to as any).toISOString(), }; + return this.request>({ + url: '/stockmovements/filter/v1', + method: 'GET', + headers, + query, + }, opts?.responseOpts); + }; + + /** + */ + getMovements4(): Observable> + getMovements4(opts?: OperationOpts): Observable>> + getMovements4(opts?: OperationOpts): Observable | RawAjaxResponse>> { + const headers: HttpHeaders = { + ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), + }; + + return this.request>({ + url: '/medicalstockmovements', + method: 'GET', + headers, + }, opts?.responseOpts); + }; + + /** + */ + getMovements5({ ref }: GetMovements5Request): Observable> + getMovements5({ ref }: GetMovements5Request, opts?: OperationOpts): Observable>> + getMovements5({ ref }: GetMovements5Request, opts?: OperationOpts): Observable | RawAjaxResponse>> { + throwIfNullOrUndefined(ref, 'ref', 'getMovements5'); + + const headers: HttpHeaders = { + ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), + }; + + return this.request>({ + url: '/medicalstockmovements/{ref}'.replace('{ref}', encodeURI(ref)), + method: 'GET', + headers, + }, opts?.responseOpts); + }; + + /** + */ + getMovements6({ medCode, medType, wardId, movType, movFrom, movTo, lotPrepFrom, lotPrepTo, lotDueFrom, lotDueTo }: GetMovements6Request): Observable> + getMovements6({ medCode, medType, wardId, movType, movFrom, movTo, lotPrepFrom, lotPrepTo, lotDueFrom, lotDueTo }: GetMovements6Request, opts?: OperationOpts): Observable>> + getMovements6({ medCode, medType, wardId, movType, movFrom, movTo, lotPrepFrom, lotPrepTo, lotDueFrom, lotDueTo }: GetMovements6Request, opts?: OperationOpts): Observable | RawAjaxResponse>> { + + const headers: HttpHeaders = { + ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), + }; + + const query: HttpQuery = {}; + + if (medCode != null) { query['med_code'] = medCode; } + if (medType != null) { query['med_type'] = medType; } + if (wardId != null) { query['ward_id'] = wardId; } + if (movType != null) { query['mov_type'] = movType; } + if (movFrom != null) { query['mov_from'] = (movFrom as any).toISOString(); } + if (movTo != null) { query['mov_to'] = (movTo as any).toISOString(); } + if (lotPrepFrom != null) { query['lot_prep_from'] = (lotPrepFrom as any).toISOString(); } + if (lotPrepTo != null) { query['lot_prep_to'] = (lotPrepTo as any).toISOString(); } + if (lotDueFrom != null) { query['lot_due_from'] = (lotDueFrom as any).toISOString(); } + if (lotDueTo != null) { query['lot_due_to'] = (lotDueTo as any).toISOString(); } + + return this.request>({ + url: '/medicalstockmovements/filter/v2', + method: 'GET', + headers, + query, + }, opts?.responseOpts); + }; + + /** + */ + getMovements7({ wardId, from, to }: GetMovements7Request): Observable> + getMovements7({ wardId, from, to }: GetMovements7Request, opts?: OperationOpts): Observable>> + getMovements7({ wardId, from, to }: GetMovements7Request, opts?: OperationOpts): Observable | RawAjaxResponse>> { + throwIfNullOrUndefined(wardId, 'wardId', 'getMovements7'); + throwIfNullOrUndefined(from, 'from', 'getMovements7'); + throwIfNullOrUndefined(to, 'to', 'getMovements7'); + + const headers: HttpHeaders = { + ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), + }; + + const query: HttpQuery = { // required parameters are used directly since they are already checked by throwIfNullOrUndefined + 'ward_id': wardId, + 'from': (from as any).toISOString(), + 'to': (to as any).toISOString(), + }; + return this.request>({ url: '/medicalstockmovements/filter/v1', method: 'GET', @@ -217,6 +394,32 @@ export class StockMovementsApi extends BaseAPI { 'ref': ref, }; + return this.request({ + url: '/stockmovements/charge', + method: 'POST', + headers, + query, + body: movementDTO, + }, opts?.responseOpts); + }; + + /** + */ + newMultipleChargingMovements1({ ref, movementDTO }: NewMultipleChargingMovements1Request): Observable + newMultipleChargingMovements1({ ref, movementDTO }: NewMultipleChargingMovements1Request, opts?: OperationOpts): Observable> + newMultipleChargingMovements1({ ref, movementDTO }: NewMultipleChargingMovements1Request, opts?: OperationOpts): Observable> { + throwIfNullOrUndefined(ref, 'ref', 'newMultipleChargingMovements1'); + throwIfNullOrUndefined(movementDTO, 'movementDTO', 'newMultipleChargingMovements1'); + + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), + }; + + const query: HttpQuery = { // required parameters are used directly since they are already checked by throwIfNullOrUndefined + 'ref': ref, + }; + return this.request({ url: '/medicalstockmovements/charge', method: 'POST', @@ -243,6 +446,32 @@ export class StockMovementsApi extends BaseAPI { 'ref': ref, }; + return this.request({ + url: '/stockmovements/discharge', + method: 'POST', + headers, + query, + body: movementDTO, + }, opts?.responseOpts); + }; + + /** + */ + newMultipleDischargingMovements1({ ref, movementDTO }: NewMultipleDischargingMovements1Request): Observable + newMultipleDischargingMovements1({ ref, movementDTO }: NewMultipleDischargingMovements1Request, opts?: OperationOpts): Observable> + newMultipleDischargingMovements1({ ref, movementDTO }: NewMultipleDischargingMovements1Request, opts?: OperationOpts): Observable> { + throwIfNullOrUndefined(ref, 'ref', 'newMultipleDischargingMovements1'); + throwIfNullOrUndefined(movementDTO, 'movementDTO', 'newMultipleDischargingMovements1'); + + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), + }; + + const query: HttpQuery = { // required parameters are used directly since they are already checked by throwIfNullOrUndefined + 'ref': ref, + }; + return this.request({ url: '/medicalstockmovements/discharge', method: 'POST', diff --git a/src/generated/apis/SuppliersApi.ts b/src/generated/apis/SuppliersApi.ts index e878f2549..ea55d6a80 100644 --- a/src/generated/apis/SuppliersApi.ts +++ b/src/generated/apis/SuppliersApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/TherapiesApi.ts b/src/generated/apis/TherapiesApi.ts index b99d96e89..6d43e8b46 100644 --- a/src/generated/apis/TherapiesApi.ts +++ b/src/generated/apis/TherapiesApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/UserGroupsApi.ts b/src/generated/apis/UserGroupsApi.ts new file mode 100644 index 000000000..3c4f33694 --- /dev/null +++ b/src/generated/apis/UserGroupsApi.ts @@ -0,0 +1,183 @@ +// tslint:disable +/** + * Open Hospital API Documentation + * Open Hospital API Documentation + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Observable } from 'rxjs'; +import { BaseAPI, HttpHeaders, throwIfNullOrUndefined, encodeURI, OperationOpts, RawAjaxResponse } from '../runtime'; +import { + UserGroupDTO, +} from '../models'; + +export interface AssignPermissionRequest { + groupCode: string; + id: number; +} + +export interface DeleteGroupRequest { + groupCode: string; +} + +export interface GetUserGroupRequest { + groupCode: string; +} + +export interface NewUserGroupRequest { + userGroupDTO: UserGroupDTO; +} + +export interface RevokePermissionRequest { + groupCode: string; + id: number; +} + +export interface UpdateUserGroupRequest { + groupCode: string; + userGroupDTO: UserGroupDTO; +} + +/** + * no description + */ +export class UserGroupsApi extends BaseAPI { + + /** + */ + assignPermission({ groupCode, id }: AssignPermissionRequest): Observable + assignPermission({ groupCode, id }: AssignPermissionRequest, opts?: OperationOpts): Observable> + assignPermission({ groupCode, id }: AssignPermissionRequest, opts?: OperationOpts): Observable> { + throwIfNullOrUndefined(groupCode, 'groupCode', 'assignPermission'); + throwIfNullOrUndefined(id, 'id', 'assignPermission'); + + const headers: HttpHeaders = { + ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), + }; + + return this.request({ + url: '/usergroups/{group_code}/permissions/{id}'.replace('{group_code}', encodeURI(groupCode)).replace('{id}', encodeURI(id)), + method: 'POST', + headers, + }, opts?.responseOpts); + }; + + /** + */ + deleteGroup({ groupCode }: DeleteGroupRequest): Observable + deleteGroup({ groupCode }: DeleteGroupRequest, opts?: OperationOpts): Observable> + deleteGroup({ groupCode }: DeleteGroupRequest, opts?: OperationOpts): Observable> { + throwIfNullOrUndefined(groupCode, 'groupCode', 'deleteGroup'); + + const headers: HttpHeaders = { + ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), + }; + + return this.request({ + url: '/usergroups/{group_code}'.replace('{group_code}', encodeURI(groupCode)), + method: 'DELETE', + headers, + }, opts?.responseOpts); + }; + + /** + */ + getUserGroup({ groupCode }: GetUserGroupRequest): Observable + getUserGroup({ groupCode }: GetUserGroupRequest, opts?: OperationOpts): Observable> + getUserGroup({ groupCode }: GetUserGroupRequest, opts?: OperationOpts): Observable> { + throwIfNullOrUndefined(groupCode, 'groupCode', 'getUserGroup'); + + const headers: HttpHeaders = { + ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), + }; + + return this.request({ + url: '/usergroups/{group_code}'.replace('{group_code}', encodeURI(groupCode)), + method: 'GET', + headers, + }, opts?.responseOpts); + }; + + /** + */ + getUserGroups(): Observable> + getUserGroups(opts?: OperationOpts): Observable>> + getUserGroups(opts?: OperationOpts): Observable | RawAjaxResponse>> { + const headers: HttpHeaders = { + ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), + }; + + return this.request>({ + url: '/usergroups', + method: 'GET', + headers, + }, opts?.responseOpts); + }; + + /** + */ + newUserGroup({ userGroupDTO }: NewUserGroupRequest): Observable + newUserGroup({ userGroupDTO }: NewUserGroupRequest, opts?: OperationOpts): Observable> + newUserGroup({ userGroupDTO }: NewUserGroupRequest, opts?: OperationOpts): Observable> { + throwIfNullOrUndefined(userGroupDTO, 'userGroupDTO', 'newUserGroup'); + + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), + }; + + return this.request({ + url: '/usergroups', + method: 'POST', + headers, + body: userGroupDTO, + }, opts?.responseOpts); + }; + + /** + */ + revokePermission({ groupCode, id }: RevokePermissionRequest): Observable + revokePermission({ groupCode, id }: RevokePermissionRequest, opts?: OperationOpts): Observable> + revokePermission({ groupCode, id }: RevokePermissionRequest, opts?: OperationOpts): Observable> { + throwIfNullOrUndefined(groupCode, 'groupCode', 'revokePermission'); + throwIfNullOrUndefined(id, 'id', 'revokePermission'); + + const headers: HttpHeaders = { + ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), + }; + + return this.request({ + url: '/usergroups/{group_code}/permissions/{id}'.replace('{group_code}', encodeURI(groupCode)).replace('{id}', encodeURI(id)), + method: 'DELETE', + headers, + }, opts?.responseOpts); + }; + + /** + */ + updateUserGroup({ groupCode, userGroupDTO }: UpdateUserGroupRequest): Observable + updateUserGroup({ groupCode, userGroupDTO }: UpdateUserGroupRequest, opts?: OperationOpts): Observable> + updateUserGroup({ groupCode, userGroupDTO }: UpdateUserGroupRequest, opts?: OperationOpts): Observable> { + throwIfNullOrUndefined(groupCode, 'groupCode', 'updateUserGroup'); + throwIfNullOrUndefined(userGroupDTO, 'userGroupDTO', 'updateUserGroup'); + + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), + }; + + return this.request({ + url: '/usergroups/{group_code}'.replace('{group_code}', encodeURI(groupCode)), + method: 'PUT', + headers, + body: userGroupDTO, + }, opts?.responseOpts); + }; + +} diff --git a/src/generated/apis/UserSettingsApi.ts b/src/generated/apis/UserSettingsApi.ts index 2b676e0d4..50478299e 100644 --- a/src/generated/apis/UserSettingsApi.ts +++ b/src/generated/apis/UserSettingsApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,12 +12,25 @@ */ import { Observable } from 'rxjs'; -import { BaseAPI, HttpHeaders, throwIfNullOrUndefined, OperationOpts, RawAjaxResponse } from '../runtime'; +import { BaseAPI, HttpHeaders, throwIfNullOrUndefined, encodeURI, OperationOpts, RawAjaxResponse } from '../runtime'; import { UserSettingDTO, } from '../models'; -export interface NewUserSettingRequest { +export interface DeleteUserSettingRequest { + id: number; +} + +export interface GetUserSettingByUserRequest { + configName: string; +} + +export interface NewUserSettingsRequest { + userSettingDTO: UserSettingDTO; +} + +export interface UpdateUserSettingsRequest { + id: number; userSettingDTO: UserSettingDTO; } @@ -28,15 +41,35 @@ export class UserSettingsApi extends BaseAPI { /** */ - getUserSettingDashboard(): Observable - getUserSettingDashboard(opts?: OperationOpts): Observable> - getUserSettingDashboard(opts?: OperationOpts): Observable> { + deleteUserSetting({ id }: DeleteUserSettingRequest): Observable + deleteUserSetting({ id }: DeleteUserSettingRequest, opts?: OperationOpts): Observable> + deleteUserSetting({ id }: DeleteUserSettingRequest, opts?: OperationOpts): Observable> { + throwIfNullOrUndefined(id, 'id', 'deleteUserSetting'); + + const headers: HttpHeaders = { + ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), + }; + + return this.request({ + url: '/usersettings/{id}'.replace('{id}', encodeURI(id)), + method: 'DELETE', + headers, + }, opts?.responseOpts); + }; + + /** + */ + getUserSettingByUser({ configName }: GetUserSettingByUserRequest): Observable + getUserSettingByUser({ configName }: GetUserSettingByUserRequest, opts?: OperationOpts): Observable> + getUserSettingByUser({ configName }: GetUserSettingByUserRequest, opts?: OperationOpts): Observable> { + throwIfNullOrUndefined(configName, 'configName', 'getUserSettingByUser'); + const headers: HttpHeaders = { ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), }; return this.request({ - url: '/usersettings/dashboard', + url: '/usersettings/{configName}'.replace('{configName}', encodeURI(configName)), method: 'GET', headers, }, opts?.responseOpts); @@ -44,10 +77,26 @@ export class UserSettingsApi extends BaseAPI { /** */ - newUserSetting({ userSettingDTO }: NewUserSettingRequest): Observable - newUserSetting({ userSettingDTO }: NewUserSettingRequest, opts?: OperationOpts): Observable> - newUserSetting({ userSettingDTO }: NewUserSettingRequest, opts?: OperationOpts): Observable> { - throwIfNullOrUndefined(userSettingDTO, 'userSettingDTO', 'newUserSetting'); + getUserSettings(): Observable> + getUserSettings(opts?: OperationOpts): Observable>> + getUserSettings(opts?: OperationOpts): Observable | RawAjaxResponse>> { + const headers: HttpHeaders = { + ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), + }; + + return this.request>({ + url: '/usersettings', + method: 'GET', + headers, + }, opts?.responseOpts); + }; + + /** + */ + newUserSettings({ userSettingDTO }: NewUserSettingsRequest): Observable + newUserSettings({ userSettingDTO }: NewUserSettingsRequest, opts?: OperationOpts): Observable> + newUserSettings({ userSettingDTO }: NewUserSettingsRequest, opts?: OperationOpts): Observable> { + throwIfNullOrUndefined(userSettingDTO, 'userSettingDTO', 'newUserSettings'); const headers: HttpHeaders = { 'Content-Type': 'application/json', @@ -62,4 +111,25 @@ export class UserSettingsApi extends BaseAPI { }, opts?.responseOpts); }; + /** + */ + updateUserSettings({ id, userSettingDTO }: UpdateUserSettingsRequest): Observable + updateUserSettings({ id, userSettingDTO }: UpdateUserSettingsRequest, opts?: OperationOpts): Observable> + updateUserSettings({ id, userSettingDTO }: UpdateUserSettingsRequest, opts?: OperationOpts): Observable> { + throwIfNullOrUndefined(id, 'id', 'updateUserSettings'); + throwIfNullOrUndefined(userSettingDTO, 'userSettingDTO', 'updateUserSettings'); + + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), + }; + + return this.request({ + url: '/usersettings/{id}'.replace('{id}', encodeURI(id)), + method: 'PUT', + headers, + body: userSettingDTO, + }, opts?.responseOpts); + }; + } diff --git a/src/generated/apis/UsersApi.ts b/src/generated/apis/UsersApi.ts index cf2c58f9c..17bf554cc 100644 --- a/src/generated/apis/UsersApi.ts +++ b/src/generated/apis/UsersApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,25 +14,15 @@ import { Observable } from 'rxjs'; import { BaseAPI, HttpHeaders, HttpQuery, throwIfNullOrUndefined, encodeURI, OperationOpts, RawAjaxResponse } from '../runtime'; import { - LitePermissionDTO, + PermissionDTO, UserDTO, - UserGroupDTO, UserProfileDTO, - UserSettingDTO, } from '../models'; -export interface DeleteGroupRequest { - groupCode: string; -} - export interface DeleteUserRequest { username: string; } -export interface DeleteUserSettingRequest { - id: number; -} - export interface GetUserRequest { groupId?: string; } @@ -41,43 +31,21 @@ export interface GetUserByNameRequest { username: string; } -export interface GetUserSettingByIdRequest { - id: number; -} - -export interface GetUserSettingByUserRequest { - userName: string; - configName: string; -} - export interface NewUserRequest { userDTO: UserDTO; } -export interface NewUserGroupRequest { - userGroupDTO: UserGroupDTO; -} - -export interface NewUserSettingsRequest { - userSettingDTO: UserSettingDTO; -} - export interface RetrievePermissionsByUsernameRequest { username: string; } -export interface UpdateUserRequest { +export interface UpdateProfileRequest { userDTO: UserDTO; - password?: boolean; -} - -export interface UpdateUserGroupRequest { - userGroupDTO: UserGroupDTO; } -export interface UpdateUserSettingsRequest { - id: number; - userSettingDTO: UserSettingDTO; +export interface UpdateUserRequest { + username: string; + userDTO: UserDTO; } /** @@ -87,58 +55,22 @@ export class UsersApi extends BaseAPI { /** */ - deleteGroup({ groupCode }: DeleteGroupRequest): Observable - deleteGroup({ groupCode }: DeleteGroupRequest, opts?: OperationOpts): Observable> - deleteGroup({ groupCode }: DeleteGroupRequest, opts?: OperationOpts): Observable> { - throwIfNullOrUndefined(groupCode, 'groupCode', 'deleteGroup'); - - const headers: HttpHeaders = { - ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), - }; - - return this.request({ - url: '/users/groups/{group_code}'.replace('{group_code}', encodeURI(groupCode)), - method: 'DELETE', - headers, - }, opts?.responseOpts); - }; - - /** - */ - deleteUser({ username }: DeleteUserRequest): Observable - deleteUser({ username }: DeleteUserRequest, opts?: OperationOpts): Observable> - deleteUser({ username }: DeleteUserRequest, opts?: OperationOpts): Observable> { + deleteUser({ username }: DeleteUserRequest): Observable + deleteUser({ username }: DeleteUserRequest, opts?: OperationOpts): Observable> + deleteUser({ username }: DeleteUserRequest, opts?: OperationOpts): Observable> { throwIfNullOrUndefined(username, 'username', 'deleteUser'); const headers: HttpHeaders = { ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), }; - return this.request({ + return this.request({ url: '/users/{username}'.replace('{username}', encodeURI(username)), method: 'DELETE', headers, }, opts?.responseOpts); }; - /** - */ - deleteUserSetting({ id }: DeleteUserSettingRequest): Observable - deleteUserSetting({ id }: DeleteUserSettingRequest, opts?: OperationOpts): Observable> - deleteUserSetting({ id }: DeleteUserSettingRequest, opts?: OperationOpts): Observable> { - throwIfNullOrUndefined(id, 'id', 'deleteUserSetting'); - - const headers: HttpHeaders = { - ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), - }; - - return this.request({ - url: '/users/settings/{id}'.replace('{id}', encodeURI(id)), - method: 'DELETE', - headers, - }, opts?.responseOpts); - }; - /** */ getUser({ groupId }: GetUserRequest): Observable> @@ -181,78 +113,9 @@ export class UsersApi extends BaseAPI { /** */ - getUserGroup(): Observable> - getUserGroup(opts?: OperationOpts): Observable>> - getUserGroup(opts?: OperationOpts): Observable | RawAjaxResponse>> { - const headers: HttpHeaders = { - ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), - }; - - return this.request>({ - url: '/users/groups', - method: 'GET', - headers, - }, opts?.responseOpts); - }; - - /** - */ - getUserSettingById({ id }: GetUserSettingByIdRequest): Observable - getUserSettingById({ id }: GetUserSettingByIdRequest, opts?: OperationOpts): Observable> - getUserSettingById({ id }: GetUserSettingByIdRequest, opts?: OperationOpts): Observable> { - throwIfNullOrUndefined(id, 'id', 'getUserSettingById'); - - const headers: HttpHeaders = { - ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), - }; - - return this.request({ - url: '/users/settings/{id}'.replace('{id}', encodeURI(id)), - method: 'GET', - headers, - }, opts?.responseOpts); - }; - - /** - */ - getUserSettingByUser({ userName, configName }: GetUserSettingByUserRequest): Observable - getUserSettingByUser({ userName, configName }: GetUserSettingByUserRequest, opts?: OperationOpts): Observable> - getUserSettingByUser({ userName, configName }: GetUserSettingByUserRequest, opts?: OperationOpts): Observable> { - throwIfNullOrUndefined(userName, 'userName', 'getUserSettingByUser'); - throwIfNullOrUndefined(configName, 'configName', 'getUserSettingByUser'); - - const headers: HttpHeaders = { - ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), - }; - - return this.request({ - url: '/users/{userName}/settings/{configName}'.replace('{userName}', encodeURI(userName)).replace('{configName}', encodeURI(configName)), - method: 'GET', - headers, - }, opts?.responseOpts); - }; - - /** - */ - getUserSettings(): Observable> - getUserSettings(opts?: OperationOpts): Observable>> - getUserSettings(opts?: OperationOpts): Observable | RawAjaxResponse>> { - const headers: HttpHeaders = { - ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), - }; - - return this.request>({ - url: '/users/settings', - method: 'GET', - headers, - }, opts?.responseOpts); - }; - - /** - */ - newUser({ userDTO }: NewUserRequest): Observable - newUser({ userDTO }: NewUserRequest, opts?: OperationOpts): Observable> - newUser({ userDTO }: NewUserRequest, opts?: OperationOpts): Observable> { + newUser({ userDTO }: NewUserRequest): Observable + newUser({ userDTO }: NewUserRequest, opts?: OperationOpts): Observable> + newUser({ userDTO }: NewUserRequest, opts?: OperationOpts): Observable> { throwIfNullOrUndefined(userDTO, 'userDTO', 'newUser'); const headers: HttpHeaders = { @@ -260,7 +123,7 @@ export class UsersApi extends BaseAPI { ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), }; - return this.request({ + return this.request({ url: '/users', method: 'POST', headers, @@ -270,73 +133,17 @@ export class UsersApi extends BaseAPI { /** */ - newUserGroup({ userGroupDTO }: NewUserGroupRequest): Observable - newUserGroup({ userGroupDTO }: NewUserGroupRequest, opts?: OperationOpts): Observable> - newUserGroup({ userGroupDTO }: NewUserGroupRequest, opts?: OperationOpts): Observable> { - throwIfNullOrUndefined(userGroupDTO, 'userGroupDTO', 'newUserGroup'); - - const headers: HttpHeaders = { - 'Content-Type': 'application/json', - ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), - }; - - return this.request({ - url: '/users/groups', - method: 'POST', - headers, - body: userGroupDTO, - }, opts?.responseOpts); - }; - - /** - */ - newUserSettings({ userSettingDTO }: NewUserSettingsRequest): Observable - newUserSettings({ userSettingDTO }: NewUserSettingsRequest, opts?: OperationOpts): Observable> - newUserSettings({ userSettingDTO }: NewUserSettingsRequest, opts?: OperationOpts): Observable> { - throwIfNullOrUndefined(userSettingDTO, 'userSettingDTO', 'newUserSettings'); - - const headers: HttpHeaders = { - 'Content-Type': 'application/json', - ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), - }; - - return this.request({ - url: '/users/settings', - method: 'POST', - headers, - body: userSettingDTO, - }, opts?.responseOpts); - }; - - /** - */ - retrievePermissionsByCurrentLoggedInUser(): Observable> - retrievePermissionsByCurrentLoggedInUser(opts?: OperationOpts): Observable>> - retrievePermissionsByCurrentLoggedInUser(opts?: OperationOpts): Observable | RawAjaxResponse>> { - const headers: HttpHeaders = { - ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), - }; - - return this.request>({ - url: '/users/permissions', - method: 'GET', - headers, - }, opts?.responseOpts); - }; - - /** - */ - retrievePermissionsByUsername({ username }: RetrievePermissionsByUsernameRequest): Observable> - retrievePermissionsByUsername({ username }: RetrievePermissionsByUsernameRequest, opts?: OperationOpts): Observable>> - retrievePermissionsByUsername({ username }: RetrievePermissionsByUsernameRequest, opts?: OperationOpts): Observable | RawAjaxResponse>> { + retrievePermissionsByUsername({ username }: RetrievePermissionsByUsernameRequest): Observable> + retrievePermissionsByUsername({ username }: RetrievePermissionsByUsernameRequest, opts?: OperationOpts): Observable>> + retrievePermissionsByUsername({ username }: RetrievePermissionsByUsernameRequest, opts?: OperationOpts): Observable | RawAjaxResponse>> { throwIfNullOrUndefined(username, 'username', 'retrievePermissionsByUsername'); const headers: HttpHeaders = { ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), }; - return this.request>({ - url: '/users/permissions/username/{username}'.replace('{username}', encodeURI(username)), + return this.request>({ + url: '/users/{username}/permissions'.replace('{username}', encodeURI(username)), method: 'GET', headers, }, opts?.responseOpts); @@ -360,67 +167,42 @@ export class UsersApi extends BaseAPI { /** */ - updateUser({ userDTO, password }: UpdateUserRequest): Observable - updateUser({ userDTO, password }: UpdateUserRequest, opts?: OperationOpts): Observable> - updateUser({ userDTO, password }: UpdateUserRequest, opts?: OperationOpts): Observable> { - throwIfNullOrUndefined(userDTO, 'userDTO', 'updateUser'); + updateProfile({ userDTO }: UpdateProfileRequest): Observable + updateProfile({ userDTO }: UpdateProfileRequest, opts?: OperationOpts): Observable> + updateProfile({ userDTO }: UpdateProfileRequest, opts?: OperationOpts): Observable> { + throwIfNullOrUndefined(userDTO, 'userDTO', 'updateProfile'); const headers: HttpHeaders = { 'Content-Type': 'application/json', ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), }; - const query: HttpQuery = {}; - - if (password != null) { query['password'] = password; } - - return this.request({ - url: '/users', + return this.request({ + url: '/users/me', method: 'PUT', headers, - query, body: userDTO, }, opts?.responseOpts); }; /** */ - updateUserGroup({ userGroupDTO }: UpdateUserGroupRequest): Observable - updateUserGroup({ userGroupDTO }: UpdateUserGroupRequest, opts?: OperationOpts): Observable> - updateUserGroup({ userGroupDTO }: UpdateUserGroupRequest, opts?: OperationOpts): Observable> { - throwIfNullOrUndefined(userGroupDTO, 'userGroupDTO', 'updateUserGroup'); - - const headers: HttpHeaders = { - 'Content-Type': 'application/json', - ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), - }; - - return this.request({ - url: '/users/groups', - method: 'PUT', - headers, - body: userGroupDTO, - }, opts?.responseOpts); - }; - - /** - */ - updateUserSettings({ id, userSettingDTO }: UpdateUserSettingsRequest): Observable - updateUserSettings({ id, userSettingDTO }: UpdateUserSettingsRequest, opts?: OperationOpts): Observable> - updateUserSettings({ id, userSettingDTO }: UpdateUserSettingsRequest, opts?: OperationOpts): Observable> { - throwIfNullOrUndefined(id, 'id', 'updateUserSettings'); - throwIfNullOrUndefined(userSettingDTO, 'userSettingDTO', 'updateUserSettings'); + updateUser({ username, userDTO }: UpdateUserRequest): Observable + updateUser({ username, userDTO }: UpdateUserRequest, opts?: OperationOpts): Observable> + updateUser({ username, userDTO }: UpdateUserRequest, opts?: OperationOpts): Observable> { + throwIfNullOrUndefined(username, 'username', 'updateUser'); + throwIfNullOrUndefined(userDTO, 'userDTO', 'updateUser'); const headers: HttpHeaders = { 'Content-Type': 'application/json', ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), }; - return this.request({ - url: '/users/settings/{id}'.replace('{id}', encodeURI(id)), + return this.request({ + url: '/users/{username}'.replace('{username}', encodeURI(username)), method: 'PUT', headers, - body: userSettingDTO, + body: userDTO, }, opts?.responseOpts); }; diff --git a/src/generated/apis/VaccineTypeApi.ts b/src/generated/apis/VaccineTypeApi.ts index 15e3a94a3..2719bf88b 100644 --- a/src/generated/apis/VaccineTypeApi.ts +++ b/src/generated/apis/VaccineTypeApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/VaccinesApi.ts b/src/generated/apis/VaccinesApi.ts index f9cd0bd62..5da1c927e 100644 --- a/src/generated/apis/VaccinesApi.ts +++ b/src/generated/apis/VaccinesApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/VisitApi.ts b/src/generated/apis/VisitApi.ts index 8f151349b..3e969595f 100644 --- a/src/generated/apis/VisitApi.ts +++ b/src/generated/apis/VisitApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/WardsApi.ts b/src/generated/apis/WardsApi.ts index 6d47bc4c2..2cc4d7577 100644 --- a/src/generated/apis/WardsApi.ts +++ b/src/generated/apis/WardsApi.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/apis/index.ts b/src/generated/apis/index.ts index 26b19218d..852c54395 100644 --- a/src/generated/apis/index.ts +++ b/src/generated/apis/index.ts @@ -34,6 +34,8 @@ export * from './SMSApi'; export * from './StockMovementsApi'; export * from './SuppliersApi'; export * from './TherapiesApi'; +export * from './UserGroupsApi'; +export * from './UserSettingsApi'; export * from './UsersApi'; export * from './VaccineTypeApi'; export * from './VaccinesApi'; diff --git a/src/generated/models/AdmissionDTO.ts b/src/generated/models/AdmissionDTO.ts index 75a692703..4b933c05e 100644 --- a/src/generated/models/AdmissionDTO.ts +++ b/src/generated/models/AdmissionDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/AdmissionTypeDTO.ts b/src/generated/models/AdmissionTypeDTO.ts index 7a01e1058..bcae77e37 100644 --- a/src/generated/models/AdmissionTypeDTO.ts +++ b/src/generated/models/AdmissionTypeDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/AdmittedPatientDTO.ts b/src/generated/models/AdmittedPatientDTO.ts index ff74944bb..bc822d02b 100644 --- a/src/generated/models/AdmittedPatientDTO.ts +++ b/src/generated/models/AdmittedPatientDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/AgeType.ts b/src/generated/models/AgeType.ts index 2de34105f..f4f755067 100644 --- a/src/generated/models/AgeType.ts +++ b/src/generated/models/AgeType.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/AgeTypeDTO.ts b/src/generated/models/AgeTypeDTO.ts index 7b76784fa..2f941cea5 100644 --- a/src/generated/models/AgeTypeDTO.ts +++ b/src/generated/models/AgeTypeDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/BillDTO.ts b/src/generated/models/BillDTO.ts index 29515ba97..456641c4b 100644 --- a/src/generated/models/BillDTO.ts +++ b/src/generated/models/BillDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/BillItemsDTO.ts b/src/generated/models/BillItemsDTO.ts index 507327000..41694f85f 100644 --- a/src/generated/models/BillItemsDTO.ts +++ b/src/generated/models/BillItemsDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/BillPaymentsDTO.ts b/src/generated/models/BillPaymentsDTO.ts index 5395f4d03..dad025014 100644 --- a/src/generated/models/BillPaymentsDTO.ts +++ b/src/generated/models/BillPaymentsDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/DeliveryResultTypeDTO.ts b/src/generated/models/DeliveryResultTypeDTO.ts index ad7034e21..e7e488784 100644 --- a/src/generated/models/DeliveryResultTypeDTO.ts +++ b/src/generated/models/DeliveryResultTypeDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/DeliveryTypeDTO.ts b/src/generated/models/DeliveryTypeDTO.ts index 3f2c800db..708ae8fe5 100644 --- a/src/generated/models/DeliveryTypeDTO.ts +++ b/src/generated/models/DeliveryTypeDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/DischargeTypeDTO.ts b/src/generated/models/DischargeTypeDTO.ts index b63e56c00..a568cbecf 100644 --- a/src/generated/models/DischargeTypeDTO.ts +++ b/src/generated/models/DischargeTypeDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/DiseaseDTO.ts b/src/generated/models/DiseaseDTO.ts index 309915457..403c4f434 100644 --- a/src/generated/models/DiseaseDTO.ts +++ b/src/generated/models/DiseaseDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/DiseaseTypeDTO.ts b/src/generated/models/DiseaseTypeDTO.ts index b77286288..360d6e391 100644 --- a/src/generated/models/DiseaseTypeDTO.ts +++ b/src/generated/models/DiseaseTypeDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/ExamDTO.ts b/src/generated/models/ExamDTO.ts index f76956223..3534c1a52 100644 --- a/src/generated/models/ExamDTO.ts +++ b/src/generated/models/ExamDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/ExamRowDTO.ts b/src/generated/models/ExamRowDTO.ts index 58bd3f2bf..beb71b0ba 100644 --- a/src/generated/models/ExamRowDTO.ts +++ b/src/generated/models/ExamRowDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/ExamTypeDTO.ts b/src/generated/models/ExamTypeDTO.ts index f5a022d68..4220374cc 100644 --- a/src/generated/models/ExamTypeDTO.ts +++ b/src/generated/models/ExamTypeDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/FullBillDTO.ts b/src/generated/models/FullBillDTO.ts index 1a3a7d59f..ffc9803f1 100644 --- a/src/generated/models/FullBillDTO.ts +++ b/src/generated/models/FullBillDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/HospitalDTO.ts b/src/generated/models/HospitalDTO.ts index 834f83a46..3c46cf663 100644 --- a/src/generated/models/HospitalDTO.ts +++ b/src/generated/models/HospitalDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/LabWithRowsDTO.ts b/src/generated/models/LabWithRowsDTO.ts index 24e747666..5185fa04a 100644 --- a/src/generated/models/LabWithRowsDTO.ts +++ b/src/generated/models/LabWithRowsDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/LaboratoryDTO.ts b/src/generated/models/LaboratoryDTO.ts index a53f0a00e..ab9adc892 100644 --- a/src/generated/models/LaboratoryDTO.ts +++ b/src/generated/models/LaboratoryDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/LitePermissionDTO.ts b/src/generated/models/LitePermissionDTO.ts index f94b19b3a..c29d4f7f8 100644 --- a/src/generated/models/LitePermissionDTO.ts +++ b/src/generated/models/LitePermissionDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/LoginRequest.ts b/src/generated/models/LoginRequest.ts index 0a68bcfdb..ef486feec 100644 --- a/src/generated/models/LoginRequest.ts +++ b/src/generated/models/LoginRequest.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/LoginResponse.ts b/src/generated/models/LoginResponse.ts index 3baef1778..5865c1f37 100644 --- a/src/generated/models/LoginResponse.ts +++ b/src/generated/models/LoginResponse.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -23,6 +23,12 @@ export interface LoginResponse { * @memberof LoginResponse */ token?: string; + /** + * RefreshToken + * @type {string} + * @memberof LoginResponse + */ + refreshToken?: string; /** * Type of Token * @type {string} diff --git a/src/generated/models/LotDTO.ts b/src/generated/models/LotDTO.ts index 21a3fa09f..14a0d3294 100644 --- a/src/generated/models/LotDTO.ts +++ b/src/generated/models/LotDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/MalnutritionDTO.ts b/src/generated/models/MalnutritionDTO.ts index 120a42525..e6cccef73 100644 --- a/src/generated/models/MalnutritionDTO.ts +++ b/src/generated/models/MalnutritionDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/MedicalDTO.ts b/src/generated/models/MedicalDTO.ts index fbed3052c..0b2c82266 100644 --- a/src/generated/models/MedicalDTO.ts +++ b/src/generated/models/MedicalDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/MedicalTypeDTO.ts b/src/generated/models/MedicalTypeDTO.ts index f094e94fa..9cf472dd8 100644 --- a/src/generated/models/MedicalTypeDTO.ts +++ b/src/generated/models/MedicalTypeDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/MedicalWardDTO.ts b/src/generated/models/MedicalWardDTO.ts index 8f9599c75..184ee2813 100644 --- a/src/generated/models/MedicalWardDTO.ts +++ b/src/generated/models/MedicalWardDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/MedicalWardIdDTO.ts b/src/generated/models/MedicalWardIdDTO.ts index e293e0ed5..e45654a98 100644 --- a/src/generated/models/MedicalWardIdDTO.ts +++ b/src/generated/models/MedicalWardIdDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/MovementDTO.ts b/src/generated/models/MovementDTO.ts index 1a02a6be4..6469f183f 100644 --- a/src/generated/models/MovementDTO.ts +++ b/src/generated/models/MovementDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/MovementTypeDTO.ts b/src/generated/models/MovementTypeDTO.ts index ea021745b..acc4a2634 100644 --- a/src/generated/models/MovementTypeDTO.ts +++ b/src/generated/models/MovementTypeDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/MovementWardDTO.ts b/src/generated/models/MovementWardDTO.ts index 8c2c73b15..86fdceaff 100644 --- a/src/generated/models/MovementWardDTO.ts +++ b/src/generated/models/MovementWardDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/OpdDTO.ts b/src/generated/models/OpdDTO.ts index a324f7c50..4bb2b40da 100644 --- a/src/generated/models/OpdDTO.ts +++ b/src/generated/models/OpdDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/OpdWithOperationRowDTO.ts b/src/generated/models/OpdWithOperationRowDTO.ts index 7840a5713..e06331c00 100644 --- a/src/generated/models/OpdWithOperationRowDTO.ts +++ b/src/generated/models/OpdWithOperationRowDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/OperationDTO.ts b/src/generated/models/OperationDTO.ts index 61931b330..97492e784 100644 --- a/src/generated/models/OperationDTO.ts +++ b/src/generated/models/OperationDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/OperationRowDTO.ts b/src/generated/models/OperationRowDTO.ts index fb7832fab..b8690f8aa 100644 --- a/src/generated/models/OperationRowDTO.ts +++ b/src/generated/models/OperationRowDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/OperationTypeDTO.ts b/src/generated/models/OperationTypeDTO.ts index 64e962036..efdb74169 100644 --- a/src/generated/models/OperationTypeDTO.ts +++ b/src/generated/models/OperationTypeDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/PageAdmissionDTO.ts b/src/generated/models/PageAdmissionDTO.ts index ca02e8159..35f068802 100644 --- a/src/generated/models/PageAdmissionDTO.ts +++ b/src/generated/models/PageAdmissionDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/PageInfoDTO.ts b/src/generated/models/PageInfoDTO.ts index ad97da982..51c1f70fd 100644 --- a/src/generated/models/PageInfoDTO.ts +++ b/src/generated/models/PageInfoDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/PageLabWithRowsDTO.ts b/src/generated/models/PageLabWithRowsDTO.ts index 757563493..727df7529 100644 --- a/src/generated/models/PageLabWithRowsDTO.ts +++ b/src/generated/models/PageLabWithRowsDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/PageOpdDTO.ts b/src/generated/models/PageOpdDTO.ts index 7d0e9aae5..b07830b88 100644 --- a/src/generated/models/PageOpdDTO.ts +++ b/src/generated/models/PageOpdDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/PagePatientDTO.ts b/src/generated/models/PagePatientDTO.ts index 261c84680..05425ec3f 100644 --- a/src/generated/models/PagePatientDTO.ts +++ b/src/generated/models/PagePatientDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/PagePatientExaminationDTO.ts b/src/generated/models/PagePatientExaminationDTO.ts index 97ee2fa37..f39f2dc31 100644 --- a/src/generated/models/PagePatientExaminationDTO.ts +++ b/src/generated/models/PagePatientExaminationDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/Patient.ts b/src/generated/models/Patient.ts index 1602f431e..3e87778e4 100644 --- a/src/generated/models/Patient.ts +++ b/src/generated/models/Patient.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/PatientConsensus.ts b/src/generated/models/PatientConsensus.ts index aceb5b124..c2795d3c9 100644 --- a/src/generated/models/PatientConsensus.ts +++ b/src/generated/models/PatientConsensus.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/PatientConsensusDTO.ts b/src/generated/models/PatientConsensusDTO.ts index d6a43642f..233b989fe 100644 --- a/src/generated/models/PatientConsensusDTO.ts +++ b/src/generated/models/PatientConsensusDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/PatientDTO.ts b/src/generated/models/PatientDTO.ts index be5cb9e6a..24d2e9e08 100644 --- a/src/generated/models/PatientDTO.ts +++ b/src/generated/models/PatientDTO.ts @@ -1,10 +1,10 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation - * - * The version of the OpenAPI document: 1.0 + * Open Hospital API Documentation + * Open Hospital API Documentation * + * The version of the OpenAPI document: 0.1.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -121,7 +121,7 @@ export interface PatientDTO { * @type {string} * @memberof PatientDTO */ - bloodType: string; + bloodType: PatientDTOBloodTypeEnum; /** * HasInsurance (Y=Yes, N=no) * @type {string} @@ -194,46 +194,63 @@ export interface PatientDTO { * @enum {string} */ export enum PatientDTOSexEnum { - M = "M", - F = "F", + M = 'M', + F = 'F' } /** * @export * @enum {string} */ export enum PatientDTOMotherEnum { - D = "D", - A = "A", + D = 'D', + A = 'A' } /** * @export * @enum {string} */ export enum PatientDTOFatherEnum { - D = "D", - A = "A", + D = 'D', + A = 'A' +} +/** + * @export + * @enum {string} + * these are manually overwritten + * because openapi-generator does not handle well thoser enums + */ +export enum PatientDTOBloodTypeEnum { + Opos = "0-", + Oneg = "0+", + Aneg = "A-", + Apos = "A+", + Bneg = "B-", + Bpos = "B+", + ABneg = "AB-", + ABpos = "AB+", } /** * @export * @enum {string} */ export enum PatientDTOHasInsuranceEnum { - Y = "Y", - N = "N", + Y = 'Y', + N = 'N' } /** * @export * @enum {string} */ export enum PatientDTOParentTogetherEnum { - Y = "Y", - N = "N", + Y = 'Y', + N = 'N' } /** * @export * @enum {string} */ export enum PatientDTOStatusEnum { - I = "I", - O = "O", + I = 'I', + O = 'O' } + diff --git a/src/generated/models/PatientExaminationDTO.ts b/src/generated/models/PatientExaminationDTO.ts index c1405aeb6..32c77cfab 100644 --- a/src/generated/models/PatientExaminationDTO.ts +++ b/src/generated/models/PatientExaminationDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/PatientProfilePhoto.ts b/src/generated/models/PatientProfilePhoto.ts index 6907fedff..7ed0d33ff 100644 --- a/src/generated/models/PatientProfilePhoto.ts +++ b/src/generated/models/PatientProfilePhoto.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/PatientProfilePhotoPhotoAsImage.ts b/src/generated/models/PatientProfilePhotoPhotoAsImage.ts index a74ae3d2f..e9a582066 100644 --- a/src/generated/models/PatientProfilePhotoPhotoAsImage.ts +++ b/src/generated/models/PatientProfilePhotoPhotoAsImage.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphics.ts b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphics.ts index 73e6e47e2..1b8ab4d7a 100644 --- a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphics.ts +++ b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphics.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -29,11 +29,6 @@ export interface PatientProfilePhotoPhotoAsImageGraphics { * @memberof PatientProfilePhotoPhotoAsImageGraphics */ color?: PatientProfilePhotoPhotoAsImageGraphicsColor; - /** - * @type {PatientProfilePhotoPhotoAsImageGraphicsColor} - * @memberof PatientProfilePhotoPhotoAsImageGraphics - */ - xormode?: PatientProfilePhotoPhotoAsImageGraphicsColor; /** * @type {PatientProfilePhotoPhotoAsImageGraphicsFont} * @memberof PatientProfilePhotoPhotoAsImageGraphics @@ -49,6 +44,11 @@ export interface PatientProfilePhotoPhotoAsImageGraphics { * @memberof PatientProfilePhotoPhotoAsImageGraphics */ clipBounds?: PatientProfilePhotoPhotoAsImageGraphicsClipBounds; + /** + * @type {PatientProfilePhotoPhotoAsImageGraphicsColor} + * @memberof PatientProfilePhotoPhotoAsImageGraphics + */ + xormode?: PatientProfilePhotoPhotoAsImageGraphicsColor; /** * @type {PatientProfilePhotoPhotoAsImageGraphicsClip} * @memberof PatientProfilePhotoPhotoAsImageGraphics diff --git a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClip.ts b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClip.ts index 96ba62280..69d6a4502 100644 --- a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClip.ts +++ b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClip.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClipBounds.ts b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClipBounds.ts index 3f21f7638..972dd58c8 100644 --- a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClipBounds.ts +++ b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClipBounds.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D.ts b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D.ts index 8a65502a6..dc513a8ec 100644 --- a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D.ts +++ b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,50 +25,50 @@ export interface PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D { * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D */ - maxX?: number; + width?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D */ - maxY?: number; + height?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D */ - centerX?: number; + y?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D */ - centerY?: number; + x?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D */ - height?: number; + maxX?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D */ - width?: number; + maxY?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D */ - minX?: number; + centerX?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D */ - minY?: number; + centerY?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D */ - x?: number; + minX?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D */ - y?: number; + minY?: number; } diff --git a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClipBoundsLocation.ts b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClipBoundsLocation.ts index aad960b56..1071b6994 100644 --- a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClipBoundsLocation.ts +++ b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClipBoundsLocation.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClipBoundsSize.ts b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClipBoundsSize.ts index b67b572ba..1ffb63be4 100644 --- a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClipBoundsSize.ts +++ b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClipBoundsSize.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsColor.ts b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsColor.ts index 786565941..62d03be4c 100644 --- a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsColor.ts +++ b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsColor.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsColorColorSpace.ts b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsColorColorSpace.ts index 5edca8c4f..8b2f7f8b8 100644 --- a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsColorColorSpace.ts +++ b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsColorColorSpace.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsFont.ts b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsFont.ts index 62012971a..3517f0abc 100644 --- a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsFont.ts +++ b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsFont.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -40,31 +40,21 @@ export interface PatientProfilePhotoPhotoAsImageGraphicsFont { * @memberof PatientProfilePhotoPhotoAsImageGraphicsFont */ attributes?: { [key: string]: object; }; - /** - * @type {PatientProfilePhotoPhotoAsImageGraphicsFontTransform} - * @memberof PatientProfilePhotoPhotoAsImageGraphicsFont - */ - transform?: PatientProfilePhotoPhotoAsImageGraphicsFontTransform; /** * @type {string} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFont */ - psname?: string; + family?: string; /** * @type {string} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFont */ fontName?: string; /** - * @type {number} - * @memberof PatientProfilePhotoPhotoAsImageGraphicsFont - */ - size2D?: number; - /** - * @type {boolean} + * @type {PatientProfilePhotoPhotoAsImageGraphicsFontTransform} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFont */ - plain?: boolean; + transform?: PatientProfilePhotoPhotoAsImageGraphicsFontTransform; /** * @type {boolean} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFont @@ -76,33 +66,43 @@ export interface PatientProfilePhotoPhotoAsImageGraphicsFont { */ italic?: boolean; /** - * @type {boolean} + * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFont */ - transformed?: boolean; + numGlyphs?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFont */ - numGlyphs?: number; + missingGlyphCode?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFont */ - missingGlyphCode?: number; + italicAngle?: number; /** - * @type {Array} + * @type {boolean} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFont */ - availableAttributes?: Array; + transformed?: boolean; /** - * @type {number} + * @type {boolean} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFont */ - italicAngle?: number; + plain?: boolean; /** * @type {string} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFont */ - family?: string; + psname?: string; + /** + * @type {number} + * @memberof PatientProfilePhotoPhotoAsImageGraphicsFont + */ + size2D?: number; + /** + * @type {Array} + * @memberof PatientProfilePhotoPhotoAsImageGraphicsFont + */ + availableAttributes?: Array; } diff --git a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsFontMetrics.ts b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsFontMetrics.ts index d5b5e35ee..0725940a7 100644 --- a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsFontMetrics.ts +++ b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsFontMetrics.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -42,38 +42,38 @@ export interface PatientProfilePhotoPhotoAsImageGraphicsFontMetrics { */ leading?: number; /** - * @type {PatientProfilePhotoPhotoAsImageGraphicsFontMetricsFontRenderContext} + * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFontMetrics */ - fontRenderContext?: PatientProfilePhotoPhotoAsImageGraphicsFontMetricsFontRenderContext; + height?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFontMetrics */ - maxAscent?: number; + maxDescent?: number; /** - * @type {number} + * @type {Array} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFontMetrics */ - maxDescent?: number; + widths?: Array; /** - * @type {number} + * @type {PatientProfilePhotoPhotoAsImageGraphicsFontMetricsFontRenderContext} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFontMetrics */ - maxDecent?: number; + fontRenderContext?: PatientProfilePhotoPhotoAsImageGraphicsFontMetricsFontRenderContext; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFontMetrics */ - maxAdvance?: number; + maxAscent?: number; /** - * @type {Array} + * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFontMetrics */ - widths?: Array; + maxDecent?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFontMetrics */ - height?: number; + maxAdvance?: number; } diff --git a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsFontMetricsFontRenderContext.ts b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsFontMetricsFontRenderContext.ts index 9086f4947..d3e4d2313 100644 --- a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsFontMetricsFontRenderContext.ts +++ b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsFontMetricsFontRenderContext.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,11 +25,6 @@ export interface PatientProfilePhotoPhotoAsImageGraphicsFontMetricsFontRenderCon * @memberof PatientProfilePhotoPhotoAsImageGraphicsFontMetricsFontRenderContext */ transform?: PatientProfilePhotoPhotoAsImageGraphicsFontTransform; - /** - * @type {boolean} - * @memberof PatientProfilePhotoPhotoAsImageGraphicsFontMetricsFontRenderContext - */ - transformed?: boolean; /** * @type {object} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFontMetricsFontRenderContext @@ -40,6 +35,11 @@ export interface PatientProfilePhotoPhotoAsImageGraphicsFontMetricsFontRenderCon * @memberof PatientProfilePhotoPhotoAsImageGraphicsFontMetricsFontRenderContext */ fractionalMetricsHint?: object; + /** + * @type {boolean} + * @memberof PatientProfilePhotoPhotoAsImageGraphicsFontMetricsFontRenderContext + */ + transformed?: boolean; /** * @type {boolean} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFontMetricsFontRenderContext diff --git a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsFontTransform.ts b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsFontTransform.ts index 8dbe4221a..2195517ff 100644 --- a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsFontTransform.ts +++ b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsFontTransform.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -60,15 +60,15 @@ export interface PatientProfilePhotoPhotoAsImageGraphicsFontTransform { * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFontTransform */ - determinant?: number; + toRotation?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFontTransform */ - toRotation?: number; + toQuadrantRotation?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFontTransform */ - toQuadrantRotation?: number; + determinant?: number; } diff --git a/src/generated/models/PatientVaccineDTO.ts b/src/generated/models/PatientVaccineDTO.ts index 5f60408dc..ffc988a94 100644 --- a/src/generated/models/PatientVaccineDTO.ts +++ b/src/generated/models/PatientVaccineDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/PermissionDTO.ts b/src/generated/models/PermissionDTO.ts index 38a56287f..235214267 100644 --- a/src/generated/models/PermissionDTO.ts +++ b/src/generated/models/PermissionDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,6 +12,7 @@ */ /** + * List of group\'s permissions * @export * @interface PermissionDTO */ @@ -33,10 +34,4 @@ export interface PermissionDTO { * @memberof PermissionDTO */ description: string; - /** - * The user group id - * @type {Array} - * @memberof PermissionDTO - */ - userGroupIds: Array; } diff --git a/src/generated/models/PregnantTreatmentTypeDTO.ts b/src/generated/models/PregnantTreatmentTypeDTO.ts index 66ae9bdfd..809cacad6 100644 --- a/src/generated/models/PregnantTreatmentTypeDTO.ts +++ b/src/generated/models/PregnantTreatmentTypeDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/PriceDTO.ts b/src/generated/models/PriceDTO.ts index 3e927c294..89e89072b 100644 --- a/src/generated/models/PriceDTO.ts +++ b/src/generated/models/PriceDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/PriceList.ts b/src/generated/models/PriceList.ts index 824fab3d5..4836fc2bc 100644 --- a/src/generated/models/PriceList.ts +++ b/src/generated/models/PriceList.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/PriceListDTO.ts b/src/generated/models/PriceListDTO.ts index 715cca3ae..27d4536a9 100644 --- a/src/generated/models/PriceListDTO.ts +++ b/src/generated/models/PriceListDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/PricesOthersDTO.ts b/src/generated/models/PricesOthersDTO.ts index 219dbeb3c..1dbfc5ca1 100644 --- a/src/generated/models/PricesOthersDTO.ts +++ b/src/generated/models/PricesOthersDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/SmsDTO.ts b/src/generated/models/SmsDTO.ts index 916244e5e..d6eb8e8ad 100644 --- a/src/generated/models/SmsDTO.ts +++ b/src/generated/models/SmsDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/SupplierDTO.ts b/src/generated/models/SupplierDTO.ts index 13ba680b0..14bdb0d1f 100644 --- a/src/generated/models/SupplierDTO.ts +++ b/src/generated/models/SupplierDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -17,7 +17,6 @@ */ export interface SupplierDTO { /** - * The supplier\'s ID * @type {number} * @memberof SupplierDTO */ diff --git a/src/generated/models/TherapyDTO.ts b/src/generated/models/TherapyDTO.ts index f50d2dba2..674b737c2 100644 --- a/src/generated/models/TherapyDTO.ts +++ b/src/generated/models/TherapyDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/TherapyRow.ts b/src/generated/models/TherapyRow.ts index 98c50434b..7f96100ce 100644 --- a/src/generated/models/TherapyRow.ts +++ b/src/generated/models/TherapyRow.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -109,12 +109,12 @@ export interface TherapyRow { * @type {boolean} * @memberof TherapyRow */ - notify?: boolean; + sms?: boolean; /** * @type {boolean} * @memberof TherapyRow */ - sms?: boolean; + notify?: boolean; /** * @type {number} * @memberof TherapyRow diff --git a/src/generated/models/TherapyRowDTO.ts b/src/generated/models/TherapyRowDTO.ts index c04c537f0..3de900658 100644 --- a/src/generated/models/TherapyRowDTO.ts +++ b/src/generated/models/TherapyRowDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/TokenRefreshRequest.ts b/src/generated/models/TokenRefreshRequest.ts new file mode 100644 index 000000000..1d15df08d --- /dev/null +++ b/src/generated/models/TokenRefreshRequest.ts @@ -0,0 +1,24 @@ +// tslint:disable +/** + * Open Hospital API Documentation + * Open Hospital API Documentation + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * @export + * @interface TokenRefreshRequest + */ +export interface TokenRefreshRequest { + /** + * @type {string} + * @memberof TokenRefreshRequest + */ + refreshToken?: string; +} diff --git a/src/generated/models/UserDTO.ts b/src/generated/models/UserDTO.ts index 621eb1044..581ebcf1f 100644 --- a/src/generated/models/UserDTO.ts +++ b/src/generated/models/UserDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/UserGroupDTO.ts b/src/generated/models/UserGroupDTO.ts index 0c906d016..a7599a6d7 100644 --- a/src/generated/models/UserGroupDTO.ts +++ b/src/generated/models/UserGroupDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,6 +11,10 @@ * Do not edit the class manually. */ +import { + PermissionDTO, +} from './'; + /** * The user\'s group * @export @@ -29,4 +33,10 @@ export interface UserGroupDTO { * @memberof UserGroupDTO */ desc?: string; + /** + * List of group\'s permissions + * @type {Array} + * @memberof UserGroupDTO + */ + permissions?: Array; } diff --git a/src/generated/models/UserProfileDTO.ts b/src/generated/models/UserProfileDTO.ts index 80c33356b..c7c4cd7d8 100644 --- a/src/generated/models/UserProfileDTO.ts +++ b/src/generated/models/UserProfileDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/UserSettingDTO.ts b/src/generated/models/UserSettingDTO.ts index f9da714c7..2be07829f 100644 --- a/src/generated/models/UserSettingDTO.ts +++ b/src/generated/models/UserSettingDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/VaccineDTO.ts b/src/generated/models/VaccineDTO.ts index 2ac2c7a2d..4bec7033d 100644 --- a/src/generated/models/VaccineDTO.ts +++ b/src/generated/models/VaccineDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/VaccineTypeDTO.ts b/src/generated/models/VaccineTypeDTO.ts index 65591788a..0d7907fca 100644 --- a/src/generated/models/VaccineTypeDTO.ts +++ b/src/generated/models/VaccineTypeDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/VisitDTO.ts b/src/generated/models/VisitDTO.ts index 6f2f87afa..e6af4145c 100644 --- a/src/generated/models/VisitDTO.ts +++ b/src/generated/models/VisitDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/generated/models/WardDTO.ts b/src/generated/models/WardDTO.ts index eeff9c863..6f8e7865d 100644 --- a/src/generated/models/WardDTO.ts +++ b/src/generated/models/WardDTO.ts @@ -1,9 +1,9 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation + * Open Hospital API Documentation + * Open Hospital API Documentation * - * The version of the OpenAPI document: 1.0 + * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -76,17 +76,17 @@ export interface WardDTO { * @type {boolean} * @memberof WardDTO */ - opd?: boolean; + female?: boolean; /** * @type {boolean} * @memberof WardDTO */ - female?: boolean; + male?: boolean; /** * @type {boolean} * @memberof WardDTO */ - male?: boolean; + opd?: boolean; /** * @type {boolean} * @memberof WardDTO diff --git a/src/generated/models/index.ts b/src/generated/models/index.ts index 55bdc1fe6..efb93d806 100644 --- a/src/generated/models/index.ts +++ b/src/generated/models/index.ts @@ -18,7 +18,6 @@ export * from './FullBillDTO'; export * from './HospitalDTO'; export * from './LabWithRowsDTO'; export * from './LaboratoryDTO'; -export * from './LitePermissionDTO'; export * from './LoginRequest'; export * from './LoginResponse'; export * from './LotDTO'; @@ -72,6 +71,7 @@ export * from './SupplierDTO'; export * from './TherapyDTO'; export * from './TherapyRow'; export * from './TherapyRowDTO'; +export * from './TokenRefreshRequest'; export * from './UserDTO'; export * from './UserGroupDTO'; export * from './UserProfileDTO'; diff --git a/src/generated/runtime.ts b/src/generated/runtime.ts index 3bdbf3b3e..3dbdfa869 100644 --- a/src/generated/runtime.ts +++ b/src/generated/runtime.ts @@ -263,4 +263,4 @@ export interface ResponseArgs extends AjaxResponse {} export interface Middleware { pre?(request: RequestArgs): RequestArgs; post?(response: ResponseArgs): ResponseArgs; -} +} \ No newline at end of file diff --git a/src/libraries/authUtils/getAuthenticationFromSession.ts b/src/libraries/authUtils/getAuthenticationFromSession.ts index 1b53e105f..460a33c49 100644 --- a/src/libraries/authUtils/getAuthenticationFromSession.ts +++ b/src/libraries/authUtils/getAuthenticationFromSession.ts @@ -3,7 +3,7 @@ import { IAuthentication } from "../../state/main/types"; import { SessionStorage } from "../storage/storage"; export const getAuthenticationFromSession = (): IAuthentication => { - const { permissions, userName } = SessionStorage.read(PERMISSION_KEY); + const { permissions } = SessionStorage.read(PERMISSION_KEY); const { username, token } = SessionStorage.read(AUTH_KEY); if (!(token && username && permissions)) { diff --git a/src/libraries/dashboardUtils/admissions/useAdmByAdmTypeData.ts b/src/libraries/dashboardUtils/admissions/useAdmByAdmTypeData.ts index ef7098b56..8cfd178ec 100644 --- a/src/libraries/dashboardUtils/admissions/useAdmByAdmTypeData.ts +++ b/src/libraries/dashboardUtils/admissions/useAdmByAdmTypeData.ts @@ -21,10 +21,7 @@ export const useAdmByAdmTypeData = () => { state.admissions.getAdmissions.status ?? "" ) ); - const wardStatus = useAppSelector( - (state) => state.wards.allWards.status ?? "IDLE" - ); - const sexLabels = [t("common.male"), t("common.female")]; + const labels = admissionTypes.map((e) => e.description ?? ""); const data = { labels: labels, diff --git a/src/libraries/dashboardUtils/admissions/useAdmByWardData.ts b/src/libraries/dashboardUtils/admissions/useAdmByWardData.ts index 41a1c9a87..b7859bfc8 100644 --- a/src/libraries/dashboardUtils/admissions/useAdmByWardData.ts +++ b/src/libraries/dashboardUtils/admissions/useAdmByWardData.ts @@ -1,8 +1,5 @@ -import { useTranslation } from "react-i18next"; -import { AdmissionDTO, WardDTO } from "../../../generated"; -import { TAPIResponseStatus } from "../../../state/types"; -import { IState } from "../../../types"; import { useAppSelector } from "libraries/hooks/redux"; +import { useTranslation } from "react-i18next"; export const useAdmByAdmWardData = () => { const { t } = useTranslation(); diff --git a/src/libraries/dashboardUtils/discharges/useDisByAgeTypeData.ts b/src/libraries/dashboardUtils/discharges/useDisByAgeTypeData.ts index 6acf55b70..aeeac06d5 100644 --- a/src/libraries/dashboardUtils/discharges/useDisByAgeTypeData.ts +++ b/src/libraries/dashboardUtils/discharges/useDisByAgeTypeData.ts @@ -1,8 +1,5 @@ -import { useTranslation } from "react-i18next"; import { useAppSelector } from "libraries/hooks/redux"; -import { AdmissionDTO, AgeTypeDTO } from "../../../generated"; -import { TAPIResponseStatus } from "../../../state/types"; -import { IState } from "../../../types"; +import { useTranslation } from "react-i18next"; export const useDisByAgeTypeData = () => { const { t } = useTranslation(); diff --git a/src/libraries/dashboardUtils/discharges/useDisByDisTypeData.ts b/src/libraries/dashboardUtils/discharges/useDisByDisTypeData.ts index 4c7644da7..338411f8d 100644 --- a/src/libraries/dashboardUtils/discharges/useDisByDisTypeData.ts +++ b/src/libraries/dashboardUtils/discharges/useDisByDisTypeData.ts @@ -1,8 +1,5 @@ -import { useTranslation } from "react-i18next"; import { useAppSelector } from "libraries/hooks/redux"; -import { AdmissionDTO, AdmissionTypeDTO } from "../../../generated"; -import { TAPIResponseStatus } from "../../../state/types"; -import { IState } from "../../../types"; +import { useTranslation } from "react-i18next"; import { colorGen } from "../../uiUtils/colorGenerator"; export const useDisByDisTypeData = () => { diff --git a/src/libraries/dashboardUtils/discharges/useDisBySexData.ts b/src/libraries/dashboardUtils/discharges/useDisBySexData.ts index dc4708613..49f02c299 100644 --- a/src/libraries/dashboardUtils/discharges/useDisBySexData.ts +++ b/src/libraries/dashboardUtils/discharges/useDisBySexData.ts @@ -1,8 +1,5 @@ -import { useTranslation } from "react-i18next"; import { useAppSelector } from "libraries/hooks/redux"; -import { AdmissionDTO } from "../../../generated"; -import { TAPIResponseStatus } from "../../../state/types"; -import { IState } from "../../../types"; +import { useTranslation } from "react-i18next"; export const useDisBySexData = () => { const { t } = useTranslation(); diff --git a/src/libraries/dashboardUtils/discharges/useDisByWardData.ts b/src/libraries/dashboardUtils/discharges/useDisByWardData.ts index ffad9861d..8d3f5f746 100644 --- a/src/libraries/dashboardUtils/discharges/useDisByWardData.ts +++ b/src/libraries/dashboardUtils/discharges/useDisByWardData.ts @@ -1,8 +1,5 @@ -import { useTranslation } from "react-i18next"; import { useAppSelector } from "libraries/hooks/redux"; -import { AdmissionDTO, WardDTO } from "../../../generated"; -import { TAPIResponseStatus } from "../../../state/types"; -import { IState } from "../../../types"; +import { useTranslation } from "react-i18next"; export const useDisByWardData = () => { const { t } = useTranslation(); diff --git a/src/libraries/formDataHandling/functions.ts b/src/libraries/formDataHandling/functions.ts index 0a19d8bc9..2f501c91c 100644 --- a/src/libraries/formDataHandling/functions.ts +++ b/src/libraries/formDataHandling/functions.ts @@ -1,5 +1,10 @@ import { produce } from "immer"; +import { isEmpty } from "lodash"; import moment from "moment"; +import { + TAgeFieldName, + TAgeType, +} from "../../components/accessories/patientDataForm/types"; import { IFormCustomizationProps } from "../../customization/formCustomization/type"; import { AdmissionDTO, @@ -17,11 +22,6 @@ import { WardDTO, } from "../../generated"; import { TFieldAddress, TFieldFormattedValue, TFields } from "./types"; -import { - TAgeFieldName, - TAgeType, -} from "../../components/accessories/patientDataForm/types"; -import { isEmpty } from "lodash"; export const getFromFields = ( fields: TFields, @@ -328,10 +328,10 @@ export const getBirthDateAndAge = ( switch (ageType) { case "agetype": let selectedAgeType = allAgeTypes?.find( - (at, i) => at.code == values.agetype + (at, i) => at.code === values.agetype ); - if (selectedAgeType != undefined) { + if (selectedAgeType !== undefined) { let averageAge = Math.round( selectedAgeType.from && selectedAgeType.to ? (selectedAgeType.from + selectedAgeType.to) / 2 diff --git a/src/libraries/hooks/api/useAdmissions.ts b/src/libraries/hooks/api/useAdmissions.ts index d4817d86d..9c509c5f7 100644 --- a/src/libraries/hooks/api/useAdmissions.ts +++ b/src/libraries/hooks/api/useAdmissions.ts @@ -36,7 +36,7 @@ export const useAdmissions = () => { useEffect(() => { dispatch(getAdmissions({ admissionrange: range, page, size })); - }, [page]); + }, [dispatch, page, range, size]); return { pageInfo, diff --git a/src/libraries/hooks/api/useDischarges.ts b/src/libraries/hooks/api/useDischarges.ts index 69113d756..9a6b70b62 100644 --- a/src/libraries/hooks/api/useDischarges.ts +++ b/src/libraries/hooks/api/useDischarges.ts @@ -36,7 +36,7 @@ export const useDisharges = () => { useEffect(() => { dispatch(getDischarges({ dischargerange: range, page, size })); - }, [page]); + }, [dispatch, page, range, size]); return { pageInfo, diff --git a/src/mockServer/fixtures/dashboardSettingDTO.ts b/src/mockServer/fixtures/dashboardSettingDTO.ts new file mode 100644 index 000000000..e4de4c93d --- /dev/null +++ b/src/mockServer/fixtures/dashboardSettingDTO.ts @@ -0,0 +1,9 @@ +import { UserSettingDTO } from "../../generated"; + +export const dashboardSettingDTO: UserSettingDTO = { + id: 1, + configName: "dashboard", + user: "admin", + configValue: + "eyJsYXlvdXQiOnsibGciOlt7InciOjQsImgiOjMsIngiOjgsInkiOjAsImkiOiJvcGRCeUFnZVR5cGUiLCJtaW5XIjozLCJtaW5IIjozLCJtYXhIIjo1LCJtb3ZlZCI6ZmFsc2UsInN0YXRpYyI6ZmFsc2V9LHsidyI6NCwiaCI6MywieCI6NCwieSI6MCwiaSI6Im9wZEJ5U2V4IiwibWluVyI6MywibWluSCI6MywibWF4SCI6NSwibW92ZWQiOmZhbHNlLCJzdGF0aWMiOmZhbHNlfSx7InciOjQsImgiOjMsIngiOjAsInkiOjAsImkiOiJhZG1pc3Npb25CeVNleCIsIm1pblciOjMsIm1pbkgiOjMsIm1heEgiOjUsIm1vdmVkIjpmYWxzZSwic3RhdGljIjpmYWxzZX0seyJ3Ijo0LCJoIjozLCJ4Ijo4LCJ5IjozLCJpIjoiYWRtaXNzaW9uQnlBZ2VUeXBlIiwibWluVyI6MywibWluSCI6MywibWF4SCI6NSwibW92ZWQiOmZhbHNlLCJzdGF0aWMiOmZhbHNlfSx7InciOjQsImgiOjMsIngiOjAsInkiOjMsImkiOiJhZG1pc3Npb25CeVdhcmQiLCJtaW5XIjozLCJtaW5IIjozLCJtYXhIIjo1LCJtb3ZlZCI6ZmFsc2UsInN0YXRpYyI6ZmFsc2V9LHsidyI6NCwiaCI6MywieCI6NCwieSI6MywiaSI6ImFkbWlzc2lvbkJ5VHlwZSIsIm1pblciOjMsIm1pbkgiOjMsIm1heEgiOjUsIm1vdmVkIjpmYWxzZSwic3RhdGljIjpmYWxzZX1dLCJtZCI6W3siaSI6Im9wZEJ5QWdlVHlwZSIsInciOjYsImgiOjMsIngiOjAsInkiOjAsIm1pblciOjQsIm1pbkgiOjMsIm1heEgiOjR9LHsiaSI6Im9wZEJ5U2V4IiwidyI6NiwiaCI6MywieCI6MCwieSI6MCwibWluVyI6NCwibWluSCI6MywibWF4SCI6NH0seyJpIjoiYWRtaXNzaW9uQnlTZXgiLCJ3Ijo2LCJoIjozLCJ4IjowLCJ5IjowLCJtaW5XIjo0LCJtaW5IIjozLCJtYXhIIjo0fSx7ImkiOiJhZG1pc3Npb25CeUFnZVR5cGUiLCJ3Ijo2LCJoIjozLCJ4IjowLCJ5IjowLCJtaW5XIjo0LCJtaW5IIjozLCJtYXhIIjo0fSx7ImkiOiJhZG1pc3Npb25CeVdhcmQiLCJ3Ijo2LCJoIjozLCJ4IjowLCJ5IjowLCJtaW5XIjo0LCJtaW5IIjozLCJtYXhIIjo0fSx7ImkiOiJhZG1pc3Npb25CeVR5cGUiLCJ3Ijo2LCJoIjozLCJ4IjowLCJ5IjowLCJtaW5XIjo0LCJtaW5IIjozLCJtYXhIIjo0fV0sInNtIjpbeyJpIjoib3BkQnlBZ2VUeXBlIiwidyI6NiwiaCI6MywieCI6MCwieSI6MCwibWluVyI6NiwibWluSCI6MywibWF4SCI6NH0seyJpIjoib3BkQnlTZXgiLCJ3Ijo2LCJoIjozLCJ4IjowLCJ5IjowLCJtaW5XIjo2LCJtaW5IIjozLCJtYXhIIjo0fSx7ImkiOiJhZG1pc3Npb25CeVNleCIsInciOjYsImgiOjMsIngiOjAsInkiOjAsIm1pblciOjYsIm1pbkgiOjMsIm1heEgiOjR9LHsiaSI6ImFkbWlzc2lvbkJ5QWdlVHlwZSIsInciOjYsImgiOjMsIngiOjAsInkiOjAsIm1pblciOjYsIm1pbkgiOjMsIm1heEgiOjR9LHsiaSI6ImFkbWlzc2lvbkJ5V2FyZCIsInciOjYsImgiOjMsIngiOjAsInkiOjAsIm1pblciOjYsIm1pbkgiOjMsIm1heEgiOjR9LHsiaSI6ImFkbWlzc2lvbkJ5VHlwZSIsInciOjYsImgiOjMsIngiOjAsInkiOjAsIm1pblciOjYsIm1pbkgiOjMsIm1heEgiOjR9XSwieHMiOlt7ImkiOiJvcGRCeUFnZVR5cGUiLCJ3Ijo2LCJoIjozLCJ4IjowLCJ5IjowLCJtaW5XIjo2LCJtaW5IIjozLCJtYXhIIjo0fSx7ImkiOiJvcGRCeVNleCIsInciOjYsImgiOjMsIngiOjAsInkiOjAsIm1pblciOjYsIm1pbkgiOjMsIm1heEgiOjR9LHsiaSI6ImFkbWlzc2lvbkJ5U2V4IiwidyI6NiwiaCI6MywieCI6MCwieSI6MCwibWluVyI6NiwibWluSCI6MywibWF4SCI6NH0seyJpIjoiYWRtaXNzaW9uQnlBZ2VUeXBlIiwidyI6NiwiaCI6MywieCI6MCwieSI6MCwibWluVyI6NiwibWluSCI6MywibWF4SCI6NH0seyJpIjoiYWRtaXNzaW9uQnlXYXJkIiwidyI6NiwiaCI6MywieCI6MCwieSI6MCwibWluVyI6NiwibWluSCI6MywibWF4SCI6NH0seyJpIjoiYWRtaXNzaW9uQnlUeXBlIiwidyI6NiwiaCI6MywieCI6MCwieSI6MCwibWluVyI6NiwibWluSCI6MywibWF4SCI6NH1dLCJ4eHMiOlt7ImkiOiJvcGRCeUFnZVR5cGUiLCJ3IjoxMiwiaCI6MywieCI6MCwieSI6MCwibWluVyI6MTIsIm1pbkgiOjMsIm1heEgiOjR9LHsiaSI6Im9wZEJ5U2V4IiwidyI6MTIsImgiOjMsIngiOjAsInkiOjAsIm1pblciOjEyLCJtaW5IIjozLCJtYXhIIjo0fSx7ImkiOiJhZG1pc3Npb25CeVNleCIsInciOjEyLCJoIjozLCJ4IjowLCJ5IjowLCJtaW5XIjoxMiwibWluSCI6MywibWF4SCI6NH0seyJpIjoiYWRtaXNzaW9uQnlBZ2VUeXBlIiwidyI6MTIsImgiOjMsIngiOjAsInkiOjAsIm1pblciOjEyLCJtaW5IIjozLCJtYXhIIjo0fSx7ImkiOiJhZG1pc3Npb25CeVdhcmQiLCJ3IjoxMiwiaCI6MywieCI6MCwieSI6MCwibWluVyI6MTIsIm1pbkgiOjMsIm1heEgiOjR9LHsiaSI6ImFkbWlzc2lvbkJ5VHlwZSIsInciOjEyLCJoIjozLCJ4IjowLCJ5IjowLCJtaW5XIjoxMiwibWluSCI6MywibWF4SCI6NH1dfSwidG9vbGJveCI6eyJsZyI6W3siaSI6ImRpc2NoYXJnZUJ5U2V4IiwidyI6NCwiaCI6MywieCI6OCwieSI6MCwibWluVyI6MywibWluSCI6MywibWF4SCI6NX0seyJpIjoiZGlzY2hhcmdlQnlBZ2VUeXBlIiwidyI6NCwiaCI6MywieCI6NCwieSI6MiwibWluVyI6MywibWluSCI6MywibWF4SCI6NX0seyJpIjoiZGlzY2hhcmdlQnlXYXJkIiwidyI6NCwiaCI6MywieCI6MCwieSI6MCwibWluVyI6MywibWluSCI6MywibWF4SCI6NX0seyJpIjoiZGlzY2hhcmdlQnlUeXBlIiwidyI6NCwiaCI6MywieCI6OCwieSI6MiwibWluVyI6MywibWluSCI6MywibWF4SCI6NX1dLCJtZCI6W3siaSI6ImRpc2NoYXJnZUJ5U2V4IiwidyI6NiwiaCI6MywieCI6MCwieSI6MCwibWluVyI6NCwibWluSCI6MywibWF4SCI6NH0seyJpIjoiZGlzY2hhcmdlQnlBZ2VUeXBlIiwidyI6NiwiaCI6MywieCI6NiwieSI6MiwibWluVyI6NCwibWluSCI6MywibWF4SCI6NH0seyJpIjoiZGlzY2hhcmdlQnlXYXJkIiwidyI6NiwiaCI6MywieCI6MCwieSI6MCwibWluVyI6NCwibWluSCI6MywibWF4SCI6NH0seyJpIjoiZGlzY2hhcmdlQnlUeXBlIiwidyI6NiwiaCI6MywieCI6NiwieSI6MiwibWluVyI6NCwibWluSCI6MywibWF4SCI6NH1dLCJzbSI6W3siaSI6ImRpc2NoYXJnZUJ5U2V4IiwidyI6NiwiaCI6MywieCI6MCwieSI6MCwibWluVyI6NiwibWluSCI6MywibWF4SCI6NH0seyJpIjoiZGlzY2hhcmdlQnlBZ2VUeXBlIiwidyI6NiwiaCI6MywieCI6NiwieSI6MiwibWluVyI6NiwibWluSCI6MywibWF4SCI6NH0seyJpIjoiZGlzY2hhcmdlQnlXYXJkIiwidyI6NiwiaCI6MywieCI6MCwieSI6MCwibWluVyI6NiwibWluSCI6MywibWF4SCI6NH0seyJpIjoiZGlzY2hhcmdlQnlUeXBlIiwidyI6NiwiaCI6MywieCI6NiwieSI6MiwibWluVyI6NiwibWluSCI6MywibWF4SCI6NH1dLCJ4cyI6W3siaSI6ImRpc2NoYXJnZUJ5U2V4IiwidyI6NiwiaCI6MywieCI6MCwieSI6MCwibWluVyI6NiwibWluSCI6MywibWF4SCI6NH0seyJpIjoiZGlzY2hhcmdlQnlBZ2VUeXBlIiwidyI6NiwiaCI6MywieCI6NiwieSI6MiwibWluVyI6NiwibWluSCI6MywibWF4SCI6NH0seyJpIjoiZGlzY2hhcmdlQnlXYXJkIiwidyI6NiwiaCI6MywieCI6MCwieSI6MCwibWluVyI6NiwibWluSCI6MywibWF4SCI6NH0seyJpIjoiZGlzY2hhcmdlQnlUeXBlIiwidyI6NiwiaCI6MywieCI6NiwieSI6MiwibWluVyI6NiwibWluSCI6MywibWF4SCI6NH1dLCJ4eHMiOlt7ImkiOiJkaXNjaGFyZ2VCeVNleCIsInciOjEyLCJoIjozLCJ4IjowLCJ5IjowLCJtaW5XIjoxMiwibWluSCI6MywibWF4SCI6NH0seyJpIjoiZGlzY2hhcmdlQnlBZ2VUeXBlIiwidyI6MTIsImgiOjMsIngiOjAsInkiOjIsIm1pblciOjEyLCJtaW5IIjozLCJtYXhIIjo0fSx7ImkiOiJkaXNjaGFyZ2VCeVdhcmQiLCJ3IjoxMiwiaCI6MywieCI6MCwieSI6MCwibWluVyI6MTIsIm1pbkgiOjMsIm1heEgiOjR9LHsiaSI6ImRpc2NoYXJnZUJ5VHlwZSIsInciOjEyLCJoIjozLCJ4IjowLCJ5IjoyLCJtaW5XIjoxMiwibWluSCI6MywibWF4SCI6NH1dfX0=", +}; diff --git a/src/mockServer/fixtures/examRequestDTO.js b/src/mockServer/fixtures/examRequestDTO.js new file mode 100644 index 000000000..a8c78939f --- /dev/null +++ b/src/mockServer/fixtures/examRequestDTO.js @@ -0,0 +1,48 @@ +export const examRequestDTO = [ + { + code: 344, + material: "Undefined", + exam: { + code: "01.04", + description: "1.4 Film Comment", + procedure: 1, + defaultResult: "0", + examtype: { code: "HB", description: "1.Haematology" }, + lock: 1, + }, + registrationDate: "2024-10-03T11:03:31", + labDate: "2024-10-03T00:03:30", + result: "", + lock: 0, + note: null, + patientCode: 85, + patName: "Threadgill Mack", + inOutPatient: "O", + age: 64, + sex: "F", + status: "draft", + }, + { + code: 345, + material: "Undefined", + exam: { + code: "01.03", + description: "1.3 Differential ", + procedure: 1, + defaultResult: "", + examtype: { code: "HB", description: "1.Haematology" }, + lock: 0, + }, + registrationDate: "2024-10-03T11:05:02", + labDate: "2024-10-03T00:05:01", + result: "", + lock: 0, + note: null, + patientCode: 85, + patName: "Threadgill Mack", + inOutPatient: "O", + age: 64, + sex: "F", + status: "draft", + }, +]; diff --git a/src/mockServer/routes/hospital.js b/src/mockServer/routes/hospital.js index 09083c8c6..e5e3704a9 100644 --- a/src/mockServer/routes/hospital.js +++ b/src/mockServer/routes/hospital.js @@ -19,5 +19,15 @@ export const hospitalRoutes = (server) => { res.status(200).json(hospitalDTO); } }); + server.put("/:code").intercept((req, res) => { + const body = req.jsonBody(); + switch (body.description) { + case "FAIL": + res.status(400).json({ message: "Invalid payload" }); + break; + default: + res.status(200).json(body); + } + }); }); }; diff --git a/src/mockServer/routes/labExamRequest.js b/src/mockServer/routes/labExamRequest.js new file mode 100644 index 000000000..2136d32fc --- /dev/null +++ b/src/mockServer/routes/labExamRequest.js @@ -0,0 +1,19 @@ +import { examRequestDTO } from "mockServer/fixtures/examRequestDTO"; + +export const labExamRequestRoutes = (server) => { + server.namespace("/laboratories/examRequest", () => { + server.get("/patient/:id").intercept((req, res) => { + res.status(200).json(examRequestDTO); + }); + server.post("/").intercept((req, res) => { + let body = req.jsonBody(); + switch (body.code) { + case "FAIL": + res.status(400).json({ message: "Fail to create lab exam request" }); + break; + default: + res.status(200).json(body); + } + }); + }); +}; diff --git a/src/mockServer/routes/patients.js b/src/mockServer/routes/patients.js index d5b8d44ee..5cfb2b8d6 100644 --- a/src/mockServer/routes/patients.js +++ b/src/mockServer/routes/patients.js @@ -26,10 +26,10 @@ export const patientRoutes = (server) => { res.body = null; break; case "1234563": - res.status(200).json(patientDTOOut); + res.status(200).json({ ...patientDTOOut, code }); break; default: - res.status(200).json(patientDTO); + res.status(200).json({ ...patientDTO, code }); } }); diff --git a/src/mockServer/routes/users.js b/src/mockServer/routes/users.js index 848ccef6f..2863d9d83 100644 --- a/src/mockServer/routes/users.js +++ b/src/mockServer/routes/users.js @@ -1,3 +1,4 @@ +import { dashboardSettingDTO } from "mockServer/fixtures/dashboardSettingDTO"; import permissionList from "../fixtures/permissionList"; import { usersDTO } from "../fixtures/usersDTO"; @@ -25,5 +26,14 @@ export const userRoutes = (server) => { server.put("/").intercept((_req, res) => { res.status(200).json(usersDTO[0]); }); + server.get("/:username/settings/dashboard").intercept((req, res) => { + res.status(200).json(dashboardSettingDTO); + }); + server.put("/settings/:code").intercept((req, res) => { + res.status(200).json(req.body); + }); + server.post("/settings").intercept((req, res) => { + res.status(200).json(req.body); + }); }); }; diff --git a/src/mockServer/routes/wards.js b/src/mockServer/routes/wards.js index 6834e84ed..c692b5d38 100644 --- a/src/mockServer/routes/wards.js +++ b/src/mockServer/routes/wards.js @@ -19,7 +19,7 @@ export const wardsRoutes = (server) => { server.post("/").intercept((req, res) => { const body = req.jsonBody(); switch (body.code) { - case "FAIL": + case "FL": res.status(400).json({ message: "Fail to create ward" }); break; default: @@ -29,7 +29,7 @@ export const wardsRoutes = (server) => { server.put("/").intercept((req, res) => { const body = req.jsonBody(); switch (body.code) { - case "FAIL": + case "FL": res.status(400).json({ message: "Fail to update ward" }); break; default: diff --git a/src/mockServer/server.js b/src/mockServer/server.js index 417d51792..7e20c60e1 100644 --- a/src/mockServer/server.js +++ b/src/mockServer/server.js @@ -1,38 +1,39 @@ import XHRAdapter from "@pollyjs/adapter-xhr"; import { Polly } from "@pollyjs/core"; import { BASE_PATH } from "../generated/runtime"; -import { authRoutes } from "./routes/auth"; -import { examinationsRoutes } from "./routes/examinations"; -import { patientRoutes } from "./routes/patients"; -import { userRoutes } from "./routes/users"; -import { userGroupRoutes } from "./routes/userGroups"; -import { visitRoutes } from "./routes/visits"; -import { opdRoutes } from "./routes/opd"; -import { diseasesRoutes } from "./routes/diseases"; -import { diseaseTypeRoutes } from "./routes/diseaseTypes"; -import { ageTypeRoutes } from "./routes/ageTypes"; -import { therapyRoutes } from "./routes/therapies"; -import { medicalRoutes } from "./routes/medicals"; import { admissionRoutes } from "./routes/admissions"; import { admissionTypesRoutes } from "./routes/admissionTypes"; +import { ageTypeRoutes } from "./routes/ageTypes"; +import { authRoutes } from "./routes/auth"; +import { billRoutes } from "./routes/bill"; +import { deliveryResultTypeRoutes } from "./routes/deliveryResultType"; +import { deliveryTypesRoutes } from "./routes/deliveryTypes"; import { dischargeTypesRoutes } from "./routes/dischargeTypes"; -import { wardsRoutes } from "./routes/wards"; -import { labRoutes } from "./routes/lab"; +import { diseasesRoutes } from "./routes/diseases"; +import { diseaseTypeRoutes } from "./routes/diseaseTypes"; import { examRoutes } from "./routes/exam"; +import { examinationsRoutes } from "./routes/examinations"; import { examRowRoutes } from "./routes/examRow"; import { examTypesRoutes } from "./routes/examTypes"; -import { billRoutes } from "./routes/bill"; -import { pricesRoutes } from "./routes/prices"; -import { operationRoutes } from "./routes/operations"; import { hospitalRoutes } from "./routes/hospital"; +import { labRoutes } from "./routes/lab"; +import { labExamRequestRoutes } from "./routes/labExamRequest"; +import { medicalRoutes } from "./routes/medicals"; +import { medicalTypesRoutes } from "./routes/medicalTypes"; +import { opdRoutes } from "./routes/opd"; +import { operationRoutes } from "./routes/operations"; import { operationTypeRoutes } from "./routes/operationTypes"; +import { patientRoutes } from "./routes/patients"; +import { pregnantTreatmentTypeRoutes } from "./routes/pregnantTreatmentType"; +import { pricesRoutes } from "./routes/prices"; +import { suppliersRoutes } from "./routes/suppliers"; +import { therapyRoutes } from "./routes/therapies"; +import { userGroupRoutes } from "./routes/userGroups"; +import { userRoutes } from "./routes/users"; import { vaccineRoutes } from "./routes/vaccine"; import { vaccineTypesRoutes } from "./routes/vaccineTypes"; -import { deliveryTypesRoutes } from "./routes/deliveryTypes"; -import { suppliersRoutes } from "./routes/suppliers"; -import { medicalTypesRoutes } from "./routes/medicalTypes"; -import { pregnantTreatmentTypeRoutes } from "./routes/pregnantTreatmentType"; -import { deliveryResultTypeRoutes } from "./routes/deliveryResultType"; +import { visitRoutes } from "./routes/visits"; +import { wardsRoutes } from "./routes/wards"; export function makeServer() { Polly.register(XHRAdapter); @@ -76,6 +77,7 @@ export function makeServer() { medicalTypesRoutes(server); pregnantTreatmentTypeRoutes(server); deliveryResultTypeRoutes(server); + labExamRequestRoutes(server); }); return server; } diff --git a/src/resources/i18n/en.json b/src/resources/i18n/en.json index b00fc1119..fe3d978c7 100644 --- a/src/resources/i18n/en.json +++ b/src/resources/i18n/en.json @@ -36,7 +36,8 @@ "validatePasswordTooShort": "Password is too short - should be 5 chars minimum.", "validatePasswordTooWeak": "Please create a stronger password: 1 upper case letter, 1 lower case letter, 1 numeric digit", "validatePasswordMustMatch": "Passwords must match", - "validateUserName": "You need to specify a user name" + "validateUserName": "You need to specify a user name", + "validateUserNameRegex": "Allowed characters: lowercase letters(abc), numbers(123), dot(.), dash (-) and underscore (_)" }, "hospital": { "address": "Address", @@ -46,7 +47,13 @@ "telephone": "Telephone", "fax": "Fax", "email": "Email Address", - "currencyCod": "Currency Code" + "currencyCod": "Currency Code", + "editHospital": "Edit hospital infos", + "updateHospital": "Save changes", + "saveHospital": "Save", + "updated": "Hospital infos updated", + "updateSuccess": "Hospital infos have been updated successfully!", + "discardChanges": "Changes will be lost. Do you want to discard anyway ?" }, "login": { "username": "Username", @@ -832,6 +839,14 @@ "swabs": { "txt": "Swabs" }, "tissues": { "txt": "Tissues" }, "urine": { "txt": "Urine" } + }, + "common": { + "thecodeisalreadyinuse": { + "msg": "The ward code is already in use" + }, + "thecodeistoolongmax1char": { + "msg": "The ward is too long. It should three characters or less" + } } }, "exam": { diff --git a/src/resources/i18n/fr.json b/src/resources/i18n/fr.json index b73819257..df8833f76 100644 --- a/src/resources/i18n/fr.json +++ b/src/resources/i18n/fr.json @@ -9,10 +9,43 @@ "someexamswithoutresultpleasecheck": "Certains examens n'ont pas de résultats. Veuillez vérifier." } }, + "validations": { + "min": "La valeur doit être au moins {{min}}", + "max": "la valeur ne doit pas dépasser {{max}}", + "minLength": "la longueur de la valeur doit être au moins {{min}}", + "maxLength": "la longueur de la valeur ne doit pas dépasser {{max}}", + "email": "La valeur n'est pas une adresse e-mail valide", + "number": "la valeur n'est pas un nombre valide" + }, "user": { + "users": "Utilisateurs", "username": "Nom d'utilisateur", + "group": "Groupe", "groups": "Groupes", - "lastlogin": "Dernière connexion" + "password": "Mot de passe", + "passwordRetype": "Retaper le mot de passe", + "lastlogin": "Dernière connexion", + "description": "Description", + "addUser": "Nouvel utilisateur", + "createdSuccessTitle": "Utilisateur créé", + "createdSuccessMessage": "Utilisateur créé avec succès !", + "validateUserNeedsGroup": "Chaque utilisateur doit appartenir à un groupe", + "validatePasswordNeeded": "Aucun mot de psse fourni", + "validatePasswordTooShort": "Le mot de passe est trop court - il doit comporter au moins 5 caractères", + "validatePasswordTooWeak": "Veuillez créer un mot de passe plus fort : 1 lettre majuscule, 1 lettre minuscule, 1 chiffre", + "validatePasswordMustMatch": "Les mots de passe doivent correspondre", + "validateUserName": "Vous devez spécifier un nom d'utilisateur", + "validateUserNameRegex": "Caractères autorisés : lettres minuscules (abc), chiffres (123), point (.), tiret (-) et trait de soulignement (_)" + }, + "hospital": { + "address": "Adresse", + "city": "Ville", + "code": "Code", + "description": "Description", + "telephone": "Téléphone", + "fax": "Fax", + "email": "Adresse e-mail", + "currencyCod": "Code de devise" }, "login": { "username": "Nom d'utilisateur", @@ -162,7 +195,7 @@ "created": "Patient créé", "updatesuccessful": "Le patient a été modifié avec succès.", "createother": "Ajouter un autre patient", - "status": "Statut" + "status": "État de santé" }, "opd": { "newopd": "Créer une nouvelle visite OPD", @@ -345,7 +378,19 @@ "billrecords": "Registre des factures", "visits": "Visites", "patients": "Patients", - "consultancy": "Consultations" + "consultancy": "Consultations", + "administration": "Administration", + "wards": "Pavillon", + "diseases": "Maladie", + "operations": "Opération", + "vaccines": "Vaccins", + "prices": "Liste de prix", + "suppliers": "Fournisseurs", + "telemetry": "Télémétrie", + "users": "Utilisateurs & Groupes", + "types": "Gérer les types", + "hospitalInfo": "Informations sur l'hôpital", + "hospital": "Hôpital" }, "operation": { "newoperation": "Nouvelle opération", @@ -376,7 +421,23 @@ "success": "Succès", "failure": "échec" }, - "previousentries": "Opérations précédentes" + "previousentries": "Opérations précédentes", + "code": "Code", + "description": "Nom", + "type": "Type", + "class": "Catégorie", + "context": "Contexte", + "classes": { + "major": "Majeur", + "minor": "Mineure" + }, + "addOperation": "Ajouter une opération", + "editOperation": "Modifier l'opération", + "updateOperation": "Mise à jour d'une opération", + "saveOperation": "Sauver l'opération", + "createSuccess": "Opération créé avec succès !", + "updateSuccess": "L'opération {{code}} a été mise à jour avec succès !", + "deleteSuccess": "L'opération {{code}} a été supprimée avec succès !" }, "common": { "ok": "OK", @@ -462,7 +523,20 @@ "expand_all": "Agrandir la visualisation", "remainingchars": "Restant : {{actuel}} / {{max}}", "gohome": "Aller à la page d'accueil", - "gotopatientactivities": "Aller aux activités du patient" + "gotopatientactivities": "Aller aux activités du patient", + "permissionDenied": "Permission refusée - Vous n'avez pas les privilèges requis pour accéder à ce contenu", + "menu": "Menu", + "filter": "Filtre", + "min": "Min", + "max": "Max", + "value": "Valeur", + "true": "Vrai", + "false": "Faux", + "all": "Tous", + "from": "D'où", + "to": "Vers", + "datebefore": "Devrait être avant la date de fin", + "dateafter": "Doit être supérieur à la date de début" }, "permission": { "denied": "Autorisation refusée", @@ -757,6 +831,296 @@ "swabs": { "txt": "Écouvillons" }, "tissues": { "txt": "Tissus" }, "urine": { "txt": "Urine" } + }, + "common": { + "thecodeisalreadyinuse": { + "msg": "Le code du pavillon est déjà utilisé" + }, + "thecodeistoolongmax1char": { + "msg": "Le code est trop long. Il doit contenir trois caractères ou moins" + } } + }, + "exam": { + "code": "Code", + "examtype": "Type d'examen", + "description": "Nom", + "procedure": "Procédure", + "defaultResult": "Valeur par défaut", + "addExam": "Nouvel examen", + "editExam": "Modifier l'examen", + "created": "Examen créé", + "deleted": "Examen supprimé", + "updated": "Examen mis à jour", + "updateSuccess": "Examen mis à jour avec succès", + "createSuccess": "Examen créé avec succès", + "deleteSuccess": "Examen supprimé avec succès", + "updateExam": "Mettre à jour l'examen", + "validateProcedureMinMax": "La valeur ne peut être que 1, 2 ou 3" + }, + "vaccine": { + "code": "Code", + "vaccinetype": "Type de vaccin", + "description": "Nom", + "exams": "Type d'examen", + "addVaccine": "Ajouter un vaccin", + "editVaccine": "Modifier un vaccin", + "updateVaccine": "Mis à jour du vaccin", + "saveVaccine": "Sauver le vaccin", + "updated": "Vaccin mis à jour", + "updateSuccess": "Vaccine {{code}} a été mise à jour avec succès", + "created": "Vaccin creé", + "createSuccess": "Vaccin a été creé avec succès", + "deleted": "Vaccin supprimé", + "deleteSuccess": "Vaccin supprimé avec succès!", + "cancelCreation": "Êtes-vous sûr d’annuler la création du vaccin ?", + "cancelUpdate": "Êtes-vous sûr de vouloir annuler la mise à jour du vaccin ?" + }, + "types": { + "selectAType": "Sélectionnez un type", + "vaccines": "Type de vaccin", + "exams": "Type d'examen", + "admissions": "Types d'admission", + "diseases": "Types de maladies", + "discharges": "Types de décharge", + "deliveries": "Types de livraison", + "operations": "Types d'opération", + "medicals": "Types de médicament", + "chooseATypeToStart": "Choisissez un type pour commencer...", + "pregnantTreatment": "Types de traitement pour enceintes", + "deliveryResultType": "Types de résultats de livraison" + }, + "vaccineTypes": { + "code": "Code", + "description": "Description", + "title": "Gérer les types de vaccins", + "addVaccineType": "Nouveau type de vaccin", + "deleted": "Effacé", + "deleteSuccess": "Le type de vaccin a été supprimé avec succès !", + "saveVaccineTypes": "Sauver", + "editVaccineType": "Modifier le type de vaccin", + "updateVaccineType": "Sauvegarder les modifications", + "created": "Vaccin creé", + "createSuccess": "Le type de vaccin a été créé avec succès!", + "updated": "Type de vaccin mis à jour", + "updateSuccess": "Le type de vaccin a été mis à jour avec succès!", + "cancelCreation": "Êtes-vous sûr d’annuler la création du type de vaccin ?", + "cancelUpdate": "Êtes-vous sûr de vouloir annuler la mise à jour du type de vaccin ?" + }, + "medicalTypes": { + "code": "Code", + "description": "Description", + "title": "Gérer les types de médicament", + "addMedicalType": "Nouveau type médical", + "deleted": "Effacé", + "deleteSuccess": "Le type de médicament a été supprimé avec succès !", + "saveMedicalTypes": "Sauver", + "editMedicalType": "Modifier le type de médicament", + "updateMedicalType": "Sauver les modifications", + "created": "Médicament creé", + "createSuccess": "Le type de médicament a été créé avec succès !", + "updated": "Type de médicament mis à jour", + "updateSuccess": "Le type de médicament a été supprimé avec succès !", + "cancelCreation": "Êtes-vous sûr d'annuler la création du type de médicament?", + "cancelUpdate": "Êtes-vous sûr d'annuler la mise à jour du type de mdicament?" + }, + "dischargeTypes": { + "code": "Code", + "description": "Description", + "title": "Gérer les types de décharge", + "addDischargeType": "Nouveau type de décharge", + "deleted": "Effacé", + "deleteSuccess": "Le type de décharge a été supprimé avec succès !", + "saveDischargeTypes": "Sauver", + "editDischargeType": "Modifier le type de décharge", + "updateDischargeType": "Sauver les modifications", + "created": "Type de décharge créé", + "createSuccess": "Le type de décharge a été creé avec succès !", + "updated": "Type de décharge mis à jour", + "updateSuccess": "Le type de décharge a été mis à jour avec succès!", + "cancelCreation": "Êtes-vous sûr d'annuler la création du type de décharge?", + "cancelUpdate": "Êtes-vous sûr de vouloir annuler la mise à jour du type de décharge?" + }, + "deliveryTypes": { + "code": "Code", + "description": "Description", + "title": "Gérer les types de livraison", + "addDeliveryType": "Nouveau type de livraison", + "deleted": "Effacé", + "deleteSuccess": "Le type de livraison a été supprimé avec succès !", + "saveDeliveryTypes": "Sauver", + "editDeliveryType": "Modifier le type de livraison", + "updateDeliveryType": "Sauver les modifications", + "created": "Type de livraison créé", + "createSuccess": "Le type de livraison a été créé avec succès!", + "updated": "Type de livraison mis à jour", + "updateSuccess": "Le type de livraison a été mis à jour avec succès !", + "cancelCreation": "Êtes-vous sûr d'annuler la création du type de livraison?", + "cancelUpdate": "Êtes-vous sûr d'annuler la mise à jour du type de livraison?" + }, + "admissionTypes": { + "code": "Code", + "description": "Description", + "title": "Gérer les types d'admission", + "addAdmissionType": "Nouveau type d'admission", + "deleted": "Effacé", + "deleteSuccess": "Le type d'admission a été supprimé avec succès !", + "saveAdmissionTypes": "Sauver", + "editAdmissionType": "Mise a jour du type d'admission", + "updateAdmissionType": "Sauver les modifications", + "created": "Type d'admission mis à jour", + "createSuccess": "Le type d'admission a été créé avec succès!", + "updated": "Type d'admission mis à jour", + "updateSuccess": "Le type d'admission a été mis à jour avec succès!", + "cancelCreation": "Êtes-vous sûr d'annuler la création du type d'admission?", + "cancelUpdate": "Êtes-vous sûr d'annuler la mise à jour du type d'admission?" + }, + "diseaseTypes": { + "code": "Code", + "description": "Description", + "title": "Gérer les types de maladies", + "addDiseaseType": "Nouveau type de maladie", + "deleted": "Effacé", + "deleteSuccess": "Le type de maladie a été supprimé avec succès !", + "saveDiseaseTypes": "Sauver", + "editDiseaseType": "Modifier le type de maladie", + "updateDiseaseType": "Sauver les modifications", + "created": "Type de maladie créé", + "createSuccess": "Le type de maladie a été creé avec succès !", + "updated": "Type de maladie mis à jour", + "updateSuccess": "Le type de maladie a été mis à jour avec succès!", + "cancelCreation": "Êtes-vous sûr d'annuler la création du type de maladie?", + "cancelUpdate": "Êtes-vous sûr de vouloir annuler la mise à jour du type de maladie?" + }, + "operationTypes": { + "code": "Code", + "description": "Description", + "title": "Gérer les types d'opération", + "addOperationType": "Nouveau type d'opération", + "deleted": "Effacé", + "deleteSuccess": "Le type d'opération a été supprimé avec succès !", + "saveOperationTypes": "Sauver", + "editOperationType": "Modifier le type d'opération", + "updateOperationType": "Sauver les modifications", + "created": "Type d'opération creé", + "createSuccess": "Le type d'operation a été créé avec succès!", + "updated": "Type d'opération mise à jour", + "updateSuccess": "Le type d'operation a été créé avec succès!", + "cancelCreation": "Êtes-vous sûr d'annuler la création du type d'operation?", + "cancelUpdate": "Êtes-vous sûr d'annuler la mise à jour du type d'opération?" + }, + "supplier": { + "id": "Fournisseurs ID", + "name": "Nom", + "address": "Adresse", + "taxcode": "NID", + "phone": "Téléphone", + "fax": "Fax", + "email": "Adresse e-mail", + "note": "Remarque", + "addNewSupplier": "Ajouter un nouveau fournisseur", + "editSupplier": "Modifier le fournisseur", + "updateSupplier": "Sauver les modifications", + "saveSupplier": "Sauver", + "addSupplier": "Nouveau fournisseur", + "updated": "Fournisseur mis à jour", + "updateSuccess": "Fournisseur mis à jour avec succès !", + "created": "Fournisseur creé", + "createSuccess": "Fournisseur creé avec succès !" + }, + "ward": { + "code": "Code", + "description": "Description", + "beds": "Lits", + "nurs": "Infirmières", + "docs": "Médecins", + "pharmacy": "Pharmacie", + "male": "Mâle", + "female": "Femelle", + "telephone": "Téléphone", + "fax": "Fax", + "opd": "OPD", + "email": "Adresse e-mail", + "visitDuration": "Durée de la visite", + "addWard": "Ajouter service hospitalier", + "editWard": "Modifier service hospitalier", + "updateWard": "Modifier service hospitalier", + "saveWard": "Sauver service hospitalier", + "created": "Service hospitalier creé", + "updated": "Service hospitalier mis à jour", + "deleted": "Service hospitalier supprimé", + "createSuccess": "Service hospitalier a été creé avec succès", + "updateSuccess": "Service hospitalier {{code}} a été mise à jour avec succès", + "deleteSuccess": "Service hospitalier {{code}} a été supprimé avec succès" + }, + "disease": { + "code": "Code", + "name": "Nom", + "diseaseType": "Type", + "opdInclude": "OPD", + "ipdInInclude": "IP In", + "ipdOutInclude": "IP Out", + "addDisease": "Ajouter la maladie", + "editDisease": "Modifier la maladie", + "updateDisease": "Modifier la maladie", + "saveDisease": "Sauver la maladie", + "created": "Maladie creé", + "updated": "Maladie mis à jour", + "createSuccess": "Maladie créé avec succès !", + "updateSuccess": "La maladie {{code}} a été mise à jour avec succès !", + "enabled": "Activé", + "disabled": "Désactivé", + "all": "Toutes le maladies" + }, + "pregnantTreatmentTypes": { + "code": "Code", + "description": "Description", + "title": "Gérer les types de traitement pour enceintes", + "addPregnantTreatmentType": "Nouveau type de traitement pour enceintes", + "deleted": "Effacé", + "deleteSuccess": "Le type de traitement enceinte a été supprimé avec succès !", + "savePregnantTreatmentTypes": "Sauver", + "editPregnantTreatmentType": "Modifier type de traitement pour enceintes", + "updatePregnantTreatmentType": "Sauver les modifications", + "created": "Type de traitement enceinte creé", + "createSuccess": "Le type de traitement enceinte a été creé avec succès !", + "updated": "Type de traitement enceinte mis à jour", + "updateSuccess": "Le type de traitement enceinte a été mis à jour avec succès !", + "cancelCreation": "Êtes-vous sûr d'annuler la création du type du traitement enceinte?", + "cancelUpdate": "Êtes-vous sûr d'annuler la mis à jour du type du traitement enceinte?" + }, + "deliveryResultType": { + "code": "Code", + "description": "Description", + "title": "Gérer les types de résultat de livraison", + "addDeliveryResultType": "Nouveau type de résultat de livraison", + "deleted": "Effacé", + "deleteSuccess": "Le type de résultat de livraison a été supprimé avec succès!", + "saveDeliveryResultTypes": "Sauver", + "editDeliveryResultType": "Modifier le type de livraison", + "updateDeliveryResultType": "Sauver les modifications", + "created": "Résultat de livraison creé", + "createSuccess": "Le type de résultat de livraison a été créé avec succès!", + "updated": "Type de résultat de livraison mis à jour", + "updateSuccess": "Le type de résultat de livraison a été mis à jour avec succès !", + "cancelCreation": "Êtes-vous sûr d’annuler la création du type de résultat de livraison ?", + "cancelUpdate": "Êtes-vous sûr de vouloir annuler la mise à jour du type de résultat de livraison ?" + }, + "examTypes": { + "code": "Code", + "description": "Description", + "title": "Gérer les types d'examen", + "addExamType": "Nouveau type d'examen", + "deleted": "Effacé", + "deleteSuccess": "Le type d'examen a été supprimé avec succès !", + "saveExamTypes": "Sauver", + "editExamType": "Modifier le type d'examen", + "updateExamType": "Sauver les modifications", + "created": "Type d'examen créé", + "createSuccess": "Le type d'examen a été créé avec succès !", + "updated": "Type d'examen mis à jour", + "updateSuccess": "Le type d'examen a été mis à jour avec succès !", + "cancelCreation": "Êtes-vous sûr d'annuler la création du type d'examen?", + "cancelUpdate": "Êtes-vous sûr d'annuler la mise à jour du type d'examen?" } } diff --git a/src/routes/Admin/AdminRoutes.tsx b/src/routes/Admin/AdminRoutes.tsx index c3ac713e8..fb6bdfa8d 100644 --- a/src/routes/Admin/AdminRoutes.tsx +++ b/src/routes/Admin/AdminRoutes.tsx @@ -1,3 +1,4 @@ +import { EditHospital } from "components/accessories/admin/hospital"; import React, { ReactNode, useMemo } from "react"; import { useTranslation } from "react-i18next"; import { Navigate, Route, Routes } from "react-router"; @@ -6,7 +7,11 @@ import { EditDisease, NewDisease, } from "../../components/accessories/admin/diseases"; -import { EditExam, Exams, NewExam } from "../../components/accessories/admin/exams"; +import { + EditExam, + Exams, + NewExam, +} from "../../components/accessories/admin/exams"; import { EditOperation, NewOperation, @@ -100,13 +105,19 @@ export const AdminRoutes = () => { { path: getPath(PATHS.admin_exams_new), element: ( - } /> + } + /> ), }, { path: getPath(PATHS.admin_exams_edit), element: ( - } /> + } + /> ), }, { @@ -216,6 +227,15 @@ export const AdminRoutes = () => { /> ), }, + { + path: getPath(PATHS.admin_hospital_edit), + element: ( + } + /> + ), + }, ], [t] ); diff --git a/src/routes/MainRouter.tsx b/src/routes/MainRouter.tsx index 4b9759656..475b82bef 100644 --- a/src/routes/MainRouter.tsx +++ b/src/routes/MainRouter.tsx @@ -24,7 +24,7 @@ export const MainRouter: React.FC = () => { if (status === "SUCCESS") { dispatch(getUserSettings()); } - }, [status]); + }, [dispatch, status]); const RequiredAdminAccess = withPermission( "admin.access", diff --git a/src/state/admissions/slice.ts b/src/state/admissions/slice.ts index ad3c30b4c..20fb21690 100644 --- a/src/state/admissions/slice.ts +++ b/src/state/admissions/slice.ts @@ -1,8 +1,8 @@ import { createSlice } from "@reduxjs/toolkit"; +import { isEmpty } from "lodash"; +import { ApiResponse } from "state/types"; import { initial } from "./initial"; import * as thunks from "./thunk"; -import { ApiResponse } from "state/types"; -import { isEmpty } from "lodash"; export const admissionSlice = createSlice({ name: "admissions", @@ -17,6 +17,9 @@ export const admissionSlice = createSlice({ dischargePatientReset: (state) => { state.dischargePatient = initial.dischargePatient; }, + getCurrentAdmissionReset: (state) => { + state.currentAdmissionByPatientId = initial.currentAdmissionByPatientId; + }, }, extraReducers: (builder) => builder @@ -55,7 +58,7 @@ export const admissionSlice = createSlice({ state.getAdmissions = ApiResponse.loading(); }) .addCase(thunks.getAdmissions.fulfilled, (state, action) => { - state.getAdmissions.status = isEmpty(action.payload.data) + state.getAdmissions.status = isEmpty(action.payload?.data) ? "SUCCESS_EMPTY" : "SUCCESS"; state.getAdmissions.data = action.payload; @@ -68,7 +71,7 @@ export const admissionSlice = createSlice({ state.getDischarges = ApiResponse.loading(); }) .addCase(thunks.getDischarges.fulfilled, (state, action) => { - state.getDischarges.status = isEmpty(action.payload.data) + state.getDischarges.status = isEmpty(action.payload?.data) ? "SUCCESS_EMPTY" : "SUCCESS"; state.getDischarges.data = action.payload; @@ -82,7 +85,8 @@ export const admissionSlice = createSlice({ }) .addCase(thunks.getPatientAdmissions.fulfilled, (state, action) => { state.getPatientAdmissions = isEmpty(action.payload) - ? ApiResponse.empty() : ApiResponse.value(action.payload); + ? ApiResponse.empty() + : ApiResponse.value(action.payload); }) .addCase(thunks.getPatientAdmissions.rejected, (state, action) => { state.getPatientAdmissions = ApiResponse.error(action.payload); @@ -93,7 +97,8 @@ export const admissionSlice = createSlice({ }) .addCase(thunks.getAdmittedPatients.fulfilled, (state, action) => { state.getAdmittedPatients = isEmpty(action.payload) - ? ApiResponse.empty() : ApiResponse.value(action.payload); + ? ApiResponse.empty() + : ApiResponse.value(action.payload); }) .addCase(thunks.getAdmittedPatients.rejected, (state, action) => { state.getAdmittedPatients = ApiResponse.error(action.payload); @@ -114,4 +119,5 @@ export const { createAdmissionReset, updateAdmissionReset, dischargePatientReset, + getCurrentAdmissionReset, } = admissionSlice.actions; diff --git a/src/state/hospital/initial.ts b/src/state/hospital/initial.ts index 83501116d..afff62c89 100644 --- a/src/state/hospital/initial.ts +++ b/src/state/hospital/initial.ts @@ -1,6 +1,7 @@ -import { IHospitalState } from "./types"; import { ApiResponse } from "../types"; +import { IHospitalState } from "./types"; export const initial: IHospitalState = { getHospital: new ApiResponse({ status: "IDLE" }), + updateHospital: new ApiResponse({ status: "IDLE" }), }; diff --git a/src/state/hospital/slice.ts b/src/state/hospital/slice.ts index 31306fa90..b011df253 100644 --- a/src/state/hospital/slice.ts +++ b/src/state/hospital/slice.ts @@ -6,7 +6,11 @@ import * as thunks from "./thunk"; export const hospitalSlice = createSlice({ name: "hospitals", initialState: initial, - reducers: {}, + reducers: { + updateHospitalReset: (state) => { + state.updateHospital = initial.updateHospital; + }, + }, extraReducers: (builder) => builder // Get Hospital @@ -18,5 +22,19 @@ export const hospitalSlice = createSlice({ }) .addCase(thunks.getHospital.rejected, (state, action) => { state.getHospital = ApiResponse.error(action.payload); + }) + // Update Hospital + .addCase(thunks.updateHospital.pending, (state) => { + state.updateHospital = ApiResponse.loading(); + }) + .addCase(thunks.updateHospital.fulfilled, (state, action) => { + state.updateHospital = state.getHospital = ApiResponse.value( + action.payload + ); + }) + .addCase(thunks.updateHospital.rejected, (state, action) => { + state.updateHospital = ApiResponse.error(action.payload); }), }); + +export const { updateHospitalReset } = hospitalSlice.actions; diff --git a/src/state/hospital/thunk.ts b/src/state/hospital/thunk.ts index b16279824..5bc077173 100644 --- a/src/state/hospital/thunk.ts +++ b/src/state/hospital/thunk.ts @@ -1,9 +1,11 @@ import { createAsyncThunk } from "@reduxjs/toolkit"; -import { HospitalsApi } from "../../generated"; +import { HospitalDTO, HospitalsApi } from "../../generated"; import { customConfiguration } from "../../libraries/apiUtils/configuration"; const api = new HospitalsApi(customConfiguration(false)); +const securedApi = new HospitalsApi(customConfiguration()); + export const getHospital = createAsyncThunk( "hospitals/getHospital", async (_, thunkApi) => @@ -12,3 +14,12 @@ export const getHospital = createAsyncThunk( .toPromise() .catch((error) => thunkApi.rejectWithValue(error.response)) ); + +export const updateHospital = createAsyncThunk( + "hospitals/updateHospital", + async (payload: { code: string; hospitalDTO: HospitalDTO }, thunkApi) => + securedApi + .updateHospital(payload) + .toPromise() + .catch((error) => thunkApi.rejectWithValue(error.response)) +); diff --git a/src/state/hospital/types.ts b/src/state/hospital/types.ts index a3e5810fe..0b0f26c78 100644 --- a/src/state/hospital/types.ts +++ b/src/state/hospital/types.ts @@ -3,4 +3,5 @@ import { ApiResponse } from "../types"; export type IHospitalState = { getHospital: ApiResponse; + updateHospital: ApiResponse; }; diff --git a/src/state/laboratories/slice.ts b/src/state/laboratories/slice.ts index 7ab25443c..fdb62fc1d 100644 --- a/src/state/laboratories/slice.ts +++ b/src/state/laboratories/slice.ts @@ -1,8 +1,8 @@ import { createSlice } from "@reduxjs/toolkit"; +import { isEmpty } from "lodash"; +import { ApiResponse } from "state/types"; import { initial } from "./initial"; import * as thunks from "./thunk"; -import { ApiResponse } from "state/types"; -import { isEmpty } from "lodash"; export const laboratorySlice = createSlice({ name: "laboratories", @@ -46,8 +46,7 @@ export const laboratorySlice = createSlice({ state.searchLabs = ApiResponse.loading(); }) .addCase(thunks.searchLabs.fulfilled, (state, action) => { - state.searchLabs = - ApiResponse.value(action.payload); + state.searchLabs = ApiResponse.value(action.payload); }) .addCase(thunks.searchLabs.rejected, (state, action) => { state.searchLabs = ApiResponse.error(action.payload); @@ -65,6 +64,19 @@ export const laboratorySlice = createSlice({ .addCase(thunks.getLabsByPatientId.rejected, (state, action) => { state.labsByPatientId = ApiResponse.error(action.payload); }) + // Get Lab Requests By Patient ID + .addCase(thunks.getLabsRequestByPatientId.pending, (state) => { + state.labsRequestByPatientId = ApiResponse.loading(); + }) + .addCase(thunks.getLabsRequestByPatientId.fulfilled, (state, action) => { + state.labsRequestByPatientId.status = isEmpty(action.payload) + ? "SUCCESS_EMPTY" + : "SUCCESS"; + state.labsRequestByPatientId.data = action.payload as any; + }) + .addCase(thunks.getLabsRequestByPatientId.rejected, (state, action) => { + state.labsRequestByPatientId = ApiResponse.error(action.payload); + }) // Get Lab By Code .addCase(thunks.getLabByCode.pending, (state) => { state.getLabByCode = ApiResponse.loading(); diff --git a/src/state/laboratories/thunk.ts b/src/state/laboratories/thunk.ts index 65f4ea7d5..782a34eab 100644 --- a/src/state/laboratories/thunk.ts +++ b/src/state/laboratories/thunk.ts @@ -35,7 +35,7 @@ export const getLabsByPatientId = createAsyncThunk( .getLaboratory1({ patId: patId ?? -1 }) .toPromise() .then((result) => - result.map((item) => + (result ?? []).map((item) => item.laboratoryDTO ? item : { laboratoryDTO: item } ) ) diff --git a/src/state/layouts/slice.ts b/src/state/layouts/slice.ts index a047a42fa..91f6ec170 100644 --- a/src/state/layouts/slice.ts +++ b/src/state/layouts/slice.ts @@ -1,14 +1,14 @@ import { PayloadAction, createSlice } from "@reduxjs/toolkit"; -import { initial } from "./initial"; -import * as thunks from "./thunk"; -import { ApiResponse } from "state/types"; import { isEmpty } from "lodash"; import { Layouts } from "react-grid-layout"; +import { ApiResponse } from "state/types"; import { decodeLayoutConfig, encodeLayout, toolboxDashboards, } from "../../components/accessories/dashboard/layouts/consts"; +import { initial } from "./initial"; +import * as thunks from "./thunk"; export const layoutSlice = createSlice({ name: "layouts", @@ -72,6 +72,9 @@ export const layoutSlice = createSlice({ ...payload, configValue: encodeLayout({ layout, toolbox }), }; + + state.layouts = layout; + state.toolbox = toolbox; }) .addCase(thunks.getLayouts.rejected, (state, action) => { state.getLayouts = ApiResponse.error(action.payload); diff --git a/src/state/layouts/thunk.ts b/src/state/layouts/thunk.ts index 024b1dbdd..e4062d5a6 100644 --- a/src/state/layouts/thunk.ts +++ b/src/state/layouts/thunk.ts @@ -1,15 +1,15 @@ import { createAsyncThunk } from "@reduxjs/toolkit"; -import { UserSettingDTO, UsersApi } from "../../generated"; -import { customConfiguration } from "../../libraries/apiUtils/configuration"; import { decodeLayoutConfig } from "../../components/accessories/dashboard/layouts/consts"; +import { UserSettingDTO, UserSettingsApi } from "../../generated"; +import { customConfiguration } from "../../libraries/apiUtils/configuration"; -const api = new UsersApi(customConfiguration()); +const api = new UserSettingsApi(customConfiguration()); export const getLayouts = createAsyncThunk( "layouts/getLayouts", async (userName: string, thunkApi) => api - .getUserSettingByUser({ configName: "dashboard", userName }) + .getUserSettingByUser({ configName: "dashboard" }) .toPromise() .catch((error) => thunkApi.rejectWithValue(error.response)) ); diff --git a/src/state/main/thunk.ts b/src/state/main/thunk.ts index a1ba1644b..04f5b85e9 100644 --- a/src/state/main/thunk.ts +++ b/src/state/main/thunk.ts @@ -1,23 +1,24 @@ -import { Dispatch, createAsyncThunk } from "@reduxjs/toolkit"; -import { LoginApi, UsersApi } from "../../generated"; -import { customConfiguration } from "../../libraries/apiUtils/configuration"; +import { createAsyncThunk, Dispatch } from "@reduxjs/toolkit"; import { concat } from "rxjs"; import { tap, toArray } from "rxjs/operators"; +import { LoginApi, UsersApi, UserSettingsApi } from "../../generated"; +import { customConfiguration } from "../../libraries/apiUtils/configuration"; import { saveAuthenticationDataToSession } from "../../libraries/authUtils/saveAuthenticationDataToSession"; import { savePermissionDataToSession } from "../../libraries/authUtils/savePermissionDataToSession"; import { SessionStorage } from "../../libraries/storage/storage"; -import { IAction } from "../types"; -import { setLogoutFailed, setLogoutLoading, setLogoutSuccess } from "./slice"; -import { getPatientsReset, searchPatientsReset } from "../patients"; import { getLabsReset, searchLabsReset } from "../laboratories"; import { getOpdsReset } from "../opds"; import { getOperationsByAdmissionReset, getOperationsReset, } from "../operations"; +import { getPatientsReset, searchPatientsReset } from "../patients"; +import { IAction } from "../types"; +import { setLogoutFailed, setLogoutLoading, setLogoutSuccess } from "./slice"; const loginApi = new LoginApi(customConfiguration(false)); const usersApi = new UsersApi(customConfiguration()); +const userSettingsApi = new UserSettingsApi(customConfiguration()); export const setAuthentication = createAsyncThunk( "main/getLayouts", @@ -71,7 +72,7 @@ export const setForgotPasswordThunk = createAsyncThunk( export const getUserSettings = createAsyncThunk( "main/getUserSettings", async (_, thunkApi) => - usersApi + userSettingsApi .getUserSettings() .toPromise() .catch((error) => thunkApi.rejectWithValue(error.response)) diff --git a/src/state/opds/thunk.ts b/src/state/opds/thunk.ts index 32676eb3a..20843e630 100644 --- a/src/state/opds/thunk.ts +++ b/src/state/opds/thunk.ts @@ -1,4 +1,6 @@ import { createAsyncThunk } from "@reduxjs/toolkit"; +import { isEmpty } from "lodash"; +import moment from "moment"; import { OpdDTO, OpdWithOperationRowDTO, @@ -6,8 +8,6 @@ import { UpdateOpdWithOperationRowRequest, } from "../../generated"; import { customConfiguration } from "../../libraries/apiUtils/configuration"; -import { isEmpty } from "lodash"; -import moment from "moment"; const api = new OpdsApi(customConfiguration()); @@ -31,7 +31,7 @@ export const getOpdsWithOperationRows = createAsyncThunk( }) .toPromise() .then((result) => - result.map((item) => + (result ?? []).map((item) => item.opdDTO ? item : ({ opdDTO: item } as OpdWithOperationRowDTO) ) ) diff --git a/src/state/patients/thunk.ts b/src/state/patients/thunk.ts index 4644b52e6..3e759204c 100644 --- a/src/state/patients/thunk.ts +++ b/src/state/patients/thunk.ts @@ -1,8 +1,8 @@ import { createAsyncThunk } from "@reduxjs/toolkit"; -import { PatientDTO, PatientsApi, UpdatePatientRequest } from "../../generated"; -import { customConfiguration } from "../../libraries/apiUtils/configuration"; import moment from "moment"; import { TValues } from "../../components/activities/searchPatientActivity/types"; +import { PatientDTO, PatientsApi, UpdatePatientRequest } from "../../generated"; +import { customConfiguration } from "../../libraries/apiUtils/configuration"; const api = new PatientsApi(customConfiguration()); @@ -13,7 +13,7 @@ export const searchPatient = createAsyncThunk( return api .getPatient({ code: parseInt(values.id) }) .toPromise() - .then((result) => [result]) + .then((result) => (result ? [result] : [])) .catch((error) => thunkApi.rejectWithValue(error.response)); } return api diff --git a/src/state/usergroups/thunk.ts b/src/state/usergroups/thunk.ts index 395307ade..eecb2b27a 100644 --- a/src/state/usergroups/thunk.ts +++ b/src/state/usergroups/thunk.ts @@ -1,14 +1,14 @@ import { createAsyncThunk } from "@reduxjs/toolkit"; -import { UserGroupDTO, UsersApi } from "../../generated"; +import { UserGroupDTO, UserGroupsApi } from "../../generated"; import { customConfiguration } from "../../libraries/apiUtils/configuration"; -const api = new UsersApi(customConfiguration()); +const api = new UserGroupsApi(customConfiguration()); export const getUserGroups = createAsyncThunk( "userGroups/getUserGroups", async (_, thunkApi) => api - .getUserGroup() + .getUserGroups() .toPromise() .catch((error) => thunkApi.rejectWithValue(error.response)) ); @@ -27,7 +27,7 @@ export const updateUserGroup = createAsyncThunk( "userGroups/updateUserGroup", async (userGroupDTO: UserGroupDTO, thunkApi) => api - .updateUserGroup({ userGroupDTO }) + .updateUserGroup({ groupCode: userGroupDTO.code, userGroupDTO }) .toPromise() .then(() => userGroupDTO) .catch((error) => thunkApi.rejectWithValue(error.response)) diff --git a/src/state/users/thunk.ts b/src/state/users/thunk.ts index 9e0e78ee2..e0da1fb36 100644 --- a/src/state/users/thunk.ts +++ b/src/state/users/thunk.ts @@ -27,7 +27,7 @@ export const updateUser = createAsyncThunk( "users/updateUser", async (userDTO: UserDTO, thunkApi) => api - .updateUser({ userDTO }) + .updateUser({ username: userDTO.userName, userDTO }) .toPromise() .then(() => userDTO) .catch((error) => thunkApi.rejectWithValue(error.response)) diff --git a/src/styles/index.scss b/src/styles/index.scss index e0d627f65..5d0229f6f 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -9,7 +9,7 @@ .App { & > div { - height: 100vh; + min-height: 100vh; } [class*="Form"],