From 775474edc7fd465bb6f8d64db58381a293f85191 Mon Sep 17 00:00:00 2001 From: SteveGT96 Date: Tue, 15 Oct 2024 16:26:18 +0100 Subject: [PATCH 1/8] chore: Align api spec file --- api/oh.yaml | 5450 +++++++++-------- .../admin/exams/editExam/EditExam.tsx | 9 +- .../admin/exams/newExam/NewExam.tsx | 2 +- src/generated/.openapi-generator/FILES | 264 +- src/generated/apis/ExamsApi.ts | 29 +- src/generated/apis/SuppliersApi.ts | 22 + src/generated/apis/UserGroupsApi.ts | 54 + src/generated/models/ExamWithRowsDTO.ts | 34 + src/generated/models/GroupPermissionsDTO.ts | 25 + src/generated/models/OperationDTO.ts | 17 + src/generated/models/Patient.ts | 4 +- src/generated/models/PatientDTO.ts | 45 +- ...filePhotoPhotoAsImageGraphicsClipBounds.ts | 12 +- ...oPhotoAsImageGraphicsClipBoundsBounds2D.ts | 20 +- ...entProfilePhotoPhotoAsImageGraphicsFont.ts | 10 +- ...ilePhotoPhotoAsImageGraphicsFontMetrics.ts | 8 +- src/generated/models/TherapyRow.ts | 8 +- src/generated/models/WardDTO.ts | 6 +- src/generated/models/index.ts | 2 + src/generated/runtime.ts | 337 +- src/state/exams/thunk.ts | 17 +- 21 files changed, 3293 insertions(+), 3082 deletions(-) create mode 100644 src/generated/models/ExamWithRowsDTO.ts create mode 100644 src/generated/models/GroupPermissionsDTO.ts diff --git a/api/oh.yaml b/api/oh.yaml index dced99431..39802bb7f 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": @@ -26,18 +26,18 @@ paths: schema: type: array items: - $ref: '#/components/schemas/WardDTO' + $ref: "#/components/schemas/WardDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Wards + - Wards operationId: updateWard requestBody: content: application/json: schema: - $ref: '#/components/schemas/WardDTO' + $ref: "#/components/schemas/WardDTO" required: true responses: "200": @@ -45,18 +45,18 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/WardDTO' + $ref: "#/components/schemas/WardDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Wards + - Wards operationId: newWard requestBody: content: application/json: schema: - $ref: '#/components/schemas/WardDTO' + $ref: "#/components/schemas/WardDTO" required: true responses: "200": @@ -64,26 +64,26 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/WardDTO' + $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: schema: - $ref: '#/components/schemas/VisitDTO' + $ref: "#/components/schemas/VisitDTO" required: true responses: "200": @@ -91,13 +91,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/VisitDTO' + $ref: "#/components/schemas/VisitDTO" security: - - bearerAuth: [] + - bearerAuth: [] /vaccinetypes: get: tags: - - Vaccine Type + - Vaccine Type operationId: getVaccineType responses: "200": @@ -107,18 +107,18 @@ paths: schema: type: array items: - $ref: '#/components/schemas/VaccineTypeDTO' + $ref: "#/components/schemas/VaccineTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Vaccine Type + - Vaccine Type operationId: updateVaccineType requestBody: content: application/json: schema: - $ref: '#/components/schemas/VaccineTypeDTO' + $ref: "#/components/schemas/VaccineTypeDTO" required: true responses: "200": @@ -126,18 +126,18 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/VaccineTypeDTO' + $ref: "#/components/schemas/VaccineTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Vaccine Type + - Vaccine Type operationId: newVaccineType requestBody: content: application/json: schema: - $ref: '#/components/schemas/VaccineTypeDTO' + $ref: "#/components/schemas/VaccineTypeDTO" required: true responses: "200": @@ -145,13 +145,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/VaccineTypeDTO' + $ref: "#/components/schemas/VaccineTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] /vaccines: get: tags: - - Vaccines + - Vaccines operationId: getVaccines responses: "200": @@ -161,18 +161,18 @@ paths: schema: type: array items: - $ref: '#/components/schemas/VaccineDTO' + $ref: "#/components/schemas/VaccineDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Vaccines + - Vaccines operationId: updateVaccine requestBody: content: application/json: schema: - $ref: '#/components/schemas/VaccineDTO' + $ref: "#/components/schemas/VaccineDTO" required: true responses: "200": @@ -180,18 +180,18 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/VaccineDTO' + $ref: "#/components/schemas/VaccineDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Vaccines + - Vaccines operationId: newVaccine requestBody: content: application/json: schema: - $ref: '#/components/schemas/VaccineDTO' + $ref: "#/components/schemas/VaccineDTO" required: true responses: "200": @@ -199,26 +199,26 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/VaccineDTO' + $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: schema: - $ref: '#/components/schemas/UserSettingDTO' + $ref: "#/components/schemas/UserSettingDTO" required: true responses: "200": @@ -226,60 +226,60 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UserSettingDTO' + $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 content: application/json: schema: - $ref: '#/components/schemas/UserDTO' + $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: schema: - $ref: '#/components/schemas/UserDTO' + $ref: "#/components/schemas/UserDTO" required: true responses: "200": @@ -287,28 +287,28 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UserDTO' + $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": @@ -316,18 +316,18 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UserProfileDTO' + $ref: "#/components/schemas/UserProfileDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Users + - Users operationId: updateProfile requestBody: content: application/json: schema: - $ref: '#/components/schemas/UserDTO' + $ref: "#/components/schemas/UserDTO" required: true responses: "200": @@ -335,44 +335,44 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UserProfileDTO' + $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 content: application/json: schema: - $ref: '#/components/schemas/UserGroupDTO' + $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: schema: - $ref: '#/components/schemas/UserGroupDTO' + $ref: "#/components/schemas/UserGroupDTO" required: true responses: "200": @@ -380,36 +380,91 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UserGroupDTO' + $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 + operationId: updateGroupPermissions + parameters: + - name: group_code + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GroupPermissionsDTO" + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/PermissionDTO" + security: + - bearerAuth: [] + patch: + tags: + - User Groups + operationId: replaceGroupPermissions + parameters: + - name: group_code + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GroupPermissionsDTO" + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/PermissionDTO" + security: + - 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 @@ -418,18 +473,18 @@ paths: schema: type: array items: - $ref: '#/components/schemas/SupplierDTO' + $ref: "#/components/schemas/SupplierDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Suppliers + - Suppliers operationId: updateSupplier requestBody: content: application/json: schema: - $ref: '#/components/schemas/SupplierDTO' + $ref: "#/components/schemas/SupplierDTO" required: true responses: "200": @@ -437,45 +492,45 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SupplierDTO' + $ref: "#/components/schemas/SupplierDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Suppliers + - Suppliers operationId: saveSupplier requestBody: content: application/json: schema: - $ref: '#/components/schemas/SupplierDTO' + $ref: "#/components/schemas/SupplierDTO" required: true responses: - "200": - description: OK + "201": + description: Created content: application/json: schema: - $ref: '#/components/schemas/SupplierDTO' + $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: schema: - $ref: '#/components/schemas/PricesOthersDTO' + $ref: "#/components/schemas/PricesOthersDTO" required: true responses: "200": @@ -483,20 +538,20 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PricesOthersDTO' + $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 @@ -505,24 +560,24 @@ 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: schema: - $ref: '#/components/schemas/PriceListDTO' + $ref: "#/components/schemas/PriceListDTO" required: true responses: "200": @@ -530,20 +585,20 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PriceListDTO' + $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 @@ -552,23 +607,23 @@ 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: schema: - $ref: '#/components/schemas/PregnantTreatmentTypeDTO' + $ref: "#/components/schemas/PregnantTreatmentTypeDTO" required: true responses: "200": @@ -576,19 +631,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PregnantTreatmentTypeDTO' + $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 @@ -597,24 +652,24 @@ 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: schema: - $ref: '#/components/schemas/PatientVaccineDTO' + $ref: "#/components/schemas/PatientVaccineDTO" required: true responses: "200": @@ -622,20 +677,20 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PatientVaccineDTO' + $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 @@ -644,44 +699,44 @@ 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 content: application/json: schema: - $ref: '#/components/schemas/PatientDTO' + $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: schema: - $ref: '#/components/schemas/PatientDTO' + $ref: "#/components/schemas/PatientDTO" required: true responses: "200": @@ -689,20 +744,20 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PatientDTO' + $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 @@ -711,44 +766,44 @@ 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 content: application/json: schema: - $ref: '#/components/schemas/PatientConsensusDTO' + $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: schema: - $ref: '#/components/schemas/PatientConsensusDTO' + $ref: "#/components/schemas/PatientConsensusDTO" required: true responses: "200": @@ -756,25 +811,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PatientConsensusDTO' + $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: schema: - $ref: '#/components/schemas/OperationTypeDTO' + $ref: "#/components/schemas/OperationTypeDTO" required: true responses: "200": @@ -782,19 +837,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OperationTypeDTO' + $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 @@ -803,42 +858,42 @@ 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 content: application/json: schema: - $ref: '#/components/schemas/OperationDTO' + $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: schema: - $ref: '#/components/schemas/OperationDTO' + $ref: "#/components/schemas/OperationDTO" required: true responses: "200": @@ -846,19 +901,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OperationDTO' + $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 @@ -867,17 +922,17 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /operations/rows: put: tags: - - Operations + - Operations operationId: updateOperationRow requestBody: content: application/json: schema: - $ref: '#/components/schemas/OperationRowDTO' + $ref: "#/components/schemas/OperationRowDTO" required: true responses: "200": @@ -888,16 +943,16 @@ paths: type: integer format: int32 security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Operations + - Operations operationId: newOperationRow requestBody: content: application/json: schema: - $ref: '#/components/schemas/OperationRowDTO' + $ref: "#/components/schemas/OperationRowDTO" required: true responses: "200": @@ -905,26 +960,26 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OperationRowDTO' + $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: schema: - $ref: '#/components/schemas/OpdDTO' + $ref: "#/components/schemas/OpdDTO" required: true responses: "200": @@ -932,20 +987,20 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OpdDTO' + $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 @@ -954,24 +1009,24 @@ 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: schema: - $ref: '#/components/schemas/OpdWithOperationRowDTO' + $ref: "#/components/schemas/OpdWithOperationRowDTO" required: true responses: "200": @@ -979,13 +1034,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OpdWithOperationRowDTO' + $ref: "#/components/schemas/OpdWithOperationRowDTO" security: - - bearerAuth: [] + - bearerAuth: [] /medstockmovementtypes: get: tags: - - Medical Stock Movement Type + - Medical Stock Movement Type operationId: getMedicalDsrStockMovementType responses: "200": @@ -995,18 +1050,18 @@ paths: schema: type: array items: - $ref: '#/components/schemas/MovementTypeDTO' + $ref: "#/components/schemas/MovementTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Medical Stock Movement Type + - Medical Stock Movement Type operationId: updateMedicalDsrStockMovementType requestBody: content: application/json: schema: - $ref: '#/components/schemas/MovementTypeDTO' + $ref: "#/components/schemas/MovementTypeDTO" required: true responses: "200": @@ -1014,18 +1069,18 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/MovementTypeDTO' + $ref: "#/components/schemas/MovementTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Medical Stock Movement Type + - Medical Stock Movement Type operationId: newMedicalDsrStockMovementType requestBody: content: application/json: schema: - $ref: '#/components/schemas/MovementTypeDTO' + $ref: "#/components/schemas/MovementTypeDTO" required: true responses: "200": @@ -1033,13 +1088,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/MovementTypeDTO' + $ref: "#/components/schemas/MovementTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] /medicaltypes: get: tags: - - Medical Types + - Medical Types operationId: getMedicalTypes responses: "200": @@ -1049,18 +1104,18 @@ paths: schema: type: array items: - $ref: '#/components/schemas/MedicalTypeDTO' + $ref: "#/components/schemas/MedicalTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Medical Types + - Medical Types operationId: updateMedicalType requestBody: content: application/json: schema: - $ref: '#/components/schemas/MedicalTypeDTO' + $ref: "#/components/schemas/MedicalTypeDTO" required: true responses: "200": @@ -1068,18 +1123,18 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/MedicalTypeDTO' + $ref: "#/components/schemas/MedicalTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Medical Types + - Medical Types operationId: createMedicalType requestBody: content: application/json: schema: - $ref: '#/components/schemas/MedicalTypeDTO' + $ref: "#/components/schemas/MedicalTypeDTO" required: true responses: "200": @@ -1087,24 +1142,24 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/MedicalTypeDTO' + $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 @@ -1113,25 +1168,25 @@ paths: schema: type: array items: - $ref: '#/components/schemas/MedicalDTO' + $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: schema: - $ref: '#/components/schemas/MedicalDTO' + $ref: "#/components/schemas/MedicalDTO" required: true responses: "200": @@ -1139,25 +1194,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/MedicalDTO' + $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: schema: - $ref: '#/components/schemas/MedicalDTO' + $ref: "#/components/schemas/MedicalDTO" required: true responses: "200": @@ -1165,19 +1220,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/MedicalDTO' + $ref: "#/components/schemas/MedicalDTO" security: - - bearerAuth: [] + - bearerAuth: [] /malnutritions: put: tags: - - Malnutritions + - Malnutritions operationId: updateMalnutrition requestBody: content: application/json: schema: - $ref: '#/components/schemas/MalnutritionDTO' + $ref: "#/components/schemas/MalnutritionDTO" required: true responses: "200": @@ -1185,18 +1240,18 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/MalnutritionDTO' + $ref: "#/components/schemas/MalnutritionDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Malnutritions + - Malnutritions operationId: newMalnutrition requestBody: content: application/json: schema: - $ref: '#/components/schemas/MalnutritionDTO' + $ref: "#/components/schemas/MalnutritionDTO" required: true responses: "200": @@ -1204,20 +1259,20 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/MalnutritionDTO' + $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 @@ -1226,44 +1281,44 @@ 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 content: application/json: schema: - $ref: '#/components/schemas/LaboratoryDTO' + $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: schema: - $ref: '#/components/schemas/LabWithRowsDTO' + $ref: "#/components/schemas/LabWithRowsDTO" required: true responses: "200": @@ -1273,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 @@ -1293,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 @@ -1319,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 @@ -1339,23 +1394,23 @@ 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: schema: - $ref: '#/components/schemas/HospitalDTO' + $ref: "#/components/schemas/HospitalDTO" required: true responses: "200": @@ -1363,25 +1418,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/HospitalDTO' + $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: schema: - $ref: '#/components/schemas/ExamTypeDTO' + $ref: "#/components/schemas/ExamTypeDTO" required: true responses: "200": @@ -1389,19 +1444,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ExamTypeDTO' + $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 @@ -1410,23 +1465,23 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /exams/{code}: put: tags: - - Exams - operationId: updateExams + - 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: schema: - $ref: '#/components/schemas/ExamDTO' + $ref: "#/components/schemas/ExamWithRowsDTO" required: true responses: "200": @@ -1434,19 +1489,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ExamDTO' + $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 @@ -1455,44 +1510,44 @@ 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 content: application/json: schema: - $ref: '#/components/schemas/PatientExaminationDTO' + $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: schema: - $ref: '#/components/schemas/PatientExaminationDTO' + $ref: "#/components/schemas/PatientExaminationDTO" required: true responses: "200": @@ -1502,11 +1557,11 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /diseasetypes: get: tags: - - Disease Types + - Disease Types operationId: getAllDiseaseTypes responses: "200": @@ -1516,18 +1571,18 @@ paths: schema: type: array items: - $ref: '#/components/schemas/DiseaseTypeDTO' + $ref: "#/components/schemas/DiseaseTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Disease Types + - Disease Types operationId: updateDiseaseType requestBody: content: application/json: schema: - $ref: '#/components/schemas/DiseaseTypeDTO' + $ref: "#/components/schemas/DiseaseTypeDTO" required: true responses: "200": @@ -1535,18 +1590,18 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DiseaseTypeDTO' + $ref: "#/components/schemas/DiseaseTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Disease Types + - Disease Types operationId: newDiseaseType requestBody: content: application/json: schema: - $ref: '#/components/schemas/DiseaseTypeDTO' + $ref: "#/components/schemas/DiseaseTypeDTO" required: true responses: "200": @@ -1554,19 +1609,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DiseaseTypeDTO' + $ref: "#/components/schemas/DiseaseTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] /diseases: put: tags: - - Diseases + - Diseases operationId: updateDisease requestBody: content: application/json: schema: - $ref: '#/components/schemas/DiseaseDTO' + $ref: "#/components/schemas/DiseaseDTO" required: true responses: "200": @@ -1574,18 +1629,18 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DiseaseDTO' + $ref: "#/components/schemas/DiseaseDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Diseases + - Diseases operationId: newDisease requestBody: content: application/json: schema: - $ref: '#/components/schemas/DiseaseDTO' + $ref: "#/components/schemas/DiseaseDTO" required: true responses: "200": @@ -1593,13 +1648,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DiseaseDTO' + $ref: "#/components/schemas/DiseaseDTO" security: - - bearerAuth: [] + - bearerAuth: [] /dischargetypes: get: tags: - - DischargeType + - DischargeType operationId: getDischargeTypes responses: "200": @@ -1609,18 +1664,18 @@ paths: schema: type: array items: - $ref: '#/components/schemas/DischargeTypeDTO' + $ref: "#/components/schemas/DischargeTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - DischargeType + - DischargeType operationId: updateDischargeTypet requestBody: content: application/json: schema: - $ref: '#/components/schemas/DischargeTypeDTO' + $ref: "#/components/schemas/DischargeTypeDTO" required: true responses: "200": @@ -1628,18 +1683,18 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DischargeTypeDTO' + $ref: "#/components/schemas/DischargeTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - DischargeType + - DischargeType operationId: newDischargeType requestBody: content: application/json: schema: - $ref: '#/components/schemas/DischargeTypeDTO' + $ref: "#/components/schemas/DischargeTypeDTO" required: true responses: "200": @@ -1647,13 +1702,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DischargeTypeDTO' + $ref: "#/components/schemas/DischargeTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] /deliverytypes: get: tags: - - Delivery Type + - Delivery Type operationId: getDeliveryTypes responses: "200": @@ -1663,18 +1718,18 @@ paths: schema: type: array items: - $ref: '#/components/schemas/DeliveryTypeDTO' + $ref: "#/components/schemas/DeliveryTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Delivery Type + - Delivery Type operationId: updateDeliveryTypes requestBody: content: application/json: schema: - $ref: '#/components/schemas/DeliveryTypeDTO' + $ref: "#/components/schemas/DeliveryTypeDTO" required: true responses: "200": @@ -1682,18 +1737,18 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DeliveryTypeDTO' + $ref: "#/components/schemas/DeliveryTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Delivery Type + - Delivery Type operationId: newDeliveryType requestBody: content: application/json: schema: - $ref: '#/components/schemas/DeliveryTypeDTO' + $ref: "#/components/schemas/DeliveryTypeDTO" required: true responses: "200": @@ -1701,13 +1756,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DeliveryTypeDTO' + $ref: "#/components/schemas/DeliveryTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] /deliveryresulttypes: get: tags: - - Delivery Result Type + - Delivery Result Type operationId: getDeliveryResultTypes responses: "200": @@ -1717,18 +1772,18 @@ paths: schema: type: array items: - $ref: '#/components/schemas/DeliveryResultTypeDTO' + $ref: "#/components/schemas/DeliveryResultTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Delivery Result Type + - Delivery Result Type operationId: updateDeliveryResultTypes requestBody: content: application/json: schema: - $ref: '#/components/schemas/DeliveryResultTypeDTO' + $ref: "#/components/schemas/DeliveryResultTypeDTO" required: true responses: "200": @@ -1736,18 +1791,18 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DeliveryResultTypeDTO' + $ref: "#/components/schemas/DeliveryResultTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Delivery Result Type + - Delivery Result Type operationId: newDeliveryResultType requestBody: content: application/json: schema: - $ref: '#/components/schemas/DeliveryResultTypeDTO' + $ref: "#/components/schemas/DeliveryResultTypeDTO" required: true responses: "200": @@ -1755,46 +1810,46 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DeliveryResultTypeDTO' + $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 content: application/json: schema: - $ref: '#/components/schemas/BillDTO' + $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: schema: - $ref: '#/components/schemas/FullBillDTO' + $ref: "#/components/schemas/FullBillDTO" required: true responses: "200": @@ -1802,20 +1857,20 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FullBillDTO' + $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 @@ -1824,11 +1879,11 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /agetypes: get: tags: - - AgeTypes + - AgeTypes operationId: getAllAgeTypes responses: "200": @@ -1838,18 +1893,18 @@ paths: schema: type: array items: - $ref: '#/components/schemas/AgeTypeDTO' + $ref: "#/components/schemas/AgeTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - AgeTypes + - AgeTypes operationId: updateAgeType requestBody: content: application/json: schema: - $ref: '#/components/schemas/AgeTypeDTO' + $ref: "#/components/schemas/AgeTypeDTO" required: true responses: "200": @@ -1857,13 +1912,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AgeTypeDTO' + $ref: "#/components/schemas/AgeTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] /admissiontypes: get: tags: - - AdmissionTypes + - AdmissionTypes operationId: getAdmissionTypes responses: "200": @@ -1873,18 +1928,18 @@ paths: schema: type: array items: - $ref: '#/components/schemas/AdmissionTypeDTO' + $ref: "#/components/schemas/AdmissionTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - AdmissionTypes + - AdmissionTypes operationId: updateAdmissionTypes requestBody: content: application/json: schema: - $ref: '#/components/schemas/AdmissionTypeDTO' + $ref: "#/components/schemas/AdmissionTypeDTO" required: true responses: "200": @@ -1892,18 +1947,18 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AdmissionTypeDTO' + $ref: "#/components/schemas/AdmissionTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - AdmissionTypes + - AdmissionTypes operationId: newAdmissionType requestBody: content: application/json: schema: - $ref: '#/components/schemas/AdmissionTypeDTO' + $ref: "#/components/schemas/AdmissionTypeDTO" required: true responses: "200": @@ -1911,42 +1966,42 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AdmissionTypeDTO' + $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 @@ -1955,18 +2010,18 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PageAdmissionDTO' + $ref: "#/components/schemas/PageAdmissionDTO" security: - - bearerAuth: [] + - bearerAuth: [] put: tags: - - Admissions + - Admissions operationId: updateAdmissions requestBody: content: application/json: schema: - $ref: '#/components/schemas/AdmissionDTO' + $ref: "#/components/schemas/AdmissionDTO" required: true responses: "400": @@ -1976,18 +2031,18 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AdmissionDTO' + $ref: "#/components/schemas/AdmissionDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Admissions + - Admissions operationId: newAdmissions requestBody: content: application/json: schema: - $ref: '#/components/schemas/AdmissionDTO' + $ref: "#/components/schemas/AdmissionDTO" required: true responses: "400": @@ -1997,19 +2052,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AdmissionDTO' + $ref: "#/components/schemas/AdmissionDTO" security: - - bearerAuth: [] + - bearerAuth: [] /visits: post: tags: - - Visit + - Visit operationId: newVisit requestBody: content: application/json: schema: - $ref: '#/components/schemas/VisitDTO' + $ref: "#/components/schemas/VisitDTO" required: true responses: "200": @@ -2017,13 +2072,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/VisitDTO' + $ref: "#/components/schemas/VisitDTO" security: - - bearerAuth: [] + - bearerAuth: [] /visits/insertList: post: tags: - - Visit + - Visit operationId: newVisits requestBody: content: @@ -2031,7 +2086,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/VisitDTO' + $ref: "#/components/schemas/VisitDTO" required: true responses: "200": @@ -2041,11 +2096,11 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /usersettings: get: tags: - - User Settings + - User Settings operationId: getUserSettings responses: "200": @@ -2055,18 +2110,18 @@ paths: schema: type: array items: - $ref: '#/components/schemas/UserSettingDTO' + $ref: "#/components/schemas/UserSettingDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - User Settings + - User Settings operationId: newUserSettings requestBody: content: application/json: schema: - $ref: '#/components/schemas/UserSettingDTO' + $ref: "#/components/schemas/UserSettingDTO" required: true responses: "201": @@ -2074,20 +2129,20 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UserSettingDTO' + $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 @@ -2096,18 +2151,18 @@ paths: schema: type: array items: - $ref: '#/components/schemas/UserDTO' + $ref: "#/components/schemas/UserDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Users + - Users operationId: newUser requestBody: content: application/json: schema: - $ref: '#/components/schemas/UserDTO' + $ref: "#/components/schemas/UserDTO" required: true responses: "201": @@ -2115,13 +2170,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UserDTO' + $ref: "#/components/schemas/UserDTO" security: - - bearerAuth: [] + - bearerAuth: [] /usergroups: get: tags: - - User Groups + - User Groups operationId: getUserGroups responses: "200": @@ -2131,18 +2186,18 @@ paths: schema: type: array items: - $ref: '#/components/schemas/UserGroupDTO' + $ref: "#/components/schemas/UserGroupDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - User Groups + - User Groups operationId: newUserGroup requestBody: content: application/json: schema: - $ref: '#/components/schemas/UserGroupDTO' + $ref: "#/components/schemas/UserGroupDTO" required: true responses: "201": @@ -2150,26 +2205,26 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UserGroupDTO' + $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 @@ -2179,38 +2234,38 @@ 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: application/json: schema: - $ref: '#/components/schemas/TherapyRowDTO' + $ref: "#/components/schemas/TherapyRowDTO" required: true responses: "200": @@ -2218,13 +2273,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TherapyRowDTO' + $ref: "#/components/schemas/TherapyRowDTO" security: - - bearerAuth: [] + - bearerAuth: [] /therapies/replace: post: tags: - - Therapies + - Therapies operationId: replaceTherapies requestBody: content: @@ -2232,7 +2287,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/TherapyRowDTO' + $ref: "#/components/schemas/TherapyRowDTO" required: true responses: "200": @@ -2240,13 +2295,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TherapyRow' + $ref: "#/components/schemas/TherapyRow" security: - - bearerAuth: [] + - bearerAuth: [] /therapies/meds-out-of-stock: post: tags: - - Therapies + - Therapies operationId: getMedicalsOutOfStock requestBody: content: @@ -2254,7 +2309,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/TherapyDTO' + $ref: "#/components/schemas/TherapyDTO" required: true responses: "200": @@ -2264,13 +2319,13 @@ paths: schema: type: array items: - $ref: '#/components/schemas/MedicalDTO' + $ref: "#/components/schemas/MedicalDTO" security: - - bearerAuth: [] + - bearerAuth: [] /therapies/from-rows: post: tags: - - Therapies + - Therapies operationId: getTherapies requestBody: content: @@ -2278,7 +2333,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/TherapyRowDTO' + $ref: "#/components/schemas/TherapyRowDTO" required: true responses: "200": @@ -2288,19 +2343,19 @@ paths: schema: type: array items: - $ref: '#/components/schemas/TherapyDTO' + $ref: "#/components/schemas/TherapyDTO" security: - - bearerAuth: [] + - bearerAuth: [] /therapies/from-row: post: tags: - - Therapies + - Therapies operationId: getTherapy requestBody: content: application/json: schema: - $ref: '#/components/schemas/TherapyRowDTO' + $ref: "#/components/schemas/TherapyRowDTO" required: true responses: "200": @@ -2308,27 +2363,27 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TherapyDTO' + $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: schema: type: array items: - $ref: '#/components/schemas/MovementDTO' + $ref: "#/components/schemas/MovementDTO" required: true responses: "200": @@ -2338,25 +2393,25 @@ 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: schema: type: array items: - $ref: '#/components/schemas/MovementDTO' + $ref: "#/components/schemas/MovementDTO" required: true responses: "200": @@ -2366,23 +2421,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 @@ -2391,25 +2446,25 @@ paths: schema: type: array items: - $ref: '#/components/schemas/SmsDTO' + $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: schema: - $ref: '#/components/schemas/SmsDTO' + $ref: "#/components/schemas/SmsDTO" required: true responses: "200": @@ -2419,11 +2474,11 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /sms/delete: post: tags: - - SMS + - SMS operationId: deleteSms requestBody: content: @@ -2431,7 +2486,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/SmsDTO' + $ref: "#/components/schemas/SmsDTO" required: true responses: "200": @@ -2441,11 +2496,11 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /pricesothers: get: tags: - - Others Price + - Others Price operationId: getPricesOthers responses: "200": @@ -2455,18 +2510,18 @@ paths: schema: type: array items: - $ref: '#/components/schemas/PricesOthersDTO' + $ref: "#/components/schemas/PricesOthersDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Others Price + - Others Price operationId: newPricesOthers requestBody: content: application/json: schema: - $ref: '#/components/schemas/PricesOthersDTO' + $ref: "#/components/schemas/PricesOthersDTO" required: true responses: "200": @@ -2474,13 +2529,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PricesOthersDTO' + $ref: "#/components/schemas/PricesOthersDTO" security: - - bearerAuth: [] + - bearerAuth: [] /pricelists: get: tags: - - Price Lists + - Price Lists operationId: getPriceLists responses: "200": @@ -2490,18 +2545,18 @@ paths: schema: type: array items: - $ref: '#/components/schemas/PriceListDTO' + $ref: "#/components/schemas/PriceListDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Price Lists + - Price Lists operationId: newPriceList requestBody: content: application/json: schema: - $ref: '#/components/schemas/PriceListDTO' + $ref: "#/components/schemas/PriceListDTO" required: true responses: "200": @@ -2509,13 +2564,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PriceListDTO' + $ref: "#/components/schemas/PriceListDTO" security: - - bearerAuth: [] + - bearerAuth: [] /pregnanttreatmenttypes: get: tags: - - Pregnant Treatment Types + - Pregnant Treatment Types operationId: getPregnantTreatmentTypes responses: "200": @@ -2525,18 +2580,18 @@ paths: schema: type: array items: - $ref: '#/components/schemas/PregnantTreatmentTypeDTO' + $ref: "#/components/schemas/PregnantTreatmentTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Pregnant Treatment Types + - Pregnant Treatment Types operationId: newPregnantTreatmentType requestBody: content: application/json: schema: - $ref: '#/components/schemas/PregnantTreatmentTypeDTO' + $ref: "#/components/schemas/PregnantTreatmentTypeDTO" required: true responses: "200": @@ -2544,19 +2599,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PregnantTreatmentTypeDTO' + $ref: "#/components/schemas/PregnantTreatmentTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] /patientvaccines: post: tags: - - Patient Vaccines + - Patient Vaccines operationId: newPatientVaccine requestBody: content: application/json: schema: - $ref: '#/components/schemas/PatientVaccineDTO' + $ref: "#/components/schemas/PatientVaccineDTO" required: true responses: "200": @@ -2564,47 +2619,47 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PatientVaccineDTO' + $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 content: application/json: schema: - $ref: '#/components/schemas/PagePatientDTO' + $ref: "#/components/schemas/PagePatientDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Patients + - Patients operationId: newPatient requestBody: content: application/json: schema: - $ref: '#/components/schemas/PatientDTO' + $ref: "#/components/schemas/PatientDTO" required: true responses: "200": @@ -2612,13 +2667,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PatientDTO' + $ref: "#/components/schemas/PatientDTO" security: - - bearerAuth: [] + - bearerAuth: [] /operationtypes: get: tags: - - Operations Types + - Operations Types operationId: getOperationTypes responses: "200": @@ -2628,18 +2683,18 @@ paths: schema: type: array items: - $ref: '#/components/schemas/OperationTypeDTO' + $ref: "#/components/schemas/OperationTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Operations Types + - Operations Types operationId: newOperationType requestBody: content: application/json: schema: - $ref: '#/components/schemas/OperationTypeDTO' + $ref: "#/components/schemas/OperationTypeDTO" required: true responses: "200": @@ -2647,13 +2702,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OperationTypeDTO' + $ref: "#/components/schemas/OperationTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] /operations: get: tags: - - Operations + - Operations operationId: getOperations responses: "200": @@ -2663,18 +2718,18 @@ paths: schema: type: array items: - $ref: '#/components/schemas/OperationDTO' + $ref: "#/components/schemas/OperationDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Operations + - Operations operationId: newOperation requestBody: content: application/json: schema: - $ref: '#/components/schemas/OperationDTO' + $ref: "#/components/schemas/OperationDTO" required: true responses: "200": @@ -2682,19 +2737,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OperationDTO' + $ref: "#/components/schemas/OperationDTO" security: - - bearerAuth: [] + - bearerAuth: [] /operations/rows/search/opd: post: tags: - - Operations + - Operations operationId: getOperationRowsByOpd requestBody: content: application/json: schema: - $ref: '#/components/schemas/OpdDTO' + $ref: "#/components/schemas/OpdDTO" required: true responses: "200": @@ -2704,19 +2759,19 @@ paths: schema: type: array items: - $ref: '#/components/schemas/OperationRowDTO' + $ref: "#/components/schemas/OperationRowDTO" security: - - bearerAuth: [] + - bearerAuth: [] /opds: post: tags: - - Opds + - Opds operationId: newOpd requestBody: content: application/json: schema: - $ref: '#/components/schemas/OpdDTO' + $ref: "#/components/schemas/OpdDTO" required: true responses: "200": @@ -2724,19 +2779,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OpdDTO' + $ref: "#/components/schemas/OpdDTO" security: - - bearerAuth: [] + - bearerAuth: [] /opds/rows: post: tags: - - Opds + - Opds operationId: newOpdWithOperationRow requestBody: content: application/json: schema: - $ref: '#/components/schemas/OpdWithOperationRowDTO' + $ref: "#/components/schemas/OpdWithOperationRowDTO" required: true responses: "200": @@ -2744,19 +2799,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OpdWithOperationRowDTO' + $ref: "#/components/schemas/OpdWithOperationRowDTO" security: - - bearerAuth: [] + - bearerAuth: [] /medicalstockward/movements: post: tags: - - Medical Stock Ward + - Medical Stock Ward operationId: newMovementWard requestBody: content: application/json: schema: - $ref: '#/components/schemas/MovementWardDTO' + $ref: "#/components/schemas/MovementWardDTO" required: true responses: "200": @@ -2766,25 +2821,25 @@ 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: schema: type: array items: - $ref: '#/components/schemas/MovementDTO' + $ref: "#/components/schemas/MovementDTO" required: true responses: "200": @@ -2794,25 +2849,25 @@ 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: schema: type: array items: - $ref: '#/components/schemas/MovementDTO' + $ref: "#/components/schemas/MovementDTO" required: true responses: "200": @@ -2822,48 +2877,48 @@ 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 content: application/json: schema: - $ref: '#/components/schemas/PageLabWithRowsDTO' + $ref: "#/components/schemas/PageLabWithRowsDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Laboratories + - Laboratories operationId: newLaboratory requestBody: content: application/json: schema: - $ref: '#/components/schemas/LabWithRowsDTO' + $ref: "#/components/schemas/LabWithRowsDTO" required: true responses: "200": @@ -2873,11 +2928,11 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /laboratories/insertList: post: tags: - - Laboratories + - Laboratories operationId: newLaboratory2 requestBody: content: @@ -2885,7 +2940,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/LabWithRowsDTO' + $ref: "#/components/schemas/LabWithRowsDTO" required: true responses: "200": @@ -2895,11 +2950,11 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /laboratories/examRequest: get: tags: - - Laboratories + - Laboratories operationId: getLaboratoryExamRequest responses: "200": @@ -2909,18 +2964,18 @@ paths: schema: type: array items: - $ref: '#/components/schemas/LaboratoryDTO' + $ref: "#/components/schemas/LaboratoryDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Laboratories + - Laboratories operationId: newExamRequest requestBody: content: application/json: schema: - $ref: '#/components/schemas/LaboratoryDTO' + $ref: "#/components/schemas/LaboratoryDTO" required: true responses: "200": @@ -2930,11 +2985,11 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /examtypes: get: tags: - - Exam Types + - Exam Types operationId: getExamTypes responses: "200": @@ -2944,18 +2999,18 @@ paths: schema: type: array items: - $ref: '#/components/schemas/ExamTypeDTO' + $ref: "#/components/schemas/ExamTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Exam Types + - Exam Types operationId: newExamType requestBody: content: application/json: schema: - $ref: '#/components/schemas/ExamTypeDTO' + $ref: "#/components/schemas/ExamTypeDTO" required: true responses: "200": @@ -2963,13 +3018,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ExamTypeDTO' + $ref: "#/components/schemas/ExamTypeDTO" security: - - bearerAuth: [] + - bearerAuth: [] /exams: get: tags: - - Exams + - Exams operationId: getExams responses: "200": @@ -2979,32 +3034,32 @@ paths: schema: type: array items: - $ref: '#/components/schemas/ExamDTO' + $ref: "#/components/schemas/ExamDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Exams + - Exams operationId: newExam requestBody: content: application/json: schema: - $ref: '#/components/schemas/ExamDTO' + $ref: "#/components/schemas/ExamWithRowsDTO" required: true responses: - "200": - description: OK + "201": + description: Created content: application/json: schema: - $ref: '#/components/schemas/ExamDTO' + $ref: "#/components/schemas/ExamDTO" security: - - bearerAuth: [] + - bearerAuth: [] /examrows: get: tags: - - Exam Rows + - Exam Rows operationId: getExamRows responses: "200": @@ -3014,18 +3069,18 @@ paths: schema: type: array items: - $ref: '#/components/schemas/ExamRowDTO' + $ref: "#/components/schemas/ExamRowDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Exam Rows + - Exam Rows operationId: newExamRow requestBody: content: application/json: schema: - $ref: '#/components/schemas/ExamRowDTO' + $ref: "#/components/schemas/ExamRowDTO" required: true responses: "200": @@ -3033,19 +3088,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ExamRowDTO' + $ref: "#/components/schemas/ExamRowDTO" security: - - bearerAuth: [] + - bearerAuth: [] /examinations: post: tags: - - Examinations + - Examinations operationId: newPatientExamination requestBody: content: application/json: schema: - $ref: '#/components/schemas/PatientExaminationDTO' + $ref: "#/components/schemas/PatientExaminationDTO" required: true responses: "200": @@ -3055,29 +3110,29 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /bills: get: tags: - - Bills + - Bills operationId: searchBills_1 parameters: - - name: datefrom - in: query - required: true - schema: - type: string - - name: dateto - in: query - required: true - schema: - type: string - - name: patient_code - in: query - required: false - schema: - type: integer - format: int32 + - name: datefrom + in: query + required: true + schema: + type: string + - name: dateto + in: query + required: true + schema: + type: string + - name: patient_code + in: query + required: false + schema: + type: integer + format: int32 responses: "200": description: OK @@ -3086,18 +3141,18 @@ paths: schema: type: array items: - $ref: '#/components/schemas/BillDTO' + $ref: "#/components/schemas/BillDTO" security: - - bearerAuth: [] + - bearerAuth: [] post: tags: - - Bills + - Bills operationId: newBill requestBody: content: application/json: schema: - $ref: '#/components/schemas/FullBillDTO' + $ref: "#/components/schemas/FullBillDTO" required: true responses: "200": @@ -3105,13 +3160,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FullBillDTO' + $ref: "#/components/schemas/FullBillDTO" security: - - bearerAuth: [] + - bearerAuth: [] /bills/search/by/payments: post: tags: - - Bills + - Bills operationId: searchBillsByPayments requestBody: content: @@ -3119,7 +3174,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/BillPaymentsDTO' + $ref: "#/components/schemas/BillPaymentsDTO" required: true responses: "200": @@ -3129,30 +3184,30 @@ paths: schema: type: array items: - $ref: '#/components/schemas/BillDTO' + $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: schema: - $ref: '#/components/schemas/BillItemsDTO' + $ref: "#/components/schemas/BillItemsDTO" required: true responses: "200": @@ -3162,33 +3217,33 @@ paths: schema: type: array items: - $ref: '#/components/schemas/BillDTO' + $ref: "#/components/schemas/BillDTO" security: - - bearerAuth: [] + - bearerAuth: [] /auth/refresh-token: post: tags: - - Login + - Login operationId: refreshToken requestBody: content: application/json: schema: - $ref: '#/components/schemas/TokenRefreshRequest' + $ref: "#/components/schemas/TokenRefreshRequest" required: true responses: "200": description: OK content: - '*/*': + "*/*": schema: - $ref: '#/components/schemas/LoginResponse' + $ref: "#/components/schemas/LoginResponse" security: - - bearerAuth: [] + - bearerAuth: [] /auth/logout: post: tags: - - Login + - Login description: Logout the current user. operationId: logout responses: @@ -3197,13 +3252,13 @@ paths: /auth/login: post: tags: - - Login + - Login operationId: authenticateUser requestBody: content: application/json: schema: - $ref: '#/components/schemas/LoginRequest' + $ref: "#/components/schemas/LoginRequest" required: true responses: "200": @@ -3211,26 +3266,26 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LoginResponse' + $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: schema: - $ref: '#/components/schemas/AdmissionDTO' + $ref: "#/components/schemas/AdmissionDTO" required: true responses: "400": @@ -3242,11 +3297,11 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /wardsNoMaternity: get: tags: - - Wards + - Wards operationId: getWardsNoMaternity responses: "200": @@ -3256,20 +3311,20 @@ paths: schema: type: array items: - $ref: '#/components/schemas/WardDTO' + $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 @@ -3279,18 +3334,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 @@ -3299,18 +3354,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 @@ -3319,19 +3374,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 @@ -3340,20 +3395,20 @@ paths: schema: type: array items: - $ref: '#/components/schemas/VisitDTO' + $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 @@ -3362,18 +3417,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 @@ -3382,20 +3437,20 @@ paths: schema: type: array items: - $ref: '#/components/schemas/VaccineDTO' + $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 @@ -3404,38 +3459,38 @@ 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 content: application/json: schema: - $ref: '#/components/schemas/UserSettingDTO' + $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 @@ -3444,21 +3499,21 @@ paths: schema: type: array items: - $ref: '#/components/schemas/PermissionDTO' + $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 @@ -3467,20 +3522,20 @@ paths: schema: type: array items: - $ref: '#/components/schemas/TherapyRowDTO' + $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 @@ -3489,32 +3544,48 @@ 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 content: application/json: schema: - $ref: '#/components/schemas/SupplierDTO' + $ref: "#/components/schemas/SupplierDTO" security: - - bearerAuth: [] + - bearerAuth: [] + delete: + tags: + - Suppliers + operationId: deleteSupplier + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int32 + responses: + "204": + description: No Content + security: + - bearerAuth: [] /stockmovements: get: tags: - - Stock Movements + - Stock Movements operationId: getMovements responses: "200": @@ -3524,20 +3595,20 @@ paths: schema: type: array items: - $ref: '#/components/schemas/MovementDTO' + $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 @@ -3546,21 +3617,21 @@ paths: schema: type: array items: - $ref: '#/components/schemas/MovementDTO' + $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 @@ -3569,72 +3640,72 @@ paths: schema: type: array items: - $ref: '#/components/schemas/LotDTO' + $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 @@ -3643,32 +3714,32 @@ paths: schema: type: array items: - $ref: '#/components/schemas/MovementDTO' + $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 @@ -3677,27 +3748,27 @@ paths: schema: type: array items: - $ref: '#/components/schemas/MovementDTO' + $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 @@ -3706,11 +3777,11 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /reports/exams-list: get: tags: - - Reports + - Reports operationId: printExamsListPdf responses: "200": @@ -3723,11 +3794,11 @@ paths: type: string format: byte security: - - bearerAuth: [] + - bearerAuth: [] /reports/diseases-list: get: tags: - - Reports + - Reports operationId: printDiseasesListPdf responses: "200": @@ -3740,11 +3811,11 @@ paths: type: string format: byte security: - - bearerAuth: [] + - bearerAuth: [] /pricelists/prices: get: tags: - - Price Lists + - Price Lists operationId: getPrices responses: "200": @@ -3754,21 +3825,21 @@ paths: schema: type: array items: - $ref: '#/components/schemas/PriceDTO' + $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 @@ -3777,31 +3848,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 @@ -3810,11 +3881,11 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /permissions: get: tags: - - Permissions + - Permissions operationId: retrieveAllPermissions responses: "200": @@ -3824,41 +3895,41 @@ paths: schema: type: array items: - $ref: '#/components/schemas/PermissionDTO' + $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 content: application/json: schema: - $ref: '#/components/schemas/PermissionDTO' + $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 @@ -3867,40 +3938,40 @@ paths: schema: type: array items: - $ref: '#/components/schemas/PermissionDTO' + $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 content: application/json: schema: - $ref: '#/components/schemas/PermissionDTO' + $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 @@ -3909,21 +3980,21 @@ paths: schema: type: array items: - $ref: '#/components/schemas/PatientVaccineDTO' + $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 @@ -3933,52 +4004,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 @@ -3987,39 +4058,39 @@ paths: schema: type: array items: - $ref: '#/components/schemas/PatientVaccineDTO' + $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 @@ -4028,13 +4099,13 @@ paths: schema: type: array items: - $ref: '#/components/schemas/PatientDTO' + $ref: "#/components/schemas/PatientDTO" security: - - bearerAuth: [] + - bearerAuth: [] /patients/nextcode: get: tags: - - Patients + - Patients operationId: getPatientNextCode responses: "200": @@ -4045,25 +4116,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 @@ -4072,11 +4143,11 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /patients/cities: get: tags: - - Patients + - Patients operationId: getPatientCities responses: "200": @@ -4088,39 +4159,39 @@ 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 content: application/json: schema: - $ref: '#/components/schemas/PatientDTO' + $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 @@ -4129,21 +4200,21 @@ paths: schema: type: array items: - $ref: '#/components/schemas/OperationDTO' + $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 @@ -4152,21 +4223,21 @@ paths: schema: type: array items: - $ref: '#/components/schemas/OperationRowDTO' + $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 @@ -4175,20 +4246,20 @@ paths: schema: type: array items: - $ref: '#/components/schemas/OperationRowDTO' + $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 @@ -4197,114 +4268,114 @@ paths: schema: type: array items: - $ref: '#/components/schemas/OpdDTO' + $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 content: application/json: schema: - $ref: '#/components/schemas/PageOpdDTO' + $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 @@ -4313,48 +4384,48 @@ paths: schema: type: array items: - $ref: '#/components/schemas/OpdWithOperationRowDTO' + $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 content: application/json: schema: - $ref: '#/components/schemas/OpdDTO' + $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 @@ -4363,19 +4434,19 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /opds/ProgYear/{year}: get: tags: - - Opds + - Opds operationId: getProgYear_1 parameters: - - name: year - in: path - required: true - schema: - type: integer - format: int32 + - name: year + in: path + required: true + schema: + type: integer + format: int32 responses: "200": description: OK @@ -4385,37 +4456,37 @@ 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 content: application/json: schema: - $ref: '#/components/schemas/MovementTypeDTO' + $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 @@ -4424,18 +4495,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 @@ -4444,18 +4515,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 @@ -4464,18 +4535,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 @@ -4484,32 +4555,32 @@ paths: schema: type: array items: - $ref: '#/components/schemas/MedicalWardDTO' + $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 @@ -4518,32 +4589,32 @@ paths: schema: type: array items: - $ref: '#/components/schemas/MovementWardDTO' + $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 @@ -4552,26 +4623,26 @@ paths: schema: type: array items: - $ref: '#/components/schemas/MovementWardDTO' + $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 @@ -4581,11 +4652,11 @@ paths: type: integer format: int32 security: - - bearerAuth: [] + - bearerAuth: [] /medicalstockmovements: get: tags: - - Stock Movements + - Stock Movements operationId: getMovements_4 responses: "200": @@ -4595,20 +4666,20 @@ paths: schema: type: array items: - $ref: '#/components/schemas/MovementDTO' + $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 @@ -4617,21 +4688,21 @@ paths: schema: type: array items: - $ref: '#/components/schemas/MovementDTO' + $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 @@ -4640,72 +4711,72 @@ paths: schema: type: array items: - $ref: '#/components/schemas/LotDTO' + $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 @@ -4714,32 +4785,32 @@ paths: schema: type: array items: - $ref: '#/components/schemas/MovementDTO' + $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 @@ -4748,27 +4819,27 @@ paths: schema: type: array items: - $ref: '#/components/schemas/MovementDTO' + $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 @@ -4777,39 +4848,39 @@ 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 content: application/json: schema: - $ref: '#/components/schemas/MedicalDTO' + $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 @@ -4818,35 +4889,35 @@ paths: schema: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /medicals/filter: get: tags: - - Medicals + - Medicals operationId: filterMedicals parameters: - - name: desc - in: query - required: false - schema: - type: string - - name: type - in: query - required: false - schema: - type: string - - name: critical - in: query - required: false - schema: - type: boolean - default: false - - name: name_sorted - in: query - required: false - schema: - type: boolean - default: false + - name: desc + in: query + required: false + schema: + type: string + - name: type + in: query + required: false + schema: + type: string + - name: critical + in: query + required: false + schema: + type: boolean + default: false + - name: name_sorted + in: query + required: false + schema: + type: boolean + default: false responses: "200": description: OK @@ -4855,20 +4926,20 @@ paths: schema: type: array items: - $ref: '#/components/schemas/MedicalDTO' + $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 @@ -4877,34 +4948,34 @@ paths: schema: type: array items: - $ref: '#/components/schemas/MalnutritionDTO' + $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 content: application/json: schema: - $ref: '#/components/schemas/MalnutritionDTO' + $ref: "#/components/schemas/MalnutritionDTO" security: - - bearerAuth: [] + - bearerAuth: [] /laboratories/materials: get: tags: - - Laboratories + - Laboratories operationId: getMaterials responses: "200": @@ -4916,104 +4987,104 @@ 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 content: application/json: schema: - $ref: '#/components/schemas/PageLabWithRowsDTO' + $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 content: application/json: schema: - $ref: '#/components/schemas/LabWithRowsDTO' + $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 @@ -5022,21 +5093,21 @@ paths: schema: type: array items: - $ref: '#/components/schemas/LaboratoryDTO' + $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 @@ -5045,13 +5116,13 @@ paths: schema: type: array items: - $ref: '#/components/schemas/LabWithRowsDTO' + $ref: "#/components/schemas/LabWithRowsDTO" security: - - bearerAuth: [] + - bearerAuth: [] /hospitals: get: tags: - - Hospitals + - Hospitals operationId: getHospital responses: "200": @@ -5059,13 +5130,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/HospitalDTO' + $ref: "#/components/schemas/HospitalDTO" security: - - bearerAuth: [] + - bearerAuth: [] /hospitals/currencyCode: get: tags: - - Hospitals + - Hospitals operationId: getHospitalCurrencyCode responses: "200": @@ -5075,18 +5146,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 @@ -5095,21 +5166,21 @@ paths: schema: type: array items: - $ref: '#/components/schemas/ExamDTO' + $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 @@ -5118,20 +5189,20 @@ paths: schema: type: array items: - $ref: '#/components/schemas/ExamRowDTO' + $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 @@ -5140,24 +5211,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 @@ -5166,20 +5237,20 @@ paths: schema: type: array items: - $ref: '#/components/schemas/ExamRowDTO' + $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 @@ -5188,111 +5259,111 @@ paths: schema: type: array items: - $ref: '#/components/schemas/ExamRowDTO' + $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 content: application/json: schema: - $ref: '#/components/schemas/PagePatientExaminationDTO' + $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 content: application/json: schema: - $ref: '#/components/schemas/PatientExaminationDTO' + $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 content: application/json: schema: - $ref: '#/components/schemas/PatientExaminationDTO' + $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 content: application/json: schema: - $ref: '#/components/schemas/PatientExaminationDTO' + $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 @@ -5301,39 +5372,39 @@ paths: schema: type: array items: - $ref: '#/components/schemas/PatientExaminationDTO' + $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 content: application/json: schema: - $ref: '#/components/schemas/DiseaseDTO' + $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 @@ -5344,11 +5415,11 @@ paths: additionalProperties: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /diseases/opd: get: tags: - - Diseases + - Diseases operationId: getDiseasesOpd responses: "200": @@ -5358,20 +5429,20 @@ paths: schema: type: array items: - $ref: '#/components/schemas/DiseaseDTO' + $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 @@ -5380,13 +5451,13 @@ paths: schema: type: array items: - $ref: '#/components/schemas/DiseaseDTO' + $ref: "#/components/schemas/DiseaseDTO" security: - - bearerAuth: [] + - bearerAuth: [] /diseases/ipd/out: get: tags: - - Diseases + - Diseases operationId: getDiseasesIpdOut responses: "200": @@ -5396,20 +5467,20 @@ paths: schema: type: array items: - $ref: '#/components/schemas/DiseaseDTO' + $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 @@ -5418,13 +5489,13 @@ paths: schema: type: array items: - $ref: '#/components/schemas/DiseaseDTO' + $ref: "#/components/schemas/DiseaseDTO" security: - - bearerAuth: [] + - bearerAuth: [] /diseases/ipd/in: get: tags: - - Diseases + - Diseases operationId: getDiseasesIpdIn responses: "200": @@ -5434,20 +5505,20 @@ paths: schema: type: array items: - $ref: '#/components/schemas/DiseaseDTO' + $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 @@ -5456,13 +5527,13 @@ paths: schema: type: array items: - $ref: '#/components/schemas/DiseaseDTO' + $ref: "#/components/schemas/DiseaseDTO" security: - - bearerAuth: [] + - bearerAuth: [] /diseases/both: get: tags: - - Diseases + - Diseases operationId: getDiseases responses: "200": @@ -5472,20 +5543,20 @@ paths: schema: type: array items: - $ref: '#/components/schemas/DiseaseDTO' + $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 @@ -5494,13 +5565,13 @@ paths: schema: type: array items: - $ref: '#/components/schemas/DiseaseDTO' + $ref: "#/components/schemas/DiseaseDTO" security: - - bearerAuth: [] + - bearerAuth: [] /diseases/all: get: tags: - - Diseases + - Diseases operationId: getAllDiseases responses: "200": @@ -5510,21 +5581,21 @@ paths: schema: type: array items: - $ref: '#/components/schemas/DiseaseDTO' + $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 @@ -5533,21 +5604,21 @@ paths: schema: type: array items: - $ref: '#/components/schemas/BillDTO' + $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 @@ -5556,31 +5627,31 @@ paths: schema: type: array items: - $ref: '#/components/schemas/BillDTO' + $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 @@ -5589,21 +5660,21 @@ paths: schema: type: array items: - $ref: '#/components/schemas/BillPaymentsDTO' + $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 @@ -5612,13 +5683,13 @@ paths: schema: type: array items: - $ref: '#/components/schemas/BillPaymentsDTO' + $ref: "#/components/schemas/BillPaymentsDTO" security: - - bearerAuth: [] + - bearerAuth: [] /bills/items: get: tags: - - Bills + - Bills operationId: getDistinctItems responses: "200": @@ -5628,21 +5699,21 @@ paths: schema: type: array items: - $ref: '#/components/schemas/BillItemsDTO' + $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 @@ -5651,42 +5722,42 @@ paths: schema: type: array items: - $ref: '#/components/schemas/BillItemsDTO' + $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 content: application/json: schema: - $ref: '#/components/schemas/AgeType' + $ref: "#/components/schemas/AgeType" security: - - bearerAuth: [] + - bearerAuth: [] /agetypes/code: get: tags: - - AgeTypes + - AgeTypes operationId: getAgeTypeCodeByAge parameters: - - name: age - in: query - required: true - schema: - type: integer - format: int32 + - name: age + in: query + required: true + schema: + type: integer + format: int32 responses: "200": description: OK @@ -5697,19 +5768,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 @@ -5720,20 +5791,20 @@ paths: schema: type: array items: - $ref: '#/components/schemas/AdmissionDTO' + $ref: "#/components/schemas/AdmissionDTO" security: - - bearerAuth: [] + - bearerAuth: [] /admissions/getNextProgressiveIdInYear: get: tags: - - Admissions + - Admissions operationId: getNextYProg parameters: - - name: wardcode - in: query - required: true - schema: - type: string + - name: wardcode + in: query + required: true + schema: + type: string responses: "400": description: Bad Request @@ -5745,18 +5816,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 @@ -5768,34 +5839,34 @@ paths: type: integer format: int32 security: - - bearerAuth: [] + - bearerAuth: [] /admissions/discharges: - get: - tags: - - 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 + get: + tags: + - Admissions + operationId: getDischarges + parameters: + - name: dischargerange + in: query + required: true + schema: + type: array + items: + type: string + - name: page + in: query + required: false + schema: + type: integer + format: int32 + default: 0 + - name: size + in: query + required: false + schema: + type: integer + format: int32 + default: 80 responses: "400": description: Bad Request @@ -5804,21 +5875,21 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PageAdmissionDTO' + $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 @@ -5827,35 +5898,35 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AdmissionDTO' + $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 @@ -5866,20 +5937,20 @@ paths: schema: type: array items: - $ref: '#/components/schemas/AdmittedPatientDTO' + $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 @@ -5888,19 +5959,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 @@ -5909,18 +5980,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 @@ -5929,18 +6000,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 @@ -5949,19 +6020,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 @@ -5970,18 +6041,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 @@ -5990,18 +6061,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 @@ -6012,18 +6083,18 @@ paths: additionalProperties: type: boolean security: - - bearerAuth: [] + - bearerAuth: [] /dischargetypes/{code}: delete: tags: - - DischargeType + - DischargeType operationId: deleteDischargeType parameters: - - name: code - in: path - required: true - schema: - type: string + - name: code + in: path + required: true + schema: + type: string responses: "200": description: OK @@ -6032,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 @@ -6052,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 @@ -6072,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 @@ -6092,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 @@ -6115,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: @@ -6164,24 +6235,24 @@ components: description: lock format: int32 example: 0 + opd: + type: boolean female: type: boolean male: type: boolean - opd: - type: boolean pharmacy: type: boolean PatientDTO: required: - - age - - bloodType - - city - - fatherName - - firstName - - motherName - - secondName - - sex + - age + - bloodType + - city + - fatherName + - firstName + - motherName + - secondName + - sex type: object properties: code: @@ -6219,8 +6290,8 @@ components: description: Sex example: M enum: - - M - - F + - M + - F address: maxLength: 50 type: string @@ -6254,8 +6325,8 @@ components: description: "Mother's status (D=dead, A=alive)" example: A enum: - - D - - A + - D + - A fatherName: maxLength: 50 type: string @@ -6266,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 @@ -6329,8 +6400,8 @@ components: description: Status example: I enum: - - I - - O + - I + - O consensusFlag: type: boolean description: Consensus flag @@ -6342,8 +6413,8 @@ components: description: Class representing a patient VisitDTO: required: - - date - - patient + - date + - patient type: object properties: visitID: @@ -6351,7 +6422,7 @@ components: description: The visit's ID format: int32 patient: - $ref: '#/components/schemas/PatientDTO' + $ref: "#/components/schemas/PatientDTO" date: type: string description: Date of the visit @@ -6364,7 +6435,7 @@ components: type: boolean description: Sms of the visit ward: - $ref: '#/components/schemas/WardDTO' + $ref: "#/components/schemas/WardDTO" duration: type: integer description: Duration of the visit @@ -6376,8 +6447,8 @@ components: description: Class representing a vaccine type VaccineTypeDTO: required: - - code - - description + - code + - description type: object properties: code: @@ -6393,9 +6464,9 @@ components: description: Class representing a vaccine type VaccineDTO: required: - - code - - description - - vaccineType + - code + - description + - vaccineType type: object properties: code: @@ -6409,7 +6480,7 @@ components: description: Description of the vaccine example: BCG vaccineType: - $ref: '#/components/schemas/VaccineTypeDTO' + $ref: "#/components/schemas/VaccineTypeDTO" lock: type: integer description: Lock @@ -6418,10 +6489,10 @@ components: description: Class representing a vaccine UserSettingDTO: required: - - configName - - configValue - - id - - user + - configName + - configValue + - id + - user type: object properties: id: @@ -6444,8 +6515,8 @@ components: description: The value of the user PermissionDTO: required: - - description - - id + - description + - id type: object properties: name: @@ -6461,9 +6532,9 @@ components: description: List of group's permissions UserDTO: required: - - passwd - - userGroupName - - userName + - passwd + - userGroupName + - userName type: object properties: userName: @@ -6472,7 +6543,7 @@ components: description: The username (must be unique) example: John Doe userGroupName: - $ref: '#/components/schemas/UserGroupDTO' + $ref: "#/components/schemas/UserGroupDTO" passwd: maxLength: 50 type: string @@ -6485,7 +6556,7 @@ components: example: Lab chief technician UserGroupDTO: required: - - code + - code type: object properties: code: @@ -6502,7 +6573,7 @@ components: type: array description: List of group's permissions items: - $ref: '#/components/schemas/PermissionDTO' + $ref: "#/components/schemas/PermissionDTO" description: The user's group UserProfileDTO: type: object @@ -6514,11 +6585,24 @@ components: items: type: string userGroup: - $ref: '#/components/schemas/UserGroupDTO' + $ref: "#/components/schemas/UserGroupDTO" + GroupPermissionsDTO: + type: object + properties: + permissions: + type: array + description: List of permissions' ids + example: + - 48 + - 24 + items: + type: integer + description: List of permissions' ids + format: int32 SupplierDTO: required: - - supId - - supName + - supId + - supName type: object properties: supId: @@ -6560,11 +6644,11 @@ components: description: The supplier's notes PricesOthersDTO: required: - - code - - daily - - description - - ipdInclude - - opdInclude + - code + - daily + - description + - ipdInclude + - opdInclude type: object properties: id: @@ -6627,8 +6711,8 @@ components: description: Class representing a price list PregnantTreatmentTypeDTO: required: - - code - - description + - code + - description type: object properties: code: @@ -6646,10 +6730,10 @@ components: description: Class representing a pregnant treatment type PatientVaccineDTO: required: - - patient - - progr - - vaccine - - vaccineDate + - patient + - progr + - vaccine + - vaccineDate type: object properties: code: @@ -6664,9 +6748,9 @@ components: type: string description: The vaccine date patient: - $ref: '#/components/schemas/PatientDTO' + $ref: "#/components/schemas/PatientDTO" vaccine: - $ref: '#/components/schemas/VaccineDTO' + $ref: "#/components/schemas/VaccineDTO" lock: type: integer description: Lock @@ -6678,7 +6762,7 @@ components: readOnly: true PatientConsensusDTO: required: - - patientId + - patientId type: object properties: consensusFlag: @@ -6694,8 +6778,8 @@ components: description: Class representing a patient consensus OperationTypeDTO: required: - - code - - description + - code + - description type: object properties: code: @@ -6708,10 +6792,11 @@ components: description: The operation type OperationDTO: required: - - code - - description - - major - - type + - code + - description + - major + - opeFor + - type type: object properties: code: @@ -6723,7 +6808,15 @@ components: type: string description: The operation description type: - $ref: '#/components/schemas/OperationTypeDTO' + $ref: "#/components/schemas/OperationTypeDTO" + opeFor: + type: string + description: The operation context + example: opd_admission + enum: + - opd_admission + - admission + - opd major: type: integer description: The operation major @@ -6735,10 +6828,10 @@ components: example: 0 AdmissionDTO: required: - - admDate - - admitted - - deleted - - type + - admDate + - admitted + - deleted + - type type: object properties: id: @@ -6756,36 +6849,36 @@ components: description: Type of admission example: "N" ward: - $ref: '#/components/schemas/WardDTO' + $ref: "#/components/schemas/WardDTO" patient: - $ref: '#/components/schemas/PatientDTO' + $ref: "#/components/schemas/PatientDTO" admDate: type: string description: Admission date admType: - $ref: '#/components/schemas/AdmissionTypeDTO' + $ref: "#/components/schemas/AdmissionTypeDTO" diseaseIn: - $ref: '#/components/schemas/DiseaseDTO' + $ref: "#/components/schemas/DiseaseDTO" diseaseOut1: - $ref: '#/components/schemas/DiseaseDTO' + $ref: "#/components/schemas/DiseaseDTO" diseaseOut2: - $ref: '#/components/schemas/DiseaseDTO' + $ref: "#/components/schemas/DiseaseDTO" diseaseOut3: - $ref: '#/components/schemas/DiseaseDTO' + $ref: "#/components/schemas/DiseaseDTO" operation: - $ref: '#/components/schemas/OperationDTO' + $ref: "#/components/schemas/OperationDTO" opDate: type: string 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 description: Discharge date disType: - $ref: '#/components/schemas/DischargeTypeDTO' + $ref: "#/components/schemas/DischargeTypeDTO" note: maxLength: 65535 type: string @@ -6798,14 +6891,14 @@ components: type: string description: Visit date pregTreatmentType: - $ref: '#/components/schemas/PregnantTreatmentTypeDTO' + $ref: "#/components/schemas/PregnantTreatmentTypeDTO" deliveryDate: type: string description: Delivery date deliveryType: - $ref: '#/components/schemas/DeliveryTypeDTO' + $ref: "#/components/schemas/DeliveryTypeDTO" deliveryResult: - $ref: '#/components/schemas/DeliveryResultTypeDTO' + $ref: "#/components/schemas/DeliveryResultTypeDTO" weight: type: number description: Weight @@ -6843,8 +6936,8 @@ components: description: The admission AdmissionTypeDTO: required: - - code - - description + - code + - description type: object properties: code: @@ -6859,22 +6952,22 @@ 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: type: integer format: int32 patient: - $ref: '#/components/schemas/PatientDTO' + $ref: "#/components/schemas/PatientDTO" listId: type: integer format: int32 @@ -6923,8 +7016,8 @@ components: description: Class representing a bill DeliveryResultTypeDTO: required: - - code - - description + - code + - description type: object properties: code: @@ -6939,8 +7032,8 @@ components: description: Delivery result type DeliveryTypeDTO: required: - - code - - description + - code + - description type: object properties: code: @@ -6955,8 +7048,8 @@ components: description: Delivery type DischargeTypeDTO: required: - - code - - description + - code + - description type: object properties: code: @@ -6971,12 +7064,12 @@ components: description: DisChargeType DiseaseDTO: required: - - code - - description - - diseaseType - - ipdInInclude - - ipdOutInclude - - opdInclude + - code + - description + - diseaseType + - ipdInInclude + - ipdOutInclude + - opdInclude type: object properties: code: @@ -6989,7 +7082,7 @@ components: type: string description: Disease description diseaseType: - $ref: '#/components/schemas/DiseaseTypeDTO' + $ref: "#/components/schemas/DiseaseTypeDTO" opdInclude: type: boolean description: Indicates whether the disease is an OPD disease @@ -7014,8 +7107,8 @@ components: description: Class representing a disease DiseaseTypeDTO: required: - - code - - description + - code + - description type: object properties: code: @@ -7029,11 +7122,11 @@ components: description: Class representing a disease type OpdDTO: required: - - age - - newPatient - - note - - sex - - ward + - age + - newPatient + - note + - sex + - ward type: object properties: code: @@ -7079,11 +7172,11 @@ components: format: int32 example: 18 disease: - $ref: '#/components/schemas/DiseaseDTO' + $ref: "#/components/schemas/DiseaseDTO" disease2: - $ref: '#/components/schemas/DiseaseDTO' + $ref: "#/components/schemas/DiseaseDTO" disease3: - $ref: '#/components/schemas/DiseaseDTO' + $ref: "#/components/schemas/DiseaseDTO" newPatient: type: string description: New(N) or Reattendance(R) patient @@ -7124,21 +7217,21 @@ components: type: string description: Prescription ward: - $ref: '#/components/schemas/WardDTO' + $ref: "#/components/schemas/WardDTO" description: The opd OperationRowDTO: required: - - opDate - - opResult - - operation - - prescriber + - opDate + - opResult + - operation + - prescriber type: object properties: id: type: integer format: int32 operation: - $ref: '#/components/schemas/OperationDTO' + $ref: "#/components/schemas/OperationDTO" prescriber: maxLength: 150 type: string @@ -7155,11 +7248,11 @@ components: type: string description: The remark of the operation admission: - $ref: '#/components/schemas/AdmissionDTO' + $ref: "#/components/schemas/AdmissionDTO" opd: - $ref: '#/components/schemas/OpdDTO' + $ref: "#/components/schemas/OpdDTO" bill: - $ref: '#/components/schemas/BillDTO' + $ref: "#/components/schemas/BillDTO" transUnit: type: number description: The transunit @@ -7172,16 +7265,16 @@ components: type: object properties: opdDTO: - $ref: '#/components/schemas/OpdDTO' + $ref: "#/components/schemas/OpdDTO" operationRows: type: array items: - $ref: '#/components/schemas/OperationRowDTO' + $ref: "#/components/schemas/OperationRowDTO" MovementTypeDTO: required: - - code - - description - - type + - code + - description + - type type: object properties: code: @@ -7200,8 +7293,8 @@ components: example: "-" MedicalTypeDTO: required: - - code - - description + - code + - description type: object properties: code: @@ -7228,7 +7321,7 @@ components: description: The product code example: PARA type: - $ref: '#/components/schemas/MedicalTypeDTO' + $ref: "#/components/schemas/MedicalTypeDTO" description: maxLength: 100 type: string @@ -7266,10 +7359,10 @@ components: example: 0 MalnutritionDTO: required: - - admission - - dateSupp - - height - - weight + - admission + - dateSupp + - height + - weight type: object properties: code: @@ -7286,7 +7379,7 @@ components: description: The date of the next malnutrition control example: 1979-05-01T11:20:33 admission: - $ref: '#/components/schemas/AdmissionDTO' + $ref: "#/components/schemas/AdmissionDTO" height: type: number description: The height of the patient @@ -7324,9 +7417,9 @@ components: maxLength: 50 type: string description: Exam Default Result - example: '>=12 (NORMAL)' + example: ">=12 (NORMAL)" examtype: - $ref: '#/components/schemas/ExamTypeDTO' + $ref: "#/components/schemas/ExamTypeDTO" lock: type: integer description: Lock @@ -7350,7 +7443,7 @@ components: type: object properties: laboratoryDTO: - $ref: '#/components/schemas/LaboratoryDTO' + $ref: "#/components/schemas/LaboratoryDTO" laboratoryRowList: type: array items: @@ -7367,7 +7460,7 @@ components: description: Laboratory Material example: Blood exam: - $ref: '#/components/schemas/ExamDTO' + $ref: "#/components/schemas/ExamDTO" registrationDate: type: string description: Laboratory Registration Date @@ -7399,8 +7492,8 @@ components: description: Laboratory Patient InOut example: "0" enum: - - I - - O + - I + - O age: type: integer description: Laboratory Patient Age @@ -7414,11 +7507,11 @@ components: description: Laboratory status example: DRAFT enum: - - draft - - open - - done - - invalid - - deleted + - draft + - open + - done + - invalid + - deleted HospitalDTO: type: object properties: @@ -7467,10 +7560,29 @@ components: description: Lock format: int32 example: 0 + ExamWithRowsDTO: + required: + - exam + type: object + properties: + exam: + $ref: "#/components/schemas/ExamDTO" + rows: + type: array + description: + Possible result for the exam(only for exams with procedure + 1 and 2) + example: "['POSITIVE', 'NEGATIVE']" + items: + type: string + description: + Possible result for the exam(only for exams with procedure + 1 and 2) + example: "['POSITIVE', 'NEGATIVE']" PatientExaminationDTO: required: - - patientCode - - pex_date + - patientCode + - pex_date type: object properties: pex_ID: @@ -7523,12 +7635,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 @@ -7542,14 +7654,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 @@ -7559,18 +7671,18 @@ components: description: Bowel Function example: regular enum: - - constipation - - regular - - diarrheal - - irregular + - constipation + - regular + - diarrheal + - irregular BillItemsDTO: required: - - itemAmount - - itemDescription - - itemDisplayCode - - itemId - - itemQuantity - - priceId + - itemAmount + - itemDescription + - itemDisplayCode + - itemId + - itemQuantity + - priceId type: object properties: id: @@ -7615,10 +7727,10 @@ components: description: Class representing a billItem BillPaymentsDTO: required: - - amount - - billId - - date - - user + - amount + - billId + - date + - user type: object properties: id: @@ -7649,27 +7761,27 @@ components: description: Class representing a billPayment FullBillDTO: required: - - bill - - billItems + - bill + - billItems type: object properties: bill: - $ref: '#/components/schemas/BillDTO' + $ref: "#/components/schemas/BillDTO" billItems: type: array description: List of bill items elements items: - $ref: '#/components/schemas/BillItemsDTO' + $ref: "#/components/schemas/BillItemsDTO" billPayments: type: array description: List of bill payments elements items: - $ref: '#/components/schemas/BillPaymentsDTO' + $ref: "#/components/schemas/BillPaymentsDTO" AgeTypeDTO: required: - - description - - from - - to + - description + - from + - to type: object properties: code: @@ -7692,16 +7804,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: @@ -7710,7 +7822,7 @@ components: format: int32 example: 1 patID: - $ref: '#/components/schemas/PatientDTO' + $ref: "#/components/schemas/PatientDTO" startDate: type: string description: The start date of therapy @@ -7751,7 +7863,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 @@ -7762,17 +7875,17 @@ components: example: 0 Patient: required: - - age - - birthDate - - bloodType - - city - - deleted - - fatherName - - firstName - - motherName - - name - - secondName - - sex + - age + - birthDate + - bloodType + - city + - deleted + - fatherName + - firstName + - motherName + - name + - secondName + - sex type: object properties: createdBy: @@ -7847,13 +7960,13 @@ components: type: integer format: int32 patientProfilePhoto: - $ref: '#/components/schemas/PatientProfilePhoto' + $ref: "#/components/schemas/PatientProfilePhoto" patientConsensus: - $ref: '#/components/schemas/PatientConsensus' - informations: - type: string + $ref: "#/components/schemas/PatientConsensus" searchString: type: string + informations: + type: string PatientConsensus: type: object properties: @@ -7878,12 +7991,12 @@ components: serviceFlag: type: boolean patient: - $ref: '#/components/schemas/Patient' + $ref: "#/components/schemas/Patient" PatientProfilePhoto: type: object properties: patient: - $ref: '#/components/schemas/Patient' + $ref: "#/components/schemas/Patient" photo: type: array items: @@ -7949,6 +8062,8 @@ components: type: object family: type: string + plain: + type: boolean fontName: type: string transform: @@ -8003,8 +8118,6 @@ components: format: float transformed: type: boolean - plain: - type: boolean psname: type: string size2D: @@ -8034,6 +8147,8 @@ components: type: object family: type: string + plain: + type: boolean fontName: type: string transform: @@ -8088,8 +8203,6 @@ components: format: float transformed: type: boolean - plain: - type: boolean psname: type: string size2D: @@ -8099,6 +8212,9 @@ components: type: array items: type: object + height: + type: integer + format: int32 ascent: type: integer format: int32 @@ -8108,9 +8224,6 @@ components: leading: type: integer format: int32 - height: - type: integer - format: int32 maxDescent: type: integer format: int32 @@ -8220,18 +8333,24 @@ components: properties: empty: type: boolean - width: + height: type: number format: double - height: + minX: type: number format: double - "y": + minY: + type: number + format: double + width: type: number format: double x: type: number format: double + "y": + type: number + format: double maxX: type: number format: double @@ -8244,29 +8363,29 @@ components: centerY: type: number format: double - minX: - type: number - format: double - minY: - type: number - format: double rect: type: object properties: empty: type: boolean - width: + height: type: number format: double - height: + minX: type: number format: double - "y": + minY: + type: number + format: double + width: type: number format: double x: type: number format: double + "y": + type: number + format: double maxX: type: number format: double @@ -8279,29 +8398,23 @@ components: centerY: type: number format: double - minX: - type: number - format: double - minY: - type: number - format: double writeOnly: true - maxX: + minX: type: number format: double - maxY: + minY: type: number format: double - centerX: + maxX: type: number format: double - centerY: + maxY: type: number format: double - minX: + centerX: type: number format: double - minY: + centerY: type: number format: double xormode: @@ -8380,18 +8493,24 @@ components: properties: empty: type: boolean - width: + height: type: number format: double - height: + minX: type: number format: double - "y": + minY: + type: number + format: double + width: type: number format: double x: type: number format: double + "y": + type: number + format: double maxX: type: number format: double @@ -8404,29 +8523,29 @@ components: centerY: type: number format: double - minX: - type: number - format: double - minY: - type: number - format: double rect: type: object properties: empty: type: boolean - width: + height: type: number format: double - height: + minX: type: number format: double - "y": + minY: + type: number + format: double + width: type: number format: double x: type: number format: double + "y": + type: number + format: double maxX: type: number format: double @@ -8439,29 +8558,23 @@ components: centerY: type: number format: double - minX: - type: number - format: double - minY: - type: number - format: double writeOnly: true - maxX: + minX: type: number format: double - maxY: + minY: type: number format: double - centerX: + maxX: type: number format: double - centerY: + maxY: type: number format: double - minX: + centerX: type: number format: double - minY: + centerY: type: number format: double bounds2D: @@ -8469,18 +8582,24 @@ components: properties: empty: type: boolean - width: + height: type: number format: double - height: + minX: type: number format: double - "y": + minY: + type: number + format: double + width: type: number format: double x: type: number format: double + "y": + type: number + format: double maxX: type: number format: double @@ -8493,12 +8612,6 @@ components: centerY: type: number format: double - minX: - type: number - format: double - minY: - type: number - format: double clipRect: type: object properties: @@ -8539,18 +8652,24 @@ components: properties: empty: type: boolean - width: + height: type: number format: double - height: + minX: type: number format: double - "y": + minY: + type: number + format: double + width: type: number format: double x: type: number format: double + "y": + type: number + format: double maxX: type: number format: double @@ -8563,29 +8682,29 @@ components: centerY: type: number format: double - minX: - type: number - format: double - minY: - type: number - format: double rect: type: object properties: empty: type: boolean - width: + height: type: number format: double - height: + minX: type: number format: double - "y": + minY: + type: number + format: double + width: type: number format: double x: type: number format: double + "y": + type: number + format: double maxX: type: number format: double @@ -8598,44 +8717,38 @@ components: centerY: type: number format: double - minX: - type: number - format: double - minY: - type: number - format: double writeOnly: true - maxX: + minX: type: number format: double - maxY: + minY: type: number format: double - centerX: + maxX: type: number format: double - centerY: + maxY: type: number format: double - minX: + centerX: type: number format: double - minY: + centerY: type: number format: double deprecated: true TherapyRow: required: - - endDate - - freqInDay - - freqInPeriod - - medicalId - - notifyInt - - patient - - qty - - smsInt - - startDate - - unitID + - endDate + - freqInDay + - freqInPeriod + - medicalId + - notifyInt + - patient + - qty + - smsInt + - startDate + - unitID type: object properties: createdBy: @@ -8655,7 +8768,7 @@ components: type: integer format: int32 patient: - $ref: '#/components/schemas/Patient' + $ref: "#/components/schemas/Patient" startDate: type: string format: date-time @@ -8685,13 +8798,13 @@ components: smsInt: type: integer format: int32 - sms: - type: boolean - notify: - type: boolean medical: type: integer format: int32 + notify: + type: boolean + sms: + type: boolean TherapyDTO: type: object properties: @@ -8709,14 +8822,14 @@ 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 format: date-time medical: - $ref: '#/components/schemas/MedicalDTO' + $ref: "#/components/schemas/MedicalDTO" qty: type: number description: The quantity of the medical @@ -8737,19 +8850,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: @@ -8772,11 +8887,11 @@ components: description: The lot MovementDTO: required: - - date - - medical - - quantity - - refNo - - type + - date + - medical + - quantity + - refNo + - type type: object properties: code: @@ -8785,13 +8900,13 @@ components: format: int32 example: 1 medical: - $ref: '#/components/schemas/MedicalDTO' + $ref: "#/components/schemas/MedicalDTO" type: - $ref: '#/components/schemas/MovementTypeDTO' + $ref: "#/components/schemas/MovementTypeDTO" ward: - $ref: '#/components/schemas/WardDTO' + $ref: "#/components/schemas/WardDTO" lot: - $ref: '#/components/schemas/LotDTO' + $ref: "#/components/schemas/LotDTO" date: type: string description: The movement date @@ -8802,19 +8917,19 @@ components: format: int32 example: 50 supplier: - $ref: '#/components/schemas/SupplierDTO' + $ref: "#/components/schemas/SupplierDTO" refNo: type: string description: The movement reference example: MVN152445 SmsDTO: required: - - module - - smsDate - - smsDateSched - - smsNumber - - smsText - - smsUser + - module + - smsDate + - smsDateSched + - smsNumber + - smsText + - smsUser type: object properties: smsId: @@ -8860,11 +8975,11 @@ components: description: SMS module Id MovementWardDTO: required: - - date - - description - - quantity - - units - - ward + - date + - description + - quantity + - units + - ward type: object properties: code: @@ -8873,14 +8988,14 @@ components: format: int32 example: 1 ward: - $ref: '#/components/schemas/WardDTO' + $ref: "#/components/schemas/WardDTO" date: type: string description: The movement ward's date format: date example: 2020-06-07 patient: - $ref: '#/components/schemas/PatientDTO' + $ref: "#/components/schemas/PatientDTO" age: type: integer description: The patient's age in case the movement is associated to a patient @@ -8888,7 +9003,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 @@ -8897,7 +9013,7 @@ components: description: The description of the movement example: stock transfer from pharmacy to laboratory medical: - $ref: '#/components/schemas/MedicalDTO' + $ref: "#/components/schemas/MedicalDTO" quantity: type: number description: The quantity of the medical concerned by the movement @@ -8908,9 +9024,9 @@ components: description: The measure's unit of the medical concerned by the movement example: pct wardTo: - $ref: '#/components/schemas/WardDTO' + $ref: "#/components/schemas/WardDTO" wardFrom: - $ref: '#/components/schemas/WardDTO' + $ref: "#/components/schemas/WardDTO" ExamRowDTO: type: object properties: @@ -8924,7 +9040,7 @@ components: description: Exam Row Code example: NEGATIVE exam: - $ref: '#/components/schemas/ExamDTO' + $ref: "#/components/schemas/ExamDTO" TokenRefreshRequest: type: object properties: @@ -8950,8 +9066,8 @@ components: description: Class representing a Login response LoginRequest: required: - - password - - username + - password + - username type: object properties: username: @@ -8964,18 +9080,18 @@ components: example: admin PriceDTO: required: - - description - - group - - item - - list - - price + - description + - group + - item + - list + - price type: object properties: id: type: integer format: int32 list: - $ref: '#/components/schemas/PriceList' + $ref: "#/components/schemas/PriceList" group: type: string description: The group @@ -9002,10 +9118,10 @@ components: description: Class representing a prices PriceList: required: - - code - - currency - - description - - name + - code + - currency + - description + - name type: object properties: createdBy: @@ -9061,23 +9177,23 @@ components: data: type: array items: - $ref: '#/components/schemas/PatientDTO' + $ref: "#/components/schemas/PatientDTO" pageInfo: - $ref: '#/components/schemas/PageInfoDTO' + $ref: "#/components/schemas/PageInfoDTO" PageOpdDTO: type: object properties: data: type: array items: - $ref: '#/components/schemas/OpdDTO' + $ref: "#/components/schemas/OpdDTO" pageInfo: - $ref: '#/components/schemas/PageInfoDTO' + $ref: "#/components/schemas/PageInfoDTO" MedicalWardDTO: type: object properties: id: - $ref: '#/components/schemas/MedicalWardIdDTO' + $ref: "#/components/schemas/MedicalWardIdDTO" in_quantity: type: number description: The in-quantity @@ -9090,14 +9206,14 @@ components: example: 89 MedicalWardIdDTO: required: - - medical - - ward + - medical + - ward type: object properties: ward: - $ref: '#/components/schemas/WardDTO' + $ref: "#/components/schemas/WardDTO" medical: - $ref: '#/components/schemas/MedicalDTO' + $ref: "#/components/schemas/MedicalDTO" description: The medical ward's id example: 1 PageLabWithRowsDTO: @@ -9106,23 +9222,23 @@ components: data: type: array items: - $ref: '#/components/schemas/LabWithRowsDTO' + $ref: "#/components/schemas/LabWithRowsDTO" pageInfo: - $ref: '#/components/schemas/PageInfoDTO' + $ref: "#/components/schemas/PageInfoDTO" PagePatientExaminationDTO: type: object properties: data: type: array items: - $ref: '#/components/schemas/PatientExaminationDTO' + $ref: "#/components/schemas/PatientExaminationDTO" pageInfo: - $ref: '#/components/schemas/PageInfoDTO' + $ref: "#/components/schemas/PageInfoDTO" AgeType: required: - - description - - from - - to + - description + - from + - to type: object properties: createdBy: @@ -9154,16 +9270,16 @@ components: data: type: array items: - $ref: '#/components/schemas/AdmissionDTO' + $ref: "#/components/schemas/AdmissionDTO" pageInfo: - $ref: '#/components/schemas/PageInfoDTO' + $ref: "#/components/schemas/PageInfoDTO" AdmittedPatientDTO: type: object properties: patient: - $ref: '#/components/schemas/PatientDTO' + $ref: "#/components/schemas/PatientDTO" admission: - $ref: '#/components/schemas/AdmissionDTO' + $ref: "#/components/schemas/AdmissionDTO" securitySchemes: bearerAuth: type: http diff --git a/src/components/accessories/admin/exams/editExam/EditExam.tsx b/src/components/accessories/admin/exams/editExam/EditExam.tsx index df28de2b4..0fba7ec73 100644 --- a/src/components/accessories/admin/exams/editExam/EditExam.tsx +++ b/src/components/accessories/admin/exams/editExam/EditExam.tsx @@ -5,8 +5,8 @@ import { Navigate, useLocation, useParams } from "react-router"; import { PATHS } from "../../../../../consts"; import { ExamDTO } from "../../../../../generated"; import { updateExam } from "../../../../../state/exams"; -import { getInitialFields } from "../examForm/consts"; import ExamForm from "../examForm/ExamForm"; +import { getInitialFields } from "../examForm/consts"; export const EditExam = () => { const dispatch = useAppDispatch(); @@ -16,7 +16,12 @@ export const EditExam = () => { const update = useAppSelector((state) => state.operations.update); const handleSubmit = (examDTO: ExamDTO) => { - dispatch(updateExam({ code: examDTO.code!!, examDTO })); + dispatch( + updateExam({ + code: examDTO.code!!, + examWithRowsDTO: { exam: examDTO, rows: [] }, + }) + ); }; if (state?.code !== id) { diff --git a/src/components/accessories/admin/exams/newExam/NewExam.tsx b/src/components/accessories/admin/exams/newExam/NewExam.tsx index f83effb75..5f7c2fec7 100644 --- a/src/components/accessories/admin/exams/newExam/NewExam.tsx +++ b/src/components/accessories/admin/exams/newExam/NewExam.tsx @@ -12,7 +12,7 @@ export const NewExam = () => { const create = useAppSelector((state) => state.exams.examCreate); const handleSubmit = (value: ExamDTO) => { - dispatch(createExam(value)); + dispatch(createExam({ examWithRowsDTO: { exam: value, rows: [] } })); }; return ( diff --git a/src/generated/.openapi-generator/FILES b/src/generated/.openapi-generator/FILES index e64020890..fabd38adc 100644 --- a/src/generated/.openapi-generator/FILES +++ b/src/generated/.openapi-generator/FILES @@ -1,131 +1,133 @@ -.gitignore -apis\AdmissionTypesApi.ts -apis\AdmissionsApi.ts -apis\AgeTypesApi.ts -apis\BillsApi.ts -apis\DeliveryResultTypeApi.ts -apis\DeliveryTypeApi.ts -apis\DischargeTypeApi.ts -apis\DiseaseTypesApi.ts -apis\DiseasesApi.ts -apis\ExamRowsApi.ts -apis\ExamTypesApi.ts -apis\ExaminationsApi.ts -apis\ExamsApi.ts -apis\HospitalsApi.ts -apis\LaboratoriesApi.ts -apis\LoginApi.ts -apis\MalnutritionsApi.ts -apis\MedicalStockMovementTypeApi.ts -apis\MedicalStockWardApi.ts -apis\MedicalTypesApi.ts -apis\MedicalsApi.ts -apis\OpdsApi.ts -apis\OperationsApi.ts -apis\OperationsTypesApi.ts -apis\OthersPriceApi.ts -apis\PatientConsensusApi.ts -apis\PatientVaccinesApi.ts -apis\PatientsApi.ts -apis\PermissionsApi.ts -apis\PregnantTreatmentTypesApi.ts -apis\PriceListsApi.ts -apis\ReportsApi.ts -apis\SMSApi.ts -apis\StockMovementsApi.ts -apis\SuppliersApi.ts -apis\TherapiesApi.ts -apis\UserGroupsApi.ts -apis\UserSettingsApi.ts -apis\UsersApi.ts -apis\VaccineTypeApi.ts -apis\VaccinesApi.ts -apis\VisitApi.ts -apis\WardsApi.ts -apis\index.ts -index.ts -models\AdmissionDTO.ts -models\AdmissionTypeDTO.ts -models\AdmittedPatientDTO.ts -models\AgeType.ts -models\AgeTypeDTO.ts -models\BillDTO.ts -models\BillItemsDTO.ts -models\BillPaymentsDTO.ts -models\DeliveryResultTypeDTO.ts -models\DeliveryTypeDTO.ts -models\DischargeTypeDTO.ts -models\DiseaseDTO.ts -models\DiseaseTypeDTO.ts -models\ExamDTO.ts -models\ExamRowDTO.ts -models\ExamTypeDTO.ts -models\FullBillDTO.ts -models\HospitalDTO.ts -models\LabWithRowsDTO.ts -models\LaboratoryDTO.ts -models\LoginRequest.ts -models\LoginResponse.ts -models\LotDTO.ts -models\MalnutritionDTO.ts -models\MedicalDTO.ts -models\MedicalTypeDTO.ts -models\MedicalWardDTO.ts -models\MedicalWardIdDTO.ts -models\MovementDTO.ts -models\MovementTypeDTO.ts -models\MovementWardDTO.ts -models\OpdDTO.ts -models\OpdWithOperationRowDTO.ts -models\OperationDTO.ts -models\OperationRowDTO.ts -models\OperationTypeDTO.ts -models\PageAdmissionDTO.ts -models\PageInfoDTO.ts -models\PageLabWithRowsDTO.ts -models\PageOpdDTO.ts -models\PagePatientDTO.ts -models\PagePatientExaminationDTO.ts -models\Patient.ts -models\PatientConsensus.ts -models\PatientConsensusDTO.ts -models\PatientDTO.ts -models\PatientExaminationDTO.ts -models\PatientProfilePhoto.ts -models\PatientProfilePhotoPhotoAsImage.ts -models\PatientProfilePhotoPhotoAsImageGraphics.ts -models\PatientProfilePhotoPhotoAsImageGraphicsClip.ts -models\PatientProfilePhotoPhotoAsImageGraphicsClipBounds.ts -models\PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D.ts -models\PatientProfilePhotoPhotoAsImageGraphicsClipBoundsLocation.ts -models\PatientProfilePhotoPhotoAsImageGraphicsClipBoundsSize.ts -models\PatientProfilePhotoPhotoAsImageGraphicsColor.ts -models\PatientProfilePhotoPhotoAsImageGraphicsColorColorSpace.ts -models\PatientProfilePhotoPhotoAsImageGraphicsFont.ts -models\PatientProfilePhotoPhotoAsImageGraphicsFontMetrics.ts -models\PatientProfilePhotoPhotoAsImageGraphicsFontMetricsFontRenderContext.ts -models\PatientProfilePhotoPhotoAsImageGraphicsFontTransform.ts -models\PatientVaccineDTO.ts -models\PermissionDTO.ts -models\PregnantTreatmentTypeDTO.ts -models\PriceDTO.ts -models\PriceList.ts -models\PriceListDTO.ts -models\PricesOthersDTO.ts -models\SmsDTO.ts -models\SupplierDTO.ts -models\TherapyDTO.ts -models\TherapyRow.ts -models\TherapyRowDTO.ts -models\TokenRefreshRequest.ts -models\UserDTO.ts -models\UserGroupDTO.ts -models\UserProfileDTO.ts -models\UserSettingDTO.ts -models\VaccineDTO.ts -models\VaccineTypeDTO.ts -models\VisitDTO.ts -models\WardDTO.ts -models\index.ts -runtime.ts -tsconfig.json +.gitignore +apis\AdmissionTypesApi.ts +apis\AdmissionsApi.ts +apis\AgeTypesApi.ts +apis\BillsApi.ts +apis\DeliveryResultTypeApi.ts +apis\DeliveryTypeApi.ts +apis\DischargeTypeApi.ts +apis\DiseaseTypesApi.ts +apis\DiseasesApi.ts +apis\ExamRowsApi.ts +apis\ExamTypesApi.ts +apis\ExaminationsApi.ts +apis\ExamsApi.ts +apis\HospitalsApi.ts +apis\LaboratoriesApi.ts +apis\LoginApi.ts +apis\MalnutritionsApi.ts +apis\MedicalStockMovementTypeApi.ts +apis\MedicalStockWardApi.ts +apis\MedicalTypesApi.ts +apis\MedicalsApi.ts +apis\OpdsApi.ts +apis\OperationsApi.ts +apis\OperationsTypesApi.ts +apis\OthersPriceApi.ts +apis\PatientConsensusApi.ts +apis\PatientVaccinesApi.ts +apis\PatientsApi.ts +apis\PermissionsApi.ts +apis\PregnantTreatmentTypesApi.ts +apis\PriceListsApi.ts +apis\ReportsApi.ts +apis\SMSApi.ts +apis\StockMovementsApi.ts +apis\SuppliersApi.ts +apis\TherapiesApi.ts +apis\UserGroupsApi.ts +apis\UserSettingsApi.ts +apis\UsersApi.ts +apis\VaccineTypeApi.ts +apis\VaccinesApi.ts +apis\VisitApi.ts +apis\WardsApi.ts +apis\index.ts +index.ts +models\AdmissionDTO.ts +models\AdmissionTypeDTO.ts +models\AdmittedPatientDTO.ts +models\AgeType.ts +models\AgeTypeDTO.ts +models\BillDTO.ts +models\BillItemsDTO.ts +models\BillPaymentsDTO.ts +models\DeliveryResultTypeDTO.ts +models\DeliveryTypeDTO.ts +models\DischargeTypeDTO.ts +models\DiseaseDTO.ts +models\DiseaseTypeDTO.ts +models\ExamDTO.ts +models\ExamRowDTO.ts +models\ExamTypeDTO.ts +models\ExamWithRowsDTO.ts +models\FullBillDTO.ts +models\GroupPermissionsDTO.ts +models\HospitalDTO.ts +models\LabWithRowsDTO.ts +models\LaboratoryDTO.ts +models\LoginRequest.ts +models\LoginResponse.ts +models\LotDTO.ts +models\MalnutritionDTO.ts +models\MedicalDTO.ts +models\MedicalTypeDTO.ts +models\MedicalWardDTO.ts +models\MedicalWardIdDTO.ts +models\MovementDTO.ts +models\MovementTypeDTO.ts +models\MovementWardDTO.ts +models\OpdDTO.ts +models\OpdWithOperationRowDTO.ts +models\OperationDTO.ts +models\OperationRowDTO.ts +models\OperationTypeDTO.ts +models\PageAdmissionDTO.ts +models\PageInfoDTO.ts +models\PageLabWithRowsDTO.ts +models\PageOpdDTO.ts +models\PagePatientDTO.ts +models\PagePatientExaminationDTO.ts +models\Patient.ts +models\PatientConsensus.ts +models\PatientConsensusDTO.ts +models\PatientDTO.ts +models\PatientExaminationDTO.ts +models\PatientProfilePhoto.ts +models\PatientProfilePhotoPhotoAsImage.ts +models\PatientProfilePhotoPhotoAsImageGraphics.ts +models\PatientProfilePhotoPhotoAsImageGraphicsClip.ts +models\PatientProfilePhotoPhotoAsImageGraphicsClipBounds.ts +models\PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D.ts +models\PatientProfilePhotoPhotoAsImageGraphicsClipBoundsLocation.ts +models\PatientProfilePhotoPhotoAsImageGraphicsClipBoundsSize.ts +models\PatientProfilePhotoPhotoAsImageGraphicsColor.ts +models\PatientProfilePhotoPhotoAsImageGraphicsColorColorSpace.ts +models\PatientProfilePhotoPhotoAsImageGraphicsFont.ts +models\PatientProfilePhotoPhotoAsImageGraphicsFontMetrics.ts +models\PatientProfilePhotoPhotoAsImageGraphicsFontMetricsFontRenderContext.ts +models\PatientProfilePhotoPhotoAsImageGraphicsFontTransform.ts +models\PatientVaccineDTO.ts +models\PermissionDTO.ts +models\PregnantTreatmentTypeDTO.ts +models\PriceDTO.ts +models\PriceList.ts +models\PriceListDTO.ts +models\PricesOthersDTO.ts +models\SmsDTO.ts +models\SupplierDTO.ts +models\TherapyDTO.ts +models\TherapyRow.ts +models\TherapyRowDTO.ts +models\TokenRefreshRequest.ts +models\UserDTO.ts +models\UserGroupDTO.ts +models\UserProfileDTO.ts +models\UserSettingDTO.ts +models\VaccineDTO.ts +models\VaccineTypeDTO.ts +models\VisitDTO.ts +models\WardDTO.ts +models\index.ts +runtime.ts +tsconfig.json diff --git a/src/generated/apis/ExamsApi.ts b/src/generated/apis/ExamsApi.ts index 28e37b638..e2bfe54e6 100644 --- a/src/generated/apis/ExamsApi.ts +++ b/src/generated/apis/ExamsApi.ts @@ -15,6 +15,7 @@ import { Observable } from 'rxjs'; import { BaseAPI, HttpHeaders, throwIfNullOrUndefined, encodeURI, OperationOpts, RawAjaxResponse } from '../runtime'; import { ExamDTO, + ExamWithRowsDTO, } from '../models'; export interface DeleteExam1Request { @@ -26,12 +27,12 @@ export interface GetExams1Request { } export interface NewExamRequest { - examDTO: ExamDTO; + examWithRowsDTO: ExamWithRowsDTO; } -export interface UpdateExamsRequest { +export interface UpdateExamRequest { code: string; - examDTO: ExamDTO; + examWithRowsDTO: ExamWithRowsDTO; } /** @@ -93,10 +94,10 @@ export class ExamsApi extends BaseAPI { /** */ - newExam({ examDTO }: NewExamRequest): Observable - newExam({ examDTO }: NewExamRequest, opts?: OperationOpts): Observable> - newExam({ examDTO }: NewExamRequest, opts?: OperationOpts): Observable> { - throwIfNullOrUndefined(examDTO, 'examDTO', 'newExam'); + newExam({ examWithRowsDTO }: NewExamRequest): Observable + newExam({ examWithRowsDTO }: NewExamRequest, opts?: OperationOpts): Observable> + newExam({ examWithRowsDTO }: NewExamRequest, opts?: OperationOpts): Observable> { + throwIfNullOrUndefined(examWithRowsDTO, 'examWithRowsDTO', 'newExam'); const headers: HttpHeaders = { 'Content-Type': 'application/json', @@ -107,17 +108,17 @@ export class ExamsApi extends BaseAPI { url: '/exams', method: 'POST', headers, - body: examDTO, + body: examWithRowsDTO, }, opts?.responseOpts); }; /** */ - updateExams({ code, examDTO }: UpdateExamsRequest): Observable - updateExams({ code, examDTO }: UpdateExamsRequest, opts?: OperationOpts): Observable> - updateExams({ code, examDTO }: UpdateExamsRequest, opts?: OperationOpts): Observable> { - throwIfNullOrUndefined(code, 'code', 'updateExams'); - throwIfNullOrUndefined(examDTO, 'examDTO', 'updateExams'); + updateExam({ code, examWithRowsDTO }: UpdateExamRequest): Observable + updateExam({ code, examWithRowsDTO }: UpdateExamRequest, opts?: OperationOpts): Observable> + updateExam({ code, examWithRowsDTO }: UpdateExamRequest, opts?: OperationOpts): Observable> { + throwIfNullOrUndefined(code, 'code', 'updateExam'); + throwIfNullOrUndefined(examWithRowsDTO, 'examWithRowsDTO', 'updateExam'); const headers: HttpHeaders = { 'Content-Type': 'application/json', @@ -128,7 +129,7 @@ export class ExamsApi extends BaseAPI { url: '/exams/{code}'.replace('{code}', encodeURI(code)), method: 'PUT', headers, - body: examDTO, + body: examWithRowsDTO, }, opts?.responseOpts); }; diff --git a/src/generated/apis/SuppliersApi.ts b/src/generated/apis/SuppliersApi.ts index ea55d6a80..07cbb0d47 100644 --- a/src/generated/apis/SuppliersApi.ts +++ b/src/generated/apis/SuppliersApi.ts @@ -17,6 +17,10 @@ import { SupplierDTO, } from '../models'; +export interface DeleteSupplierRequest { + id: number; +} + export interface GetSuppliersRequest { excludeDeleted?: boolean; } @@ -38,6 +42,24 @@ export interface UpdateSupplierRequest { */ export class SuppliersApi extends BaseAPI { + /** + */ + deleteSupplier({ id }: DeleteSupplierRequest): Observable + deleteSupplier({ id }: DeleteSupplierRequest, opts?: OperationOpts): Observable> + deleteSupplier({ id }: DeleteSupplierRequest, opts?: OperationOpts): Observable> { + throwIfNullOrUndefined(id, 'id', 'deleteSupplier'); + + const headers: HttpHeaders = { + ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), + }; + + return this.request({ + url: '/suppliers/{id}'.replace('{id}', encodeURI(id)), + method: 'DELETE', + headers, + }, opts?.responseOpts); + }; + /** */ getSuppliers({ excludeDeleted }: GetSuppliersRequest): Observable> diff --git a/src/generated/apis/UserGroupsApi.ts b/src/generated/apis/UserGroupsApi.ts index 3c4f33694..8a6617fd0 100644 --- a/src/generated/apis/UserGroupsApi.ts +++ b/src/generated/apis/UserGroupsApi.ts @@ -14,6 +14,8 @@ import { Observable } from 'rxjs'; import { BaseAPI, HttpHeaders, throwIfNullOrUndefined, encodeURI, OperationOpts, RawAjaxResponse } from '../runtime'; import { + GroupPermissionsDTO, + PermissionDTO, UserGroupDTO, } from '../models'; @@ -34,11 +36,21 @@ export interface NewUserGroupRequest { userGroupDTO: UserGroupDTO; } +export interface ReplaceGroupPermissionsRequest { + groupCode: string; + groupPermissionsDTO: GroupPermissionsDTO; +} + export interface RevokePermissionRequest { groupCode: string; id: number; } +export interface UpdateGroupPermissionsRequest { + groupCode: string; + groupPermissionsDTO: GroupPermissionsDTO; +} + export interface UpdateUserGroupRequest { groupCode: string; userGroupDTO: UserGroupDTO; @@ -140,6 +152,27 @@ export class UserGroupsApi extends BaseAPI { }, opts?.responseOpts); }; + /** + */ + replaceGroupPermissions({ groupCode, groupPermissionsDTO }: ReplaceGroupPermissionsRequest): Observable> + replaceGroupPermissions({ groupCode, groupPermissionsDTO }: ReplaceGroupPermissionsRequest, opts?: OperationOpts): Observable>> + replaceGroupPermissions({ groupCode, groupPermissionsDTO }: ReplaceGroupPermissionsRequest, opts?: OperationOpts): Observable | RawAjaxResponse>> { + throwIfNullOrUndefined(groupCode, 'groupCode', 'replaceGroupPermissions'); + throwIfNullOrUndefined(groupPermissionsDTO, 'groupPermissionsDTO', 'replaceGroupPermissions'); + + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), + }; + + return this.request>({ + url: '/usergroups/{group_code}/permissions'.replace('{group_code}', encodeURI(groupCode)), + method: 'PATCH', + headers, + body: groupPermissionsDTO, + }, opts?.responseOpts); + }; + /** */ revokePermission({ groupCode, id }: RevokePermissionRequest): Observable @@ -159,6 +192,27 @@ export class UserGroupsApi extends BaseAPI { }, opts?.responseOpts); }; + /** + */ + updateGroupPermissions({ groupCode, groupPermissionsDTO }: UpdateGroupPermissionsRequest): Observable> + updateGroupPermissions({ groupCode, groupPermissionsDTO }: UpdateGroupPermissionsRequest, opts?: OperationOpts): Observable>> + updateGroupPermissions({ groupCode, groupPermissionsDTO }: UpdateGroupPermissionsRequest, opts?: OperationOpts): Observable | RawAjaxResponse>> { + throwIfNullOrUndefined(groupCode, 'groupCode', 'updateGroupPermissions'); + throwIfNullOrUndefined(groupPermissionsDTO, 'groupPermissionsDTO', 'updateGroupPermissions'); + + const headers: HttpHeaders = { + 'Content-Type': 'application/json', + ...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined), + }; + + return this.request>({ + url: '/usergroups/{group_code}/permissions'.replace('{group_code}', encodeURI(groupCode)), + method: 'PUT', + headers, + body: groupPermissionsDTO, + }, opts?.responseOpts); + }; + /** */ updateUserGroup({ groupCode, userGroupDTO }: UpdateUserGroupRequest): Observable diff --git a/src/generated/models/ExamWithRowsDTO.ts b/src/generated/models/ExamWithRowsDTO.ts new file mode 100644 index 000000000..0d445ec4f --- /dev/null +++ b/src/generated/models/ExamWithRowsDTO.ts @@ -0,0 +1,34 @@ +// tslint:disable +/** + * Open Hospital API Documentation + * Open Hospital API Documentation + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { + ExamDTO, +} from './'; + +/** + * @export + * @interface ExamWithRowsDTO + */ +export interface ExamWithRowsDTO { + /** + * @type {ExamDTO} + * @memberof ExamWithRowsDTO + */ + exam: ExamDTO; + /** + * Possible result for the exam(only for exams with procedure 1 and 2) + * @type {Array} + * @memberof ExamWithRowsDTO + */ + rows?: Array; +} diff --git a/src/generated/models/GroupPermissionsDTO.ts b/src/generated/models/GroupPermissionsDTO.ts new file mode 100644 index 000000000..d56bab2a4 --- /dev/null +++ b/src/generated/models/GroupPermissionsDTO.ts @@ -0,0 +1,25 @@ +// 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 GroupPermissionsDTO + */ +export interface GroupPermissionsDTO { + /** + * List of permissions\' ids + * @type {Array} + * @memberof GroupPermissionsDTO + */ + permissions?: Array; +} diff --git a/src/generated/models/OperationDTO.ts b/src/generated/models/OperationDTO.ts index 97492e784..2ca18514a 100644 --- a/src/generated/models/OperationDTO.ts +++ b/src/generated/models/OperationDTO.ts @@ -37,6 +37,12 @@ export interface OperationDTO { * @memberof OperationDTO */ type: OperationTypeDTO; + /** + * The operation context + * @type {string} + * @memberof OperationDTO + */ + opeFor: OperationDTOOpeForEnum; /** * The operation major * @type {number} @@ -50,3 +56,14 @@ export interface OperationDTO { */ lock?: number; } + +/** + * @export + * @enum {string} + */ +export enum OperationDTOOpeForEnum { + OpdAdmission = 'opd_admission', + Admission = 'admission', + Opd = 'opd' +} + diff --git a/src/generated/models/Patient.ts b/src/generated/models/Patient.ts index 3e87778e4..b48c7e07a 100644 --- a/src/generated/models/Patient.ts +++ b/src/generated/models/Patient.ts @@ -195,10 +195,10 @@ export interface Patient { * @type {string} * @memberof Patient */ - informations?: string; + searchString?: string; /** * @type {string} * @memberof Patient */ - searchString?: string; + informations?: string; } diff --git a/src/generated/models/PatientDTO.ts b/src/generated/models/PatientDTO.ts index 24d2e9e08..8d05bc146 100644 --- a/src/generated/models/PatientDTO.ts +++ b/src/generated/models/PatientDTO.ts @@ -4,7 +4,7 @@ * Open Hospital API Documentation * * The version of the OpenAPI document: 0.1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -121,7 +121,7 @@ export interface PatientDTO { * @type {string} * @memberof PatientDTO */ - bloodType: PatientDTOBloodTypeEnum; + bloodType: string; /** * HasInsurance (Y=Yes, N=no) * @type {string} @@ -194,63 +194,46 @@ export interface PatientDTO { * @enum {string} */ export enum PatientDTOSexEnum { - M = 'M', - F = 'F' + M = "M", + F = "F", } /** * @export * @enum {string} */ export enum PatientDTOMotherEnum { - D = 'D', - A = 'A' + D = "D", + A = "A", } /** * @export * @enum {string} */ export enum PatientDTOFatherEnum { - D = 'D', - A = 'A' -} -/** - * @export - * @enum {string} - * these are manually overwritten - * because openapi-generator does not handle well thoser enums - */ -export enum PatientDTOBloodTypeEnum { - Opos = "0-", - Oneg = "0+", - Aneg = "A-", - Apos = "A+", - Bneg = "B-", - Bpos = "B+", - ABneg = "AB-", - ABpos = "AB+", + D = "D", + A = "A", } /** * @export * @enum {string} */ export enum PatientDTOHasInsuranceEnum { - Y = 'Y', - N = 'N' + Y = "Y", + N = "N", } /** * @export * @enum {string} */ export enum PatientDTOParentTogetherEnum { - Y = 'Y', - N = 'N' + Y = "Y", + N = "N", } /** * @export * @enum {string} */ export enum PatientDTOStatusEnum { - I = 'I', - O = 'O' + I = "I", + O = "O", } - diff --git a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClipBounds.ts b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClipBounds.ts index 972dd58c8..e963f0aee 100644 --- a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClipBounds.ts +++ b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClipBounds.ts @@ -71,30 +71,30 @@ export interface PatientProfilePhotoPhotoAsImageGraphicsClipBounds { * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBounds */ - maxX?: number; + minX?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBounds */ - maxY?: number; + minY?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBounds */ - centerX?: number; + maxX?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBounds */ - centerY?: number; + maxY?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBounds */ - minX?: number; + centerX?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBounds */ - minY?: number; + centerY?: number; } diff --git a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D.ts b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D.ts index dc513a8ec..4988aa3df 100644 --- a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D.ts +++ b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D.ts @@ -25,50 +25,50 @@ export interface PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D { * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D */ - width?: number; + height?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D */ - height?: number; + minX?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D */ - y?: number; + minY?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D */ - x?: number; + width?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D */ - maxX?: number; + x?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D */ - maxY?: number; + y?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D */ - centerX?: number; + maxX?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D */ - centerY?: number; + maxY?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D */ - minX?: number; + centerX?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D */ - minY?: number; + centerY?: number; } diff --git a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsFont.ts b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsFont.ts index 3517f0abc..18f744972 100644 --- a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsFont.ts +++ b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsFont.ts @@ -45,6 +45,11 @@ export interface PatientProfilePhotoPhotoAsImageGraphicsFont { * @memberof PatientProfilePhotoPhotoAsImageGraphicsFont */ family?: string; + /** + * @type {boolean} + * @memberof PatientProfilePhotoPhotoAsImageGraphicsFont + */ + plain?: boolean; /** * @type {string} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFont @@ -85,11 +90,6 @@ export interface PatientProfilePhotoPhotoAsImageGraphicsFont { * @memberof PatientProfilePhotoPhotoAsImageGraphicsFont */ transformed?: boolean; - /** - * @type {boolean} - * @memberof PatientProfilePhotoPhotoAsImageGraphicsFont - */ - plain?: boolean; /** * @type {string} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFont diff --git a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsFontMetrics.ts b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsFontMetrics.ts index 0725940a7..4ce03cb67 100644 --- a/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsFontMetrics.ts +++ b/src/generated/models/PatientProfilePhotoPhotoAsImageGraphicsFontMetrics.ts @@ -30,22 +30,22 @@ export interface PatientProfilePhotoPhotoAsImageGraphicsFontMetrics { * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFontMetrics */ - ascent?: number; + height?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFontMetrics */ - descent?: number; + ascent?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFontMetrics */ - leading?: number; + descent?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFontMetrics */ - height?: number; + leading?: number; /** * @type {number} * @memberof PatientProfilePhotoPhotoAsImageGraphicsFontMetrics diff --git a/src/generated/models/TherapyRow.ts b/src/generated/models/TherapyRow.ts index 7f96100ce..299196676 100644 --- a/src/generated/models/TherapyRow.ts +++ b/src/generated/models/TherapyRow.ts @@ -106,18 +106,18 @@ export interface TherapyRow { */ smsInt: number; /** - * @type {boolean} + * @type {number} * @memberof TherapyRow */ - sms?: boolean; + medical?: number; /** * @type {boolean} * @memberof TherapyRow */ notify?: boolean; /** - * @type {number} + * @type {boolean} * @memberof TherapyRow */ - medical?: number; + sms?: boolean; } diff --git a/src/generated/models/WardDTO.ts b/src/generated/models/WardDTO.ts index 6f8e7865d..5625690a3 100644 --- a/src/generated/models/WardDTO.ts +++ b/src/generated/models/WardDTO.ts @@ -76,17 +76,17 @@ export interface WardDTO { * @type {boolean} * @memberof WardDTO */ - female?: boolean; + opd?: boolean; /** * @type {boolean} * @memberof WardDTO */ - male?: boolean; + female?: boolean; /** * @type {boolean} * @memberof WardDTO */ - opd?: boolean; + male?: boolean; /** * @type {boolean} * @memberof WardDTO diff --git a/src/generated/models/index.ts b/src/generated/models/index.ts index efb93d806..414db20ce 100644 --- a/src/generated/models/index.ts +++ b/src/generated/models/index.ts @@ -14,7 +14,9 @@ export * from './DiseaseTypeDTO'; export * from './ExamDTO'; export * from './ExamRowDTO'; export * from './ExamTypeDTO'; +export * from './ExamWithRowsDTO'; export * from './FullBillDTO'; +export * from './GroupPermissionsDTO'; export * from './HospitalDTO'; export * from './LabWithRowsDTO'; export * from './LaboratoryDTO'; diff --git a/src/generated/runtime.ts b/src/generated/runtime.ts index 3dbdfa869..e3fee4f86 100644 --- a/src/generated/runtime.ts +++ b/src/generated/runtime.ts @@ -1,161 +1,134 @@ // tslint:disable /** - * OH 2.0 Api Documentation - * OH 2.0 Api Documentation - * - * The version of the OpenAPI document: 1.0 + * Open Hospital API Documentation + * Open Hospital API Documentation * + * The version of the OpenAPI document: 0.1.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { Observable, of, Subscriber } from "rxjs"; -import { ajax, AjaxRequest, AjaxResponse } from "rxjs/ajax"; -import { map, concatMap } from "rxjs/operators"; +import { Observable, of, Subscriber } from 'rxjs'; +import { ajax, AjaxRequest, AjaxResponse } from 'rxjs/ajax'; +import { map, concatMap } from 'rxjs/operators'; -export const BASE_PATH = "https://oh2.open-hospital.org".replace(/\/+$/, ""); +export const BASE_PATH = 'http://localhost:8080'.replace(/\/+$/, ''); export interface ConfigurationParameters { - basePath?: string; // override base path - middleware?: Middleware[]; // middleware to apply before/after rxjs requests - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | ((name: string) => string); // parameter for apiKey security - accessToken?: string | ((name?: string, scopes?: string[]) => string); // parameter for oauth2 security + basePath?: string; // override base path + middleware?: Middleware[]; // middleware to apply before/after rxjs requests + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | ((name: string) => string); // parameter for apiKey security + accessToken?: string | ((name?: string, scopes?: string[]) => string); // parameter for oauth2 security } export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} - - get basePath(): string { - return this.configuration.basePath ?? BASE_PATH; - } - - get middleware(): Middleware[] { - return this.configuration.middleware ?? []; - } - - get username(): string | undefined { - return this.configuration.username; - } - - get password(): string | undefined { - return this.configuration.password; - } - - get apiKey(): ((name: string) => string) | undefined { - const { apiKey } = this.configuration; - return apiKey - ? typeof apiKey === "string" - ? () => apiKey - : apiKey - : undefined; - } - - get accessToken(): ((name: string, scopes?: string[]) => string) | undefined { - const { accessToken } = this.configuration; - return accessToken - ? typeof accessToken === "string" - ? () => accessToken - : accessToken - : undefined; - } + constructor(private configuration: ConfigurationParameters = {}) {} + + get basePath(): string { + return this.configuration.basePath ?? BASE_PATH; + } + + get middleware(): Middleware[] { + return this.configuration.middleware ?? []; + } + + get username(): string | undefined { + return this.configuration.username; + } + + get password(): string | undefined { + return this.configuration.password; + } + + get apiKey(): ((name: string) => string) | undefined { + const { apiKey } = this.configuration; + return apiKey ? (typeof apiKey === 'string' ? () => apiKey : apiKey) : undefined; + } + + get accessToken(): ((name: string, scopes?: string[]) => string) | undefined { + const { accessToken } = this.configuration; + return accessToken ? (typeof accessToken === 'string' ? () => accessToken : accessToken) : undefined; + } } /** * This is the base class for all generated API classes. */ export class BaseAPI { - private middleware: Middleware[] = []; - - constructor(protected configuration = new Configuration()) { - this.middleware = configuration.middleware; - } - - withMiddleware = (middlewares: Middleware[]): this => { - const next = this.clone(); - next.middleware = next.middleware.concat(middlewares); - return next; - }; - - withPreMiddleware = (preMiddlewares: Array) => - this.withMiddleware(preMiddlewares.map((pre) => ({ pre }))); - - withPostMiddleware = (postMiddlewares: Array) => - this.withMiddleware(postMiddlewares.map((post) => ({ post }))); - - protected request(requestOpts: RequestOpts): Observable; - protected request( - requestOpts: RequestOpts, - responseOpts?: ResponseOpts - ): Observable>; - protected request( - requestOpts: RequestOpts, - responseOpts?: ResponseOpts - ): Observable> { - return this.rxjsRequest(this.createRequestArgs(requestOpts)).pipe( - map((res) => { - const { status, response } = res; - if (status >= 200 && status < 300) { - return responseOpts?.respone === "raw" ? res : response; - } - throw res; - }) - ); - } - - private createRequestArgs = ({ - url: baseUrl, - query, - method, - headers, - body, - responseType, - }: RequestOpts): RequestArgs => { - // only add the queryString to the URL if there are query parameters. - // this is done to avoid urls ending with a '?' character which buggy webservers - // do not handle correctly sometimes. - const url = `${this.configuration.basePath}${baseUrl}${ - query && Object.keys(query).length ? `?${queryString(query)}` : "" - }`; - - return { - url, - method, - headers, - body: body instanceof FormData ? body : JSON.stringify(body), - responseType: responseType ?? "json", + private middleware: Middleware[] = []; + + constructor(protected configuration = new Configuration()) { + this.middleware = configuration.middleware; + } + + withMiddleware = (middlewares: Middleware[]): this => { + const next = this.clone(); + next.middleware = next.middleware.concat(middlewares); + return next; }; - }; - - private rxjsRequest = (params: RequestArgs): Observable => - of(params).pipe( - map((request) => { - this.middleware - .filter((item) => item.pre) - .forEach((mw) => (request = mw.pre!(request))); - return request; - }), - concatMap((args) => - ajax(args).pipe( - map((response) => { - this.middleware - .filter((item) => item.post) - .forEach((mw) => (response = mw.post!(response))); - return response; - }) - ) - ) - ); - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone = (): this => - Object.assign(Object.create(Object.getPrototypeOf(this)), this); + + withPreMiddleware = (preMiddlewares: Array) => + this.withMiddleware(preMiddlewares.map((pre) => ({ pre }))); + + withPostMiddleware = (postMiddlewares: Array) => + this.withMiddleware(postMiddlewares.map((post) => ({ post }))); + + protected request(requestOpts: RequestOpts): Observable + protected request(requestOpts: RequestOpts, responseOpts?: ResponseOpts): Observable> + protected request(requestOpts: RequestOpts, responseOpts?: ResponseOpts): Observable> { + return this.rxjsRequest(this.createRequestArgs(requestOpts)).pipe( + map((res) => { + const { status, response } = res; + if (status >= 200 && status < 300) { + return responseOpts?.respone === 'raw' ? res : response; + } + throw res; + }) + ); + } + + private createRequestArgs = ({ url: baseUrl, query, method, headers, body, responseType }: RequestOpts): RequestArgs => { + // only add the queryString to the URL if there are query parameters. + // this is done to avoid urls ending with a '?' character which buggy webservers + // do not handle correctly sometimes. + const url = `${this.configuration.basePath}${baseUrl}${query && Object.keys(query).length ? `?${queryString(query)}`: ''}`; + + return { + url, + method, + headers, + body: body instanceof FormData ? body : JSON.stringify(body), + responseType: responseType ?? 'json', + }; + } + + private rxjsRequest = (params: RequestArgs): Observable => + of(params).pipe( + map((request) => { + this.middleware.filter((item) => item.pre).forEach((mw) => (request = mw.pre!(request))); + return request; + }), + concatMap((args) => + ajax(args).pipe( + map((response) => { + this.middleware.filter((item) => item.post).forEach((mw) => (response = mw.post!(response))); + return response; + }) + ) + ) + ); + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone = (): this => + Object.assign(Object.create(Object.getPrototypeOf(this)), this); } /** @@ -163,68 +136,52 @@ export class BaseAPI { * export for not being a breaking change */ export class RequiredError extends Error { - name: "RequiredError" = "RequiredError"; + name: 'RequiredError' = 'RequiredError'; } export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", + csv: ',', + ssv: ' ', + tsv: '\t', + pipes: '|', }; export type Json = any; -export type HttpMethod = - | "GET" - | "POST" - | "PUT" - | "PATCH" - | "DELETE" - | "OPTIONS" - | "HEAD"; +export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; export type HttpHeaders = { [key: string]: string }; -export type HttpQuery = Partial<{ - [key: string]: - | string - | number - | null - | boolean - | Array; -}>; // partial is needed for strict mode +export type HttpQuery = Partial<{ [key: string]: string | number | null | boolean | Array }>; // partial is needed for strict mode export type HttpBody = Json | FormData; export interface RequestOpts extends AjaxRequest { - query?: HttpQuery; // additional prop - // the following props have improved types over AjaxRequest - method: HttpMethod; - headers?: HttpHeaders; - body?: HttpBody; - responseType?: "json" | "blob" | "arraybuffer" | "text"; + query?: HttpQuery; // additional prop + // the following props have improved types over AjaxRequest + method: HttpMethod; + headers?: HttpHeaders; + body?: HttpBody; + responseType?: 'json' | 'blob' | 'arraybuffer' | 'text'; } export interface ResponseOpts { - respone?: "raw"; + respone?: 'raw'; } export interface OperationOpts { - responseOpts?: ResponseOpts; + responseOpts?: ResponseOpts; } -// AjaxResponse with typed response +// AjaxResponse with typed response export interface RawAjaxResponse extends AjaxResponse { - response: T; + response: T; } export const encodeURI = (value: any) => encodeURIComponent(`${value}`); -const queryString = (params: HttpQuery): string => - Object.entries(params) - .map(([key, value]) => - value instanceof Array - ? value.map((val) => `${encodeURI(key)}=${encodeURI(val)}`).join("&") +const queryString = (params: HttpQuery): string => Object.entries(params) + .map(([key, value]) => value instanceof Array + ? value.map((val) => `${encodeURI(key)}=${encodeURI(val)}`).join('&') : `${encodeURI(key)}=${encodeURI(value)}` ) - .join("&"); + .join('&'); // alias fallback for not being a breaking change export const querystring = queryString; @@ -232,28 +189,16 @@ export const querystring = queryString; /** * @deprecated */ -export const throwIfRequired = ( - params: { [key: string]: any }, - key: string, - nickname: string -) => { - if (!params || params[key] == null) { - throw new RequiredError( - `Required parameter ${key} was null or undefined when calling ${nickname}.` - ); - } +export const throwIfRequired = (params: {[key: string]: any}, key: string, nickname: string) => { + if (!params || params[key] == null) { + throw new RequiredError(`Required parameter ${key} was null or undefined when calling ${nickname}.`); + } }; -export const throwIfNullOrUndefined = ( - value: any, - paramName: string, - nickname: string -) => { - if (value == null) { - throw new Error( - `Parameter "${paramName}" was null or undefined when calling "${nickname}".` - ); - } +export const throwIfNullOrUndefined = (value: any, paramName: string, nickname: string) => { + if (value == null) { + throw new Error(`Parameter "${paramName}" was null or undefined when calling "${nickname}".`); + } }; // alias for easier importing @@ -261,6 +206,6 @@ export interface RequestArgs extends AjaxRequest {} export interface ResponseArgs extends AjaxResponse {} export interface Middleware { - pre?(request: RequestArgs): RequestArgs; - post?(response: ResponseArgs): ResponseArgs; -} \ No newline at end of file + pre?(request: RequestArgs): RequestArgs; + post?(response: ResponseArgs): ResponseArgs; +} diff --git a/src/state/exams/thunk.ts b/src/state/exams/thunk.ts index bc7773822..bc1c58231 100644 --- a/src/state/exams/thunk.ts +++ b/src/state/exams/thunk.ts @@ -1,5 +1,10 @@ import { createAsyncThunk } from "@reduxjs/toolkit"; -import { ExamDTO, ExamRowsApi, ExamsApi, UpdateExamsRequest } from "../../generated"; +import { + ExamRowsApi, + ExamsApi, + NewExamRequest, + UpdateExamRequest, +} from "../../generated"; import { customConfiguration } from "../../libraries/apiUtils/configuration"; const api = new ExamsApi(customConfiguration()); @@ -26,18 +31,18 @@ export const getExamRows = createAsyncThunk( export const createExam = createAsyncThunk( "exams/createExam", - async (examDTO: ExamDTO, thunkApi) => + async (payload: NewExamRequest, thunkApi) => api - .newExam({ examDTO }) + .newExam(payload) .toPromise() .catch((error) => thunkApi.rejectWithValue(error.response)) ); export const updateExam = createAsyncThunk( "exams/updateExam", - async (payload: UpdateExamsRequest, thunkApi) => + async (payload: UpdateExamRequest, thunkApi) => api - .updateExams(payload) + .updateExam(payload) .toPromise() .catch((error) => thunkApi.rejectWithValue(error.response)) ); @@ -46,7 +51,7 @@ export const deleteExam = createAsyncThunk( "exams/deleteExam", async (code: string, thunkApi) => api - .deleteExam1({code}) + .deleteExam1({ code }) .toPromise() .catch((error) => thunkApi.rejectWithValue(error.response)) ); From 068c883f4b2b30245d174e8ae1ac7d5cb75db30e Mon Sep 17 00:00:00 2001 From: SteveGT96 Date: Wed, 16 Oct 2024 17:55:53 +0100 Subject: [PATCH 2/8] update: Update exam form --- package.json | 3 + .../admin/exams/editExam/EditExam.tsx | 25 +++-- .../admin/exams/examForm/ExamForm.tsx | 93 ++++++++++++++++--- .../admin/exams/examForm/consts.ts | 14 ++- .../admin/exams/examForm/styles.scss | 29 ++++++ .../accessories/admin/exams/examForm/types.ts | 6 +- .../admin/exams/examsTable/ExamsTable.tsx | 6 +- .../admin/exams/newExam/NewExam.tsx | 9 +- .../accessories/admin/exams/types.ts | 5 +- src/libraries/formDataHandling/functions.ts | 6 +- src/libraries/formDataHandling/types.ts | 1 + src/resources/i18n/en.json | 5 + 12 files changed, 167 insertions(+), 35 deletions(-) diff --git a/package.json b/package.json index 46eef8123..1401ca5c3 100644 --- a/package.json +++ b/package.json @@ -148,5 +148,8 @@ }, "_moduleAliases": { "@": "./dist" + }, + "volta": { + "node": "20.18.0" } } diff --git a/src/components/accessories/admin/exams/editExam/EditExam.tsx b/src/components/accessories/admin/exams/editExam/EditExam.tsx index 0fba7ec73..16da0c526 100644 --- a/src/components/accessories/admin/exams/editExam/EditExam.tsx +++ b/src/components/accessories/admin/exams/editExam/EditExam.tsx @@ -1,10 +1,10 @@ import { useAppDispatch, useAppSelector } from "libraries/hooks/redux"; -import React from "react"; +import React, { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { Navigate, useLocation, useParams } from "react-router"; import { PATHS } from "../../../../../consts"; import { ExamDTO } from "../../../../../generated"; -import { updateExam } from "../../../../../state/exams"; +import { getExamRows, updateExam } from "../../../../../state/exams"; import ExamForm from "../examForm/ExamForm"; import { getInitialFields } from "../examForm/consts"; @@ -13,13 +13,26 @@ export const EditExam = () => { const { t } = useTranslation(); const { state }: { state: ExamDTO | undefined } = useLocation(); const { id } = useParams(); - const update = useAppSelector((state) => state.operations.update); + const update = useAppSelector((state) => state.exams.examUpdate); - const handleSubmit = (examDTO: ExamDTO) => { + const examRows: string[] | undefined = useAppSelector((state) => + state.exams.examRowsByExamCode.data?.map((row) => row.description!) + ); + + useEffect(() => { + if (id) { + dispatch(getExamRows(id)); + } + }, [dispatch, id]); + + const handleSubmit = ({ + rows, + ...examDTO + }: ExamDTO & { rows: string[] | undefined }) => { dispatch( updateExam({ code: examDTO.code!!, - examWithRowsDTO: { exam: examDTO, rows: [] }, + examWithRowsDTO: { exam: examDTO, rows }, }) ); }; @@ -35,7 +48,7 @@ export const EditExam = () => { isLoading={!!update.isLoading} resetButtonLabel={t("common.cancel")} submitButtonLabel={t("exam.updateExam")} - fields={getInitialFields(state)} + fields={getInitialFields(state, examRows)} /> ); }; diff --git a/src/components/accessories/admin/exams/examForm/ExamForm.tsx b/src/components/accessories/admin/exams/examForm/ExamForm.tsx index 839d9b6d9..bf74c99aa 100644 --- a/src/components/accessories/admin/exams/examForm/ExamForm.tsx +++ b/src/components/accessories/admin/exams/examForm/ExamForm.tsx @@ -10,7 +10,7 @@ import React, { } from "react"; import { useTranslation } from "react-i18next"; import { useNavigate } from "react-router"; -import { number, object, string } from "yup"; +import { array, number, object, string } from "yup"; import checkIcon from "../../../../../assets/check-icon.png"; import warningIcon from "../../../../../assets/warning-icon.png"; import { PATHS } from "../../../../../consts"; @@ -28,6 +28,8 @@ import TextField from "../../../textField/TextField"; import "./styles.scss"; import { IExamProps } from "./types"; +import { AddCircle } from "@mui/icons-material"; +import { IconButton } from "@mui/material"; import { useAppDispatch, useAppSelector } from "libraries/hooks/redux"; import AutocompleteField from "../../../autocompleteField/AutocompleteField"; import InfoBox from "../../../infoBox/InfoBox"; @@ -60,6 +62,15 @@ const ExamForm: FC = ({ [examTypeState.data] ); + const procedureOptions = useMemo( + () => [ + { value: "1", label: t("exam.procedures.1") }, + { value: "2", label: t("exam.procedures.2") }, + { value: "3", label: t("exam.procedures.3") }, + ], + [t] + ); + const errorMessage = useMemo( () => (creationMode @@ -79,6 +90,18 @@ const ExamForm: FC = ({ code: string().required(t("common.required")), description: string().required(t("common.required")), examtype: string().required(t("common.required")), + rows: array() + .of(string().required(t("common.required"))) + .test({ + name: "min", + exclusive: true, + test: function (value) { + return parseInt(this.parent.procedure) === 3 + ? true + : (value as string[]).length <= 2; + }, + message: t("exam.minLength"), + }), procedure: number() .test({ name: "onetwothree", @@ -119,11 +142,34 @@ const ExamForm: FC = ({ navigate(-1); }; + const addExamRow = useCallback(() => { + formik.setFieldValue("rows", [...formik.values.rows, ""]); + }, [formik]); + + const removeExamRow = useCallback( + (index: number) => () => { + formik.setFieldValue( + "rows", + (formik.values.rows as string[]).splice(index, 1) + ); + }, + [formik] + ); + const onBlurCallback = useCallback( (fieldName: string) => (e: React.FocusEvent, value: string) => { handleBlur(e); setFieldValue(fieldName, value); + if (fieldName === "procedure") { + const rows = formik.values.rows as string[]; + if (parseInt(value) === 3) { + setFieldValue("rows", []); + } else if (rows.length < 2) { + setFieldValue("rows", rows.length === 1 ? [rows[0], ""] : ["", ""]); + } + console.log(formik.values.rows); + } }, [handleBlur, setFieldValue] ); @@ -193,18 +239,7 @@ const ExamForm: FC = ({ fieldName="selectedType" fieldValue={formik.values.procedure} label={t("exam.procedure")} - options={[ - { - label: '1: a list of available "string" results', - value: "1", - }, - { label: '2: a list of all "boolean" results', value: "2" }, - { - label: - "3: exact value (it will be typed in by the laboratorist)", - value: "3", - }, - ]} + options={procedureOptions} errorText={getErrorText("procedure")} isValid={isValid("procedure")} onChange={(v) => formik.setFieldValue("procedure", v)} @@ -226,6 +261,38 @@ const ExamForm: FC = ({ + {["1", "2"].includes(formik.values.procedure) && ( +
+
+ Exam options + {isValid("rows") && ( + {getErrorText("rows")} + )} +
+ {(formik.values.rows as string[]).map((_, index) => ( +
+ +
+ ))} + + + +
+ )} +
-
- -
+ {formik.values.procedure !== "2" && ( +
+ +
+ )}
{["1", "2"].includes(formik.values.procedure) && ( -
-
- Exam options - {isValid("rows") && ( - {getErrorText("rows")} - )} -
- {(formik.values.rows as string[]).map((_, index) => ( -
- -
+ + {t("exam.possibleValues")} + {formik.values.procedure === "1" && ( + {t("exam.defaultValue")} + )} + {(formik.values.rows as string[]).map((row, index) => ( + +
+ +
+ {(formik.values.rows as string[]).length > 2 && ( + + + + )} + {formik.values.procedure === "1" && ( + + )} +
))} = ({ > -
+ )} -
{(formik.values.rows as string[]).length > 2 && ( From 737f435af900b913650d78174ed23fe799c36549 Mon Sep 17 00:00:00 2001 From: SteveGT96 Date: Fri, 18 Oct 2024 15:38:37 +0100 Subject: [PATCH 6/8] fix: Fix e2e tests --- .../exams_activities/add_exam_activity.cy.ts | 3 +-- .../admin/exams/examForm/ExamForm.tsx | 1 + src/mockServer/routes/exam.js | 17 ++++++++++++----- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/cypress/integrations/admin_activities/exams_activities/add_exam_activity.cy.ts b/cypress/integrations/admin_activities/exams_activities/add_exam_activity.cy.ts index 4b96c4ca9..c20abbb8c 100644 --- a/cypress/integrations/admin_activities/exams_activities/add_exam_activity.cy.ts +++ b/cypress/integrations/admin_activities/exams_activities/add_exam_activity.cy.ts @@ -18,9 +18,8 @@ describe("Add exam Activity specs", () => { cy.byId("examtype").click(); cy.get('.MuiAutocomplete-popper li[data-option-index="0"]').click(); cy.byId("selectedType").last().click(); - cy.get('.MuiPopover-paper li[data-value="1"]').last().click(); + cy.get('.MuiPopover-paper li[data-value="3"]').last().click().click(); cy.byId("description").type("Children exam"); - cy.byId("defaultResult").type("POSITIVE"); cy.dataCy("submit-form").click(); cy.dataCy("info-box").contains("Fail"); }); diff --git a/src/components/accessories/admin/exams/examForm/ExamForm.tsx b/src/components/accessories/admin/exams/examForm/ExamForm.tsx index a235687c4..7b0585e45 100644 --- a/src/components/accessories/admin/exams/examForm/ExamForm.tsx +++ b/src/components/accessories/admin/exams/examForm/ExamForm.tsx @@ -327,6 +327,7 @@ const ExamForm: FC = ({ diff --git a/src/mockServer/routes/exam.js b/src/mockServer/routes/exam.js index 9980d4767..80f5a1bea 100644 --- a/src/mockServer/routes/exam.js +++ b/src/mockServer/routes/exam.js @@ -6,17 +6,24 @@ export const examRoutes = (server) => { res.status(200).json(examsDTO); }); server.post("/").intercept((req, res) => { - let body = req.jsonBody(); - switch (body.code) { + const body = req.jsonBody(); + switch (body.exam.code) { case "FAIL": res.status(400).json({ message: "Fail to create exam" }); break; default: - res.status(200).json(body); + res.status(201).json(body.exam); } }); - server.put("/:code").intercept((_req, res) => { - res.status(200).json(examsDTO); + server.put("/:code").intercept((req, res) => { + const body = req.jsonBody(); + switch (body.exam.description) { + case "FAIL": + res.status(400).json({ message: "Fail to update exam" }); + break; + default: + res.status(200).json(body.exam); + } }); server.delete("/:code").intercept((req, res) => { const { code } = req.params; From 67aefdddff73f0ab785ded2e66193460c38def7c Mon Sep 17 00:00:00 2001 From: SteveGT96 Date: Fri, 18 Oct 2024 15:53:23 +0100 Subject: [PATCH 7/8] fix: Fix unit tests --- package.json | 3 --- src/libraries/formDataHandling/functions.ts | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 1401ca5c3..46eef8123 100644 --- a/package.json +++ b/package.json @@ -148,8 +148,5 @@ }, "_moduleAliases": { "@": "./dist" - }, - "volta": { - "node": "20.18.0" } } diff --git a/src/libraries/formDataHandling/functions.ts b/src/libraries/formDataHandling/functions.ts index 45b396f49..24f666f06 100644 --- a/src/libraries/formDataHandling/functions.ts +++ b/src/libraries/formDataHandling/functions.ts @@ -32,6 +32,8 @@ export const getFromFields = ( acc[key] = fields[key].isArray ? JSON.parse(fields[key][fieldAddress]) : fields[key][fieldAddress]; + } else { + acc[key] = fields[key][fieldAddress]; } return acc; }, {}); From a7f90425716dd2e4e7695fb7b1375411bbe4574f Mon Sep 17 00:00:00 2001 From: SteveGT96 Date: Tue, 22 Oct 2024 17:16:57 +0100 Subject: [PATCH 8/8] fix: Fix browser crashing --- src/components/accessories/table/filter/FilterButton.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/accessories/table/filter/FilterButton.tsx b/src/components/accessories/table/filter/FilterButton.tsx index edf2d24b3..75f12e190 100644 --- a/src/components/accessories/table/filter/FilterButton.tsx +++ b/src/components/accessories/table/filter/FilterButton.tsx @@ -100,7 +100,6 @@ export const FilterButton = ({ field, onChange }: IOwnProps) => { }; useEffect(() => { - formik.submitForm(); const submit = setTimeout(() => { formik.submitForm(); }, 250);