{"openapi":"3.1.0","info":{"title":"OpenAPI definition","version":"v0"},"servers":[{"url":"https://clinic.ubucloud.cc","description":"Generated server url"}],"paths":{"/api/specialties/{id}":{"get":{"tags":["specialty-controller"],"operationId":"getSpecialtyById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SpecialtyDTO"}}}}}},"put":{"tags":["specialty-controller"],"operationId":"updateSpecialty","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecialtyDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SpecialtyDTO"}}}}}},"delete":{"tags":["specialty-controller"],"operationId":"deleteSpecialty","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK"}}}},"/api/patients/{id}":{"get":{"tags":["patient-controller"],"operationId":"getPatientById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PatientDTO"}}}}}},"put":{"tags":["patient-controller"],"operationId":"updatePatient","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PatientDTO"}}}}}},"delete":{"tags":["patient-controller"],"operationId":"deletePatient","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK"}}}},"/api/appointments/{id}":{"get":{"tags":["appointment-controller"],"operationId":"getAppointmentById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AppointmentDTO"}}}}}},"put":{"tags":["appointment-controller"],"operationId":"updateAppointment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AppointmentDTO"}}}}}},"delete":{"tags":["appointment-controller"],"operationId":"delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK"}}}},"/api/visits":{"get":{"tags":["visit-controller"],"operationId":"getAllVisitors","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VisitDTO"}}}}}}},"post":{"tags":["visit-controller"],"operationId":"createVisit","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/VisitDTO"}}}}}}},"/api/specialties":{"get":{"tags":["specialty-controller"],"operationId":"getAllSpecialties","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SpecialtyDTO"}}}}}}},"post":{"tags":["specialty-controller"],"operationId":"create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecialtyDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SpecialtyDTO"}}}}}}},"/api/records":{"get":{"tags":["medical-record-controller"],"operationId":"getAllRecords","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MedicalRecordDTO"}}}}}}},"post":{"tags":["medical-record-controller"],"operationId":"createRecord","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MedicalRecordDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MedicalRecordDTO"}}}}}}},"/api/patients":{"get":{"tags":["patient-controller"],"operationId":"getAllPatients","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PatientDTO"}}}}}}},"post":{"tags":["patient-controller"],"operationId":"createPatient","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PatientDTO"}}}}}}},"/api/doctors":{"get":{"tags":["doctor-controller"],"operationId":"getAllDoctors","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DoctorDTO"}}}}}}},"post":{"tags":["doctor-controller"],"operationId":"createDoctor","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DoctorDTO"}}}}}}},"/api/appointments":{"get":{"tags":["appointment-controller"],"operationId":"getAllAppointments","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AppointmentDTO"}}}}}}},"post":{"tags":["appointment-controller"],"operationId":"createAppointment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AppointmentDTO"}}}}}}},"/api/visits/{id}":{"get":{"tags":["visit-controller"],"operationId":"findById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/VisitDTO"}}}}}},"delete":{"tags":["visit-controller"],"operationId":"deleteVisit","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK"}}}},"/api/records/{id}":{"get":{"tags":["medical-record-controller"],"operationId":"getRecordsById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MedicalRecordDTO"}}}}}},"delete":{"tags":["medical-record-controller"],"operationId":"deleteById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK"}}}},"/api/patients/search":{"get":{"tags":["patient-controller"],"operationId":"searchPatientsByLastName","parameters":[{"name":"lastName","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PatientDTO"}}}}}}}},"/api/patients/by-doctor/{doctorId}":{"get":{"tags":["patient-controller"],"operationId":"getPatientsByDoctor","parameters":[{"name":"doctorId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PatientDTO"}}}}}}}},"/api/doctors/{id}":{"get":{"tags":["doctor-controller"],"operationId":"getDoctorById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DoctorDTO"}}}}}},"delete":{"tags":["doctor-controller"],"operationId":"deleteDoctor","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK"}}}}},"components":{"schemas":{"SpecialtyDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string","minLength":1},"description":{"type":"string"}},"required":["name"]},"PatientDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"type":"string","format":"date"},"gender":{"type":"string","enum":["Male","Female"]},"phone":{"type":"string","pattern":"\\+?[1-9\\-\\s]{7,15}"},"email":{"type":"string"},"address":{"type":"string"},"primaryDoctorId":{"type":"integer","format":"int64"}},"required":["dateOfBirth","firstName","gender","lastName"]},"AppointmentDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"patientId":{"type":"integer","format":"int64"},"doctorId":{"type":"integer","format":"int64"},"startDateTime":{"type":"string","format":"date-time"},"endDateTime":{"type":"string","format":"date-time"},"reason":{"type":"string"},"status":{"type":"string","enum":["Pending","Confirmed","Completed","Cancelled"]},"notes":{"type":"string"}},"required":["doctorId","patientId","startDateTime"]},"VisitDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"patientId":{"type":"integer","format":"int64"},"doctorId":{"type":"integer","format":"int64"},"appointmentId":{"type":"integer","format":"int64"},"visitDateTime":{"type":"string","format":"date-time"},"complaints":{"type":"string"},"diagnosis":{"type":"string"},"treatment":{"type":"string"},"recommendations":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["complaints","createdAt","diagnosis","treatment"]},"MedicalRecordDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"patientId":{"type":"integer","format":"int64"},"recordType":{"type":"string","enum":["CHRONIC_DISEASE","ALLERGY","SURGERY","VACCINATION","OTHER"]},"recordDate":{"type":"string","format":"date"},"content":{"type":"string"},"doctorId":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"}},"required":["doctorId","patientId","recordDate","recordType"]},"DoctorDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"email":{"type":"string"},"phone":{"type":"string","pattern":"\\+?[1-9\\-\\s]{7,15}"},"officeRoom":{"type":"string"},"specialtyId":{"type":"integer","format":"int64"},"specialtyName":{"type":"string"}},"required":["email","firstName","lastName","specialtyId"]}}}}