diff --git a/api/oh.yaml b/api/oh.yaml index 5f67ee97e..ad88fc5b2 100644 --- a/api/oh.yaml +++ b/api/oh.yaml @@ -9,14 +9,14 @@ info: 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": @@ -28,10 +28,10 @@ paths: items: $ref: "#/components/schemas/WardDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Wards + - Wards operationId: updateWard requestBody: content: @@ -47,10 +47,10 @@ paths: schema: $ref: "#/components/schemas/WardDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Wards + - Wards operationId: newWard requestBody: content: @@ -66,19 +66,19 @@ paths: 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: @@ -93,11 +93,11 @@ paths: schema: $ref: "#/components/schemas/VisitDTO" security: - - bearerAuth: [] + - bearerAuth: [] /vaccinetypes: get: tags: - - Vaccine Type + - Vaccine Type operationId: getVaccineType responses: "200": @@ -109,10 +109,10 @@ paths: items: $ref: "#/components/schemas/VaccineTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Vaccine Type + - Vaccine Type operationId: updateVaccineType requestBody: content: @@ -128,10 +128,10 @@ paths: schema: $ref: "#/components/schemas/VaccineTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Vaccine Type + - Vaccine Type operationId: newVaccineType requestBody: content: @@ -147,11 +147,11 @@ paths: schema: $ref: "#/components/schemas/VaccineTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] /vaccines: get: tags: - - Vaccines + - Vaccines operationId: getVaccines responses: "200": @@ -163,10 +163,10 @@ paths: items: $ref: "#/components/schemas/VaccineDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Vaccines + - Vaccines operationId: updateVaccine requestBody: content: @@ -182,10 +182,10 @@ paths: schema: $ref: "#/components/schemas/VaccineDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Vaccines + - Vaccines operationId: newVaccine requestBody: content: @@ -201,19 +201,19 @@ paths: schema: $ref: "#/components/schemas/VaccineDTO" security: - - bearerAuth: [] + - bearerAuth: [] /usersettings/{id}: put: tags: - - User Settings + - User Settings operationId: updateUserSettings 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: @@ -228,34 +228,34 @@ paths: schema: $ref: "#/components/schemas/UserSettingDTO" security: - - bearerAuth: [] + - bearerAuth: [] delete: tags: - - User Settings + - User Settings operationId: deleteUserSetting parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int32 + - name: id + in: path + required: true + schema: + type: integer + format: int32 responses: "204": description: No Content security: - - bearerAuth: [] + - bearerAuth: [] /users/{username}: get: tags: - - Users + - Users operationId: getUserByName parameters: - - name: username - in: path - required: true - schema: - type: string + - name: username + in: path + required: true + schema: + type: string responses: "200": description: OK @@ -264,17 +264,17 @@ paths: schema: $ref: "#/components/schemas/UserDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Users + - Users operationId: updateUser parameters: - - name: username - in: path - required: true - schema: - type: string + - name: username + in: path + required: true + schema: + type: string requestBody: content: application/json: @@ -289,26 +289,26 @@ paths: schema: $ref: "#/components/schemas/UserDTO" security: - - bearerAuth: [] + - bearerAuth: [] delete: tags: - - Users + - Users operationId: deleteUser parameters: - - name: username - in: path - required: true - schema: - type: string + - name: username + in: path + required: true + schema: + type: string responses: "204": description: No Content security: - - bearerAuth: [] + - bearerAuth: [] /users/me: get: tags: - - Users + - Users operationId: retrieveProfileByCurrentLoggedInUser responses: "200": @@ -318,10 +318,10 @@ paths: schema: $ref: "#/components/schemas/UserProfileDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Users + - Users operationId: updateProfile requestBody: content: @@ -337,18 +337,18 @@ paths: schema: $ref: "#/components/schemas/UserProfileDTO" security: - - bearerAuth: [] + - bearerAuth: [] /usergroups/{group_code}: get: tags: - - User Groups + - User Groups operationId: getUserGroup parameters: - - name: group_code - in: path - required: true - schema: - type: string + - name: group_code + in: path + required: true + schema: + type: string responses: "200": description: OK @@ -357,17 +357,17 @@ paths: schema: $ref: "#/components/schemas/UserGroupDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - User Groups + - User Groups operationId: updateUserGroup parameters: - - name: group_code - in: path - required: true - schema: - type: string + - name: group_code + in: path + required: true + schema: + type: string requestBody: content: application/json: @@ -382,33 +382,33 @@ paths: schema: $ref: "#/components/schemas/UserGroupDTO" security: - - bearerAuth: [] + - bearerAuth: [] delete: tags: - - User Groups + - User Groups operationId: deleteGroup parameters: - - name: group_code - in: path - required: true - schema: - type: string + - name: group_code + in: path + required: true + schema: + type: string responses: "204": description: No Content security: - - bearerAuth: [] + - bearerAuth: [] /usergroups/{group_code}/permissions: put: tags: - - User Groups + - User Groups operationId: updateGroupPermissions parameters: - - name: group_code - in: path - required: true - schema: - type: string + - name: group_code + in: path + required: true + schema: + type: string requestBody: content: application/json: @@ -425,17 +425,17 @@ paths: items: $ref: "#/components/schemas/PermissionDTO" security: - - bearerAuth: [] + - bearerAuth: [] patch: tags: - - User Groups + - User Groups operationId: replaceGroupPermissions parameters: - - name: group_code - in: path - required: true - schema: - type: string + - name: group_code + in: path + required: true + schema: + type: string requestBody: content: application/json: @@ -452,19 +452,19 @@ paths: items: $ref: "#/components/schemas/PermissionDTO" 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": description: OK @@ -475,10 +475,10 @@ paths: items: $ref: "#/components/schemas/SupplierDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Suppliers + - Suppliers operationId: updateSupplier requestBody: content: @@ -494,10 +494,10 @@ paths: schema: $ref: "#/components/schemas/SupplierDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Suppliers + - Suppliers operationId: saveSupplier requestBody: content: @@ -513,19 +513,19 @@ paths: 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: @@ -540,18 +540,18 @@ paths: 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": description: OK @@ -560,19 +560,19 @@ paths: 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: @@ -587,18 +587,18 @@ paths: 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": description: OK @@ -607,18 +607,18 @@ paths: 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: @@ -633,17 +633,17 @@ paths: 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 + - name: code + in: path + required: true + schema: + type: string responses: "200": description: OK @@ -652,19 +652,19 @@ paths: 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: @@ -679,18 +679,18 @@ paths: 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": description: OK @@ -699,19 +699,19 @@ paths: 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": description: OK @@ -720,18 +720,18 @@ paths: 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: @@ -746,18 +746,18 @@ paths: 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": description: OK @@ -766,19 +766,19 @@ paths: 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": description: OK @@ -787,18 +787,18 @@ paths: 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: @@ -813,18 +813,18 @@ paths: 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: @@ -839,17 +839,17 @@ paths: 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": description: OK @@ -858,18 +858,18 @@ paths: 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": description: OK @@ -878,17 +878,17 @@ paths: 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: @@ -903,17 +903,17 @@ paths: 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": description: OK @@ -922,11 +922,11 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /operations/rows: put: tags: - - Operations + - Operations operationId: updateOperationRow requestBody: content: @@ -943,10 +943,10 @@ paths: type: integer format: int32 security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Operations + - Operations operationId: newOperationRow requestBody: content: @@ -962,19 +962,19 @@ paths: 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: @@ -989,18 +989,18 @@ paths: 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": description: OK @@ -1009,19 +1009,19 @@ paths: 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: @@ -1036,11 +1036,11 @@ paths: schema: $ref: "#/components/schemas/OpdWithOperationRowDTO" security: - - bearerAuth: [] + - bearerAuth: [] /medstockmovementtypes: get: tags: - - Medical Stock Movement Type + - Medical Stock Movement Type operationId: getMedicalDsrStockMovementType responses: "200": @@ -1052,10 +1052,10 @@ paths: items: $ref: "#/components/schemas/MovementTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Medical Stock Movement Type + - Medical Stock Movement Type operationId: updateMedicalDsrStockMovementType requestBody: content: @@ -1071,10 +1071,10 @@ paths: schema: $ref: "#/components/schemas/MovementTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Medical Stock Movement Type + - Medical Stock Movement Type operationId: newMedicalDsrStockMovementType requestBody: content: @@ -1090,11 +1090,11 @@ paths: schema: $ref: "#/components/schemas/MovementTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] /medicaltypes: get: tags: - - Medical Types + - Medical Types operationId: getMedicalTypes responses: "200": @@ -1106,10 +1106,10 @@ paths: items: $ref: "#/components/schemas/MedicalTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Medical Types + - Medical Types operationId: updateMedicalType requestBody: content: @@ -1125,10 +1125,10 @@ paths: schema: $ref: "#/components/schemas/MedicalTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Medical Types + - Medical Types operationId: createMedicalType requestBody: content: @@ -1144,22 +1144,22 @@ paths: 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": description: OK @@ -1170,18 +1170,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: @@ -1196,18 +1196,18 @@ paths: 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: @@ -1222,11 +1222,11 @@ paths: schema: $ref: "#/components/schemas/MedicalDTO" security: - - bearerAuth: [] + - bearerAuth: [] /malnutritions: put: tags: - - Malnutritions + - Malnutritions operationId: updateMalnutrition requestBody: content: @@ -1242,10 +1242,10 @@ paths: schema: $ref: "#/components/schemas/MalnutritionDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Malnutritions + - Malnutritions operationId: newMalnutrition requestBody: content: @@ -1261,18 +1261,18 @@ paths: 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": description: OK @@ -1281,19 +1281,19 @@ paths: 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": description: OK @@ -1302,18 +1302,18 @@ paths: 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: @@ -1328,18 +1328,18 @@ paths: 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": description: OK @@ -1348,24 +1348,24 @@ paths: 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": description: OK @@ -1374,18 +1374,18 @@ paths: 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": description: OK @@ -1394,18 +1394,18 @@ paths: 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: @@ -1420,18 +1420,18 @@ paths: 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: @@ -1446,17 +1446,17 @@ paths: 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": description: OK @@ -1465,18 +1465,18 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /exams/{code}: put: tags: - - Exams + - Exams operationId: updateExam parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string requestBody: content: application/json: @@ -1491,17 +1491,17 @@ paths: 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": description: OK @@ -1510,19 +1510,19 @@ paths: 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": description: OK @@ -1531,18 +1531,18 @@ paths: 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: @@ -1557,11 +1557,11 @@ paths: schema: $ref: "#/components/schemas/PatientExaminationDTO" security: - - bearerAuth: [] + - bearerAuth: [] /diseasetypes: get: tags: - - Disease Types + - Disease Types operationId: getAllDiseaseTypes responses: "200": @@ -1573,10 +1573,10 @@ paths: items: $ref: "#/components/schemas/DiseaseTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Disease Types + - Disease Types operationId: updateDiseaseType requestBody: content: @@ -1592,10 +1592,10 @@ paths: schema: $ref: "#/components/schemas/DiseaseTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Disease Types + - Disease Types operationId: newDiseaseType requestBody: content: @@ -1611,11 +1611,11 @@ paths: schema: $ref: "#/components/schemas/DiseaseTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] /diseases: put: tags: - - Diseases + - Diseases operationId: updateDisease requestBody: content: @@ -1631,10 +1631,10 @@ paths: schema: $ref: "#/components/schemas/DiseaseDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Diseases + - Diseases operationId: newDisease requestBody: content: @@ -1650,11 +1650,11 @@ paths: schema: $ref: "#/components/schemas/DiseaseDTO" security: - - bearerAuth: [] + - bearerAuth: [] /dischargetypes: get: tags: - - DischargeType + - DischargeType operationId: getDischargeTypes responses: "200": @@ -1666,10 +1666,10 @@ paths: items: $ref: "#/components/schemas/DischargeTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - DischargeType + - DischargeType operationId: updateDischargeType requestBody: content: @@ -1685,10 +1685,10 @@ paths: schema: $ref: "#/components/schemas/DischargeTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - DischargeType + - DischargeType operationId: newDischargeType requestBody: content: @@ -1704,11 +1704,11 @@ paths: schema: $ref: "#/components/schemas/DischargeTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] /deliverytypes: get: tags: - - Delivery Type + - Delivery Type operationId: getDeliveryTypes responses: "200": @@ -1720,10 +1720,10 @@ paths: items: $ref: "#/components/schemas/DeliveryTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Delivery Type + - Delivery Type operationId: updateDeliveryTypes requestBody: content: @@ -1739,10 +1739,10 @@ paths: schema: $ref: "#/components/schemas/DeliveryTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Delivery Type + - Delivery Type operationId: newDeliveryType requestBody: content: @@ -1758,11 +1758,11 @@ paths: schema: $ref: "#/components/schemas/DeliveryTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] /deliveryresulttypes: get: tags: - - Delivery Result Type + - Delivery Result Type operationId: getDeliveryResultTypes responses: "200": @@ -1774,10 +1774,10 @@ paths: items: $ref: "#/components/schemas/DeliveryResultTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Delivery Result Type + - Delivery Result Type operationId: updateDeliveryResultTypes requestBody: content: @@ -1793,10 +1793,10 @@ paths: schema: $ref: "#/components/schemas/DeliveryResultTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Delivery Result Type + - Delivery Result Type operationId: newDeliveryResultType requestBody: content: @@ -1812,19 +1812,19 @@ paths: 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": description: OK @@ -1833,18 +1833,18 @@ paths: 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: @@ -1859,18 +1859,18 @@ paths: 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": description: OK @@ -1879,11 +1879,11 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /agetypes: get: tags: - - AgeTypes + - AgeTypes operationId: getAllAgeTypes responses: "200": @@ -1895,10 +1895,10 @@ paths: items: $ref: "#/components/schemas/AgeTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - AgeTypes + - AgeTypes operationId: updateAgeType requestBody: content: @@ -1918,11 +1918,11 @@ paths: items: $ref: "#/components/schemas/AgeTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] /admissiontypes: get: tags: - - AdmissionTypes + - AdmissionTypes operationId: getAdmissionTypes responses: "200": @@ -1934,10 +1934,10 @@ paths: items: $ref: "#/components/schemas/AdmissionTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - AdmissionTypes + - AdmissionTypes operationId: updateAdmissionTypes requestBody: content: @@ -1953,10 +1953,10 @@ paths: schema: $ref: "#/components/schemas/AdmissionTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - AdmissionTypes + - AdmissionTypes operationId: newAdmissionType requestBody: content: @@ -1972,40 +1972,40 @@ paths: 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 + - 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 @@ -2016,10 +2016,10 @@ paths: schema: $ref: "#/components/schemas/PageAdmissionDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Admissions + - Admissions operationId: updateAdmissions requestBody: content: @@ -2037,10 +2037,10 @@ paths: schema: $ref: "#/components/schemas/AdmissionDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Admissions + - Admissions operationId: newAdmissions requestBody: content: @@ -2058,11 +2058,11 @@ paths: schema: $ref: "#/components/schemas/AdmissionDTO" security: - - bearerAuth: [] + - bearerAuth: [] /visits: post: tags: - - Visit + - Visit operationId: newVisit requestBody: content: @@ -2078,11 +2078,11 @@ paths: schema: $ref: "#/components/schemas/VisitDTO" security: - - bearerAuth: [] + - bearerAuth: [] /visits/insertList: post: tags: - - Visit + - Visit operationId: newVisits requestBody: content: @@ -2100,11 +2100,11 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /usersettings: get: tags: - - User Settings + - User Settings operationId: getUserSettings responses: "200": @@ -2116,10 +2116,10 @@ paths: items: $ref: "#/components/schemas/UserSettingDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - User Settings + - User Settings operationId: newUserSettings requestBody: content: @@ -2135,18 +2135,18 @@ paths: schema: $ref: "#/components/schemas/UserSettingDTO" security: - - bearerAuth: [] + - bearerAuth: [] /users: get: tags: - - Users + - Users operationId: getUser parameters: - - name: group_id - in: query - required: false - schema: - type: string + - name: group_id + in: query + required: false + schema: + type: string responses: "200": description: OK @@ -2157,10 +2157,10 @@ paths: items: $ref: "#/components/schemas/UserDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Users + - Users operationId: newUser requestBody: content: @@ -2176,11 +2176,11 @@ paths: schema: $ref: "#/components/schemas/UserDTO" security: - - bearerAuth: [] + - bearerAuth: [] /usergroups: get: tags: - - User Groups + - User Groups operationId: getUserGroups responses: "200": @@ -2192,10 +2192,10 @@ paths: items: $ref: "#/components/schemas/UserGroupDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - User Groups + - User Groups operationId: newUserGroup requestBody: content: @@ -2211,24 +2211,24 @@ paths: schema: $ref: "#/components/schemas/UserGroupDTO" security: - - bearerAuth: [] + - bearerAuth: [] /usergroups/{group_code}/permissions/{id}: post: tags: - - User Groups + - 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 + - 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 @@ -2238,32 +2238,32 @@ paths: type: integer format: int32 security: - - bearerAuth: [] + - bearerAuth: [] delete: tags: - - User Groups + - 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 + - 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: [] + - bearerAuth: [] /therapies: post: tags: - - Therapies + - Therapies operationId: newTherapy requestBody: content: @@ -2279,11 +2279,11 @@ paths: schema: $ref: "#/components/schemas/TherapyRowDTO" security: - - bearerAuth: [] + - bearerAuth: [] /therapies/replace: post: tags: - - Therapies + - Therapies operationId: replaceTherapies requestBody: content: @@ -2301,11 +2301,11 @@ paths: schema: $ref: "#/components/schemas/TherapyRowDTO" security: - - bearerAuth: [] + - bearerAuth: [] /therapies/meds-out-of-stock: post: tags: - - Therapies + - Therapies operationId: getMedicalsOutOfStock requestBody: content: @@ -2325,11 +2325,11 @@ paths: items: $ref: "#/components/schemas/MedicalDTO" security: - - bearerAuth: [] + - bearerAuth: [] /therapies/from-rows: post: tags: - - Therapies + - Therapies operationId: getTherapies requestBody: content: @@ -2349,11 +2349,11 @@ paths: items: $ref: "#/components/schemas/TherapyDTO" security: - - bearerAuth: [] + - bearerAuth: [] /therapies/from-row: post: tags: - - Therapies + - Therapies operationId: getTherapy requestBody: content: @@ -2369,18 +2369,18 @@ paths: schema: $ref: "#/components/schemas/TherapyDTO" security: - - bearerAuth: [] + - bearerAuth: [] /stockmovements/discharge: post: tags: - - Stock Movements + - Stock Movements operationId: newMultipleDischargingMovements parameters: - - name: ref - in: query - required: true - schema: - type: string + - name: ref + in: query + required: true + schema: + type: string requestBody: content: application/json: @@ -2397,18 +2397,18 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /stockmovements/charge: post: tags: - - Stock Movements + - Stock Movements operationId: newMultipleChargingMovements parameters: - - name: ref - in: query - required: true - schema: - type: string + - name: ref + in: query + required: true + schema: + type: string requestBody: content: application/json: @@ -2425,23 +2425,23 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - 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": description: OK @@ -2452,18 +2452,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: @@ -2478,11 +2478,11 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /sms/delete: post: tags: - - SMS + - SMS operationId: deleteSms requestBody: content: @@ -2500,11 +2500,11 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /pricesothers: get: tags: - - Others Price + - Others Price operationId: getPricesOthers responses: "200": @@ -2516,10 +2516,10 @@ paths: items: $ref: "#/components/schemas/PricesOthersDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Others Price + - Others Price operationId: newPricesOthers requestBody: content: @@ -2535,11 +2535,11 @@ paths: schema: $ref: "#/components/schemas/PricesOthersDTO" security: - - bearerAuth: [] + - bearerAuth: [] /pricelists: get: tags: - - Price Lists + - Price Lists operationId: getPriceLists responses: "200": @@ -2551,10 +2551,10 @@ paths: items: $ref: "#/components/schemas/PriceListDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Price Lists + - Price Lists operationId: newPriceList requestBody: content: @@ -2570,11 +2570,11 @@ paths: schema: $ref: "#/components/schemas/PriceListDTO" security: - - bearerAuth: [] + - bearerAuth: [] /pregnanttreatmenttypes: get: tags: - - Pregnant Treatment Types + - Pregnant Treatment Types operationId: getPregnantTreatmentTypes responses: "200": @@ -2586,10 +2586,10 @@ paths: items: $ref: "#/components/schemas/PregnantTreatmentTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Pregnant Treatment Types + - Pregnant Treatment Types operationId: newPregnantTreatmentType requestBody: content: @@ -2605,11 +2605,11 @@ paths: schema: $ref: "#/components/schemas/PregnantTreatmentTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] /patientvaccines: post: tags: - - Patient Vaccines + - Patient Vaccines operationId: newPatientVaccine requestBody: content: @@ -2625,27 +2625,27 @@ paths: 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": description: OK @@ -2654,10 +2654,10 @@ paths: schema: $ref: "#/components/schemas/PagePatientDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Patients + - Patients operationId: newPatient requestBody: content: @@ -2673,11 +2673,11 @@ paths: schema: $ref: "#/components/schemas/PatientDTO" security: - - bearerAuth: [] + - bearerAuth: [] /operationtypes: get: tags: - - Operations Types + - Operations Types operationId: getOperationTypes responses: "200": @@ -2689,10 +2689,10 @@ paths: items: $ref: "#/components/schemas/OperationTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Operations Types + - Operations Types operationId: newOperationType requestBody: content: @@ -2708,11 +2708,11 @@ paths: schema: $ref: "#/components/schemas/OperationTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] /operations: get: tags: - - Operations + - Operations operationId: getOperations responses: "200": @@ -2724,10 +2724,10 @@ paths: items: $ref: "#/components/schemas/OperationDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Operations + - Operations operationId: newOperation requestBody: content: @@ -2743,11 +2743,11 @@ paths: schema: $ref: "#/components/schemas/OperationDTO" security: - - bearerAuth: [] + - bearerAuth: [] /operations/rows/search/opd: post: tags: - - Operations + - Operations operationId: getOperationRowsByOpd requestBody: content: @@ -2765,11 +2765,11 @@ paths: items: $ref: "#/components/schemas/OperationRowDTO" security: - - bearerAuth: [] + - bearerAuth: [] /opds: post: tags: - - Opds + - Opds operationId: newOpd requestBody: content: @@ -2785,11 +2785,11 @@ paths: schema: $ref: "#/components/schemas/OpdDTO" security: - - bearerAuth: [] + - bearerAuth: [] /opds/rows: post: tags: - - Opds + - Opds operationId: newOpdWithOperationRow requestBody: content: @@ -2805,11 +2805,11 @@ paths: schema: $ref: "#/components/schemas/OpdWithOperationRowDTO" security: - - bearerAuth: [] + - bearerAuth: [] /medicalstockward/movements: post: tags: - - Medical Stock Ward + - Medical Stock Ward operationId: newMovementWard requestBody: content: @@ -2825,18 +2825,18 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /medicalstockmovements/discharge: post: tags: - - Stock Movements + - 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: @@ -2853,18 +2853,18 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /medicalstockmovements/charge: post: tags: - - Stock Movements + - 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: @@ -2881,30 +2881,30 @@ paths: 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": description: OK @@ -2913,10 +2913,10 @@ paths: schema: $ref: "#/components/schemas/PageLabWithRowsDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Laboratories + - Laboratories operationId: newLaboratory requestBody: content: @@ -2932,11 +2932,11 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /laboratories/insertList: post: tags: - - Laboratories + - Laboratories operationId: newLaboratory2 requestBody: content: @@ -2954,11 +2954,11 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /laboratories/examRequest: get: tags: - - Laboratories + - Laboratories operationId: getLaboratoryExamRequest responses: "200": @@ -2970,10 +2970,10 @@ paths: items: $ref: "#/components/schemas/LaboratoryDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Laboratories + - Laboratories operationId: newExamRequest requestBody: content: @@ -2989,11 +2989,11 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /examtypes: get: tags: - - Exam Types + - Exam Types operationId: getExamTypes responses: "200": @@ -3005,10 +3005,10 @@ paths: items: $ref: "#/components/schemas/ExamTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Exam Types + - Exam Types operationId: newExamType requestBody: content: @@ -3024,11 +3024,11 @@ paths: schema: $ref: "#/components/schemas/ExamTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] /exams: get: tags: - - Exams + - Exams operationId: getExams responses: "200": @@ -3040,10 +3040,10 @@ paths: items: $ref: "#/components/schemas/ExamDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Exams + - Exams operationId: newExam requestBody: content: @@ -3059,11 +3059,11 @@ paths: schema: $ref: "#/components/schemas/ExamDTO" security: - - bearerAuth: [] + - bearerAuth: [] /examrows: get: tags: - - Exam Rows + - Exam Rows operationId: getExamRows responses: "200": @@ -3075,10 +3075,10 @@ paths: items: $ref: "#/components/schemas/ExamRowDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Exam Rows + - Exam Rows operationId: newExamRow requestBody: content: @@ -3094,11 +3094,11 @@ paths: schema: $ref: "#/components/schemas/ExamRowDTO" security: - - bearerAuth: [] + - bearerAuth: [] /examinations: post: tags: - - Examinations + - Examinations operationId: newPatientExamination requestBody: content: @@ -3114,29 +3114,29 @@ paths: schema: $ref: "#/components/schemas/PatientExaminationDTO" 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": description: OK @@ -3147,10 +3147,10 @@ paths: items: $ref: "#/components/schemas/BillDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Bills + - Bills operationId: newBill requestBody: content: @@ -3166,11 +3166,11 @@ paths: schema: $ref: "#/components/schemas/FullBillDTO" security: - - bearerAuth: [] + - bearerAuth: [] /bills/search/by/payments: post: tags: - - Bills + - Bills operationId: searchBillsByPayments requestBody: content: @@ -3190,23 +3190,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: @@ -3223,11 +3223,11 @@ paths: items: $ref: "#/components/schemas/BillDTO" security: - - bearerAuth: [] + - bearerAuth: [] /auth/refresh-token: post: tags: - - Login + - Login operationId: refreshToken requestBody: content: @@ -3243,11 +3243,11 @@ paths: schema: $ref: "#/components/schemas/LoginResponse" security: - - bearerAuth: [] + - bearerAuth: [] /auth/logout: post: tags: - - Login + - Login description: Logout the current user. operationId: logout responses: @@ -3256,7 +3256,7 @@ paths: /auth/login: post: tags: - - Login + - Login operationId: authenticateUser requestBody: content: @@ -3272,19 +3272,19 @@ paths: 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: @@ -3301,11 +3301,11 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /wardsNoMaternity: get: tags: - - Wards + - Wards operationId: getWardsNoMaternity responses: "200": @@ -3317,18 +3317,18 @@ 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": description: OK @@ -3338,18 +3338,18 @@ 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": description: OK @@ -3358,18 +3358,18 @@ paths: 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": description: OK @@ -3378,19 +3378,19 @@ paths: 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": description: OK @@ -3401,18 +3401,18 @@ 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": description: OK @@ -3421,18 +3421,18 @@ paths: 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": description: OK @@ -3443,18 +3443,18 @@ 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": description: OK @@ -3463,18 +3463,18 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /usersettings/{configName}: get: tags: - - User Settings + - User Settings operationId: getUserSettingByUser parameters: - - name: configName - in: path - required: true - schema: - type: string + - name: configName + in: path + required: true + schema: + type: string responses: "200": description: OK @@ -3483,18 +3483,18 @@ paths: schema: $ref: "#/components/schemas/UserSettingDTO" security: - - bearerAuth: [] + - bearerAuth: [] /users/{username}/permissions: get: tags: - - Users + - Users operationId: retrievePermissionsByUsername parameters: - - name: username - in: path - required: true - schema: - type: string + - name: username + in: path + required: true + schema: + type: string responses: "200": description: OK @@ -3505,19 +3505,19 @@ paths: items: $ref: "#/components/schemas/PermissionDTO" security: - - bearerAuth: [] + - bearerAuth: [] /therapies/{code_patient}: get: tags: - - Therapies + - Therapies operationId: getTherapyRows parameters: - - name: code_patient - in: path - required: true - schema: - type: integer - format: int32 + - name: code_patient + in: path + required: true + schema: + type: integer + format: int32 responses: "200": description: OK @@ -3528,18 +3528,18 @@ paths: items: $ref: "#/components/schemas/TherapyRowDTO" security: - - bearerAuth: [] + - bearerAuth: [] delete: tags: - - Therapies + - Therapies operationId: deleteAllTherapies parameters: - - name: code_patient - in: path - required: true - schema: - type: integer - format: int32 + - name: code_patient + in: path + required: true + schema: + type: integer + format: int32 responses: "200": description: OK @@ -3548,19 +3548,19 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /suppliers/{id}: get: tags: - - Suppliers + - Suppliers operationId: getSuppliers_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": description: OK @@ -3569,27 +3569,27 @@ paths: schema: $ref: "#/components/schemas/SupplierDTO" security: - - bearerAuth: [] + - bearerAuth: [] delete: tags: - - Suppliers + - Suppliers operationId: deleteSupplier parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int32 + - name: id + in: path + required: true + schema: + type: integer + format: int32 responses: "204": description: No Content security: - - bearerAuth: [] + - bearerAuth: [] /stockmovements: get: tags: - - Stock Movements + - Stock Movements operationId: getMovements responses: "200": @@ -3601,18 +3601,18 @@ paths: items: $ref: "#/components/schemas/MovementDTO" security: - - bearerAuth: [] + - bearerAuth: [] /stockmovements/{ref}: get: tags: - - Stock Movements + - Stock Movements operationId: getMovements_1 parameters: - - name: ref - in: path - required: true - schema: - type: string + - name: ref + in: path + required: true + schema: + type: string responses: "200": description: OK @@ -3623,19 +3623,19 @@ paths: items: $ref: "#/components/schemas/MovementDTO" security: - - bearerAuth: [] + - bearerAuth: [] /stockmovements/lot/{med_code}: get: tags: - - Stock Movements + - Stock Movements operationId: getLotByMedical 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": description: OK @@ -3646,70 +3646,70 @@ paths: items: $ref: "#/components/schemas/LotDTO" security: - - bearerAuth: [] + - bearerAuth: [] /stockmovements/filter/v2: get: tags: - - Stock Movements + - Stock Movements operationId: getMovements_2 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": description: OK @@ -3720,30 +3720,30 @@ paths: items: $ref: "#/components/schemas/MovementDTO" security: - - bearerAuth: [] + - bearerAuth: [] /stockmovements/filter/v1: get: tags: - - Stock Movements + - Stock Movements operationId: getMovements_3 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": description: OK @@ -3754,25 +3754,25 @@ paths: items: $ref: "#/components/schemas/MovementDTO" security: - - bearerAuth: [] + - bearerAuth: [] /stockmovements/critical/check: get: tags: - - Stock Movements + - Stock Movements operationId: alertCriticalQuantity 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": description: OK @@ -3781,11 +3781,11 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /reports/exams-list: get: tags: - - Reports + - Reports operationId: printExamsListPdf responses: "200": @@ -3798,11 +3798,11 @@ paths: type: string format: byte security: - - bearerAuth: [] + - bearerAuth: [] /reports/diseases-list: get: tags: - - Reports + - Reports operationId: printDiseasesListPdf responses: "200": @@ -3815,11 +3815,11 @@ paths: type: string format: byte security: - - bearerAuth: [] + - bearerAuth: [] /pricelists/prices: get: tags: - - Price Lists + - Price Lists operationId: getPrices responses: "200": @@ -3831,19 +3831,19 @@ 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": description: OK @@ -3852,31 +3852,31 @@ paths: 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": description: OK @@ -3885,11 +3885,11 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /permissions: get: tags: - - Permissions + - Permissions operationId: retrieveAllPermissions responses: "200": @@ -3901,19 +3901,19 @@ paths: items: $ref: "#/components/schemas/PermissionDTO" security: - - bearerAuth: [] + - bearerAuth: [] /permissions/{id}: get: tags: - - Permissions + - Permissions operationId: retrievePermissionById 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": description: OK @@ -3922,18 +3922,18 @@ paths: schema: $ref: "#/components/schemas/PermissionDTO" security: - - bearerAuth: [] + - bearerAuth: [] /permissions/userGroupCode/{userGroupCode}: get: tags: - - Permissions + - Permissions operationId: retrievePermissionsByUserGroupCode parameters: - - name: userGroupCode - in: path - required: true - schema: - type: string + - name: userGroupCode + in: path + required: true + schema: + type: string responses: "200": description: OK @@ -3944,18 +3944,18 @@ 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": description: OK @@ -3964,18 +3964,18 @@ paths: 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": description: OK @@ -3986,19 +3986,19 @@ 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": description: OK @@ -4008,52 +4008,52 @@ 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": description: OK @@ -4064,37 +4064,37 @@ 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": description: OK @@ -4105,11 +4105,11 @@ paths: items: $ref: "#/components/schemas/PatientDTO" security: - - bearerAuth: [] + - bearerAuth: [] /patients/nextcode: get: tags: - - Patients + - Patients operationId: getPatientNextCode responses: "200": @@ -4120,25 +4120,25 @@ 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": description: OK @@ -4147,11 +4147,11 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /patients/cities: get: tags: - - Patients + - Patients operationId: getPatientCities responses: "200": @@ -4163,19 +4163,19 @@ 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": description: OK @@ -4184,18 +4184,18 @@ paths: 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": description: OK @@ -4206,19 +4206,19 @@ 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": description: OK @@ -4229,19 +4229,19 @@ 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": description: OK @@ -4252,18 +4252,18 @@ 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": description: OK @@ -4274,91 +4274,91 @@ 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": description: OK @@ -4367,19 +4367,19 @@ paths: 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": description: OK @@ -4390,19 +4390,19 @@ 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": description: OK @@ -4411,25 +4411,25 @@ paths: 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": description: OK @@ -4438,19 +4438,19 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /opds/ProgYear/{year}: get: tags: - - Opds + - Opds operationId: getProgressiveYear 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": description: OK @@ -4460,18 +4460,18 @@ 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": description: OK @@ -4480,17 +4480,17 @@ paths: 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": description: OK @@ -4499,18 +4499,18 @@ paths: 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": description: OK @@ -4519,18 +4519,18 @@ paths: 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": description: OK @@ -4539,18 +4539,18 @@ paths: 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": description: OK @@ -4561,30 +4561,30 @@ 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": description: OK @@ -4595,30 +4595,30 @@ 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": description: OK @@ -4629,24 +4629,24 @@ 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": description: OK @@ -4656,11 +4656,11 @@ paths: type: integer format: int32 security: - - bearerAuth: [] + - bearerAuth: [] /medicalstockmovements: get: tags: - - Stock Movements + - Stock Movements operationId: getMovements_4 responses: "200": @@ -4672,18 +4672,18 @@ paths: items: $ref: "#/components/schemas/MovementDTO" security: - - bearerAuth: [] + - bearerAuth: [] /medicalstockmovements/{ref}: get: tags: - - Stock Movements + - 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": description: OK @@ -4694,19 +4694,19 @@ paths: items: $ref: "#/components/schemas/MovementDTO" security: - - bearerAuth: [] + - bearerAuth: [] /medicalstockmovements/lot/{med_code}: get: tags: - - Stock Movements + - 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": description: OK @@ -4717,70 +4717,70 @@ paths: items: $ref: "#/components/schemas/LotDTO" security: - - bearerAuth: [] + - bearerAuth: [] /medicalstockmovements/filter/v2: get: tags: - - Stock Movements + - 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": description: OK @@ -4791,30 +4791,30 @@ paths: items: $ref: "#/components/schemas/MovementDTO" security: - - bearerAuth: [] + - bearerAuth: [] /medicalstockmovements/filter/v1: get: tags: - - Stock Movements + - 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": description: OK @@ -4825,25 +4825,25 @@ paths: items: $ref: "#/components/schemas/MovementDTO" security: - - bearerAuth: [] + - bearerAuth: [] /medicalstockmovements/critical/check: get: tags: - - Stock Movements + - 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": description: OK @@ -4852,19 +4852,19 @@ paths: 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": description: OK @@ -4873,18 +4873,18 @@ paths: 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": description: OK @@ -4893,35 +4893,35 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /medicals/filter: get: - tags: - - 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 + tags: + - 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 responses: "200": description: OK @@ -4932,18 +4932,18 @@ 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": description: OK @@ -4954,19 +4954,19 @@ 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": description: OK @@ -4975,11 +4975,11 @@ paths: schema: $ref: "#/components/schemas/MalnutritionDTO" security: - - bearerAuth: [] + - bearerAuth: [] /laboratories/materials: get: tags: - - Laboratories + - Laboratories operationId: getMaterials responses: "200": @@ -4991,62 +4991,62 @@ 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 + - 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 @@ -5055,19 +5055,19 @@ paths: 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": description: OK @@ -5076,19 +5076,19 @@ paths: 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": description: OK @@ -5099,19 +5099,19 @@ 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": description: OK @@ -5122,11 +5122,11 @@ paths: items: $ref: "#/components/schemas/LabWithRowsDTO" security: - - bearerAuth: [] + - bearerAuth: [] /hospitals: get: tags: - - Hospitals + - Hospitals operationId: getHospital responses: "200": @@ -5136,11 +5136,11 @@ paths: schema: $ref: "#/components/schemas/HospitalDTO" security: - - bearerAuth: [] + - bearerAuth: [] /hospitals/currencyCode: get: tags: - - Hospitals + - Hospitals operationId: getHospitalCurrencyCode responses: "200": @@ -5150,18 +5150,18 @@ paths: 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": description: OK @@ -5172,19 +5172,19 @@ 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": description: OK @@ -5195,18 +5195,18 @@ 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": description: OK @@ -5215,24 +5215,24 @@ paths: 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": description: OK @@ -5243,18 +5243,18 @@ 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": description: OK @@ -5265,25 +5265,25 @@ 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": description: OK @@ -5292,19 +5292,19 @@ paths: 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": description: OK @@ -5313,19 +5313,19 @@ paths: 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": description: OK @@ -5334,19 +5334,19 @@ paths: 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": description: OK @@ -5355,19 +5355,19 @@ paths: 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": description: OK @@ -5378,18 +5378,18 @@ 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": description: OK @@ -5398,17 +5398,17 @@ paths: 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": description: OK @@ -5417,11 +5417,11 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /diseases/opd: get: tags: - - Diseases + - Diseases operationId: getDiseasesOpd responses: "200": @@ -5433,18 +5433,18 @@ 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": description: OK @@ -5455,11 +5455,11 @@ paths: items: $ref: "#/components/schemas/DiseaseDTO" security: - - bearerAuth: [] + - bearerAuth: [] /diseases/ipd/out: get: tags: - - Diseases + - Diseases operationId: getDiseasesIpdOut responses: "200": @@ -5471,18 +5471,18 @@ 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": description: OK @@ -5493,11 +5493,11 @@ paths: items: $ref: "#/components/schemas/DiseaseDTO" security: - - bearerAuth: [] + - bearerAuth: [] /diseases/ipd/in: get: tags: - - Diseases + - Diseases operationId: getDiseasesIpdIn responses: "200": @@ -5509,18 +5509,18 @@ 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": description: OK @@ -5531,11 +5531,11 @@ paths: items: $ref: "#/components/schemas/DiseaseDTO" security: - - bearerAuth: [] + - bearerAuth: [] /diseases/both: get: tags: - - Diseases + - Diseases operationId: getDiseases responses: "200": @@ -5547,18 +5547,18 @@ 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": description: OK @@ -5569,11 +5569,11 @@ paths: items: $ref: "#/components/schemas/DiseaseDTO" security: - - bearerAuth: [] + - bearerAuth: [] /diseases/all: get: tags: - - Diseases + - Diseases operationId: getAllDiseases responses: "200": @@ -5585,19 +5585,19 @@ 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": description: OK @@ -5608,19 +5608,19 @@ 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": description: OK @@ -5631,29 +5631,29 @@ 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": description: OK @@ -5664,19 +5664,19 @@ 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": description: OK @@ -5687,11 +5687,11 @@ paths: items: $ref: "#/components/schemas/BillPaymentsDTO" security: - - bearerAuth: [] + - bearerAuth: [] /bills/items: get: tags: - - Bills + - Bills operationId: getDistinctItems responses: "200": @@ -5703,19 +5703,19 @@ 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": description: OK @@ -5726,19 +5726,19 @@ 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": description: OK @@ -5747,19 +5747,19 @@ paths: schema: $ref: "#/components/schemas/AgeTypeDTO" 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": description: OK @@ -5770,19 +5770,19 @@ 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: "400": description: Bad Request @@ -5795,18 +5795,18 @@ paths: items: $ref: "#/components/schemas/AdmissionDTO" security: - - bearerAuth: [] + - bearerAuth: [] /admissions/getNextProgressiveIdInYear: get: tags: - - Admissions + - Admissions operationId: getNextYearProgressiveId parameters: - - name: wardcode - in: query - required: true - schema: - type: string + - name: wardcode + in: query + required: true + schema: + type: string responses: "400": description: Bad Request @@ -5818,18 +5818,18 @@ paths: type: integer format: int32 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: "400": description: Bad Request @@ -5841,34 +5841,34 @@ paths: type: integer format: int32 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 + - 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 @@ -5879,19 +5879,19 @@ paths: schema: $ref: "#/components/schemas/PageAdmissionDTO" 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: "400": description: Bad Request @@ -5902,33 +5902,33 @@ paths: schema: $ref: "#/components/schemas/AdmissionDTO" security: - - bearerAuth: [] + - bearerAuth: [] /admissions/admittedPatients: get: tags: - - Admissions + - Admissions operationId: getAdmittedPatients parameters: - - 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: + - 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 responses: "400": description: Bad Request @@ -5941,18 +5941,18 @@ paths: items: $ref: "#/components/schemas/AdmittedPatientDTO" 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": description: OK @@ -5961,19 +5961,19 @@ paths: 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": description: OK @@ -5982,18 +5982,18 @@ paths: 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": description: OK @@ -6002,18 +6002,18 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /vaccines/{code}: delete: tags: - - Vaccines + - Vaccines operationId: deleteVaccine parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string responses: "200": description: OK @@ -6022,19 +6022,19 @@ paths: 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": description: OK @@ -6043,18 +6043,18 @@ paths: 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": description: OK @@ -6063,18 +6063,18 @@ paths: 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": description: OK @@ -6083,18 +6083,18 @@ paths: schema: 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": description: OK @@ -6103,18 +6103,18 @@ paths: 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": description: OK @@ -6123,18 +6123,18 @@ paths: 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": description: OK @@ -6143,18 +6143,18 @@ paths: 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": description: OK @@ -6163,19 +6163,19 @@ paths: 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: "400": description: Bad Request @@ -6186,16 +6186,16 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] components: schemas: WardDTO: required: - - beds - - description - - docs - - nurs - - visitDuration + - beds + - description + - docs + - nurs + - visitDuration type: object properties: code: @@ -6235,24 +6235,24 @@ components: description: lock format: int32 example: 0 - opd: - type: boolean - pharmacy: + female: type: boolean male: type: boolean - female: + 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: @@ -6290,8 +6290,8 @@ components: description: Sex example: M enum: - - M - - F + - M + - F address: maxLength: 50 type: string @@ -6325,8 +6325,8 @@ components: description: "Mother's status (D=dead, A=alive)" example: A enum: - - D - - A + - D + - A fatherName: maxLength: 50 type: string @@ -6337,35 +6337,35 @@ components: 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-/+)" 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" enum: - - "Y" - - "N" + - "Y" + - "N" parentTogether: type: string description: "Parent together (Y=Yes, N=no)" example: "N" enum: - - "Y" - - "N" + - "Y" + - "N" taxCode: maxLength: 30 type: string @@ -6400,8 +6400,8 @@ components: description: Status example: I enum: - - I - - O + - I + - O consensusFlag: type: boolean description: Consensus flag @@ -6413,8 +6413,8 @@ components: description: Class representing a patient VisitDTO: required: - - date - - patient + - date + - patient type: object properties: visitID: @@ -6452,8 +6452,8 @@ components: description: Class representing a vaccine type VaccineTypeDTO: required: - - code - - description + - code + - description type: object properties: code: @@ -6469,9 +6469,9 @@ components: description: Class representing a vaccine type VaccineDTO: required: - - code - - description - - vaccineType + - code + - description + - vaccineType type: object properties: code: @@ -6494,10 +6494,10 @@ components: description: Class representing a vaccine UserSettingDTO: required: - - configName - - configValue - - id - - user + - configName + - configValue + - id + - user type: object properties: id: @@ -6525,8 +6525,8 @@ components: example: 0 PermissionDTO: required: - - description - - id + - description + - id type: object properties: name: @@ -6542,9 +6542,9 @@ components: description: List of group's permissions UserDTO: required: - - passwd - - userGroupName - - userName + - passwd + - userGroupName + - userName type: object properties: userName: @@ -6564,9 +6564,13 @@ components: type: string description: The user's description example: Lab chief technician + deleted: + type: boolean + description: Whether the user has been soft deleted or not + example: false UserGroupDTO: required: - - code + - code type: object properties: code: @@ -6579,6 +6583,10 @@ components: type: string description: The description of the group example: Staff members working in the laboratory + deleted: + type: boolean + description: Whether the group has been soft deleted or not + example: false permissions: type: array description: List of group's permissions @@ -6603,16 +6611,16 @@ components: type: array description: List of permissions' ids example: - - 48 - - 24 + - 48 + - 24 items: type: integer description: List of permissions' ids format: int32 SupplierDTO: required: - - supId - - supName + - supId + - supName type: object properties: supId: @@ -6659,11 +6667,11 @@ components: example: 0 PricesOthersDTO: required: - - code - - daily - - description - - ipdInclude - - opdInclude + - code + - daily + - description + - ipdInclude + - opdInclude type: object properties: id: @@ -6736,8 +6744,8 @@ components: description: Class representing a price list PregnantTreatmentTypeDTO: required: - - code - - description + - code + - description type: object properties: code: @@ -6755,10 +6763,10 @@ components: description: Class representing a pregnant treatment type PatientVaccineDTO: required: - - patient - - progr - - vaccine - - vaccineDate + - patient + - progr + - vaccine + - vaccineDate type: object properties: code: @@ -6787,7 +6795,7 @@ components: readOnly: true PatientConsensusDTO: required: - - patientId + - patientId type: object properties: consensusFlag: @@ -6803,8 +6811,8 @@ components: description: Class representing a patient consensus OperationTypeDTO: required: - - code - - description + - code + - description type: object properties: code: @@ -6817,11 +6825,11 @@ components: description: The operation type OperationDTO: required: - - code - - description - - major - - opeFor - - type + - code + - description + - major + - opeFor + - type type: object properties: code: @@ -6839,9 +6847,9 @@ components: description: The operation context example: opd_admission enum: - - opd_admission - - admission - - opd + - opd_admission + - admission + - opd major: type: integer description: The operation major @@ -6853,10 +6861,10 @@ components: example: 0 AdmissionDTO: required: - - admDate - - admitted - - deleted - - type + - admDate + - admitted + - deleted + - type type: object properties: id: @@ -6897,7 +6905,7 @@ components: description: Operation date opResult: type: string - description: 'Operation result value is ''P'' or ''N'' ' + description: "Operation result value is 'P' or 'N' " example: "N" disDate: type: string @@ -6953,16 +6961,16 @@ components: type: string description: "Flag record deleted, values are 'Y' OR 'N' " example: "N" - fhu: - type: string yprog: type: integer format: int32 + fhu: + type: string description: The admission AdmissionTypeDTO: required: - - code - - description + - code + - description type: object properties: code: @@ -6977,15 +6985,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: @@ -7046,8 +7054,8 @@ components: description: Class representing a bill DeliveryResultTypeDTO: required: - - code - - description + - code + - description type: object properties: code: @@ -7062,8 +7070,8 @@ components: description: Delivery result type DeliveryTypeDTO: required: - - code - - description + - code + - description type: object properties: code: @@ -7078,8 +7086,8 @@ components: description: Delivery type DischargeTypeDTO: required: - - code - - description + - code + - description type: object properties: code: @@ -7094,12 +7102,12 @@ components: description: DisChargeType DiseaseDTO: required: - - code - - description - - diseaseType - - ipdInInclude - - ipdOutInclude - - opdInclude + - code + - description + - diseaseType + - ipdInInclude + - ipdOutInclude + - opdInclude type: object properties: code: @@ -7137,8 +7145,8 @@ components: description: Class representing a disease DiseaseTypeDTO: required: - - code - - description + - code + - description type: object properties: code: @@ -7152,11 +7160,11 @@ components: description: Class representing a disease type OpdDTO: required: - - age - - newPatient - - note - - sex - - ward + - age + - newPatient + - note + - sex + - ward type: object properties: code: @@ -7251,10 +7259,10 @@ components: description: The opd OperationRowDTO: required: - - opDate - - opResult - - operation - - prescriber + - opDate + - opResult + - operation + - prescriber type: object properties: id: @@ -7302,9 +7310,9 @@ components: $ref: "#/components/schemas/OperationRowDTO" MovementTypeDTO: required: - - code - - description - - type + - code + - description + - type type: object properties: code: @@ -7323,8 +7331,8 @@ components: example: "-" MedicalTypeDTO: required: - - code - - description + - code + - description type: object properties: code: @@ -7389,10 +7397,10 @@ components: example: 0 MalnutritionDTO: required: - - admission - - dateSupp - - height - - weight + - admission + - dateSupp + - height + - weight type: object properties: code: @@ -7447,7 +7455,7 @@ components: maxLength: 50 type: string description: Exam Default Result - example: '>=12 (NORMAL)' + example: ">=12 (NORMAL)" examtype: $ref: "#/components/schemas/ExamTypeDTO" lock: @@ -7522,8 +7530,8 @@ components: description: Laboratory Patient InOut example: "0" enum: - - I - - O + - I + - O age: type: integer description: Laboratory Patient Age @@ -7537,11 +7545,11 @@ components: description: Laboratory status example: DRAFT enum: - - draft - - open - - done - - invalid - - deleted + - draft + - open + - done + - invalid + - deleted HospitalDTO: type: object properties: @@ -7592,25 +7600,27 @@ components: example: 0 ExamWithRowsDTO: required: - - exam + - exam type: object properties: exam: $ref: "#/components/schemas/ExamDTO" rows: type: array - description: Possible result for the exam(only for exams with procedure + description: + Possible result for the exam(only for exams with procedure 1 and 2) example: "['>=12 (NORMAL)', 'IRREGULAR']" items: type: string - description: Possible result for the exam(only for exams with procedure + description: + Possible result for the exam(only for exams with procedure 1 and 2) example: "['>=12 (NORMAL)', 'IRREGULAR']" PatientExaminationDTO: required: - - patientCode - - pex_date + - patientCode + - pex_date type: object properties: pex_ID: @@ -7663,12 +7673,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 @@ -7682,14 +7692,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 @@ -7699,10 +7709,10 @@ components: description: Bowel Function example: regular enum: - - constipation - - regular - - diarrheal - - irregular + - constipation + - regular + - diarrheal + - irregular lock: type: integer description: Lock @@ -7710,12 +7720,12 @@ components: example: 0 BillItemsDTO: required: - - itemAmount - - itemDescription - - itemDisplayCode - - itemId - - itemQuantity - - priceId + - itemAmount + - itemDescription + - itemDisplayCode + - itemId + - itemQuantity + - priceId type: object properties: id: @@ -7760,10 +7770,10 @@ components: description: Class representing a billItem BillPaymentsDTO: required: - - amount - - billId - - date - - user + - amount + - billId + - date + - user type: object properties: id: @@ -7794,8 +7804,8 @@ components: description: Class representing a billPayment FullBillDTO: required: - - bill - - billItems + - bill + - billItems type: object properties: bill: @@ -7812,9 +7822,9 @@ components: $ref: "#/components/schemas/BillPaymentsDTO" AgeTypeDTO: required: - - description - - from - - to + - description + - from + - to type: object properties: code: @@ -7842,16 +7852,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: @@ -7901,7 +7911,8 @@ components: example: Sample note notifyInt: type: integer - description: "the notify flag: 1 if the notification need to be activated,\ + description: + "the notify flag: 1 if the notification need to be activated,\ \ 0 otherwise" format: int32 example: 0 @@ -7927,8 +7938,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 @@ -7955,19 +7966,21 @@ components: example: Sample note notify: type: boolean - description: "The notify flag: true if the notification need to be activated,\ + 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\ + description: + "The sms flag: true if sms need to be sent to patient, false\ \ otherwise" example: false LotDTO: required: - - code - - dueDate - - preparationDate + - code + - dueDate + - preparationDate type: object properties: code: @@ -7990,11 +8003,11 @@ components: description: The lot MovementDTO: required: - - date - - medical - - quantity - - refNo - - type + - date + - medical + - quantity + - refNo + - type type: object properties: code: @@ -8027,12 +8040,12 @@ components: example: MVN152445 SmsDTO: required: - - module - - smsDate - - smsDateSched - - smsNumber - - smsText - - smsUser + - module + - smsDate + - smsDateSched + - smsNumber + - smsText + - smsUser type: object properties: smsId: @@ -8078,11 +8091,11 @@ components: description: SMS module Id MovementWardDTO: required: - - date - - description - - quantity - - units - - ward + - date + - description + - quantity + - units + - ward type: object properties: code: @@ -8106,7 +8119,8 @@ components: example: 21 weight: type: number - description: The patient's weight in case the movement is associated to + description: + The patient's weight in case the movement is associated to a patient format: float example: 75 @@ -8168,8 +8182,8 @@ components: description: Class representing a Login response LoginRequest: required: - - password - - username + - password + - username type: object properties: username: @@ -8182,11 +8196,11 @@ components: example: admin PriceDTO: required: - - description - - group - - item - - list - - price + - description + - group + - item + - list + - price type: object properties: id: @@ -8280,8 +8294,8 @@ components: example: 89 MedicalWardIdDTO: required: - - medical - - ward + - medical + - ward type: object properties: ward: diff --git a/src/components/accessories/admin/operations/operationForm/OperationForm.tsx b/src/components/accessories/admin/operations/operationForm/OperationForm.tsx index c132eeac9..cd58a0ea9 100644 --- a/src/components/accessories/admin/operations/operationForm/OperationForm.tsx +++ b/src/components/accessories/admin/operations/operationForm/OperationForm.tsx @@ -1,5 +1,5 @@ import { useFormik } from "formik"; -import { OperationDTOOpeForEnum } from "generated"; +import { OperationDTOOpeForEnum } from "generated/models/OperationDTO"; import { useAppDispatch, useAppSelector } from "libraries/hooks/redux"; import { get, has } from "lodash"; import React, { diff --git a/src/components/accessories/admin/users/Users.tsx b/src/components/accessories/admin/users/Users.tsx index 17b9d7980..1d67cc7de 100644 --- a/src/components/accessories/admin/users/Users.tsx +++ b/src/components/accessories/admin/users/Users.tsx @@ -26,10 +26,11 @@ export const Users = () => { const setTab = (tab: TabOptions) => navigate(PATHS.admin_users, { state: { tab } }); - const handleEditGroup = (row: UserGroupDTO) => + const handleEditGroup = (row: UserGroupDTO) => { navigate(PATHS.admin_usergroups_edit.replace(":id", row.code!), { state: row, }); + }; const handleEditUser = (row: UserDTO) => navigate(PATHS.admin_users_edit.replace(":id", row.userName!), { diff --git a/src/components/accessories/admin/users/editGroup/EditGroup.tsx b/src/components/accessories/admin/users/editGroup/EditGroup.tsx index a5b77b261..ddbed24a7 100644 --- a/src/components/accessories/admin/users/editGroup/EditGroup.tsx +++ b/src/components/accessories/admin/users/editGroup/EditGroup.tsx @@ -1,8 +1,8 @@ import { useFormik } from "formik"; import { useAppDispatch, useAppSelector } from "libraries/hooks/redux"; -import React, { useEffect, useState } from "react"; +import React, { useCallback, useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; -import { Navigate, useLocation, useParams } from "react-router"; +import { useParams } from "react-router"; import { useNavigate } from "react-router-dom"; import checkIcon from "../../../../../assets/check-icon.png"; @@ -12,13 +12,16 @@ import InfoBox from "../../../infoBox/InfoBox"; import TextField from "../../../textField/TextField"; import { PATHS } from "../../../../../consts"; -import { PermissionDTO, UserGroupDTO } from "../../../../../generated"; import { usePermission } from "../../../../../libraries/permissionUtils/usePermission"; import { CircularProgress } from "@mui/material"; +import CheckboxField from "components/accessories/checkboxField/CheckboxField"; +import { PermissionDTO } from "generated/models/PermissionDTO"; +import { UserGroupDTO } from "generated/models/UserGroupDTO"; import { getAllPermissions } from "../../../../../state/permissions"; import { getUserGroup, + getUserGroupReset, updateUserGroup, updateUserGroupReset, } from "../../../../../state/usergroups"; @@ -36,7 +39,6 @@ export const EditGroup = () => { const dispatch = useAppDispatch(); const { t } = useTranslation(); const navigate = useNavigate(); - const { state }: { state: UserGroupDTO } = useLocation(); const { id } = useParams(); const canUpdatePermissions = usePermission("grouppermission.update"); @@ -82,11 +84,13 @@ export const EditGroup = () => { resetForm, errors, touched, + values, + setFieldValue, + setValues, } = useFormik({ - initialValues: state, + initialValues: group.data ?? { code: "" }, validationSchema: userGroupSchema(t), onSubmit: (values: UserGroupDTO) => { - values.permissions = groupPermissions; const dto: UserGroupDTO = { ...values, permissions: groupPermissions }; dispatch(updateUserGroup(dto)); @@ -96,19 +100,26 @@ export const EditGroup = () => { // load permissions and group on mount useEffect(() => { dispatch(getAllPermissions()); - dispatch(getUserGroup(state.code)); + dispatch(getUserGroup(id!!)); return () => { dispatch(updateUserGroupReset()); }; - }, [dispatch, state.code]); + }, [dispatch, id]); // update group permissions on group load useEffect(() => { if (group.data) { setGroupPermissions(group.data.permissions ?? []); + setValues(group.data); } }, [group.data]); + useEffect(() => { + return () => { + dispatch(getUserGroupReset()); + }; + }, []); + // compare permissions to update the update stack // and display permissions when ready useEffect(() => { @@ -125,15 +136,18 @@ export const EditGroup = () => { } }, [canUpdatePermissions, group.data, permissions.data, groupPermissions]); - if (state?.code !== id) { - return ; - } - const handleFormReset = () => { resetForm(); setGroupPermissions(group.data?.permissions ?? []); }; + const handleCheckboxChange = useCallback( + (fieldName: string) => (value: boolean) => { + setFieldValue(fieldName, value); + }, + [setFieldValue] + ); + if (permissions.hasFailed) return ( { return ( <> - {group.status === "LOADING" || permissions.status === "LOADING" ? ( + {group.isLoading || group.status === "IDLE" || permissions.isLoading ? ( ) : ( @@ -180,6 +194,14 @@ export const EditGroup = () => { /> + + + {isPermissionEditorAvailable && ( { )} diff --git a/src/components/accessories/admin/users/editGroup/validation.ts b/src/components/accessories/admin/users/editGroup/validation.ts index f3745a36c..cba1e833d 100644 --- a/src/components/accessories/admin/users/editGroup/validation.ts +++ b/src/components/accessories/admin/users/editGroup/validation.ts @@ -1,9 +1,10 @@ -import { object, string } from "yup"; -import { UserGroupDTO } from "../../../../../generated"; import { TFunction } from "react-i18next"; +import { boolean, object, string } from "yup"; +import { UserGroupDTO } from "../../../../../generated"; export const userGroupSchema = (t: TFunction<"translation">) => object().shape({ code: string().min(2).required(t("user.validateGroupCode")), desc: string(), + deleted: boolean(), }); diff --git a/src/components/accessories/admin/users/editUser/EditUserForm.tsx b/src/components/accessories/admin/users/editUser/EditUserForm.tsx index a1b630479..ddce66652 100644 --- a/src/components/accessories/admin/users/editUser/EditUserForm.tsx +++ b/src/components/accessories/admin/users/editUser/EditUserForm.tsx @@ -5,7 +5,7 @@ import { TextField as MuiTextField, } from "@mui/material"; import { useFormik } from "formik"; -import React, { ReactNode } from "react"; +import React, { ReactNode, useCallback } from "react"; import { useTranslation } from "react-i18next"; import { useNavigate } from "react-router-dom"; @@ -17,6 +17,7 @@ import ConfirmationDialog from "../../../confirmationDialog/ConfirmationDialog"; import InfoBox from "../../../infoBox/InfoBox"; import TextField from "../../../textField/TextField"; +import CheckboxField from "components/accessories/checkboxField/CheckboxField"; import { PATHS } from "../../../../../consts"; import "./styles.scss"; import { userSchema } from "./validation"; @@ -70,6 +71,13 @@ export const EditUserForm = ({ onSubmit: handleFormSubmit, }); + const handleCheckboxChange = useCallback( + (fieldName: string) => (value: boolean) => { + setFieldValue(fieldName, value); + }, + [setFieldValue] + ); + return ( @@ -152,6 +160,14 @@ export const EditUserForm = ({ onBlur={handleBlur} /> + + + diff --git a/src/components/accessories/admin/users/editUser/validation.ts b/src/components/accessories/admin/users/editUser/validation.ts index f0d2f4db3..85274642a 100644 --- a/src/components/accessories/admin/users/editUser/validation.ts +++ b/src/components/accessories/admin/users/editUser/validation.ts @@ -1,5 +1,5 @@ import { TFunction } from "react-i18next"; -import { object, ref, string } from "yup"; +import { boolean, object, ref, string } from "yup"; import { UserDTO, UserGroupDTO } from "../../../../../generated"; // min 5 characters, 1 upper case letter, 1 lower case letter, 1 numeric digit. @@ -7,7 +7,7 @@ export const passwordRules = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{5,}$/; export const userSchema = (t: TFunction<"translation">) => object().shape< - Pick & { + Pick & { passwd: string | undefined; passwd2: string | undefined; } @@ -24,6 +24,7 @@ export const userSchema = (t: TFunction<"translation">) => .matches(passwordRules, { message: t("user.validatePasswordTooWeak"), }), + deleted: boolean(), passwd2: string() .oneOf([ref("passwd")], t("user.validatePasswordMustMatch")) .notRequired() diff --git a/src/components/accessories/admin/users/newGroup/NewGroup.tsx b/src/components/accessories/admin/users/newGroup/NewGroup.tsx index f68097baa..b6303ed48 100644 --- a/src/components/accessories/admin/users/newGroup/NewGroup.tsx +++ b/src/components/accessories/admin/users/newGroup/NewGroup.tsx @@ -1,6 +1,6 @@ import { useFormik } from "formik"; import { useAppDispatch, useAppSelector } from "libraries/hooks/redux"; -import React, { useEffect } from "react"; +import React, { useCallback, useEffect } from "react"; import { useTranslation } from "react-i18next"; import { useNavigate } from "react-router-dom"; @@ -13,6 +13,7 @@ import TextField from "../../../textField/TextField"; import { PATHS } from "../../../../../consts"; import { UserGroupDTO } from "../../../../../generated"; +import CheckboxField from "components/accessories/checkboxField/CheckboxField"; import { createUserGroup, createUserGroupReset, @@ -42,6 +43,8 @@ export const NewGroup = () => { resetForm, errors, touched, + values, + setFieldValue, } = useFormik({ initialValues, validationSchema: userGroupSchema(t), @@ -56,6 +59,13 @@ export const NewGroup = () => { }; }, [dispatch]); + const handleCheckboxChange = useCallback( + (fieldName: string) => (value: boolean) => { + setFieldValue(fieldName, value); + }, + [setFieldValue] + ); + return ( @@ -81,6 +91,14 @@ export const NewGroup = () => { onBlur={handleBlur} /> + + + {t("user.groupPermissionsOnlyOnUpdate")} @@ -88,7 +106,7 @@ export const NewGroup = () => { )} diff --git a/src/components/accessories/admin/users/newUser/NewUser.tsx b/src/components/accessories/admin/users/newUser/NewUser.tsx index 1d1564e01..36acd6c25 100644 --- a/src/components/accessories/admin/users/newUser/NewUser.tsx +++ b/src/components/accessories/admin/users/newUser/NewUser.tsx @@ -6,7 +6,7 @@ import { } from "@mui/material"; import { useFormik } from "formik"; import { useAppDispatch, useAppSelector } from "libraries/hooks/redux"; -import React, { ReactNode, useEffect } from "react"; +import React, { ReactNode, useCallback, useEffect } from "react"; import { useTranslation } from "react-i18next"; import { useNavigate } from "react-router-dom"; import checkIcon from "../../../../../assets/check-icon.png"; @@ -15,9 +15,11 @@ import Button from "../../../button/Button"; import ConfirmationDialog from "../../../confirmationDialog/ConfirmationDialog"; import TextField from "../../../textField/TextField"; -import { UserDTO, UserGroupDTO } from "../../../../../generated"; import { IState } from "../../../../../types"; +import CheckboxField from "components/accessories/checkboxField/CheckboxField"; +import { UserDTO } from "generated/models/UserDTO"; +import { UserGroupDTO } from "generated/models/UserGroupDTO"; import { PATHS } from "../../../../../consts"; import { getUserGroups } from "../../../../../state/usergroups"; import { createUser, createUserReset } from "../../../../../state/users"; @@ -76,6 +78,13 @@ export const NewUser = () => { }; }, [create.hasSucceeded, dispatch, navigate]); + const handleCheckboxChange = useCallback( + (fieldName: string) => (value: boolean) => { + setFieldValue(fieldName, value); + }, + [setFieldValue] + ); + return ( @@ -167,6 +176,14 @@ export const NewUser = () => { multiline /> + + + diff --git a/src/components/accessories/admin/users/newUser/validation.ts b/src/components/accessories/admin/users/newUser/validation.ts index 3e13775c8..028e355ef 100644 --- a/src/components/accessories/admin/users/newUser/validation.ts +++ b/src/components/accessories/admin/users/newUser/validation.ts @@ -1,5 +1,5 @@ import { TFunction } from "react-i18next"; -import { object, ref, string } from "yup"; +import { boolean, 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. @@ -30,4 +30,5 @@ export const userSchema = (t: TFunction<"translation">) => .required(t("user.validatePasswordNeeded")) .oneOf([ref("passwd")], t("user.validatePasswordMustMatch")), desc: string(), + deleted: boolean(), }); diff --git a/src/components/accessories/admin/users/userGroupsTable/UserGroupsTable.tsx b/src/components/accessories/admin/users/userGroupsTable/UserGroupsTable.tsx index ddf558149..6347be18c 100644 --- a/src/components/accessories/admin/users/userGroupsTable/UserGroupsTable.tsx +++ b/src/components/accessories/admin/users/userGroupsTable/UserGroupsTable.tsx @@ -1,6 +1,6 @@ import { CircularProgress } from "@mui/material"; import { useAppDispatch, useAppSelector } from "libraries/hooks/redux"; -import React, { ReactNode, useEffect } from "react"; +import React, { ReactNode, useCallback, useEffect, useRef } from "react"; import { useTranslation } from "react-i18next"; import { useSelector } from "react-redux"; @@ -11,11 +11,16 @@ import { deleteUserGroup, deleteUserGroupReset, getUserGroups, + updateUserGroup, + updateUserGroupReset, } from "../../../../../state/usergroups"; import { IState } from "../../../../../types"; import InfoBox from "../../../infoBox/InfoBox"; import Table from "../../../table/Table"; +import { CheckOutlined } from "@mui/icons-material"; +import { TActions } from "components/accessories/table/types"; +import { scrollToElement } from "libraries/uiUtils/scrollToElement"; import classes from "./UserGroupsTable.module.scss"; interface IOwnProps { @@ -26,6 +31,7 @@ interface IOwnProps { export const UserGroupsTable = ({ headerActions, onEdit }: IOwnProps) => { const dispatch = useAppDispatch(); const { t } = useTranslation(); + const infoBoxRef = useRef(null); const canUpdate = usePermission("users.update"); const canDelete = usePermission("exams.delete"); @@ -33,6 +39,7 @@ export const UserGroupsTable = ({ headerActions, onEdit }: IOwnProps) => { dispatch(getUserGroups()); return () => { dispatch(deleteUserGroupReset()); + dispatch(updateUserGroupReset()); }; }, [dispatch]); @@ -40,13 +47,21 @@ export const UserGroupsTable = ({ headerActions, onEdit }: IOwnProps) => { dispatch(deleteUserGroup(row.code)); }; - const header = ["code", "desc"]; + const handleUpdate = useCallback( + (deleted: boolean) => (row: UserGroupDTO) => { + dispatch(updateUserGroup({ ...row, deleted })); + }, + [updateUserGroup] + ); + + const header = ["code", "desc", "deleted"]; const label = { code: t("user.code"), desc: t("user.description"), + deleted: t("common.deleted"), }; - const order = ["code", "desc"]; + const order = ["code", "desc", "deleted"]; const { data, status, error } = useSelector< IState, @@ -54,20 +69,50 @@ export const UserGroupsTable = ({ headerActions, onEdit }: IOwnProps) => { >((state) => state.usergroups.groupList); const deleteGroup = useAppSelector((state) => state.usergroups.delete); + const update = useAppSelector((state) => state.usergroups.update); + + useEffect(() => { + if (update.hasFailed) { + scrollToElement(infoBoxRef.current); + } + + if (update.hasSucceeded) dispatch(getUserGroups()); + return () => { + dispatch(deleteUserGroupReset()); + }; + }, [update.status, dispatch]); useEffect(() => { + if (deleteGroup.hasFailed) { + scrollToElement(infoBoxRef.current); + } + if (deleteGroup.hasSucceeded) dispatch(getUserGroups()); - }, [deleteGroup.hasSucceeded, dispatch]); + return () => { + dispatch(updateUserGroupReset()); + }; + }, [deleteGroup.status, dispatch]); const formatDataToDisplay = (data: UserGroupDTO[]) => { return data.map((item) => { return { code: item.code, desc: item.desc ?? "", + deleted: item.deleted ? : "", }; }); }; + const displayRowAction = useCallback( + (row: UserGroupDTO, action: TActions) => + action === "restore" + ? !!row.deleted + : action === "softDelete" + ? !row.deleted + : true, + [] + ); + return ( {(() => { @@ -83,20 +128,40 @@ export const UserGroupsTable = ({ headerActions, onEdit }: IOwnProps) => { case "SUCCESS": return ( - + <> + {(deleteGroup.hasFailed || update.hasFailed) && ( + + + + )} + + > ); case "SUCCESS_EMPTY": return ; diff --git a/src/components/accessories/admin/users/usersTable/UsersTable.tsx b/src/components/accessories/admin/users/usersTable/UsersTable.tsx index a3d5e72d7..a8b101841 100644 --- a/src/components/accessories/admin/users/usersTable/UsersTable.tsx +++ b/src/components/accessories/admin/users/usersTable/UsersTable.tsx @@ -1,17 +1,24 @@ import { CircularProgress } from "@mui/material"; -import React, { ReactNode, useEffect, useRef } from "react"; +import React, { ReactNode, useCallback, useEffect, useRef } from "react"; import { useTranslation } from "react-i18next"; import { useAppDispatch, useAppSelector } from "libraries/hooks/redux"; import { usePermission } from "libraries/permissionUtils/usePermission"; import checkIcon from "../../../../../assets/check-icon.png"; import { UserDTO } from "../../../../../generated"; -import { deleteUserReset, getUsers } from "../../../../../state/users"; +import { + deleteUserReset, + getUsers, + updateUser, + updateUserReset, +} from "../../../../../state/users"; import ConfirmationDialog from "../../../confirmationDialog/ConfirmationDialog"; import InfoBox from "../../../infoBox/InfoBox"; import Table from "../../../table/Table"; import { TFilterField } from "../../../table/filter/types"; +import { CheckOutlined } from "@mui/icons-material"; +import { TActions } from "components/accessories/table/types"; import { scrollToElement } from "libraries/uiUtils/scrollToElement"; import { getUserGroups } from "state/usergroups"; import classes from "./UsersTable.module.scss"; @@ -31,6 +38,7 @@ export const UsersTable = ({ headerActions, onEdit, onDelete }: IOwnProps) => { const canDelete = usePermission("users.update"); const deleteUser = useAppSelector((state) => state.users.delete); + const update = useAppSelector((state) => state.users.update); useEffect(() => { dispatch(getUsers({})); @@ -38,26 +46,44 @@ export const UsersTable = ({ headerActions, onEdit, onDelete }: IOwnProps) => { return () => { dispatch(deleteUserReset()); + dispatch(updateUserReset()); }; }, [dispatch]); useEffect(() => { - if (deleteUser.status === "FAIL") { + if (update.hasFailed) { + scrollToElement(infoBoxRef.current); + } + + if (update.hasSucceeded) { + dispatch(getUsers({})); + } + return () => { + dispatch(deleteUserReset()); + }; + }, [update.status, dispatch]); + + useEffect(() => { + if (deleteUser.hasFailed) { scrollToElement(infoBoxRef.current); } if (deleteUser.hasSucceeded) { dispatch(getUsers({})); } + return () => { + dispatch(updateUserReset()); + }; }, [deleteUser.status, dispatch]); - const header = ["userName", "userGroupName", "desc"]; + const header = ["userName", "userGroupName", "desc", "deleted"]; const label = { userName: t("user.username"), userGroupName: t("user.groups"), desc: t("user.description"), + deleted: t("common.deleted"), }; - const order = ["userName", "userGroupName", "desc"]; + const order = ["userName", "userGroupName", "desc", "deleted"]; const userGroupOptions = useAppSelector( (state) => state.usergroups.groupList.data?.map((item) => ({ @@ -74,6 +100,11 @@ export const UsersTable = ({ headerActions, onEdit, onDelete }: IOwnProps) => { options: userGroupOptions, }, { key: "userName", label: t("user.username"), type: "text" }, + { + key: "deleted", + label: t("common.deleted"), + type: "boolean", + }, ]; const { data, status, error } = useAppSelector( @@ -88,10 +119,35 @@ export const UsersTable = ({ headerActions, onEdit, onDelete }: IOwnProps) => { item.userGroupName?.desc ?? item.userGroupName?.code ?? "", desc: item.desc ?? "", passwd: item.passwd ?? "", + deleted: item.deleted ? : "", }; }); }; + const handleUpdate = useCallback( + (deleted: boolean) => (row: UserDTO) => { + dispatch( + updateUser({ + ...row, + userGroupName: data!.find((user) => user.userName === row.userName)! + .userGroupName, + deleted, + }) + ); + }, + [updateUser, data] + ); + + const displayRowAction = useCallback( + (row: UserDTO, action: TActions) => + action === "restore" + ? !!row.deleted + : action === "softDelete" + ? !row.deleted + : true, + [] + ); + return ( {(() => { @@ -108,9 +164,16 @@ export const UsersTable = ({ headerActions, onEdit, onDelete }: IOwnProps) => { case "SUCCESS": return ( <> - {deleteUser.status === "FAIL" && ( + {(deleteUser.hasFailed || update.hasFailed) && ( - + )} { rawData={(data ?? []).map((user) => ({ ...user, userGroupName: user.userGroupName?.code, + selected: user.deleted, }))} rowKey="userName" headerActions={headerActions} onEdit={canUpdate ? onEdit : undefined} onDelete={canDelete ? onDelete : undefined} + onRestore={canUpdate ? handleUpdate(false) : undefined} + onSoftDelete={canUpdate ? handleUpdate(true) : undefined} + labels={{ + delete: { message: t("user.confirmUserDeletion") }, + }} + displayRowAction={displayRowAction} /> = ({ onPay, onView, onAdd, + onRestore, + onSoftDelete, addTitle, showEmptyCell = true, renderItemDetails, @@ -61,6 +71,7 @@ const Table: FunctionComponent = ({ onCancel, detailColSpan, displayRowAction, + disableRowAction, detailsExcludedFields, filterColumns = [], onFilterChange, @@ -68,13 +79,16 @@ const Table: FunctionComponent = ({ rawData, rowKey = "code", headerActions, + labels, }) => { const { t } = useTranslation(); const [order, setOrder] = React.useState("desc"); const [orderBy, setOrderBy] = React.useState(initialOrderBy ?? "date"); //keyof -> DTO const [page, setPage] = React.useState(0); - const [openDeleteConfirmation, setOpenDeleteConfirmation] = useState(false); - const [openCancelConfirmation, setOpenCancelConfirmation] = useState(false); + const [openConfirmation, setOpenConfirmation] = useState<{ + action?: TActions; + open: boolean; + }>({ open: false }); const [currentRow, setCurrentRow] = useState({} as any); const [expanded, setExpanded] = useState(false); const [filters, setFilters] = useState>({}); @@ -95,15 +109,27 @@ const Table: FunctionComponent = ({ setOrderBy(property); }; + const disableAction = useCallback( + (row: any, action: TActions) => { + return disableRowAction ? disableRowAction(row, action) : false; + }, + [disableRowAction] + ); + const renderIcon = (type: TActions, row?: any) => { switch (type) { case "edit": return ( onEdit && onEdit(row)} + disabled={disableAction(row, "edit")} + onClick={ + disableAction(row, "edit") + ? () => {} + : () => onEdit && onEdit(row) + } > @@ -113,13 +139,17 @@ const Table: FunctionComponent = ({ { - setCurrentRow(row); - setOpenDeleteConfirmation(true); - }} + title={labels?.delete?.tooltip ?? "Delete"} + disabled={disableAction(row, "delete")} + onClick={ + disableAction(row, "delete") + ? () => {} + : handleOpenConfirmation(row, "delete") + } > - + ); case "print": @@ -127,8 +157,13 @@ const Table: FunctionComponent = ({ onPrint && onPrint(row)} + title={labels?.print?.tooltip ?? "Print"} + disabled={disableAction(row, "print")} + onClick={ + disableAction(row, "print") + ? () => {} + : () => onPrint && onPrint(row) + } > @@ -139,8 +174,13 @@ const Table: FunctionComponent = ({ onView && onView(row)} + title={labels?.view?.tooltip ?? "View details"} + disabled={disableAction(row, "view")} + onClick={ + disableAction(row, "view") + ? () => {} + : () => onView && onView(row) + } > @@ -150,8 +190,11 @@ const Table: FunctionComponent = ({ onPay && onPay(row)} + title={labels?.pay?.tooltip ?? "Add a payment"} + disabled={disableAction(row, "pay")} + onClick={ + disableAction(row, "pay") ? () => {} : () => onPay && onPay(row) + } > @@ -162,8 +205,13 @@ const Table: FunctionComponent = ({ onClose && onClose(row)} + title={labels?.close?.tooltip ?? "Close the bill"} + disabled={disableAction(row, "close")} + onClick={ + disableAction(row, "close") + ? () => {} + : () => onClose && onClose(row) + } > @@ -174,11 +222,13 @@ const Table: FunctionComponent = ({ { - setCurrentRow(row); - setOpenCancelConfirmation(true); - }} + title={labels?.cancel?.tooltip ?? "Cancel"} + disabled={disableAction(row, "cancel")} + onClick={ + disableAction(row, "cancel") + ? () => {} + : handleOpenConfirmation(row, "cancel") + } > @@ -188,17 +238,74 @@ const Table: FunctionComponent = ({ onAdd && onAdd(row)} + title={addTitle ?? labels?.add?.tooltip ?? "Add"} + disabled={disableAction(row, "add")} + onClick={ + disableAction(row, "add") ? () => {} : () => onAdd && onAdd(row) + } > ); + case "restore": + return ( + {} + : handleOpenConfirmation(row, "restore") + } + > + + + ); + case "softDelete": + return ( + {} + : handleOpenConfirmation(row, "softDelete") + } + > + + + ); } }; + const handleOpenConfirmation = useCallback( + (row: any, action?: TActions) => () => { + setCurrentRow(row); + setOpenConfirmation({ open: true, action }); + }, + [setOpenConfirmation, setCurrentRow] + ); + + const closeConfirmationDialog = useCallback(() => { + setOpenConfirmation({ open: false }); + }, []); + const renderActions = (row: any) => { - if (onEdit || onDelete || onPrint || onView || onCancel) { + if ( + onEdit || + onDelete || + onPrint || + onView || + onCancel || + onRestore || + onSoftDelete + ) { return ( = ({ (displayRowAction ? displayRowAction(row, "cancel") : true) ? renderIcon("cancel", row) : ""} + {onRestore && + (displayRowAction ? displayRowAction(row, "restore") : true) + ? renderIcon("restore", row) + : ""} + {onSoftDelete && + (displayRowAction ? displayRowAction(row, "softDelete") : true) + ? renderIcon("softDelete", row) + : ""} ); } }; const handleDelete = () => { if (onDelete) onDelete(currentRow); - setOpenDeleteConfirmation(false); + closeConfirmationDialog(); }; const handleCancel = () => { if (onCancel) onCancel(currentRow); - setOpenCancelConfirmation(false); + closeConfirmationDialog(); + }; + + const handleRestore = () => { + if (onRestore) onRestore(currentRow); + closeConfirmationDialog(); + }; + + const handleSoftDelete = () => { + if (onSoftDelete) onSoftDelete(currentRow); + closeConfirmationDialog(); }; const handleExpand = () => { @@ -379,20 +504,57 @@ const Table: FunctionComponent = ({ )} setOpenDeleteConfirmation(false)} + handleSecondaryButtonClick={closeConfirmationDialog} + /> + + + + = ({ primaryButtonLabel={t("common.ok")} secondaryButtonLabel={t("common.discard")} handlePrimaryButtonClick={handleCancel} - handleSecondaryButtonClick={() => setOpenCancelConfirmation(false)} + handleSecondaryButtonClick={closeConfirmationDialog} /> > ); diff --git a/src/components/accessories/table/types.ts b/src/components/accessories/table/types.ts index e23320ca7..6d0d29f97 100644 --- a/src/components/accessories/table/types.ts +++ b/src/components/accessories/table/types.ts @@ -16,6 +16,8 @@ export interface IProps { onPrint?: (row: any) => void; onView?: (row: any) => void; onAdd?: (row: any) => void; + onRestore?: (row: any) => void; + onSoftDelete?: (row: any) => void; addTitle?: string; showEmptyCell?: boolean; rowClassNames?: (row: T) => string; @@ -28,6 +30,7 @@ export interface IProps { onCancel?: (row: any) => void; detailColSpan?: number; displayRowAction?: (row: any, action: TActions) => boolean; + disableRowAction?: (row: any, action: TActions) => boolean; detailsExcludedFields?: string[]; /** * Column used for the filter. When this prop is provided, don't forget to provide also [rawData] @@ -57,6 +60,9 @@ export interface IProps { */ rowKey?: string; headerActions?: ReactNode; + labels?: Partial< + Record + >; } export interface IRowProps { @@ -84,4 +90,6 @@ export type TActions = | "pay" | "close" | "cancel" - | "add"; + | "add" + | "restore" + | "softDelete"; diff --git a/src/components/activities/billingActivity/types.ts b/src/components/activities/billingActivity/types.ts index ba8823795..a196c69cc 100644 --- a/src/components/activities/billingActivity/types.ts +++ b/src/components/activities/billingActivity/types.ts @@ -1,6 +1,7 @@ +import { BillItemsDTO } from "generated/models/BillItemsDTO"; +import { FullBillDTO } from "generated/models/FullBillDTO"; +import { PriceDTO } from "generated/models/PriceDTO"; import { Dispatch, SetStateAction } from "react"; -import { BillItemsDTO, FullBillDTO } from "../../../generated"; -import { PriceDTO } from "../../../generated/models/PriceDTO"; import { TUserCredentials } from "../../../state/main/types"; interface IOwnProps { diff --git a/src/generated/models/AgeType.ts b/src/generated/models/AgeType.ts deleted file mode 100644 index f4f755067..000000000 --- a/src/generated/models/AgeType.ts +++ /dev/null @@ -1,64 +0,0 @@ -// 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 AgeType - */ -export interface AgeType { - /** - * @type {string} - * @memberof AgeType - */ - createdBy?: string; - /** - * @type {string} - * @memberof AgeType - */ - createdDate?: string; - /** - * @type {string} - * @memberof AgeType - */ - lastModifiedBy?: string; - /** - * @type {string} - * @memberof AgeType - */ - lastModifiedDate?: string; - /** - * @type {number} - * @memberof AgeType - */ - active?: number; - /** - * @type {string} - * @memberof AgeType - */ - code?: string; - /** - * @type {string} - * @memberof AgeType - */ - description: string; - /** - * @type {number} - * @memberof AgeType - */ - from: number; - /** - * @type {number} - * @memberof AgeType - */ - to: number; -} diff --git a/src/generated/models/LitePermissionDTO.ts b/src/generated/models/LitePermissionDTO.ts deleted file mode 100644 index c29d4f7f8..000000000 --- a/src/generated/models/LitePermissionDTO.ts +++ /dev/null @@ -1,24 +0,0 @@ -// 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 LitePermissionDTO - */ -export interface LitePermissionDTO { - /** - * @type {string} - * @memberof LitePermissionDTO - */ - name?: string; -} diff --git a/src/generated/models/OpdWithOperatioRowDTO.ts b/src/generated/models/OpdWithOperatioRowDTO.ts deleted file mode 100644 index b336716d1..000000000 --- a/src/generated/models/OpdWithOperatioRowDTO.ts +++ /dev/null @@ -1,34 +0,0 @@ -// tslint:disable -/** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation - * - * The version of the OpenAPI document: 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 { - OpdDTO, - OperationRowDTO, -} from './'; - -/** - * @export - * @interface OpdWithOperatioRowDTO - */ -export interface OpdWithOperatioRowDTO { - /** - * @type {OpdDTO} - * @memberof OpdWithOperatioRowDTO - */ - opdDTO?: OpdDTO; - /** - * @type {Array} - * @memberof OpdWithOperatioRowDTO - */ - operationRows?: Array; -} diff --git a/src/generated/models/PriceList.ts b/src/generated/models/PriceList.ts deleted file mode 100644 index 4836fc2bc..000000000 --- a/src/generated/models/PriceList.ts +++ /dev/null @@ -1,70 +0,0 @@ -// 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. - */ - -/** - * The price list - * @export - * @interface PriceList - */ -export interface PriceList { - /** - * @type {string} - * @memberof PriceList - */ - createdBy?: string; - /** - * @type {string} - * @memberof PriceList - */ - createdDate?: string; - /** - * @type {string} - * @memberof PriceList - */ - lastModifiedBy?: string; - /** - * @type {string} - * @memberof PriceList - */ - lastModifiedDate?: string; - /** - * @type {number} - * @memberof PriceList - */ - active?: number; - /** - * @type {number} - * @memberof PriceList - */ - id?: number; - /** - * @type {string} - * @memberof PriceList - */ - code: string; - /** - * @type {string} - * @memberof PriceList - */ - name: string; - /** - * @type {string} - * @memberof PriceList - */ - description: string; - /** - * @type {string} - * @memberof PriceList - */ - currency: string; -} diff --git a/src/generated/models/UserDTO.ts b/src/generated/models/UserDTO.ts index 581ebcf1f..693e9e648 100644 --- a/src/generated/models/UserDTO.ts +++ b/src/generated/models/UserDTO.ts @@ -43,4 +43,10 @@ export interface UserDTO { * @memberof UserDTO */ desc?: string; + /** + * Whether the user has been soft deleted or not + * @type {boolean} + * @memberof UserDTO + */ + deleted?: boolean; } diff --git a/src/generated/models/UserGroupDTO.ts b/src/generated/models/UserGroupDTO.ts index a7599a6d7..6d9dbf911 100644 --- a/src/generated/models/UserGroupDTO.ts +++ b/src/generated/models/UserGroupDTO.ts @@ -33,6 +33,12 @@ export interface UserGroupDTO { * @memberof UserGroupDTO */ desc?: string; + /** + * Whether the group has been soft deleted or not + * @type {boolean} + * @memberof UserGroupDTO + */ + deleted?: boolean; /** * List of group\'s permissions * @type {Array} diff --git a/src/generated/models/UserMenuItemDTO.ts b/src/generated/models/UserMenuItemDTO.ts deleted file mode 100644 index 95ecbed27..000000000 --- a/src/generated/models/UserMenuItemDTO.ts +++ /dev/null @@ -1,72 +0,0 @@ -// tslint:disable -/** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation - * - * The version of the OpenAPI document: 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 UserMenuItemDTO - */ -export interface UserMenuItemDTO { - /** - * code of the menu item (must be unique) - * @type {string} - * @memberof UserMenuItemDTO - */ - code: string; - /** - * button label of the menu item - * @type {string} - * @memberof UserMenuItemDTO - */ - buttonLabel: string; - /** - * alt label of the menu item - * @type {string} - * @memberof UserMenuItemDTO - */ - altLabel: string; - /** - * tooltip label of the menu item - * @type {string} - * @memberof UserMenuItemDTO - */ - tooltip?: string; - /** - * shortcut of the menu item - * @type {string} - * @memberof UserMenuItemDTO - */ - shortcut?: string; - /** - * parent submenu of the menu item - * @type {string} - * @memberof UserMenuItemDTO - */ - mySubmenu: string; - /** - * the main window class associated - * @type {string} - * @memberof UserMenuItemDTO - */ - myClass: string; - /** - * position of the menu item - * @type {number} - * @memberof UserMenuItemDTO - */ - position: number; - /** - * @type {boolean} - * @memberof UserMenuItemDTO - */ - asubMenu?: boolean; -} diff --git a/src/generated/models/WardDTO.ts b/src/generated/models/WardDTO.ts index 30323fb44..6f8e7865d 100644 --- a/src/generated/models/WardDTO.ts +++ b/src/generated/models/WardDTO.ts @@ -76,20 +76,20 @@ export interface WardDTO { * @type {boolean} * @memberof WardDTO */ - opd?: boolean; + female?: boolean; /** * @type {boolean} * @memberof WardDTO */ - pharmacy?: boolean; + male?: boolean; /** * @type {boolean} * @memberof WardDTO */ - male?: boolean; + opd?: boolean; /** * @type {boolean} * @memberof WardDTO */ - female?: boolean; + pharmacy?: boolean; } diff --git a/src/resources/i18n/en.json b/src/resources/i18n/en.json index 72d478b5c..66646540d 100644 --- a/src/resources/i18n/en.json +++ b/src/resources/i18n/en.json @@ -51,7 +51,9 @@ "validateGroupCode": "Invalid group code", "validatePasswordMustMatch": "Passwords must match", "validateUserName": "You need to specify a user name", - "validateUserNameRegex": "Allowed characters: lowercase letters(abc), numbers(123), dot(.), dash (-) and underscore (_)" + "validateUserNameRegex": "Allowed characters: lowercase letters(abc), numbers(123), dot(.), dash (-) and underscore (_)", + "confirmUserDeletion": "Are you sure you want to delete the user ?", + "confirmUserGroupDeletion": "Are you sure you want to delete the user group ?" }, "hospital": { "address": "Address", @@ -566,7 +568,12 @@ "to": "To", "datebefore": "Should be before the end date", "dateafter": "should be after start date", - "option": "Option" + "option": "Option", + "deleted": "Deleted", + "restore": "Restore", + "restoreConfirmation": "Are you sure to restore this item ?", + "softDelete": "Mark as deleted", + "softDeleteConfirmation": "Are you sure to mark this item as deleted ?" }, "permission": { "denied": "Permission denied", @@ -879,6 +886,24 @@ "thecodeistoolongmax1char": { "msg": "The ward is too long. It should three characters or less" } + }, + "groupsbrowser": { + "alreadysoftdeleted": { + "msg": "The user group is already set as deleted." + }, + "thisgrouphasusersandcannotbedeleted": { + "msg": "The group you want to delete has users and cannot be deleted." + } + }, + "sql": { + "theselecteditemisstillusedsomewhere": { + "msg": "The selected item is still used somewhere." + } + }, + "userbrowser": { + "alreadysoftdeleted": { + "msg": "The user is already set as deleted." + } } }, "exam": { diff --git a/src/state/prices/types.ts b/src/state/prices/types.ts index 0dd562729..36b2e1066 100644 --- a/src/state/prices/types.ts +++ b/src/state/prices/types.ts @@ -1,5 +1,5 @@ -import { PriceDTO } from "../../generated/models/PriceDTO"; -import { PriceListDTO } from "../../generated/models/PriceListDTO"; +import { PriceDTO } from "generated/models/PriceDTO"; +import { PriceListDTO } from "generated/models/PriceListDTO"; import { ApiResponse } from "../types"; export type IPricesState = { diff --git a/src/state/types/discharges/thunk.ts b/src/state/types/discharges/thunk.ts index 2039d4a08..f04eb7803 100644 --- a/src/state/types/discharges/thunk.ts +++ b/src/state/types/discharges/thunk.ts @@ -1,5 +1,6 @@ import { createAsyncThunk } from "@reduxjs/toolkit"; -import { DischargeTypeApi, DischargeTypeDTO } from "../../../generated"; +import { DischargeTypeDTO } from "generated/models/DischargeTypeDTO"; +import { DischargeTypeApi } from "../../../generated"; import { customConfiguration } from "../../../libraries/apiUtils/configuration"; const api = new DischargeTypeApi(customConfiguration()); diff --git a/src/state/usergroups/slice.ts b/src/state/usergroups/slice.ts index a6a8189a3..370f23f04 100644 --- a/src/state/usergroups/slice.ts +++ b/src/state/usergroups/slice.ts @@ -17,6 +17,9 @@ export const userGroupSlice = createSlice({ deleteUserGroupReset: (state) => { state.delete = initial.delete; }, + getUserGroupReset: (state) => { + state.currentGroup = initial.currentGroup; + }, }, extraReducers: (builder) => builder @@ -78,4 +81,5 @@ export const { createUserGroupReset, updateUserGroupReset, deleteUserGroupReset, + getUserGroupReset, } = userGroupSlice.actions; diff --git a/src/state/usergroups/thunk.ts b/src/state/usergroups/thunk.ts index 39dc14647..8c08ec016 100644 --- a/src/state/usergroups/thunk.ts +++ b/src/state/usergroups/thunk.ts @@ -1,5 +1,6 @@ import { createAsyncThunk } from "@reduxjs/toolkit"; -import { UserGroupDTO, UserGroupsApi } from "../../generated"; +import { UserGroupDTO } from "generated/models/UserGroupDTO"; +import { UserGroupsApi } from "../../generated"; import { customConfiguration } from "../../libraries/apiUtils/configuration"; const api = new UserGroupsApi(customConfiguration()); @@ -74,4 +75,4 @@ export const revokePermission = createAsyncThunk( .revokePermission({ groupCode, id: permissionId }) .toPromise() .catch((error) => thunkApi.rejectWithValue(error.response)) -); \ No newline at end of file +); diff --git a/src/state/usergroups/types.ts b/src/state/usergroups/types.ts index 60eb05cee..65f0e2044 100644 --- a/src/state/usergroups/types.ts +++ b/src/state/usergroups/types.ts @@ -1,4 +1,4 @@ -import { UserGroupDTO } from "../../generated"; +import { UserGroupDTO } from "generated/models/UserGroupDTO"; import { ApiResponse } from "../types"; export type IUserGroupState = {
{t("user.groupPermissionsOnlyOnUpdate")}