Changeset c613cbf
- Timestamp:
- 05/22/26 16:45:47 (4 months ago)
- Branches:
- master
- Children:
- 9803972
- Parents:
- 500b5be
- Files:
-
- 37 added
- 1 deleted
- 3 edited
- 76 moved
-
backend/src/main/java/medora/Medora5Application.java (moved) (moved from src/main/java/medora/Medora5Application.java ) (1 diff)
-
backend/src/main/java/medora/config/CorsFilter.java (moved) (moved from src/main/java/medora/config/CorsFilter.java ) (1 diff)
-
backend/src/main/java/medora/config/SecurityConfig.java (moved) (moved from src/main/java/medora/config/SecurityConfig.java )
-
backend/src/main/java/medora/config/WebConfig.java (moved) (moved from src/main/java/medora/config/WebConfig.java )
-
backend/src/main/java/medora/exception/AdminNotFoundException.java (added)
-
backend/src/main/java/medora/exception/AllergiesNotFoundException.java (added)
-
backend/src/main/java/medora/exception/AllergyPrescriptionRestrictionNotFoundException.java (added)
-
backend/src/main/java/medora/exception/AppointmentNotFoundException.java (added)
-
backend/src/main/java/medora/exception/BillingLabTestsNotFoundException.java (added)
-
backend/src/main/java/medora/exception/BillingNotFoundException.java (added)
-
backend/src/main/java/medora/exception/BillingProceduresNotFoundException.java (added)
-
backend/src/main/java/medora/exception/DepartmentsNotFoundException.java (added)
-
backend/src/main/java/medora/exception/DiagnosisNotFoundException.java (added)
-
backend/src/main/java/medora/exception/DiagnosisProcedureNotFoundException.java (added)
-
backend/src/main/java/medora/exception/DiagnosisSymptomsNotFoundException.java (added)
-
backend/src/main/java/medora/exception/DoctorLevelNotFoundException.java (added)
-
backend/src/main/java/medora/exception/DoctorMedicalRecordNotFoundException.java (added)
-
backend/src/main/java/medora/exception/DoctorSpecializationNotFoundException.java (added)
-
backend/src/main/java/medora/exception/DoctorsNotFoundException.java (added)
-
backend/src/main/java/medora/exception/LabResultsNotFoundException.java (added)
-
backend/src/main/java/medora/exception/LabTechnicianNotFoundException.java (added)
-
backend/src/main/java/medora/exception/LabTestsNotFoundException.java (added)
-
backend/src/main/java/medora/exception/MedicalRecordAllergiesNotFoundException.java (added)
-
backend/src/main/java/medora/exception/MedicalRecordLabResultsNotFoundException.java (added)
-
backend/src/main/java/medora/exception/MedicalRecordNotFoundException.java (added)
-
backend/src/main/java/medora/exception/MedicalRecordProceduresNotFoundException.java (added)
-
backend/src/main/java/medora/exception/MedicalRecordSymptomsNotFoundException.java (added)
-
backend/src/main/java/medora/exception/MedicalReportLabResultsNotFoundException.java (added)
-
backend/src/main/java/medora/exception/MedicalReportNotFoundException.java (added)
-
backend/src/main/java/medora/exception/PatientAllergyNotFoundException.java (added)
-
backend/src/main/java/medora/exception/PatientNotFoundException.java (added)
-
backend/src/main/java/medora/exception/PatientSymptomsNotFoundException.java (added)
-
backend/src/main/java/medora/exception/PrescriptionMedicalRecordNotFoundException.java (added)
-
backend/src/main/java/medora/exception/PrescriptionRestrictionNotFoundException.java (added)
-
backend/src/main/java/medora/exception/PrescriptionsNotFoundException.java (added)
-
backend/src/main/java/medora/exception/ProcedureNotFoundException.java (added)
-
backend/src/main/java/medora/exception/ProcedureResultsNotFoundException.java (added)
-
backend/src/main/java/medora/exception/ReferralsNotFoundException.java (added)
-
backend/src/main/java/medora/exception/SpecializationProcedureNotFoundException.java (added)
-
backend/src/main/java/medora/exception/SymptomsNotFoundException.java (added)
-
backend/src/main/java/medora/models/converter/BloodTypeConverter.java (moved) (moved from src/main/java/medora/models/converter/BloodTypeConverter.java )
-
backend/src/main/java/medora/models/domain/Admin.java (moved) (moved from src/main/java/medora/models/domain/Admin.java ) (1 diff)
-
backend/src/main/java/medora/models/domain/Allergies.java (moved) (moved from src/main/java/medora/models/domain/Allergies.java )
-
backend/src/main/java/medora/models/domain/AllergyPrescriptionRestriction.java (moved) (moved from src/main/java/medora/models/domain/AllergyPrescriptionRestriction.java )
-
backend/src/main/java/medora/models/domain/Appointment.java (moved) (moved from src/main/java/medora/models/domain/Appointment.java )
-
backend/src/main/java/medora/models/domain/Billing.java (moved) (moved from src/main/java/medora/models/domain/Billing.java ) (1 diff)
-
backend/src/main/java/medora/models/domain/BillingLabTests.java (moved) (moved from src/main/java/medora/models/domain/BillingLabTests.java )
-
backend/src/main/java/medora/models/domain/BillingProcedures.java (moved) (moved from src/main/java/medora/models/domain/BillingProcedures.java )
-
backend/src/main/java/medora/models/domain/DepartmentProcedure.java (moved) (moved from src/main/java/medora/models/domain/DepartmentProcedure.java )
-
backend/src/main/java/medora/models/domain/Departments.java (moved) (moved from src/main/java/medora/models/domain/Departments.java ) (1 diff)
-
backend/src/main/java/medora/models/domain/Diagnosis.java (moved) (moved from src/main/java/medora/models/domain/Diagnosis.java )
-
backend/src/main/java/medora/models/domain/DiagnosisProcedure.java (moved) (moved from src/main/java/medora/models/domain/DiagnosisProcedure.java )
-
backend/src/main/java/medora/models/domain/DiagnosisSymptoms.java (moved) (moved from src/main/java/medora/models/domain/DiagnosisSymptoms.java )
-
backend/src/main/java/medora/models/domain/DoctorLevel.java (moved) (moved from src/main/java/medora/models/domain/DoctorLevel.java ) (1 diff)
-
backend/src/main/java/medora/models/domain/DoctorMedicalRecord.java (moved) (moved from src/main/java/medora/models/domain/DoctorMedicalRecord.java )
-
backend/src/main/java/medora/models/domain/DoctorSpecialization.java (moved) (moved from src/main/java/medora/models/domain/DoctorSpecialization.java ) (1 diff)
-
backend/src/main/java/medora/models/domain/Doctors.java (moved) (moved from src/main/java/medora/models/domain/Doctors.java )
-
backend/src/main/java/medora/models/domain/LabResults.java (moved) (moved from src/main/java/medora/models/domain/LabResults.java )
-
backend/src/main/java/medora/models/domain/LabTechnician.java (moved) (moved from src/main/java/medora/models/domain/LabTechnician.java ) (1 diff)
-
backend/src/main/java/medora/models/domain/LabTests.java (moved) (moved from src/main/java/medora/models/domain/LabTests.java )
-
backend/src/main/java/medora/models/domain/MedicalRecord.java (moved) (moved from src/main/java/medora/models/domain/MedicalRecord.java )
-
backend/src/main/java/medora/models/domain/MedicalRecordAllergies.java (moved) (moved from src/main/java/medora/models/domain/MedicalRecordAllergies.java )
-
backend/src/main/java/medora/models/domain/MedicalRecordLabResults.java (moved) (moved from src/main/java/medora/models/domain/MedicalRecordLabResults.java )
-
backend/src/main/java/medora/models/domain/MedicalRecordProcedureResults.java (moved) (moved from src/main/java/medora/models/domain/MedicalRecordProcedureResults.java )
-
backend/src/main/java/medora/models/domain/MedicalRecordProcedures.java (moved) (moved from src/main/java/medora/models/domain/MedicalRecordProcedures.java )
-
backend/src/main/java/medora/models/domain/MedicalRecordSymptoms.java (moved) (moved from src/main/java/medora/models/domain/MedicalRecordSymptoms.java )
-
backend/src/main/java/medora/models/domain/MedicalReport.java (moved) (moved from src/main/java/medora/models/domain/MedicalReport.java ) (1 diff)
-
backend/src/main/java/medora/models/domain/MedicalReportLabResults.java (moved) (moved from src/main/java/medora/models/domain/MedicalReportLabResults.java )
-
backend/src/main/java/medora/models/domain/Patient.java (moved) (moved from src/main/java/medora/models/domain/Patient.java ) (2 diffs)
-
backend/src/main/java/medora/models/domain/PatientAllergy.java (moved) (moved from src/main/java/medora/models/domain/PatientAllergy.java )
-
backend/src/main/java/medora/models/domain/PatientSymptoms.java (moved) (moved from src/main/java/medora/models/domain/PatientSymptoms.java )
-
backend/src/main/java/medora/models/domain/PerformedLabTests.java (moved) (moved from src/main/java/medora/models/domain/PerformedLabTests.java )
-
backend/src/main/java/medora/models/domain/PerformedProcedures.java (moved) (moved from src/main/java/medora/models/domain/PerformedProcedures.java )
-
backend/src/main/java/medora/models/domain/PrescriptionMedicalRecord.java (moved) (moved from src/main/java/medora/models/domain/PrescriptionMedicalRecord.java )
-
backend/src/main/java/medora/models/domain/PrescriptionRestriction.java (moved) (moved from src/main/java/medora/models/domain/PrescriptionRestriction.java )
-
backend/src/main/java/medora/models/domain/Prescriptions.java (moved) (moved from src/main/java/medora/models/domain/Prescriptions.java )
-
backend/src/main/java/medora/models/domain/Procedure.java (moved) (moved from src/main/java/medora/models/domain/Procedure.java )
-
backend/src/main/java/medora/models/domain/ProcedureResults.java (moved) (moved from src/main/java/medora/models/domain/ProcedureResults.java ) (1 diff)
-
backend/src/main/java/medora/models/domain/Referrals.java (moved) (moved from src/main/java/medora/models/domain/Referrals.java )
-
backend/src/main/java/medora/models/domain/ReportAllergy.java (moved) (moved from src/main/java/medora/models/domain/ReportAllergy.java )
-
backend/src/main/java/medora/models/domain/ReportDiagnosis.java (moved) (moved from src/main/java/medora/models/domain/ReportDiagnosis.java )
-
backend/src/main/java/medora/models/domain/ReportPrescription.java (moved) (moved from src/main/java/medora/models/domain/ReportPrescription.java )
-
backend/src/main/java/medora/models/domain/ReportSymptom.java (moved) (moved from src/main/java/medora/models/domain/ReportSymptom.java )
-
backend/src/main/java/medora/models/domain/SpecializationProcedure.java (moved) (moved from src/main/java/medora/models/domain/SpecializationProcedure.java )
-
backend/src/main/java/medora/models/domain/Symptoms.java (moved) (moved from src/main/java/medora/models/domain/Symptoms.java ) (1 diff)
-
backend/src/main/java/medora/models/domain/id/AllergyPrescriptionRestrictionId.java (moved) (moved from src/main/java/medora/models/domain/id/AllergyPrescriptionRestrictionId.java )
-
backend/src/main/java/medora/models/domain/id/BillingLabTestId.java (moved) (moved from src/main/java/medora/models/domain/id/BillingLabTestId.java )
-
backend/src/main/java/medora/models/domain/id/BillingProcedureId.java (moved) (moved from src/main/java/medora/models/domain/id/BillingProcedureId.java )
-
backend/src/main/java/medora/models/domain/id/DepartmentProcedureId.java (moved) (moved from src/main/java/medora/models/domain/id/DepartmentProcedureId.java )
-
backend/src/main/java/medora/models/domain/id/DiagnosisProcedureId.java (moved) (moved from src/main/java/medora/models/domain/id/DiagnosisProcedureId.java )
-
backend/src/main/java/medora/models/domain/id/DiagnosisSymptomId.java (moved) (moved from src/main/java/medora/models/domain/id/DiagnosisSymptomId.java )
-
backend/src/main/java/medora/models/domain/id/DoctorMedicalRecordId.java (moved) (moved from src/main/java/medora/models/domain/id/DoctorMedicalRecordId.java )
-
backend/src/main/java/medora/models/domain/id/MedicalRecordAllergyId.java (moved) (moved from src/main/java/medora/models/domain/id/MedicalRecordAllergyId.java )
-
backend/src/main/java/medora/models/domain/id/MedicalRecordLabResultId.java (moved) (moved from src/main/java/medora/models/domain/id/MedicalRecordLabResultId.java )
-
backend/src/main/java/medora/models/domain/id/MedicalRecordProcedureId.java (moved) (moved from src/main/java/medora/models/domain/id/MedicalRecordProcedureId.java )
-
backend/src/main/java/medora/models/domain/id/MedicalRecordProcedureResultId.java (moved) (moved from src/main/java/medora/models/domain/id/MedicalRecordProcedureResultId.java )
-
backend/src/main/java/medora/models/domain/id/MedicalRecordSymptomId.java (moved) (moved from src/main/java/medora/models/domain/id/MedicalRecordSymptomId.java )
-
backend/src/main/java/medora/models/domain/id/MedicalReportLabResultId.java (moved) (moved from src/main/java/medora/models/domain/id/MedicalReportLabResultId.java )
-
backend/src/main/java/medora/models/domain/id/PatientAllergyId.java (moved) (moved from src/main/java/medora/models/domain/id/PatientAllergyId.java )
-
backend/src/main/java/medora/models/domain/id/PatientSymptomsId.java (moved) (moved from src/main/java/medora/models/domain/id/PatientSymptomsId.java )
-
backend/src/main/java/medora/models/domain/id/PrescriptionMedicalRecordId.java (moved) (moved from src/main/java/medora/models/domain/id/PrescriptionMedicalRecordId.java )
-
backend/src/main/java/medora/models/domain/id/ReportAllergyId.java (moved) (moved from src/main/java/medora/models/domain/id/ReportAllergyId.java )
-
backend/src/main/java/medora/models/domain/id/ReportDiagnosisId.java (moved) (moved from src/main/java/medora/models/domain/id/ReportDiagnosisId.java )
-
backend/src/main/java/medora/models/domain/id/ReportPrescriptionId.java (moved) (moved from src/main/java/medora/models/domain/id/ReportPrescriptionId.java )
-
backend/src/main/java/medora/models/domain/id/ReportSymptomId.java (moved) (moved from src/main/java/medora/models/domain/id/ReportSymptomId.java )
-
backend/src/main/java/medora/models/domain/id/SpecializationProcedureId.java (moved) (moved from src/main/java/medora/models/domain/id/SpecializationProcedureId.java )
-
backend/src/main/java/medora/models/enums/AllergySeverity.java (moved) (moved from src/main/java/medora/models/enums/AllergySeverity.java )
-
backend/src/main/java/medora/models/enums/AppointmentStatus.java (moved) (moved from src/main/java/medora/models/enums/AppointmentStatus.java )
-
backend/src/main/java/medora/models/enums/BloodType.java (moved) (moved from src/main/java/medora/models/enums/BloodType.java )
-
backend/src/main/java/medora/models/enums/Gender.java (moved) (moved from src/main/java/medora/models/enums/Gender.java )
-
backend/src/main/java/medora/models/enums/PaymentStatus.java (moved) (moved from src/main/java/medora/models/enums/PaymentStatus.java )
-
backend/src/main/resources/application.properties (added)
-
backend/src/test/java/medora/Medora5ApplicationTests.java (moved) (moved from src/test/java/medora/Medora5ApplicationTests.java ) (1 diff)
-
pom.xml (modified) (1 diff)
-
sql/ddl.sql (modified) (1 diff)
-
sql/dml.sql (modified) (1 diff)
-
src/main/resources/application.properties (deleted)
Legend:
- Unmodified
- Added
- Removed
-
backend/src/main/java/medora/Medora5Application.java
r500b5be rc613cbf 1 package medora .medora5;1 package medora; 2 2 3 3 import org.springframework.boot.SpringApplication; -
backend/src/main/java/medora/config/CorsFilter.java
r500b5be rc613cbf 1 1 package medora.config; 2 2 3 import org.springframework.stereotype.Component; 4 import jakarta.servlet.Filter; 5 import jakarta.servlet.FilterChain; 6 import jakarta.servlet.ServletException; 7 import jakarta.servlet.ServletRequest; 8 import jakarta.servlet.ServletResponse; 3 import jakarta.servlet.*; 9 4 import jakarta.servlet.http.HttpServletRequest; 10 5 import jakarta.servlet.http.HttpServletResponse; 6 import org.springframework.stereotype.Component; 11 7 12 8 import java.io.IOException; -
backend/src/main/java/medora/models/domain/Admin.java
r500b5be rc613cbf 2 2 3 3 4 import jakarta.persistence.*; 4 import jakarta.persistence.Column; 5 import jakarta.persistence.Entity; 6 import jakarta.persistence.Id; 7 import jakarta.persistence.Table; 5 8 import jakarta.validation.constraints.Pattern; 6 9 import lombok.Getter; -
backend/src/main/java/medora/models/domain/Billing.java
r500b5be rc613cbf 4 4 import jakarta.persistence.*; 5 5 import jakarta.validation.constraints.DecimalMin; 6 import jakarta.validation.constraints.NotBlank;7 6 import lombok.Getter; 8 7 import lombok.Setter; -
backend/src/main/java/medora/models/domain/Departments.java
r500b5be rc613cbf 1 1 package medora.models.domain; 2 import jakarta.persistence.*; 2 3 import jakarta.persistence.Column; 4 import jakarta.persistence.Entity; 5 import jakarta.persistence.Id; 6 import jakarta.persistence.Table; 3 7 import lombok.Getter; 4 8 import lombok.Setter; -
backend/src/main/java/medora/models/domain/DoctorLevel.java
r500b5be rc613cbf 1 1 package medora.models.domain; 2 import jakarta.persistence.*; 2 3 import jakarta.persistence.Column; 4 import jakarta.persistence.Entity; 5 import jakarta.persistence.Id; 6 import jakarta.persistence.Table; 3 7 import lombok.Getter; 4 8 import lombok.Setter; -
backend/src/main/java/medora/models/domain/DoctorSpecialization.java
r500b5be rc613cbf 1 1 package medora.models.domain; 2 import jakarta.persistence.*; 2 3 import jakarta.persistence.Column; 4 import jakarta.persistence.Entity; 5 import jakarta.persistence.Id; 6 import jakarta.persistence.Table; 3 7 import lombok.Getter; 4 8 import lombok.Setter; -
backend/src/main/java/medora/models/domain/LabTechnician.java
r500b5be rc613cbf 2 2 3 3 4 import jakarta.persistence.*; 4 import jakarta.persistence.Column; 5 import jakarta.persistence.Entity; 6 import jakarta.persistence.Id; 7 import jakarta.persistence.Table; 5 8 import jakarta.validation.constraints.Pattern; 6 9 import lombok.Getter; -
backend/src/main/java/medora/models/domain/MedicalReport.java
r500b5be rc613cbf 7 7 8 8 import java.time.LocalDate; 9 import java.util.List;10 import java.util.ArrayList;11 9 12 10 @Getter -
backend/src/main/java/medora/models/domain/Patient.java
r500b5be rc613cbf 2 2 3 3 4 import com.fasterxml.jackson.annotation.JsonIgnore; 4 5 import jakarta.persistence.*; 5 6 import lombok.Getter; … … 7 8 import medora.models.enums.BloodType; 8 9 import medora.models.enums.Gender; 9 import com.fasterxml.jackson.annotation.JsonIgnore;10 10 11 11 import java.time.LocalDate; -
backend/src/main/java/medora/models/domain/ProcedureResults.java
r500b5be rc613cbf 3 3 4 4 import jakarta.persistence.*; 5 import jakarta.validation.constraints.NotBlank;6 5 import lombok.Getter; 7 6 import lombok.Setter; -
backend/src/main/java/medora/models/domain/Symptoms.java
r500b5be rc613cbf 2 2 3 3 4 import jakarta.persistence.*; 4 import jakarta.persistence.Column; 5 import jakarta.persistence.Entity; 6 import jakarta.persistence.Id; 7 import jakarta.persistence.Table; 5 8 import jakarta.validation.constraints.NotBlank; 6 9 import lombok.Getter; -
backend/src/test/java/medora/Medora5ApplicationTests.java
r500b5be rc613cbf 1 package medora .medora5;1 package medora; 2 2 3 3 import org.junit.jupiter.api.Test; -
pom.xml
r500b5be rc613cbf 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 3 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">4 <modelVersion>4.0.0</modelVersion>5 <parent>6 <groupId>org.springframework.boot</groupId>7 <artifactId>spring-boot-starter-parent</artifactId>8 <version>3.5.14</version>9 <relativePath/> <!-- lookup parent from repository -->10 </parent>11 <groupId>medora</groupId>12 <artifactId>medora5</artifactId>13 <version>0.0.1-SNAPSHOT</version>14 <name>medora5</name>15 <description>medora5</description>16 <url/>17 <licenses>18 <license/>19 </licenses>20 <developers>21 <developer/>22 </developers>23 <scm>24 <connection/>25 <developerConnection/>26 <tag/>27 <url/>28 </scm>29 <properties>30 <java.version>17</java.version>31 </properties>32 <dependencies>33 <dependency>34 <groupId>org.springframework.boot</groupId>35 <artifactId>spring-boot-starter-data-jpa</artifactId>36 </dependency>37 <dependency>38 <groupId>org.springframework.boot</groupId>39 <artifactId>spring-boot-starter-security</artifactId>40 </dependency>41 <dependency>42 <groupId>org.springframework.boot</groupId>43 <artifactId>spring-boot-starter-web</artifactId>44 </dependency>3 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4 <modelVersion>4.0.0</modelVersion> 5 <parent> 6 <groupId>org.springframework.boot</groupId> 7 <artifactId>spring-boot-starter-parent</artifactId> 8 <version>3.5.14</version> 9 <relativePath/> <!-- lookup parent from repository --> 10 </parent> 11 <groupId>medora</groupId> 12 <artifactId>medora5</artifactId> 13 <version>0.0.1-SNAPSHOT</version> 14 <name>medora5</name> 15 <description>medora5</description> 16 <url/> 17 <licenses> 18 <license/> 19 </licenses> 20 <developers> 21 <developer/> 22 </developers> 23 <scm> 24 <connection/> 25 <developerConnection/> 26 <tag/> 27 <url/> 28 </scm> 29 <properties> 30 <java.version>21</java.version> 31 </properties> 32 <dependencies> 33 <dependency> 34 <groupId>org.springframework.boot</groupId> 35 <artifactId>spring-boot-starter-data-jpa</artifactId> 36 </dependency> 37 <dependency> 38 <groupId>org.springframework.boot</groupId> 39 <artifactId>spring-boot-starter-security</artifactId> 40 </dependency> 41 <dependency> 42 <groupId>org.springframework.boot</groupId> 43 <artifactId>spring-boot-starter-web</artifactId> 44 </dependency> 45 45 46 <dependency> 47 <groupId>org.postgresql</groupId> 48 <artifactId>postgresql</artifactId> 49 <scope>runtime</scope> 50 </dependency> 51 <dependency> 52 <groupId>org.springframework.boot</groupId> 53 <artifactId>spring-boot-starter-test</artifactId> 54 <scope>test</scope> 55 </dependency> 56 <dependency> 57 <groupId>org.springframework.security</groupId> 58 <artifactId>spring-security-test</artifactId> 59 <scope>test</scope> 60 </dependency> 61 </dependencies> 46 <dependency> 47 <groupId>org.postgresql</groupId> 48 <artifactId>postgresql</artifactId> 49 <scope>runtime</scope> 50 </dependency> 51 <dependency> 52 <groupId>org.springframework.boot</groupId> 53 <artifactId>spring-boot-starter-test</artifactId> 54 <scope>test</scope> 55 </dependency> 56 <dependency> 57 <groupId>org.springframework.security</groupId> 58 <artifactId>spring-security-test</artifactId> 59 <scope>test</scope> 60 </dependency> 61 <dependency> 62 <groupId>org.projectlombok</groupId> 63 <artifactId>lombok</artifactId> 64 <scope>provided</scope> 65 </dependency> 66 <dependency> 67 <groupId>org.jetbrains</groupId> 68 <artifactId>annotations</artifactId> 69 <version>23.0.0</version> 70 <scope>compile</scope> 71 </dependency> 62 72 63 <build> 64 <plugins> 65 <plugin> 66 <groupId>org.springframework.boot</groupId> 67 <artifactId>spring-boot-maven-plugin</artifactId> 68 </plugin> 69 </plugins> 70 </build> 73 <dependency> 74 <groupId>org.springframework.boot</groupId> 75 <artifactId>spring-boot-starter-validation</artifactId> 76 </dependency> 77 </dependencies> 78 79 <build> 80 <plugins> 81 <plugin> 82 <groupId>org.springframework.boot</groupId> 83 <artifactId>spring-boot-maven-plugin</artifactId> 84 </plugin> 85 </plugins> 86 </build> 71 87 72 88 </project> -
sql/ddl.sql
r500b5be rc613cbf 1 2 BEGIN; 3 4 DROP TABLE IF EXISTS medical_record_allergies CASCADE; 5 DROP TABLE IF EXISTS medical_record_symptoms CASCADE; 6 DROP TABLE IF EXISTS medical_record_procedures CASCADE; 7 DROP TABLE IF EXISTS medical_record_lab_results CASCADE; 8 DROP TABLE IF EXISTS performed_lab_tests CASCADE; 9 DROP TABLE IF EXISTS performed_procedures CASCADE; 10 DROP TABLE IF EXISTS medical_report_lab_results CASCADE; 11 DROP TABLE IF EXISTS prescription_medical_records CASCADE; 12 DROP TABLE IF EXISTS diagnosis_medical_records CASCADE; 13 DROP TABLE IF EXISTS doctor_medical_records CASCADE; 14 DROP TABLE IF EXISTS billing_lab_tests CASCADE; 15 DROP TABLE IF EXISTS billing_procedures CASCADE; 16 DROP TABLE IF EXISTS department_procedures CASCADE; 17 DROP TABLE IF EXISTS diagnosis_procedures CASCADE; 18 DROP TABLE IF EXISTS specialization_procedures CASCADE; 19 DROP TABLE IF EXISTS diagnosis_symptoms CASCADE; 20 DROP TABLE IF EXISTS patient_symptoms CASCADE; 21 DROP TABLE IF EXISTS allergy_prescription_restrictions CASCADE; 22 DROP TABLE IF EXISTS patient_allergies CASCADE; 23 DROP TABLE IF EXISTS symptoms CASCADE; 24 DROP TABLE IF EXISTS allergies CASCADE; 25 26 DROP TABLE IF EXISTS billing CASCADE; 27 DROP TABLE IF EXISTS medical_report CASCADE; 28 DROP TABLE IF EXISTS referrals CASCADE; 29 DROP TABLE IF EXISTS medical_records CASCADE; 30 DROP TABLE IF EXISTS lab_results CASCADE; 31 DROP TABLE IF EXISTS lab_tests CASCADE; 32 DROP TABLE IF EXISTS prescription_restriction CASCADE; 33 DROP TABLE IF EXISTS prescriptions CASCADE; 34 DROP TABLE IF EXISTS procedure_results CASCADE; 35 DROP TABLE IF EXISTS procedures CASCADE; 36 DROP TABLE IF EXISTS diagnosis CASCADE; 37 DROP TABLE IF EXISTS appointments CASCADE; 38 DROP TABLE IF EXISTS lab_technician CASCADE; 39 DROP TABLE IF EXISTS admin CASCADE; 40 DROP TABLE IF EXISTS patients CASCADE; 41 DROP TABLE IF EXISTS doctors CASCADE; 42 DROP TABLE IF EXISTS departments CASCADE; 43 DROP TABLE IF EXISTS doctor_specialization CASCADE; 44 DROP TABLE IF EXISTS doctor_level CASCADE; 45 46 47 48 49 CREATE TABLE doctor_level ( 50 level_id BIGINT, 51 level TEXT NOT NULL, 52 53 CONSTRAINT doctor_level_PK 54 PRIMARY KEY (level_id), 55 56 CONSTRAINT doctor_level_level_UQ 57 UNIQUE (level) 58 ); 59 60 CREATE TABLE doctor_specialization ( 61 specialization_id BIGINT, 62 specialization_name TEXT NOT NULL, 63 64 CONSTRAINT doctor_specialization_PK 65 PRIMARY KEY (specialization_id), 66 67 CONSTRAINT doctor_specialization_name_UQ 68 UNIQUE (specialization_name) 69 ); 70 71 72 CREATE TABLE departments ( 73 department_id BIGINT, 74 department_name TEXT NOT NULL, 75 76 CONSTRAINT departments_PK 77 PRIMARY KEY (department_id), 78 79 CONSTRAINT departments_name_UQ 80 UNIQUE (department_name) 81 ); 82 83 CREATE TABLE doctors ( 84 doctor_id BIGINT, 85 86 first_name TEXT NOT NULL, 87 last_name TEXT NOT NULL, 88 89 email_address TEXT NOT NULL, 90 91 level_id BIGINT NOT NULL, 92 specialization_id BIGINT NOT NULL, 93 department_id BIGINT NOT NULL, 94 95 CONSTRAINT doctors_PK 96 PRIMARY KEY (doctor_id), 97 98 CONSTRAINT doctors_email_UQ 99 UNIQUE (email_address), 100 101 CONSTRAINT doctors_email_chk 102 CHECK (email_address LIKE '%@%'), 103 104 CONSTRAINT doctors_level_FK 105 FOREIGN KEY (level_id) 106 REFERENCES doctor_level(level_id) 107 ON DELETE RESTRICT, 108 109 CONSTRAINT doctors_specialization_FK 110 FOREIGN KEY (specialization_id) 111 REFERENCES doctor_specialization(specialization_id) 112 ON DELETE RESTRICT, 113 114 CONSTRAINT doctors_department_FK 115 FOREIGN KEY (department_id) 116 REFERENCES departments(department_id) 117 ON DELETE RESTRICT 118 ); 119 120 121 122 CREATE TABLE patients ( 123 patient_id BIGINT, 124 125 first_name TEXT NOT NULL, 126 last_name TEXT NOT NULL, 127 128 email_address TEXT, 129 date_of_birth DATE NOT NULL, 130 131 blood_type TEXT, 132 gender TEXT, 133 134 phone_number TEXT, 135 embg TEXT NOT NULL, 136 137 CONSTRAINT patients_PK 138 PRIMARY KEY (patient_id), 139 140 CONSTRAINT patients_email_UQ 141 UNIQUE (email_address), 142 143 CONSTRAINT patients_embg_UQ 144 UNIQUE (embg), 145 146 CONSTRAINT patients_gender_chk 147 CHECK (gender IN ('MALE', 'FEMALE')), 148 149 CONSTRAINT patients_blood_type_chk 150 CHECK ( 151 blood_type IN ( 152 'A+', 'A-', 153 'B+', 'B-', 154 'AB+', 'AB-', 155 'O+', 'O-' 156 ) 157 ) 158 ); 159 160 CREATE TABLE admin ( 161 admin_id BIGINT, 162 163 username TEXT NOT NULL, 164 name TEXT NOT NULL, 165 lastname TEXT NOT NULL, 166 167 email TEXT NOT NULL, 168 169 CONSTRAINT admin_PK 170 PRIMARY KEY (admin_id), 171 172 CONSTRAINT admin_username_UQ 173 UNIQUE (username), 174 175 CONSTRAINT admin_email_UQ 176 UNIQUE (email), 177 178 CONSTRAINT admin_email_chk 179 CHECK (email LIKE '%@adminmedora%') 180 ); 181 182 CREATE TABLE lab_technician ( 183 technician_id BIGINT, 184 185 username TEXT NOT NULL, 186 name TEXT NOT NULL, 187 lastname TEXT NOT NULL, 188 189 email TEXT NOT NULL, 190 191 CONSTRAINT lab_technician_PK 192 PRIMARY KEY (technician_id), 193 194 CONSTRAINT lab_technician_username_UQ 195 UNIQUE (username), 196 197 CONSTRAINT lab_technician_email_UQ 198 UNIQUE (email), 199 200 CONSTRAINT lab_technician_email_chk 201 CHECK (email LIKE '%@labmedora%') 202 ); 203 204 205 206 CREATE TABLE appointments ( 207 appointment_id BIGINT, 208 209 appointment_date DATE NOT NULL, 210 appointment_time TIME NOT NULL, 211 212 status TEXT NOT NULL, 213 214 patient_id BIGINT NOT NULL, 215 doctor_id BIGINT NOT NULL, 216 217 CONSTRAINT appointments_PK 218 PRIMARY KEY (appointment_id), 219 220 CONSTRAINT appointments_status_chk 221 CHECK ( 222 status IN ( 223 'SCHEDULED', 224 'COMPLETED', 225 'CANCELLED', 226 'IN_PROGRESS' 227 ) 228 ), 229 230 CONSTRAINT appointments_patient_FK 231 FOREIGN KEY (patient_id) 232 REFERENCES patients(patient_id) 233 ON DELETE RESTRICT, 234 235 CONSTRAINT appointments_doctor_FK 236 FOREIGN KEY (doctor_id) 237 REFERENCES doctors(doctor_id) 238 ON DELETE RESTRICT 239 ); 240 241 CREATE TABLE diagnosis ( 242 diagnosis_id BIGINT, 243 244 name TEXT NOT NULL, 245 description TEXT, 246 247 patient_id BIGINT NOT NULL, 248 doctor_id BIGINT NOT NULL, 249 250 CONSTRAINT diagnosis_PK 251 PRIMARY KEY (diagnosis_id), 252 253 CONSTRAINT diagnosis_patient_FK 254 FOREIGN KEY (patient_id) 255 REFERENCES patients(patient_id) 256 ON DELETE RESTRICT, 257 258 CONSTRAINT diagnosis_doctor_FK 259 FOREIGN KEY (doctor_id) 260 REFERENCES doctors(doctor_id) 261 ON DELETE RESTRICT 262 ); 263 264 265 266 267 CREATE TABLE procedures ( 268 procedure_id BIGINT, 269 270 procedure_type TEXT NOT NULL, 271 procedure_date DATE NOT NULL, 272 273 description TEXT, 274 cost DECIMAL NOT NULL, 275 276 doctor_id BIGINT NOT NULL, 277 diagnosis_id BIGINT NOT NULL, 278 279 CONSTRAINT procedures_PK 280 PRIMARY KEY (procedure_id), 281 282 CONSTRAINT procedures_cost_chk 283 CHECK (cost >= 0), 284 285 CONSTRAINT procedures_type_chk 286 CHECK (length(trim(procedure_type)) > 0), 287 288 CONSTRAINT procedures_doctor_FK 289 FOREIGN KEY (doctor_id) 290 REFERENCES doctors(doctor_id) 291 ON DELETE RESTRICT, 292 293 CONSTRAINT procedures_diagnosis_FK 294 FOREIGN KEY (diagnosis_id) 295 REFERENCES diagnosis(diagnosis_id) 296 ON DELETE RESTRICT 297 ); 298 299 300 301 302 CREATE TABLE procedure_results ( 303 result_id BIGINT, 304 305 result_description TEXT, 306 result_date DATE NOT NULL, 307 308 procedure_id BIGINT NOT NULL, 309 310 CONSTRAINT procedure_results_PK 311 PRIMARY KEY (result_id), 312 313 CONSTRAINT procedure_results_description_chk 314 CHECK ( 315 result_description IS NULL 316 OR length(trim(result_description)) > 0 317 ), 318 319 CONSTRAINT procedure_results_procedure_FK 320 FOREIGN KEY (procedure_id) 321 REFERENCES procedures(procedure_id) 322 ON DELETE RESTRICT 323 ); 324 325 CREATE TABLE prescriptions ( 326 prescription_id BIGINT, 327 328 medication_name TEXT NOT NULL, 329 330 CONSTRAINT prescriptions_PK 331 PRIMARY KEY (prescription_id) 332 ); 333 334 CREATE TABLE prescription_restriction ( 335 restriction_id BIGINT, 336 337 description TEXT NOT NULL, 338 339 prescription_id BIGINT NOT NULL, 340 341 CONSTRAINT prescription_restriction_PK 342 PRIMARY KEY (restriction_id), 343 344 CONSTRAINT prescription_restriction_desc_chk 345 CHECK (length(trim(description)) > 0), 346 347 CONSTRAINT prescription_restriction_prescription_FK 348 FOREIGN KEY (prescription_id) 349 REFERENCES prescriptions(prescription_id) 350 ON DELETE RESTRICT 351 ); 352 353 354 CREATE TABLE lab_tests ( 355 test_id BIGINT, 356 357 test_name TEXT NOT NULL, 358 description TEXT, 359 cost DECIMAL NOT NULL, 360 361 CONSTRAINT lab_tests_PK 362 PRIMARY KEY (test_id), 363 364 CONSTRAINT lab_tests_cost_chk 365 CHECK (cost >= 0), 366 367 CONSTRAINT lab_tests_name_chk 368 CHECK (length(trim(test_name)) > 0) 369 ); 370 371 372 CREATE TABLE lab_results ( 373 result_id BIGINT, 374 375 results TEXT NOT NULL, 376 result_date DATE NOT NULL, 377 378 test_id BIGINT NOT NULL, 379 380 CONSTRAINT lab_results_PK 381 PRIMARY KEY (result_id), 382 383 CONSTRAINT lab_results_results_chk 384 CHECK (length(trim(results)) > 0), 385 386 CONSTRAINT lab_results_date_chk 387 CHECK (result_date <= CURRENT_DATE), 388 389 CONSTRAINT lab_results_test_FK 390 FOREIGN KEY (test_id) 391 REFERENCES lab_tests(test_id) 392 ON DELETE RESTRICT 393 ); 394 395 CREATE TABLE medical_records ( 396 record_id BIGINT PRIMARY KEY, 397 398 patient_id BIGINT NOT NULL, 399 400 401 FOREIGN KEY (patient_id) 402 REFERENCES patients(patient_id) 403 ON DELETE RESTRICT 404 ); 405 406 407 408 409 CREATE TABLE allergies ( 410 allergy_id BIGINT, 411 412 name TEXT NOT NULL, 413 allergy_severity TEXT NOT NULL, 414 415 CONSTRAINT allergies_PK 416 PRIMARY KEY (allergy_id), 417 418 CONSTRAINT allergies_name_UQ 419 UNIQUE (name), 420 421 CONSTRAINT allergies_name_chk 422 CHECK (length(trim(name)) > 0), 423 424 CONSTRAINT allergies_severity_chk 425 CHECK (allergy_severity IN ('LOW', 'MEDIUM', 'HIGH', 'CRITICAL')) 426 ); 427 428 429 CREATE TABLE symptoms ( 430 symptom_id BIGINT, 431 432 name TEXT NOT NULL, 433 description TEXT, 434 435 CONSTRAINT symptoms_PK 436 PRIMARY KEY (symptom_id), 437 438 CONSTRAINT symptoms_name_UQ 439 UNIQUE (name), 440 441 CONSTRAINT symptoms_name_chk 442 CHECK (length(trim(name)) > 0), 443 444 CONSTRAINT symptoms_description_chk 445 CHECK ( 446 description IS NULL 447 OR length(trim(description)) > 0 448 ) 449 ); 450 451 452 CREATE TABLE referrals ( 453 454 referral_id BIGINT PRIMARY KEY, 455 456 reason TEXT NOT NULL, 457 referral_date DATE NOT NULL, 458 459 record_id BIGINT NOT NULL, 460 from_doctor_id BIGINT NOT NULL, 461 to_doctor_id BIGINT not null, 462 463 CONSTRAINT referrals_reason_chk 464 CHECK (length(trim(reason)) > 0), 465 466 FOREIGN KEY (record_id) 467 REFERENCES medical_records(record_id) 468 ON DELETE RESTRICT, 469 470 FOREIGN KEY (from_doctor_id) 471 REFERENCES doctors(doctor_id) 472 ON DELETE RESTRICT, 473 474 FOREIGN KEY (to_doctor_id) 475 REFERENCES doctors(doctor_id) 476 ON DELETE RESTRICT 477 ); 478 479 CREATE TABLE medical_report ( 480 report_id BIGINT PRIMARY KEY, 481 482 description TEXT NOT NULL, 483 report_date DATE NOT NULL, 484 485 record_id BIGINT NOT NULL, 486 doctor_id BIGINT NOT NULL, 487 488 FOREIGN KEY (record_id) 489 REFERENCES medical_records(record_id) 490 ON DELETE RESTRICT, 491 492 FOREIGN KEY (doctor_id) 493 REFERENCES doctors(doctor_id) 494 ON DELETE RESTRICT 495 ); 496 497 498 CREATE TABLE billing ( 499 bill_id BIGINT PRIMARY KEY, 500 501 total_cost DECIMAL NOT NULL, 502 503 payment_status TEXT NOT NULL, 504 payment_date DATE, 505 506 record_id BIGINT NOT NULL, 507 admin_id BIGINT NOT NULL, 508 509 CONSTRAINT billing_cost_chk CHECK (total_cost >= 0), 510 CONSTRAINT billing_status_chk 511 CHECK (payment_status IN ('PENDING', 'PAID', 'CANCELLED')), 512 513 FOREIGN KEY (record_id) 514 REFERENCES medical_records(record_id) 515 ON DELETE RESTRICT, 516 517 FOREIGN KEY (admin_id) 518 REFERENCES admin(admin_id) 519 ON DELETE RESTRICT 520 ); 521 522 523 524 525 CREATE TABLE patient_allergies ( 526 patient_id BIGINT NOT NULL, 527 allergy_id BIGINT NOT NULL, 528 529 CONSTRAINT patient_allergies_PK 530 PRIMARY KEY (patient_id, allergy_id), 531 532 CONSTRAINT patient_allergies_patient_FK 533 FOREIGN KEY (patient_id) 534 REFERENCES patients(patient_id) 535 ON DELETE RESTRICT, 536 537 CONSTRAINT patient_allergies_allergy_FK 538 FOREIGN KEY (allergy_id) 539 REFERENCES allergies(allergy_id) 540 ON DELETE RESTRICT 541 ); 542 543 544 545 CREATE TABLE allergy_prescription_restrictions ( 546 allergy_id BIGINT NOT NULL, 547 restriction_id BIGINT NOT NULL, 548 549 CONSTRAINT allergy_prescription_restrictions_PK 550 PRIMARY KEY (allergy_id, restriction_id), 551 552 CONSTRAINT allergy_prescription_restrictions_allergy_FK 553 FOREIGN KEY (allergy_id) 554 REFERENCES allergies(allergy_id) 555 ON DELETE RESTRICT, 556 557 CONSTRAINT allergy_prescription_restrictions_restriction_FK 558 FOREIGN KEY (restriction_id) 559 REFERENCES prescription_restriction(restriction_id) 560 ON DELETE RESTRICT 561 ); 562 563 564 565 CREATE TABLE patient_symptoms ( 566 patient_id BIGINT NOT NULL, 567 symptom_id BIGINT NOT NULL, 568 569 CONSTRAINT patient_symptoms_PK 570 PRIMARY KEY (patient_id, symptom_id), 571 572 CONSTRAINT patient_symptoms_patient_FK 573 FOREIGN KEY (patient_id) 574 REFERENCES patients(patient_id) 575 ON DELETE RESTRICT, 576 577 CONSTRAINT patient_symptoms_symptom_FK 578 FOREIGN KEY (symptom_id) 579 REFERENCES symptoms(symptom_id) 580 ON DELETE RESTRICT 581 ); 582 583 584 585 586 CREATE TABLE diagnosis_symptoms ( 587 diagnosis_id BIGINT NOT NULL, 588 symptom_id BIGINT NOT NULL, 589 590 CONSTRAINT diagnosis_symptoms_PK 591 PRIMARY KEY (diagnosis_id, symptom_id), 592 593 CONSTRAINT diagnosis_symptoms_diagnosis_FK 594 FOREIGN KEY (diagnosis_id) 595 REFERENCES diagnosis(diagnosis_id) 596 ON DELETE RESTRICT, 597 598 CONSTRAINT diagnosis_symptoms_symptom_FK 599 FOREIGN KEY (symptom_id) 600 REFERENCES symptoms(symptom_id) 601 ON DELETE RESTRICT 602 ); 603 604 CREATE TABLE specialization_procedures ( 605 specialization_id BIGINT NOT NULL, 606 procedure_id BIGINT NOT NULL, 607 608 CONSTRAINT specialization_procedures_PK 609 PRIMARY KEY (specialization_id, procedure_id), 610 611 CONSTRAINT specialization_procedures_specialization_FK 612 FOREIGN KEY (specialization_id) 613 REFERENCES doctor_specialization(specialization_id) 614 ON DELETE RESTRICT, 615 616 CONSTRAINT specialization_procedures_procedure_FK 617 FOREIGN KEY (procedure_id) 618 REFERENCES procedures(procedure_id) 619 ON DELETE RESTRICT 620 ); 621 622 623 624 CREATE TABLE diagnosis_procedures ( 625 diagnosis_id BIGINT NOT NULL, 626 procedure_id BIGINT NOT NULL, 627 628 CONSTRAINT diagnosis_procedures_PK 629 PRIMARY KEY (diagnosis_id, procedure_id), 630 631 CONSTRAINT diagnosis_procedures_diagnosis_FK 632 FOREIGN KEY (diagnosis_id) 633 REFERENCES diagnosis(diagnosis_id) 634 ON DELETE RESTRICT, 635 636 CONSTRAINT diagnosis_procedures_procedure_FK 637 FOREIGN KEY (procedure_id) 638 REFERENCES procedures(procedure_id) 639 ON DELETE RESTRICT 640 ); 641 642 CREATE TABLE department_procedures ( 643 department_id BIGINT NOT NULL , 644 procedure_id BIGINT NOT NULL, 645 646 CONSTRAINT department_procedures_PK 647 PRIMARY KEY (department_id, procedure_id), 648 649 CONSTRAINT department_procedures_department_FK 650 FOREIGN KEY (department_id) 651 REFERENCES departments(department_id) 652 ON DELETE RESTRICT, 653 654 CONSTRAINT department_procedures_procedure_FK 655 FOREIGN KEY (procedure_id) 656 REFERENCES procedures(procedure_id) 657 ON DELETE RESTRICT 658 ); 659 660 661 CREATE TABLE billing_procedures ( 662 bill_id BIGINT NOT NULL, 663 procedure_id BIGINT NOT NULL, 664 665 CONSTRAINT billing_procedures_PK 666 PRIMARY KEY (bill_id, procedure_id), 667 668 CONSTRAINT billing_procedures_bill_FK 669 FOREIGN KEY (bill_id) 670 REFERENCES billing(bill_id) 671 ON DELETE RESTRICT, 672 673 CONSTRAINT billing_procedures_procedure_FK 674 FOREIGN KEY (procedure_id) 675 REFERENCES procedures(procedure_id) 676 ON DELETE RESTRICT 677 ); 678 679 680 681 682 CREATE TABLE billing_lab_tests ( 683 bill_id BIGINT NOT NULL, 684 test_id BIGINT NOT NULL, 685 686 CONSTRAINT billing_lab_tests_PK 687 PRIMARY KEY (bill_id, test_id), 688 689 CONSTRAINT billing_lab_tests_bill_FK 690 FOREIGN KEY (bill_id) 691 REFERENCES billing(bill_id) 692 ON DELETE RESTRICT, 693 694 CONSTRAINT billing_lab_tests_test_FK 695 FOREIGN KEY (test_id) 696 REFERENCES lab_tests(test_id) 697 ON DELETE RESTRICT 698 ); 699 700 701 702 CREATE TABLE doctor_medical_records ( 703 doctor_id BIGINT NOT NULL, 704 record_id BIGINT NOT NULL, 705 706 CONSTRAINT doctor_medical_records_PK 707 PRIMARY KEY (doctor_id, record_id), 708 709 CONSTRAINT doctor_medical_records_doctor_FK 710 FOREIGN KEY (doctor_id) 711 REFERENCES doctors(doctor_id) 712 ON DELETE RESTRICT, 713 714 CONSTRAINT doctor_medical_records_record_FK 715 FOREIGN KEY (record_id) 716 REFERENCES medical_records(record_id) 717 ON DELETE RESTRICT 718 ); 719 720 721 722 CREATE TABLE diagnosis_medical_records ( 723 diagnosis_id BIGINT NOT NULL, 724 record_id BIGINT NOT NULL, 725 726 CONSTRAINT diagnosis_medical_records_PK 727 PRIMARY KEY (diagnosis_id, record_id), 728 729 CONSTRAINT diagnosis_medical_records_diagnosis_FK 730 FOREIGN KEY (diagnosis_id) 731 REFERENCES diagnosis(diagnosis_id) 732 ON DELETE RESTRICT, 733 734 CONSTRAINT diagnosis_medical_records_record_FK 735 FOREIGN KEY (record_id) 736 REFERENCES medical_records(record_id) 737 ON DELETE RESTRICT 738 ); 739 740 741 CREATE TABLE prescription_medical_records ( 742 prescription_id BIGINT NOT NULL, 743 record_id BIGINT NOT NULL, 744 745 dosage TEXT NOT NULL, 746 frequency TEXT NOT NULL, 747 duration TEXT NOT NULL, 748 749 notes TEXT, 750 751 CONSTRAINT prescription_medical_records_PK 752 PRIMARY KEY (prescription_id, record_id), 753 754 CONSTRAINT prescription_medical_records_prescription_FK 755 FOREIGN KEY (prescription_id) 756 REFERENCES prescriptions(prescription_id) 757 ON DELETE RESTRICT, 758 759 CONSTRAINT prescription_medical_records_record_FK 760 FOREIGN KEY (record_id) 761 REFERENCES medical_records(record_id) 762 ON DELETE RESTRICT 763 ); 764 765 766 767 CREATE TABLE medical_report_lab_results ( 768 report_id BIGINT NOT NULL, 769 result_id BIGINT NOT NULL, 770 771 CONSTRAINT medical_report_lab_results_PK 772 PRIMARY KEY (report_id, result_id), 773 774 CONSTRAINT medical_report_lab_results_report_FK 775 FOREIGN KEY (report_id) 776 REFERENCES medical_report(report_id) 777 ON DELETE RESTRICT, 778 779 CONSTRAINT medical_report_lab_results_result_FK 780 FOREIGN KEY (result_id) 781 REFERENCES lab_results(result_id) 782 ON DELETE RESTRICT 783 ); 784 785 786 787 CREATE TABLE performed_procedures ( 788 performed_id BIGINT, 789 790 procedure_id BIGINT NOT NULL, 791 doctor_id BIGINT NOT NULL, 792 patient_id BIGINT NOT NULL, 793 diagnosis_id BIGINT, 794 795 procedure_date DATE NOT NULL, 796 notes TEXT, 797 798 CONSTRAINT performed_procedures_PK 799 PRIMARY KEY (performed_id), 800 801 CONSTRAINT performed_procedures_procedure_FK 802 FOREIGN KEY (procedure_id) 803 REFERENCES procedures(procedure_id) 804 ON DELETE RESTRICT, 805 806 CONSTRAINT performed_procedures_doctor_FK 807 FOREIGN KEY (doctor_id) 808 REFERENCES doctors(doctor_id) 809 ON DELETE RESTRICT, 810 811 CONSTRAINT performed_procedures_patient_FK 812 FOREIGN KEY (patient_id) 813 REFERENCES patients(patient_id) 814 ON DELETE RESTRICT, 815 816 CONSTRAINT performed_procedures_diagnosis_FK 817 FOREIGN KEY (diagnosis_id) 818 REFERENCES diagnosis(diagnosis_id) 819 ON DELETE RESTRICT 820 ); 821 822 CREATE TABLE performed_lab_tests ( 823 performed_test_id BIGINT, 824 825 test_id BIGINT NOT NULL, 826 patient_id BIGINT NOT NULL, 827 doctor_id BIGINT NOT NULL, 828 technician_id BIGINT NOT NULL, 829 830 test_date DATE NOT NULL, 831 notes TEXT, 832 833 CONSTRAINT performed_lab_tests_PK 834 PRIMARY KEY (performed_test_id), 835 836 CONSTRAINT performed_lab_tests_test_FK 837 FOREIGN KEY (test_id) 838 REFERENCES lab_tests(test_id) 839 ON DELETE RESTRICT, 840 841 CONSTRAINT performed_lab_tests_patient_FK 842 FOREIGN KEY (patient_id) 843 REFERENCES patients(patient_id) 844 ON DELETE RESTRICT, 845 846 CONSTRAINT performed_lab_tests_doctor_FK 847 FOREIGN KEY (doctor_id) 848 REFERENCES doctors(doctor_id) 849 ON DELETE RESTRICT, 850 851 CONSTRAINT performed_lab_tests_technician_FK 852 FOREIGN KEY (technician_id) 853 REFERENCES lab_technician(technician_id) 854 ON DELETE RESTRICT 855 ); 856 857 CREATE TABLE medical_record_lab_results ( 858 record_id BIGINT NOT NULL, 859 result_id BIGINT NOT NULL, 860 861 PRIMARY KEY (record_id, result_id), 862 863 FOREIGN KEY (record_id) 864 REFERENCES medical_records(record_id) 865 ON DELETE RESTRICT, 866 867 FOREIGN KEY (result_id) 868 REFERENCES lab_results(result_id) 869 ON DELETE RESTRICT 870 ); 871 872 873 874 875 CREATE TABLE medical_record_procedures ( 876 record_id BIGINT NOT NULL, 877 procedure_id BIGINT NOT NULL, 878 879 PRIMARY KEY (record_id, procedure_id), 880 881 FOREIGN KEY (record_id) 882 REFERENCES medical_records(record_id) 883 ON DELETE RESTRICT, 884 885 FOREIGN KEY (procedure_id) 886 REFERENCES procedures(procedure_id) 887 ON DELETE RESTRICT 888 ); 889 890 891 892 CREATE TABLE medical_record_symptoms ( 893 record_id BIGINT NOT NULL, 894 symptom_id BIGINT NOT NULL, 895 severity TEXT, 896 897 PRIMARY KEY (record_id, symptom_id), 898 899 FOREIGN KEY (record_id) 900 REFERENCES medical_records(record_id) 901 ON DELETE RESTRICT, 902 903 FOREIGN KEY (symptom_id) 904 REFERENCES symptoms(symptom_id) 905 ON DELETE RESTRICT 906 ); 907 908 CREATE TABLE medical_record_allergies ( 909 record_id BIGINT NOT NULL, 910 allergy_id BIGINT NOT NULL, 911 reaction TEXT, 912 severity TEXT, 913 914 PRIMARY KEY (record_id, allergy_id), 915 916 FOREIGN KEY (record_id) 917 REFERENCES medical_records(record_id) 918 ON DELETE RESTRICT, 919 920 FOREIGN KEY (allergy_id) 921 REFERENCES allergies(allergy_id) 922 ON DELETE RESTRICT 923 ); 924 925 926 COMMIT; 927 -
sql/dml.sql
r500b5be rc613cbf 1 BEGIN; 2 INSERT INTO doctor_level (level_id, level) VALUES 3 (1, 'INTERN'), 4 (2, 'RESIDENT'), 5 (3, 'GENERAL_DOCTOR'), 6 (4, 'SPECIALIST'), 7 (5, 'CONSULTANT'); 8 9 10 INSERT INTO doctor_specialization (specialization_id, specialization_name) VALUES 11 (1, 'PULMONOLOGY'), 12 (2, 'CARDIOLOGY'), 13 (3, 'NEUROLOGY'), 14 (4, 'ORTHOPEDICS'), 15 (5, 'GYNECOLOGY'), 16 (6, 'ENT'), 17 (7, 'OPHTHALMOLOGY'), 18 (8, 'PATHOLOGY'), 19 (9, 'RADIOLOGY'), 20 (10, 'GASTROENTEROLOGY'), 21 (11, 'UROLOGY'), 22 (12, 'NEPHROLOGY'), 23 (13, 'ONCOLOGY'), 24 (14, 'DERMATOLOGY'), 25 (15, 'PEDIATRICS'), 26 (16, 'PSYCHIATRY'), 27 (17, 'REHABILITATION'), 28 (18, 'HEMATOLOGY'), 29 (19, 'INFECTIOUS_DISEASES'), 30 (20, 'NEUROSURGERY'), 31 (21, 'CARDIAC_SURGERY'), 32 (22, 'PLASTIC_SURGERY'), 33 (23, 'GENERAL_SURGERY'), 34 (24, 'DENTISTRY'), 35 (25, 'ENDOCRINOLOGY'); 36 37 INSERT INTO departments (department_id, department_name) VALUES 38 (1, 'PULMONOLOGY_DEPT'), 39 (2, 'CARDIOLOGY_DEPT'), 40 (3, 'NEUROLOGY_DEPT'), 41 (4, 'ORTHOPEDICS_DEPT'), 42 (5, 'GYNECOLOGY_DEPT'), 43 (6, 'ENT_DEPT'), 44 (7, 'OPHTHALMOLOGY_DEPT'), 45 (8, 'PATHOLOGY_DEPT'), 46 (9, 'RADIOLOGY_DEPT'), 47 (10, 'GASTROENTEROLOGY_DEPT'), 48 (11, 'UROLOGY_DEPT'), 49 (12, 'NEPHROLOGY_DEPT'), 50 (13, 'ONCOLOGY_DEPT'), 51 (14, 'DERMATOLOGY_DEPT'), 52 (15, 'PEDIATRICS_DEPT'), 53 (16, 'PSYCHIATRY_DEPT'), 54 (17, 'REHABILITATION_DEPT'), 55 (18, 'HEMATOLOGY_DEPT'), 56 (19, 'INFECTIOUS_DISEASES_DEPT'), 57 (20, 'NEUROSURGERY_DEPT'), 58 (21, 'CARDIAC_SURGERY_DEPT'), 59 (22, 'PLASTIC_SURGERY_DEPT'), 60 (23, 'GENERAL_SURGERY_DEPT'), 61 (24, 'DENTISTRY_DEPT'); 62 63 64 INSERT INTO allergies (allergy_id, name, allergy_severity) VALUES 65 (1, 'PENICILLIN', 'HIGH'), 66 (2, 'AMOXICILLIN', 'HIGH'), 67 (3, 'ASPIRIN', 'MEDIUM'), 68 (4, 'IBUPROFEN', 'MEDIUM'), 69 (5, 'PARACETAMOL', 'LOW'), 70 (6, 'CODEINE', 'HIGH'), 71 (7, 'MORPHINE', 'CRITICAL'), 72 (8, 'SULFA_DRUGS', 'HIGH'), 73 (9, 'CEPHALOSPORINS', 'HIGH'), 74 (10, 'ANESTHESIA', 'CRITICAL'), 75 (11, 'LIDOCAINE', 'HIGH'), 76 (12, 'CONTRAST_DYE', 'HIGH'), 77 (13, 'PEANUTS', 'CRITICAL'), 78 (14, 'TREE_NUTS', 'CRITICAL'), 79 (15, 'ALMONDS', 'HIGH'), 80 (16, 'WALNUTS', 'HIGH'), 81 (17, 'HAZELNUTS', 'HIGH'), 82 (18, 'CASHEWS', 'HIGH'), 83 (19, 'PISTACHIOS', 'HIGH'), 84 (20, 'SESAME', 'HIGH'), 85 (21, 'MILK', 'MEDIUM'), 86 (22, 'EGGS', 'MEDIUM'), 87 (23, 'WHEAT', 'MEDIUM'), 88 (24, 'GLUTEN', 'MEDIUM'), 89 (25, 'SOY', 'MEDIUM'), 90 (26, 'FISH', 'HIGH'), 91 (27, 'SHELLFISH', 'HIGH'), 92 (28, 'SHRIMP', 'HIGH'), 93 (29, 'CRAB', 'HIGH'), 94 (30, 'LOBSTER', 'HIGH'), 95 (31, 'STRAWBERRIES', 'LOW'), 96 (32, 'KIWI', 'LOW'), 97 (33, 'BANANA', 'LOW'), 98 (34, 'APPLE', 'LOW'), 99 (35, 'CHOCOLATE', 'LOW'), 100 (36, 'CAFFEINE', 'LOW'), 101 (37, 'POLLEN', 'LOW'), 102 (38, 'GRASS_POLLEN', 'LOW'), 103 (39, 'TREE_POLLEN', 'LOW'), 104 (40, 'RAGWEED', 'LOW'), 105 (41, 'DUST_MITES', 'LOW'), 106 (42, 'MOLD', 'MEDIUM'), 107 (43, 'MILDEW', 'MEDIUM'), 108 (44, 'PET_DANDER_CAT', 'MEDIUM'), 109 (45, 'PET_DANDER_DOG', 'MEDIUM'), 110 (46, 'FEATHERS', 'LOW'), 111 (47, 'BEE_VENOM', 'HIGH'), 112 (48, 'WASP_VENOM', 'HIGH'), 113 (49, 'HORNET_VENOM', 'HIGH'), 114 (50, 'FIRE_ANT_STINGS', 'HIGH'), 115 (51, 'LATEX', 'HIGH'), 116 (52, 'NICKEL', 'MEDIUM'), 117 (53, 'COBALT', 'MEDIUM'), 118 (54, 'CHROMIUM', 'MEDIUM'), 119 (55, 'FORMALDEHYDE', 'HIGH'), 120 (56, 'FRAGRANCES', 'MEDIUM'), 121 (57, 'PERFUMES', 'MEDIUM'), 122 (58, 'DETERGENTS', 'MEDIUM'), 123 (59, 'CLEANING_CHEMICALS', 'HIGH'), 124 (60, 'HAIR_DYE', 'MEDIUM'), 125 (61, 'IODINE', 'MEDIUM'), 126 (62, 'MRI_CONTRAST', 'HIGH'), 127 (63, 'CT_CONTRAST', 'HIGH'), 128 (64, 'PLASTER_CAST_MATERIAL', 'LOW'), 129 (65, 'OXYCODONE', 'HIGH'), 130 (66, 'TRAMADOL', 'HIGH'), 131 (67, 'DICLOFENAC', 'MEDIUM'), 132 (68, 'NAPROXEN', 'MEDIUM'), 133 (69, 'AZITHROMYCIN', 'MEDIUM'), 134 (70, 'CLARITHROMYCIN', 'MEDIUM'), 135 (71, 'METRONIDAZOLE', 'MEDIUM'), 136 (72, 'INSULIN', 'HIGH'), 137 (73, 'TOMATOES', 'LOW'), 138 (74, 'POTATOES', 'LOW'), 139 (75, 'CORN', 'LOW'), 140 (76, 'CARROTS', 'LOW'), 141 (77, 'CELERY', 'MEDIUM'), 142 (78, 'ONION', 'LOW'), 143 (79, 'GARLIC', 'LOW'), 144 (80, 'MUSTARD', 'MEDIUM'), 145 (81, 'PEACHES', 'LOW'), 146 (82, 'PEARS', 'LOW'), 147 (83, 'PLUMS', 'LOW'), 148 (84, 'GRAPES', 'LOW'), 149 (85, 'MELON', 'LOW'), 150 (86, 'SMOKE', 'MEDIUM'), 151 (87, 'CIGARETTE_SMOKE', 'MEDIUM'), 152 (88, 'AIRBORNE_CHEMICALS', 'HIGH'), 153 (89, 'POLLUTED_AIR', 'MEDIUM'), 154 (90, 'CAT_DANDER', 'MEDIUM'), 155 (91, 'DOG_DANDER', 'MEDIUM'), 156 (92, 'HORSE_DANDER', 'LOW'), 157 (93, 'PREDNISONE', 'HIGH'), 158 (94, 'HYDROCORTISONE', 'MEDIUM'), 159 (95, 'VACCINE_COMPONENTS', 'HIGH'), 160 (96, 'GLYCERIN', 'LOW'), 161 (97, 'LANOLIN', 'MEDIUM'), 162 (98, 'ALCOHOL_BASED_PRODUCTS', 'MEDIUM'), 163 (99, 'SOAP', 'LOW'), 164 (100, 'SHAMPOO', 'LOW'), 165 (101, 'LATEX_GLOVES', 'HIGH'), 166 (102, 'SURGICAL_ADHESIVES', 'HIGH'), 167 (103, 'DENTAL_MATERIALS', 'MEDIUM'), 168 (104, 'METAL_IMPLANTS', 'HIGH'), 169 (105, 'TITANIUM', 'MEDIUM'), 170 (106, 'STAINLESS_STEEL', 'MEDIUM'), 171 (107, 'PENICILLIN_DERIVATIVES', 'HIGH'), 172 (108, 'VANCOMYCIN', 'HIGH'), 173 (109, 'HEPARIN', 'HIGH'), 174 (110, 'BLOOD_PRODUCTS', 'HIGH'), 175 (111, 'LATEX_BALLOONS', 'HIGH'), 176 (112, 'HOUSE_DUST', 'LOW'), 177 (113, 'WOOD_DUST', 'MEDIUM'), 178 (114, 'PAPER_DUST', 'LOW'), 179 (115, 'TEXTILE_DYES', 'MEDIUM'), 180 (116, 'INKS', 'LOW'), 181 (117, 'GLUE', 'MEDIUM'), 182 (118, 'PAINT_FUMES', 'HIGH'), 183 (119, 'SOLVENTS', 'HIGH'), 184 (120, 'RUBBER', 'HIGH'), 185 (121, 'AMPICILLIN', 'HIGH'), 186 (122, 'PIPERACILLIN', 'HIGH'), 187 (123, 'CEFTRIAXONE', 'HIGH'), 188 (124, 'CEFEPIME', 'HIGH'), 189 (125, 'MEROPENEM', 'CRITICAL'), 190 (126, 'IMIPENEM', 'CRITICAL'), 191 (127, 'ACETAMINOPHEN', 'LOW'), 192 (128, 'DIPHENHYDRAMINE', 'MEDIUM'), 193 (129, 'LORATADINE', 'LOW'), 194 (130, 'CETIRIZINE', 'LOW'), 195 (131, 'IBUPROFEN_HIGH_DOSE', 'MEDIUM'), 196 (132, 'KETOROLAC', 'HIGH'), 197 (133, 'MELOXICAM', 'MEDIUM'), 198 (134, 'CELECOXIB', 'MEDIUM'), 199 (135, 'FENTANYL', 'CRITICAL'), 200 (136, 'METHADONE', 'CRITICAL'), 201 (137, 'BUPRENORPHINE', 'HIGH'), 202 (138, 'PROPOFOL', 'CRITICAL'), 203 (139, 'SEVOFLURANE', 'HIGH'), 204 (140, 'ISOFLURANE', 'HIGH'), 205 (141, 'METFORMIN', 'MEDIUM'), 206 (142, 'INSULIN_ANALOGS', 'HIGH'), 207 (143, 'ATENOLOL', 'MEDIUM'), 208 (144, 'METOPROLOL', 'MEDIUM'), 209 (145, 'LISINOPRIL', 'HIGH'), 210 (146, 'ENALAPRIL', 'HIGH'), 211 (147, 'WARFARIN', 'HIGH'), 212 (148, 'HEPARIN_SODIUM', 'HIGH'), 213 (149, 'SERTRALINE', 'MEDIUM'), 214 (150, 'FLUOXETINE', 'MEDIUM'), 215 (151, 'CITALOPRAM', 'MEDIUM'), 216 (152, 'CISPLATIN', 'CRITICAL'), 217 (153, 'DOXORUBICIN', 'CRITICAL'), 218 (154, 'CYCLOPHOSPHAMIDE', 'CRITICAL'), 219 (155, 'PREDNISOLONE', 'HIGH'), 220 (156, 'DEXAMETHASONE', 'HIGH'), 221 (157, 'ALBUTEROL', 'MEDIUM'), 222 (158, 'SALBUTAMOL', 'MEDIUM'), 223 (159, 'LEVOFLOXACIN', 'HIGH'); 224 225 INSERT INTO symptoms (symptom_id, name, description) VALUES 226 (1, 'ACID_REFLUX_IN_BABIES', 'Reflux in infants'), 227 (2, 'ACID_REFLUX', 'Stomach acid rising into esophagus'), 228 (3, 'AMNESIA', 'Memory loss'), 229 (4, 'ANAL_PAIN', 'Pain in anal region'), 230 (5, 'ANGER', 'Emotional irritation or rage'), 231 (6, 'ANKLE_PAIN', 'Pain in ankle'), 232 (7, 'SWOLLEN_ANKLES_FEET_LEGS', 'Swelling in lower limbs'), 233 (8, 'ANOSMIA', 'Loss of smell'), 234 (9, 'ITCHY_BOTTOM', 'Itching around anus'), 235 (10, 'ANXIETY', 'Fear and panic symptoms'), 236 (11, 'ARM_PAIN', 'Pain in arm'), 237 (12, 'BACK_PAIN', 'Pain in back'), 238 (13, 'BAD_BREATH', 'Unpleasant mouth odor'), 239 (14, 'BEDWETTING', 'Night-time urination'), 240 (15, 'VOMITING', 'Expulsion of stomach contents'), 241 (16, 'POSTMENOPAUSAL_BLEEDING', 'Bleeding after menopause'), 242 (17, 'BLEEDING_BETWEEN_PERIODS', 'Bleeding between periods'), 243 (18, 'RECTAL_BLEEDING', 'Bleeding from rectum'), 244 (19, 'BLEEDING_IN_PREGNANCY', 'Bleeding during pregnancy'), 245 (20, 'BLOATING', 'Abdominal swelling'), 246 (21, 'BLOOD_IN_PHLEGM', 'Blood in mucus'), 247 (22, 'BLOOD_IN_SEMEN', 'Blood in semen'), 248 (23, 'BLOOD_IN_URINE', 'Blood in urine'), 249 (24, 'CYANOSIS', 'Blue skin or lips'), 250 (25, 'BLUSHING', 'Facial redness'), 251 (26, 'BODY_ODOR', 'Strong smell'), 252 (27, 'BOWEL_INCONTINENCE', 'Loss of bowel control'), 253 (28, 'BREAST_LUMPS', 'Mass in breast'), 254 (29, 'BREAST_PAIN', 'Pain in breast'), 255 (30, 'EXOPHTHALMOS', 'Bulging eyes'), 256 (31, 'CATARRH', 'Excess mucus'), 257 (32, 'CHEST_PAIN', 'Chest pain'), 258 (33, 'COCCYX_PAIN', 'Tailbone pain'), 259 (34, 'CONFUSION', 'Sudden confusion'), 260 (35, 'CONSTIPATION', 'Hard stools'), 261 (36, 'COUGH', 'Cough reflex'), 262 (37, 'COUGHING_BLOOD', 'Blood in cough'), 263 (38, 'DEAFNESS', 'Hearing loss'), 264 (39, 'DEHYDRATION', 'Fluid loss'), 265 (40, 'DELIRIUM', 'Acute confusion'), 266 (41, 'DENTAL_PAIN', 'Tooth pain'), 267 (42, 'DIARRHEA_VOMITING', 'Digestive upset'), 268 (43, 'DIZZINESS', 'Balance disturbance'), 269 (44, 'DOUBLE_VISION', 'Seeing double'), 270 (45, 'DRY_EYES', 'Eye dryness'), 271 (46, 'DRY_LIPS', 'Dry lips'), 272 (47, 'DRY_MOUTH', 'Lack of saliva'), 273 (48, 'DYSPHAGIA', 'Swallowing difficulty'), 274 (49, 'EARACHE', 'Pain in ear'), 275 (50, 'EJACULATION_PROBLEMS', 'Problems with ejaculation'), 276 (51, 'ELBOW_AND_ARM_PAIN', 'Pain in elbow or arm'), 277 (52, 'EXCESSIVE_DAYTIME_SLEEPINESS', 'Abnormal daytime sleepiness'), 278 (53, 'EXCESSIVE_HAIR_GROWTH', 'Increased hair growth'), 279 (54, 'EXCESSIVE_SWEATING', 'High sweating levels'), 280 (55, 'EXCESSIVE_THIRST', 'Increased thirst'), 281 (56, 'FLOATERS_AND_FLASHES', 'Visual disturbances in vision'), 282 (57, 'EYE_PAIN', 'Pain in eye'), 283 (58, 'EYELID_PROBLEMS', 'Problems affecting eyelids'), 284 (59, 'FAINTING', 'Temporary loss of consciousness'), 285 (60, 'FLATULENCE', 'Gas in digestive system'), 286 (61, 'NAUSEA', 'Feeling of sickness'), 287 (62, 'FEVER', 'High body temperature'), 288 (63, 'FINGER_PAIN', 'Pain in fingers'), 289 (64, 'SEIZURES', 'Sudden uncontrolled brain activity'), 290 (65, 'FOOT_PAIN', 'Pain in foot'), 291 (66, 'HAIR_LOSS', 'Hair shedding'), 292 (67, 'HALLUCINATIONS_AND_HEARING_VOICES', 'Perception without stimulus'), 293 (68, 'HAND_PAIN', 'Pain in hand'), 294 (69, 'HEADACHE', 'Pain in head'), 295 (70, 'HEARING_LOSS', 'Reduced hearing ability'), 296 (71, 'HEART_PALPITATIONS', 'Irregular heartbeat sensation'), 297 (72, 'HEARTBURN_AND_ACID_REFLUX', 'Burning chest sensation'), 298 (73, 'HEAVY_PERIODS', 'Excess menstrual bleeding'), 299 (74, 'HEEL_PAIN', 'Pain in heel'), 300 (75, 'HICCUPS', 'Involuntary diaphragm spasms'), 301 (76, 'HIP_PAIN', 'Pain in hip'), 302 (77, 'HIVES', 'Skin rash with itching'), 303 (78, 'INDIGESTION', 'Difficulty digesting food'), 304 (79, 'INSOMNIA', 'Difficulty sleeping'), 305 (80, 'ITCHY_SKIN', 'Skin itching'), 306 (81, 'JOINT_PAIN', 'Pain in joints'), 307 (82, 'KNEE_PAIN', 'Pain in knee'), 308 (83, 'LEG_CRAMPS', 'Muscle cramps in legs'), 309 (84, 'LIMPING', 'Difficulty walking normally'), 310 (85, 'LOW_MOOD', 'Depressive mood state'), 311 (86, 'LUMPS', 'Abnormal tissue swelling'), 312 (87, 'MEMORY_LOSS', 'Difficulty remembering information'), 313 (88, 'METALLIC_TASTE', 'Unusual taste in mouth'), 314 (89, 'MISSED_PERIODS', 'Absent menstrual cycle'), 315 (90, 'NAIL_PROBLEMS', 'Abnormal nails'), 316 (91, 'NECK_PAIN', 'Pain in neck'), 317 (92, 'NIGHT_SWEATS', 'Sweating during sleep'), 318 (93, 'NIPPLE_DISCHARGE', 'Fluid from nipple'), 319 (94, 'OVULATION_PAIN', 'Pain during ovulation'), 320 (95, 'TESTICLE_PAIN', 'Pain in testicles'), 321 (96, 'PAINFUL_PERIODS', 'Pain during menstruation'), 322 (97, 'PARALYSIS', 'Loss of movement'), 323 (98, 'PELVIC_PAIN', 'Pain in pelvic area'), 324 (99, 'PINS_AND_NEEDLES', 'Tingling sensation'), 325 (100, 'PRIAPISM', 'Persistent painful erection'), 326 (101, 'RASH', 'Skin eruption or irritation'), 327 (102, 'RED_EYE', 'Redness in eye'), 328 (103, 'RUNNY_NOSE', 'Nasal discharge'), 329 (104, 'SHORTNESS_OF_BREATH', 'Difficulty breathing'), 330 (105, 'SORE_THROAT', 'Pain in throat'), 331 (106, 'SNEEZING', 'Reflex to clear nasal passages'), 332 (107, 'SNORING', 'Noisy breathing during sleep'), 333 (108, 'STOMACH_PAIN', 'Pain in abdomen'), 334 (109, 'STRESS', 'Mental strain condition'), 335 (110, 'STRETCH_MARKS', 'Skin streaking'), 336 (111, 'SWELLING', 'Abnormal enlargement of tissue'), 337 (112, 'SWOLLEN_GLANDS', 'Enlarged lymph nodes'), 338 (113, 'TASTE_CHANGE', 'Altered taste perception'), 339 (114, 'TREMOR', 'Uncontrolled shaking'), 340 (115, 'TIREDNESS', 'Fatigue'), 341 (116, 'TINNITUS', 'Ringing in ears'), 342 (117, 'TOOTHACHE', 'Pain in teeth'), 343 (118, 'TWITCHING', 'Muscle spasms'), 344 (119, 'UNINTENTIONAL_WEIGHT_LOSS', 'Weight loss without trying'), 345 (120, 'URINARY_INCONTINENCE', 'Loss of bladder control'), 346 (121, 'VAGINAL_BLEEDING', 'Bleeding from vagina'), 347 (122, 'VISION_LOSS', 'Reduced vision ability'), 348 (123, 'VOMITING_BLOOD', 'Blood in vomit'), 349 (124, 'WATERING_EYES', 'Excess tear production'), 350 (125, 'WHEEZING', 'Whistling breathing sound'), 351 (126, 'WRIST_PAIN', 'Pain in wrist'); 352 353 INSERT INTO doctors (doctor_id, first_name, last_name, email_address, level_id, specialization_id, department_id) VALUES 354 (1, 'Ivan', 'Stojanov', 'ivan.stojanov@medora.com', 1, 1, 1), 355 (2, 'Elena', 'Kirova', 'elena.kirova@medora.com', 2, 1, 1), 356 (3, 'Nikola', 'Trajkov', 'nikola.trajkov@medora.com', 3, 1, 1), 357 (4, 'Sara', 'Dimova', 'sara.dimova@medora.com', 4, 1, 1), 358 (5, 'Marija', 'Bajramovska', 'marija.bajramovska@medora.com', 5, 1, 1), 359 (6, 'Ana', 'Petrova', 'ana.petrova@medora.com', 1, 2, 2), 360 (7, 'Petar', 'Iliev', 'petar.iliev@medora.com', 2, 2, 2), 361 (8, 'Mila', 'Stojanova', 'mila.stojanova@medora.com', 3, 2, 2), 362 (9, 'Dejan', 'Markovski', 'dejan.markovski@medora.com', 4, 2, 2), 363 (10, 'Kristina', 'Todorova', 'kristina.todorova@medora.com', 5, 2, 2), 364 (11, 'Goran', 'Spasov', 'goran.spasov@medora.com', 1, 3, 3), 365 (12, 'Ivana', 'Hristova', 'ivana.hristova@medora.com', 2, 3, 3), 366 (13, 'Bojan', 'Nikolovski', 'bojan.nikolovski@medora.com', 3, 3, 3), 367 (14, 'Tea', 'Angelova', 'tea.angelova@medora.com', 4, 3, 3), 368 (15, 'Filip', 'Jovanov', 'filip.jovanov@medora.com', 5, 3, 3), 369 (16, 'Natasha', 'Petkovska', 'natasha.petkovska@medora.com', 1, 4, 4), 370 (17, 'Viktor', 'Andreev', 'viktor.andreev@medora.com', 2, 4, 4), 371 (18, 'Sofija', 'Marinova', 'sofija.marinova@medora.com', 3, 4, 4), 372 (19, 'Luka', 'Nikolov', 'luka.nikolov@medora.com', 4, 4, 4), 373 (20, 'Marija', 'Damjanova', 'marija.damjanova@medora.com', 5, 4, 4), 374 (21, 'Katerina', 'Ilieva', 'katerina.ilieva@medora.com', 1, 5, 5), 375 (22, 'Dimitar', 'Petrov', 'dimitar.petrov@medora.com', 2, 5, 5), 376 (23, 'Jana', 'Kostova', 'jana.kostova@medora.com', 3, 5, 5), 377 (24, 'Stefan', 'Todorov', 'stefan.todorov@medora.com', 4, 5, 5), 378 (25, 'Elena', 'Markova', 'elena.markova@medora.com', 5, 5, 5), 379 (26, 'Aleksandar', 'Ristovski', 'aleksandar.ristovski@medora.com', 1, 6, 6), 380 (27, 'Ivana', 'Trajkovska', 'ivana.trajkovska@medora.com', 2, 6, 6), 381 (28, 'Goran', 'Nikolov', 'goran.nikolov@medora.com', 3, 6, 6), 382 (29, 'Mila', 'Stojkova', 'mila.stojkova@medora.com', 4, 6, 6), 383 (30, 'Bojan', 'Petrov', 'bojan.petrov@medora.com', 5, 6, 6), 384 (31, 'Petar', 'Angelov', 'petar.angelov@medora.com', 1, 7, 7), 385 (32, 'Ana', 'Dimovska', 'ana.dimovska@medora.com', 2, 7, 7), 386 (33, 'Nikola', 'Kostadinov', 'nikola.kostadinov@medora.com', 3, 7, 7), 387 (34, 'Sara', 'Petrova', 'sara.petrova@medora.com', 4, 7, 7), 388 (35, 'Marko', 'Stojanovski', 'marko.stojanovski@medora.com', 5, 7, 7), 389 (36, 'Elena', 'Markovic', 'elena.markovic@medora.com', 1, 8, 8), 390 (37, 'Ivan', 'Petrovic', 'ivan.petrovic@medora.com', 2, 8, 8), 391 (38, 'Dejan', 'Ilievski', 'dejan.ilievski@medora.com', 3, 8, 8), 392 (39, 'Kristina', 'Ristova', 'kristina.ristova@medora.com', 4, 8, 8), 393 (40, 'Filip', 'Sokolov', 'filip.sokolov@medora.com', 5, 8, 8), 394 (41, 'Goran', 'Spasovski', 'goran.spasovski@medora.com', 1, 9, 9), 395 (42, 'Ivana', 'Hristovska', 'ivana.hristovska@medora.com', 2, 9, 9), 396 (43, 'Bojan', 'Nikolovska', 'bojan.nikolovska@medora.com', 3, 9, 9), 397 (44, 'Tea', 'Angelkovska', 'tea.angelkovska@medora.com', 4, 9, 9), 398 (45, 'Luka', 'Petrovski', 'luka.petrovski@medora.com', 5, 9, 9), 399 (46, 'Marija', 'Ristova', 'marija.ristova@medora.com', 1, 10, 10), 400 (47, 'Viktor', 'Stojanovski', 'viktor.stojanovski@medora.com', 2, 10, 10), 401 (48, 'Sofija', 'Markovska', 'sofija.markovska@medora.com', 3, 10, 10), 402 (49, 'Dimitar', 'Ilievski', 'dimitar.ilievski@medora.com', 4, 10, 10), 403 (50, 'Jana', 'Petrovska', 'jana.petrovska2@medora.com', 5, 10, 10), 404 (51, 'Stefan', 'Nikolov', 'stefan.nikolov@medora.com', 1, 11, 11), 405 (52, 'Elena', 'Trajkovska', 'elena.trajkovska@medora.com', 2, 11, 11), 406 (53, 'Nikola', 'Angelov', 'nikola.angelov@medora.com', 3, 11, 11), 407 (54, 'Sara', 'Dimovska', 'sara.dimovska@medora.com', 4, 11, 11), 408 (55, 'Ivan', 'Kostov', 'ivan.kostov@medora.com', 5, 11, 11), 409 (56, 'Petar', 'Hristov', 'petar.hristov@medora.com', 1, 12, 12), 410 (57, 'Ana', 'Petrovska', 'ana.petrovska3@medora.com', 2, 12, 12), 411 (58, 'Dejan', 'Stojkov', 'dejan.stojkov@medora.com', 3, 12, 12), 412 (59, 'Kristina', 'Ristovska', 'kristina.ristovska@medora.com', 4, 12, 12), 413 (60, 'Goran', 'Nikolovski', 'goran.nikolovski@medora.com', 5, 12, 12), 414 (61, 'Ivana', 'Markov', 'ivana.markov@medora.com', 1, 13, 13), 415 (62, 'Bojan', 'Petrovski', 'bojan.petrovski1@medora.com', 2, 13, 13), 416 (63, 'Tea', 'Ilieva', 'tea.ilieva@medora.com', 3, 13, 13), 417 (64, 'Filip', 'Spasov', 'filip.spasov@medora.com', 4, 13, 13), 418 (65, 'Marija', 'Angelova', 'marija.angelova@medora.com', 5, 13, 13), 419 (66, 'Viktor', 'Kirov', 'viktor.kirov@medora.com', 1, 14, 14), 420 (67, 'Sofija', 'Petrovska', 'sofija.petrovska@medora.com', 2, 14, 14), 421 (68, 'Luka', 'Ristovski', 'luka.ristovski@medora.com', 3, 14, 14), 422 (69, 'Dimitar', 'Markov', 'dimitar.markov@medora.com', 4, 14, 14), 423 (70, 'Jana', 'Nikolova', 'jana.nikolova@medora.com', 5, 14, 14), 424 (71, 'Marko', 'Stojanov', 'marko.stojanov@medora.com', 1, 15, 15), 425 (72, 'Elena', 'Ilievska', 'elena.ilievska@medora.com', 2, 15, 15), 426 (73, 'Nikola', 'Petrov', 'nikola.petrov@medora.com', 3, 15, 15), 427 (74, 'Sara', 'Trajkovska', 'sara.trajkovska@medora.com', 4, 15, 15), 428 (75, 'Ivan', 'Dimov', 'ivan.dimov@medora.com', 5, 15, 15), 429 (76, 'Goran', 'Ristov', 'goran.ristov@medora.com', 1, 16, 16), 430 (77, 'Ivana', 'Kostadinova', 'ivana.kostadinova@medora.com', 2, 16, 16), 431 (78, 'Bojan', 'Petkov', 'bojan.petkov@medora.com', 3, 16, 16), 432 (79, 'Tea', 'Markovska', 'tea.markovska@medora.com', 4, 16, 16), 433 (80, 'Filip', 'Stojanov', 'filip.stojanov@medora.com', 5, 16, 16), 434 (81, 'Marija', 'Hristovska', 'marija.hristovska@medora.com', 1, 17, 17), 435 (82, 'Viktor', 'Iliev', 'viktor.iliev@medora.com', 2, 17, 17), 436 (83, 'Sofija', 'Petrovski', 'sofija.petrovski@medora.com', 3, 17, 17), 437 (84, 'Luka', 'Angelovska', 'luka.angelovska@medora.com', 4, 17, 17), 438 (85, 'Dimitar', 'Kirovski', 'dimitar.kirovski@medora.com', 5, 17, 17), 439 (86, 'Jana', 'Ristova', 'jana.ristova@medora.com', 1, 18, 18), 440 (87, 'Marko', 'Petrovic', 'marko.petrovic@medora.com', 2, 18, 18), 441 (88, 'Elena', 'Stojkovska', 'elena.stojkovska@medora.com', 3, 18, 18), 442 (89, 'Nikola', 'Trajkovic', 'nikola.trajkovic@medora.com', 4, 18, 18), 443 (90, 'Sara', 'Dimkovska', 'sara.dimkovska@medora.com', 5, 18, 18), 444 (91, 'Ivan', 'Spasov', 'ivan.spasov@medora.com', 1, 19, 19), 445 (92, 'Petar', 'Nikolov', 'petar.nikolov@medora.com', 2, 19, 19), 446 (93, 'Ana', 'Markovska', 'ana.markovska@medora.com', 3, 19, 19), 447 (94, 'Dejan', 'Iliev', 'dejan.iliev@medora.com', 4, 19, 19), 448 (95, 'Kristina', 'Petrova', 'kristina.petrova@medora.com', 5, 19, 19), 449 (96, 'Goran', 'Stojanovski', 'goran.stojanovski@medora.com', 1, 20, 20), 450 (97, 'Ivana', 'Hristova', 'ivana.hristova1@medora.com', 2, 20, 20), 451 (98, 'Bojan', 'Kostov', 'bojan.kostov@medora.com', 3, 20, 20), 452 (99, 'Tea', 'Petrovska', 'tea.petrovska@medora.com', 4, 20, 20), 453 (100, 'Filip', 'Ristovski', 'filip.ristovski@medora.com', 5, 20, 20), 454 (101, 'Marija', 'Angelovska', 'marija.angelovska@medora.com', 1, 21, 21), 455 (102, 'Viktor', 'Markovski', 'viktor.markovski@medora.com', 2, 21, 21), 456 (103, 'Sofija', 'Petrova', 'sofija.petrova@medora.com', 3, 21, 21), 457 (104, 'Luka', 'Ilievski', 'luka.ilievski@medora.com', 4, 21, 21), 458 (105, 'Dimitar', 'Stojanov', 'dimitar.stojanov@medora.com', 5, 21, 21), 459 (106, 'Jana', 'Kirovska', 'jana.kirovska@medora.com', 1, 22, 22), 460 (107, 'Marko', 'Petkov', 'marko.petkov@medora.com', 2, 22, 22), 461 (108, 'Elena', 'Ristova', 'elena.ristova@medora.com', 3, 22, 22), 462 (109, 'Nikola', 'Dimov', 'nikola.dimov@medora.com', 4, 22, 22), 463 (110, 'Sara', 'Nikolova', 'sara.nikolova@medora.com', 5, 22, 22), 464 (111, 'Ivan', 'Trajkov', 'ivan.trajkov@medora.com', 1, 23, 23), 465 (112, 'Petar', 'Stojkov', 'petar.stojkov@medora.com', 2, 23, 23), 466 (113, 'Ana', 'Petrovska', 'ana.petrovska1@medora.com', 3, 23, 23), 467 (114, 'Dejan', 'Markov', 'dejan.markov@medora.com', 4, 23, 23), 468 (115, 'Kristina', 'Ilieva', 'kristina.ilieva@medora.com', 5, 23, 23), 469 (116, 'Filip', 'Kostadinov', 'filip.kostadinov@medora.com', 1, 24, 24), 470 (117, 'Ivana', 'Spasova', 'ivana.spasova@medora.com', 2, 24, 24), 471 (118, 'Bojan', 'Petrovski', 'bojan.petrovski2@medora.com', 3, 24, 24), 472 (119, 'Teodora', 'Angelova', 'teodora.angelova@medora.com', 4, 24, 24), 473 (120, 'Mila', 'Lukanovska', 'mila.lukanovska@medora.com', 5, 24, 24); 474 475 476 INSERT INTO patients ( 477 patient_id, first_name, last_name, email_address, date_of_birth, 478 blood_type, gender, phone_number, embg 479 ) VALUES 480 (1, 'Maja', 'Veljanova', 'maja.veljanova@gmail.com', '1994-02-14', 'A+', 'FEMALE', '070111222', '1402994123456'), 481 (2, 'Kristijan', 'Bojkov', 'kristijan.bojkov@gmail.com', '1991-06-21', 'O-', 'MALE', '071222333', '2106991123457'), 482 (3, 'Tamara', 'Gorgieva', 'tamara.gorgieva@gmail.com', '2000-11-03', 'B+', 'FEMALE', '072333444', '0311000123458'), 483 (4, 'Aleks', 'Nikolovski', 'aleks.nikolovski@gmail.com', '1988-09-10', 'AB+', 'MALE', '073444555', '1009988123459'), 484 (5, 'Sara', 'Milevska', 'sara.milevska@gmail.com', '1997-12-25', 'A-', 'FEMALE', '074555666', '2512997123460'), 485 (6, 'Stefan', 'Arsovski', 'stefan.arsovski@gmail.com', '1993-04-18', 'O+', 'MALE', '075666777', '1804993123461'), 486 (7, 'Elena', 'Petreska', 'elena.petreska@gmail.com', '1999-07-09', 'B-', 'FEMALE', '076777888', '0907999123462'), 487 (8, 'Viktor', 'Stankov', 'viktor.stankov@gmail.com', '1990-01-30', 'A+', 'MALE', '077888999', '3001990123463'), 488 (9, 'Ivana', 'Dimitrova', 'ivana.dimitrova@gmail.com', '1995-05-12', 'O-', 'FEMALE', '078999111', '1205995123464'), 489 (10, 'Marko', 'Lazarevski', 'marko.lazarevski@gmail.com', '1987-08-22', 'AB-', 'MALE', '070123456', '2208987123465'), 490 (11, 'Jana', 'Trajkovska', 'jana.trajkovska@gmail.com', '2001-03-17', 'A+', 'FEMALE', '071234567', '1703001123466'), 491 (12, 'Petar', 'Kostov', 'petar.kostov@gmail.com', '1992-10-05', 'B+', 'MALE', '072345678', '0510992123467'), 492 (13, 'Ana', 'Ristova', 'ana.ristova@gmail.com', '1996-06-28', 'O+', 'FEMALE', '073456789', '2806996123468'), 493 (14, 'Nikola', 'Sokolov', 'nikola.sokolov@gmail.com', '1989-02-11', 'A-', 'MALE', '074567890', '1102989123469'), 494 (15, 'Mila', 'Petrova', 'mila.petrova@gmail.com', '2002-09-19', 'AB+', 'FEMALE', '075678901', '1909022123470'), 495 (16, 'Dejan', 'Ilievski', 'dejan.ilievski@gmail.com', '1994-11-11', 'O+', 'MALE', '076789012', '1111994123471'), 496 (17, 'Kristina', 'Markovska', 'kristina.markovska@gmail.com', '1998-01-14', 'B+', 'FEMALE', '077890123', '1401988123472'), 497 (18, 'Goran', 'Petrov', 'goran.petrov@gmail.com', '1986-07-07', 'A+', 'MALE', '078901234', '0707986123473'), 498 (19, 'Sofija', 'Nikolova', 'sofija.nikolova@gmail.com', '2000-12-02', 'O-', 'FEMALE', '070112233', '0212000123474'), 499 (20, 'Dimitar', 'Angelov', 'dimitar.angelov@gmail.com', '1991-03-03', 'B-', 'MALE', '071223344', '0303991123475'), 500 (21, 'Teodora', 'Hristova', 'teodora.hristova@gmail.com', '1997-08-08', 'A+', 'FEMALE', '072334455', '0808997123476'), 501 (22, 'Filip', 'Stojanov', 'filip.stojanov@gmail.com', '1993-05-15', 'AB+', 'MALE', '073445566', '1505993123477'), 502 (23, 'Marija', 'Kirovska', 'marija.kirovska@gmail.com', '1999-10-10', 'O+', 'FEMALE', '074556677', '1010999123478'), 503 (24, 'Ivan', 'Bojkov', 'ivan.bojkov@gmail.com', '1988-12-12', 'A-', 'MALE', '075667788', '1212988123479'), 504 (25, 'Lina', 'Petrovska', 'lina.petrovska@gmail.com', '2001-04-04', 'B+', 'FEMALE', '076778899', '0404001123480'), 505 (26, 'Bojan', 'Spasov', 'bojan.spasov@gmail.com', '1992-02-20', 'O+', 'MALE', '077889900', '2002992123481'), 506 (27, 'Ana', 'Dimovska', 'ana.dimovska@gmail.com', '1995-09-09', 'A+', 'FEMALE', '078990011', '0909995123482'), 507 (28, 'Vladimir', 'Ristovski', 'vladimir.ristovski@gmail.com', '1987-06-16', 'AB-', 'MALE', '070998877', '1606987123483'), 508 (29, 'Katerina', 'Todorova', 'katerina.todorova@gmail.com', '2003-01-01', 'O-', 'FEMALE', '071887766', '0101033123484'), 509 (30, 'Martin', 'Iliev', 'martin.iliev@gmail.com', '1990-11-23', 'B+', 'MALE', '072776655', '2311990123485'), 510 (31, 'Elena', 'Trajkov', 'elena.trajkov@gmail.com', '1996-03-13', 'A-', 'FEMALE', '073665544', '1303996123486'), 511 (32, 'Aleksandar', 'Petrovski', 'aleksandar.petrovski@gmail.com', '1994-07-27', 'O+', 'MALE', '074554433', '2707994123487'), 512 (33, 'Maja', 'Stojanovska', 'maja.stojanovska@gmail.com', '1998-09-18', 'B-', 'FEMALE', '075443322', '1809998123488'), 513 (34, 'Nikola', 'Gligorov', 'nikola.gligorov@gmail.com', '1989-05-05', 'A+', 'MALE', '076332211', '0505989123489'), 514 (35, 'Sara', 'Ilieva', 'sara.ilieva@gmail.com', '2002-12-12', 'AB+', 'FEMALE', '077221100', '1212022123490'), 515 (36, 'Petar', 'Markovski', 'petar.markovski@gmail.com', '1993-03-03', 'O+', 'MALE', '078110099', '0303993123491'), 516 (37, 'Ivana', 'Petrovska', 'ivana.petrovska@gmail.com', '1997-07-07', 'A-', 'FEMALE', '070223344', '0707997123492'), 517 (38, 'Goran', 'Nikolovski', 'goran.nikolovski@gmail.com', '1986-10-10', 'B+', 'MALE', '071334455', '1010986123493'), 518 (39, 'Jana', 'Ristova', 'jana.ristova@gmail.com', '2000-01-20', 'O-', 'FEMALE', '072445566', '2001000123494'); 519 520 521 522 INSERT INTO admin ( 523 admin_id, 524 username, 525 name, 526 lastname, 527 email 528 ) VALUES 529 (1, 'admin_ilija', 'Ilija', 'Stojanov', 'ilija.stojanov@adminmedora.com'), 530 (2, 'admin_elena', 'Elena', 'Kirova', 'elena.kirova@adminmedora.com'), 531 (3, 'admin_marjan', 'Marjan', 'Petrov', 'marjan.petrov@adminmedora.com'), 532 (4, 'admin_vesna', 'Vesna', 'Dimova', 'vesna.dimova@adminmedora.com'), 533 (5, 'admin_dushanka', 'Dushanka', 'Trajkovska', 'drushanka.trajkovska@adminmedora.com'); 534 535 536 INSERT INTO lab_technician ( 537 technician_id, 538 username, 539 name, 540 lastname, 541 email 542 ) VALUES 543 (1, 'lab_darko', 'Darko', 'Milosev', 'darko.milosev@labmedora.com'), 544 (2, 'lab_biljana', 'Biljana', 'Trajkovska', 'biljana.trajkovska@labmedora.com'), 545 (3, 'lab_stefan', 'Stefan', 'Nikolovski', 'stefan.nikolovski@labmedora.com'), 546 (4, 'lab_marina', 'Marina', 'Petreska', 'marina.petreska@labmedora.com'), 547 (5, 'lab_aleksandar', 'Aleksandar', 'Ristovski', 'aleksandar.ristovski@labmedora.com'); 548 549 550 551 INSERT INTO appointments ( 552 appointment_id, 553 appointment_date, 554 appointment_time, 555 status, 556 patient_id, 557 doctor_id 558 ) VALUES 559 (1, '2026-01-10', '09:00:00', 'SCHEDULED', 1, 6), 560 (2, '2026-01-10', '09:30:00', 'COMPLETED', 2, 12), 561 (3, '2026-01-11', '10:00:00', 'COMPLETED', 3, 18), 562 (4, '2026-01-11', '10:30:00', 'CANCELLED', 4, 24), 563 (5, '2026-01-12', '11:00:00', 'SCHEDULED', 5, 31), 564 (6, '2026-01-12', '11:30:00', 'COMPLETED', 6, 37), 565 (7, '2026-01-13', '12:00:00', 'IN_PROGRESS', 7, 43), 566 (8, '2026-01-13', '12:30:00', 'SCHEDULED', 8, 49), 567 (9, '2026-01-14', '13:00:00', 'COMPLETED', 9, 55), 568 (10, '2026-01-14', '13:30:00', 'SCHEDULED', 10, 61); 569 570 571 INSERT INTO diagnosis (diagnosis_id, name, description, patient_id, doctor_id) VALUES 572 (1, 'Essential hypertension', 'Persistent high blood pressure', 1, 1), 573 (2, 'Type 2 diabetes mellitus', 'Chronic glucose metabolism disorder', 1, 1), 574 (3, 'Acute bronchitis', 'Inflammation of bronchial tubes', 1, 1), 575 (4, 'Asthma', 'Chronic airway inflammation', 1, 1), 576 (5, 'Pneumonia', 'Lung infection', 1, 1), 577 (6, 'Chronic obstructive pulmonary disease', 'Progressive lung disease', 1, 1), 578 (7, 'Migraine', 'Recurrent severe headaches', 1, 1), 579 (8, 'Epilepsy', 'Neurological seizure disorder', 1, 1), 580 (9, 'Parkinson disease', 'Neurodegenerative movement disorder', 1, 1), 581 (10, 'Alzheimer disease', 'Progressive cognitive decline', 1, 1), 582 (11, 'Osteoarthritis', 'Degenerative joint disease', 1, 1), 583 (12, 'Rheumatoid arthritis', 'Autoimmune joint inflammation', 1, 1), 584 (13, 'Fracture of femur', 'Bone fracture of thigh', 1, 1), 585 (14, 'Lumbar disc herniation', 'Spinal disc displacement', 1, 1), 586 (15, 'Scoliosis', 'Abnormal spine curvature', 1, 1), 587 (16, 'Gastritis', 'Stomach lining inflammation', 1, 1), 588 (17, 'Peptic ulcer disease', 'Ulcer in stomach or duodenum', 1, 1), 589 (18, 'Gastroesophageal reflux disease', 'Acid reflux disorder', 1, 1), 590 (19, 'Appendicitis', 'Inflammation of appendix', 1, 1), 591 (20, 'Cholelithiasis', 'Gallstones', 1, 1), 592 (21, 'Acute kidney injury', 'Sudden kidney failure', 1, 1), 593 (22, 'Chronic kidney disease', 'Long-term kidney damage', 1, 1), 594 (23, 'Urinary tract infection', 'Bacterial urinary infection', 1, 1), 595 (24, 'Nephrotic syndrome', 'Kidney protein loss disorder', 1, 1), 596 (25, 'Kidney stone', 'Renal calculus', 1, 1), 597 (26, 'Breast cancer', 'Malignant tumor of breast', 1, 1), 598 (27, 'Lung cancer', 'Malignant lung tumor', 1, 1), 599 (28, 'Leukemia', 'Blood cancer', 1, 1), 600 (29, 'Lymphoma', 'Lymphatic system cancer', 1, 1), 601 (30, 'Skin melanoma', 'Malignant skin tumor', 1, 1), 602 (31, 'Atopic dermatitis', 'Chronic skin inflammation', 1, 1), 603 (32, 'Psoriasis', 'Autoimmune skin disorder', 1, 1), 604 (33, 'Acne vulgaris', 'Inflammatory skin condition', 1, 1), 605 (34, 'Urticaria', 'Allergic skin reaction', 1, 1), 606 (35, 'Cellulitis', 'Bacterial skin infection', 1, 1), 607 (36, 'Influenza', 'Viral respiratory infection', 1, 1), 608 (37, 'COVID-19', 'Coronavirus infection', 1, 1), 609 (38, 'Hepatitis B', 'Liver viral infection', 1, 1), 610 (39, 'Hepatitis C', 'Chronic liver infection', 1, 1), 611 (40, 'Tuberculosis', 'Mycobacterial infection', 1, 1), 612 (41, 'Anemia', 'Low red blood cell count', 1, 1), 613 (42, 'Iron deficiency anemia', 'Lack of iron in blood', 1, 1), 614 (43, 'Hemophilia', 'Blood clotting disorder', 1, 1), 615 (44, 'Thrombocytopenia', 'Low platelet count', 1, 1), 616 (45, 'Deep vein thrombosis', 'Blood clot in deep veins', 1, 1), 617 (46, 'Pulmonary embolism', 'Blocked lung artery', 1, 1), 618 (47, 'Hyperthyroidism', 'Overactive thyroid gland', 1, 1), 619 (48, 'Hypothyroidism', 'Underactive thyroid gland', 1, 1), 620 (49, 'Cushing syndrome', 'Excess cortisol production', 1, 1), 621 (50, 'Addison disease', 'Adrenal insufficiency', 1, 1), 622 (51, 'Depression', 'Mood disorder', 1, 1), 623 (52, 'Anxiety disorder', 'Chronic anxiety condition', 1, 1), 624 (53, 'Bipolar disorder', 'Mood instability disorder', 1, 1), 625 (54, 'Schizophrenia', 'Psychotic disorder', 1, 1), 626 (55, 'Insomnia', 'Sleep disorder', 1, 1), 627 (56, 'Sleep apnea', 'Breathing interruption during sleep', 1, 1), 628 (57, 'Otitis media', 'Middle ear infection', 1, 1), 629 (58, 'Tonsillitis', 'Tonsil inflammation', 1, 1), 630 (59, 'Sinusitis', 'Sinus infection', 1, 1), 631 (60, 'Hearing loss', 'Reduced hearing ability', 1, 1), 632 (61, 'Cataract', 'Eye lens clouding', 1, 1), 633 (62, 'Glaucoma', 'Optic nerve damage', 1, 1), 634 (63, 'Macular degeneration', 'Retinal deterioration', 1, 1), 635 (64, 'Conjunctivitis', 'Eye inflammation', 1, 1), 636 (65, 'Dry eye syndrome', 'Insufficient tear production', 1, 1), 637 (66, 'Obesity', 'Excess body fat', 1, 1), 638 (67, 'Metabolic syndrome', 'Cluster of metabolic disorders', 1, 1), 639 (68, 'Hyperlipidemia', 'High cholesterol levels', 1, 1), 640 (69, 'Vitamin D deficiency', 'Low vitamin D levels', 1, 1), 641 (70, 'Osteoporosis', 'Bone density loss', 1, 1), 642 (71, 'Gout', 'Uric acid crystal arthritis', 1, 1), 643 (72, 'Fibromyalgia', 'Chronic pain disorder', 1, 1), 644 (73, 'Multiple sclerosis', 'Autoimmune nerve disorder', 1, 1), 645 (74, 'Myocardial infarction', 'Heart attack', 1, 1), 646 (75, 'Heart failure', 'Reduced heart pumping function', 1, 1), 647 (76, 'Arrhythmia', 'Irregular heartbeat', 1, 1), 648 (77, 'Cardiomyopathy', 'Heart muscle disease', 1, 1), 649 (78, 'Endocarditis', 'Heart infection', 1, 1), 650 (79, 'Pericarditis', 'Heart lining inflammation', 1, 1), 651 (80, 'Atherosclerosis', 'Artery plaque buildup', 1, 1), 652 (81, 'Sepsis', 'Systemic infection response', 1, 1), 653 (82, 'Meningitis', 'Brain membrane infection', 1, 1), 654 (83, 'Encephalitis', 'Brain inflammation', 1, 1), 655 (84, 'Stroke', 'Brain blood flow interruption', 1, 1), 656 (85, 'Transient ischemic attack', 'Mini-stroke', 1, 1), 657 (86, 'Pancreatitis', 'Pancreas inflammation', 1, 1), 658 (87, 'Liver cirrhosis', 'Chronic liver damage', 1, 1), 659 (88, 'Fatty liver disease', 'Fat accumulation in liver', 1, 1), 660 (89, 'Cholecystitis', 'Gallbladder inflammation', 1, 1), 661 (90, 'Hernia', 'Organ protrusion through muscle', 1, 1), 662 (91, 'Eczema', 'Skin inflammation', 1, 1), 663 (92, 'Dermatitis', 'General skin irritation', 1, 1), 664 (93, 'Allergic rhinitis', 'Nasal allergy', 1, 1), 665 (94, 'Food allergy reaction', 'Immune response to food', 1, 1), 666 (95, 'Drug allergy reaction', 'Adverse medication reaction', 1, 1), 667 (96, 'Anaphylaxis', 'Severe allergic reaction', 1, 1), 668 (97, 'Heat stroke', 'Overheating condition', 1, 1), 669 (98, 'Hypothermia', 'Low body temperature', 1, 1), 670 (99, 'Dehydration', 'Fluid loss condition', 1, 1), 671 (100, 'Electrolyte imbalance', 'Disturbed mineral levels', 1, 1), 672 (101, 'Hypertensive crisis', 'Severely elevated blood pressure emergency', 1, 1), 673 (102, 'Stable angina', 'Chest pain due to reduced blood flow', 1, 1), 674 (103, 'Unstable angina', 'Acute coronary syndrome symptom', 1, 1), 675 (104, 'Atrial fibrillation', 'Irregular heart rhythm', 1, 1), 676 (105, 'Ventricular tachycardia', 'Fast abnormal heart rhythm', 1, 1), 677 (106, 'Bronchiectasis', 'Permanent airway dilation', 1, 1), 678 (107, 'Pleural effusion', 'Fluid in lung cavity', 1, 1), 679 (108, 'Pneumothorax', 'Collapsed lung', 1, 1), 680 (109, 'Pulmonary fibrosis', 'Lung tissue scarring', 1, 1), 681 (110, 'Respiratory failure', 'Inadequate oxygen exchange', 1, 1), 682 (111, 'Bell palsy', 'Facial nerve paralysis', 1, 1), 683 (112, 'Trigeminal neuralgia', 'Facial nerve pain disorder', 1, 1), 684 (113, 'Carpal tunnel syndrome', 'Median nerve compression', 1, 1), 685 (114, 'Peripheral neuropathy', 'Nerve damage disorder', 1, 1), 686 (115, 'Restless legs syndrome', 'Uncontrolled leg movement urge', 1, 1), 687 (116, 'Cervical spondylosis', 'Neck spine degeneration', 1, 1), 688 (117, 'Spinal stenosis', 'Narrowing of spinal canal', 1, 1), 689 (118, 'Sciatica', 'Sciatic nerve pain', 1, 1), 690 (119, 'Tension headache', 'Muscle contraction headache', 1, 1), 691 (120, 'Cluster headache', 'Severe recurring headaches', 1, 1), 692 (121, 'Crohn disease', 'Inflammatory bowel disease', 1, 1), 693 (122, 'Ulcerative colitis', 'Colon inflammation disease', 1, 1), 694 (123, 'Irritable bowel syndrome', 'Functional bowel disorder', 1, 1), 695 (124, 'Celiac disease', 'Gluten intolerance disorder', 1, 1), 696 (125, 'Lactose intolerance', 'Milk sugar digestion disorder', 1, 1), 697 (126, 'Hemorrhoids', 'Swollen rectal veins', 1, 1), 698 (127, 'Anal fissure', 'Small tear in anal lining', 1, 1), 699 (128, 'Diverticulitis', 'Colon pouch inflammation', 1, 1), 700 (129, 'Intestinal obstruction', 'Blocked bowel passage', 1, 1), 701 (130, 'Peritonitis', 'Abdominal cavity infection', 1, 1), 702 (131, 'Prostatitis', 'Prostate gland inflammation', 1, 1), 703 (132, 'Benign prostatic hyperplasia', 'Prostate enlargement', 1, 1), 704 (133, 'Erectile dysfunction', 'Male sexual dysfunction', 1, 1), 705 (134, 'End stage renal disease', 'Kidney failure stage 5', 1, 1), 706 (135, 'Glomerulonephritis', 'Kidney filter inflammation', 1, 1), 707 (136, 'Pyelonephritis', 'Kidney infection', 1, 1), 708 (137, 'Bladder cancer', 'Malignant bladder tumor', 1, 1), 709 (138, 'Testicular torsion', 'Twisted testicle condition', 1, 1), 710 (139, 'Ovarian cyst', 'Fluid-filled ovary sac', 1, 1), 711 (140, 'Endometriosis', 'Uterine tissue outside uterus', 1, 1), 712 (141, 'Thyroid nodule', 'Thyroid gland lump', 1, 1), 713 (142, 'Goiter', 'Thyroid enlargement', 1, 1), 714 (143, 'Hyperparathyroidism', 'Excess parathyroid hormone', 1, 1), 715 (144, 'Hypoparathyroidism', 'Low parathyroid function', 1, 1), 716 (145, 'Diabetic ketoacidosis', 'Diabetes metabolic emergency', 1, 1), 717 (146, 'Hypoglycemia', 'Low blood sugar', 1, 1), 718 (147, 'Hyperglycemia', 'High blood sugar', 1, 1), 719 (148, 'Metabolic acidosis', 'Excess acid in blood', 1, 1), 720 (149, 'Respiratory acidosis', 'CO2 buildup in blood', 1, 1), 721 (150, 'Respiratory alkalosis', 'Low CO2 in blood', 1, 1), 722 (151, 'Septic shock', 'Severe infection-induced shock', 1, 1), 723 (152, 'Systemic inflammatory response syndrome', 'Body-wide inflammation', 1, 1), 724 (153, 'Bacterial meningitis', 'Bacterial brain infection', 1, 1), 725 (154, 'Viral meningitis', 'Viral brain infection', 1, 1), 726 (155, 'Hepatic encephalopathy', 'Liver-related brain dysfunction', 1, 1), 727 (156, 'Alcoholic liver disease', 'Alcohol-related liver damage', 1, 1), 728 (157, 'Cholangitis', 'Bile duct infection', 1, 1), 729 (158, 'Pancreatic necrosis', 'Severe pancreatic tissue death', 1, 1), 730 (159, 'Gastroenteritis', 'Stomach and intestinal infection', 1, 1), 731 (160, 'Food poisoning', 'Toxin or bacteria ingestion illness', 1, 1), 732 (161, 'Psoriatic arthritis', 'Joint inflammation from psoriasis', 1, 1), 733 (162, 'Systemic lupus erythematosus', 'Autoimmune systemic disease', 1, 1), 734 (163, 'Scleroderma', 'Skin hardening autoimmune disease', 1, 1), 735 (164, 'Vasculitis', 'Blood vessel inflammation', 1, 1), 736 (165, 'Raynaud disease', 'Blood flow restriction in extremities', 1, 1), 737 (166, 'Cellulitis of leg', 'Skin bacterial infection in leg', 1, 1), 738 (167, 'Impetigo', 'Contagious skin infection', 1, 1), 739 (168, 'Herpes simplex infection', 'Viral skin infection', 1, 1), 740 (169, 'Shingles', 'Reactivation of chickenpox virus', 1, 1), 741 (170, 'Warts', 'HPV skin growths', 1, 1), 742 (171, 'Vitamin B12 deficiency', 'Low B12 levels', 1, 1), 743 (172, 'Folate deficiency', 'Low folic acid levels', 1, 1), 744 (173, 'Scurvy', 'Vitamin C deficiency disease', 1, 1), 745 (174, 'Rickets', 'Vitamin D deficiency in children', 1, 1), 746 (175, 'Osteomalacia', 'Softening of bones', 1, 1), 747 (176, 'Hypercalcemia', 'High calcium levels', 1, 1), 748 (177, 'Hypocalcemia', 'Low calcium levels', 1, 1), 749 (178, 'Hyponatremia', 'Low sodium levels', 1, 1), 750 (179, 'Hypernatremia', 'High sodium levels', 1, 1), 751 (180, 'Hypokalemia', 'Low potassium levels', 1, 1), 752 (181, 'Hyperkalemia', 'High potassium levels', 1, 1), 753 (182, 'Heat exhaustion', 'Heat-related illness', 1, 1), 754 (183, 'Frostbite', 'Cold-induced tissue damage', 1, 1), 755 (184, 'Carbon monoxide poisoning', 'Toxic gas exposure', 1, 1), 756 (185, 'Drug overdose', 'Excess medication intake', 1, 1), 757 (186, 'Alcohol poisoning', 'Toxic alcohol levels', 1, 1), 758 (187, 'Snake bite', 'Venomous bite injury', 1, 1), 759 (188, 'Animal bite infection', 'Infected bite wound', 1, 1), 760 (189, 'Tetanus', 'Bacterial muscle stiffness disease', 1, 1), 761 (190, 'Rabies exposure', 'Viral bite exposure', 1, 1), 762 (191, 'Acute stress disorder', 'Short-term trauma response', 1, 1), 763 (192, 'Post-traumatic stress disorder', 'Long-term trauma disorder', 1, 1), 764 (193, 'Panic disorder', 'Sudden anxiety attacks', 1, 1), 765 (194, 'Social anxiety disorder', 'Fear of social situations', 1, 1), 766 (195, 'Obsessive compulsive disorder', 'Repetitive thoughts/behavior', 1, 1), 767 (196, 'Attention deficit hyperactivity disorder', 'Attention regulation disorder', 1, 1), 768 (197, 'Autism spectrum disorder', 'Neurodevelopmental condition', 1, 1), 769 (198, 'Intellectual disability', 'Cognitive impairment condition', 1, 1), 770 (199, 'Sleepwalking', 'Parasomnia disorder', 1, 1), 771 (200, 'Night terrors', 'Severe sleep disturbance', 1, 1); 772 773 774 775 INSERT INTO procedures (procedure_id, procedure_type, procedure_date, description, cost, doctor_id, diagnosis_id) VALUES 776 (1, 'Spirometry', '2026-01-10', 'Lung function test measuring airflow', 50, 1, 4), 777 (2, 'Bronchoscopy', '2026-01-10', 'Endoscopic examination of airways', 200, 1, 4), 778 (3, 'Body plethysmography', '2026-01-11', 'Measurement of lung volumes', 180, 1, 5), 779 (4, 'Diffusion capacity test (DLCO)', '2026-01-11', 'Gas exchange efficiency test', 120, 1, 106), 780 (5, 'Peak flow measurement', '2026-01-12', 'Maximum exhalation speed test', 30, 1, 4), 781 (6, 'Blood gas analysis', '2026-01-12', 'Oxygen and CO2 level test', 70, 1, 5), 782 (7, 'Allergy testing', '2026-01-13', 'Identification of respiratory allergens', 90, 2, 94), 783 (8, 'Bronchodilator test', '2026-01-13', 'Asthma response test after medication', 80, 1, 4), 784 (9, 'ECG', '2026-01-14', 'Electrical heart activity recording', 40, 2, 74), 785 (10, 'Echocardiography', '2026-01-14', 'Ultrasound of the heart', 120, 2, 75), 786 (11, 'Stress test', '2026-01-15', 'Heart performance under exercise', 100, 2, 74), 787 (12, 'Holter ECG', '2026-01-15', '24h heart rhythm monitoring', 150, 2, 76), 788 (13, 'Blood pressure Holter', '2026-01-16', '24h blood pressure monitoring', 140, 2, 1), 789 (14, 'Cardiac catheterization', '2026-01-16', 'Invasive heart vessel examination', 600, 2, 74), 790 (15, 'Coronary angiography', '2026-01-17', 'Imaging of coronary arteries', 700, 2, 74), 791 (16, 'Transesophageal echo', '2026-01-17', 'Internal heart ultrasound', 300, 2, 75), 792 (17, 'EEG', '2026-01-18', 'Brain electrical activity test', 100, 3, 7), 793 (18, 'EMG', '2026-01-18', 'Muscle electrical activity test', 120, 3, 113), 794 (19, 'Evoked potentials', '2026-01-19', 'Nerve response measurement', 130, 3, 113), 795 (20, 'Lumbar puncture', '2026-01-19', 'CSF fluid collection from spine', 250, 3, 82), 796 (21, 'Nerve conduction study', '2026-01-20', 'Nerve signal speed test', 110, 3, 113), 797 (22, 'Carotid Doppler', '2026-01-20', 'Blood flow in neck arteries', 140, 3, 84), 798 (23, 'Arthroscopy', '2026-01-21', 'Joint inspection using camera', 500, 4, 11), 799 (24, 'Hip replacement', '2026-01-21', 'Surgical hip joint replacement', 5000, 4, 11), 800 (25, 'Knee replacement', '2026-01-22', 'Surgical knee joint replacement', 4800, 4, 11), 801 (26, 'Fracture fixation', '2026-01-22', 'Bone stabilization surgery', 1200, 4, 13), 802 (27, 'Ligament reconstruction', '2026-01-23', 'Repair of torn ligaments', 2500, 4, 11), 803 (28, 'Spine surgery', '2026-01-23', 'Surgical spinal intervention', 6000, 4, 14), 804 (29, 'Gynecological ultrasound', '2026-01-24', 'Ultrasound of female reproductive system', 80, 5, 139), 805 (30, 'Pap smear', '2026-01-24', 'Cervical cancer screening test', 60, 5, 31), 806 (31, 'Colposcopy', '2026-01-25', 'Detailed cervix examination', 120, 5, 31), 807 (32, 'Hysteroscopy', '2026-01-25', 'Uterine cavity inspection', 300, 5, 140), 808 (33, 'Laparoscopy', '2026-01-26', 'Minimally invasive abdominal surgery', 700, 5, 139), 809 (34, 'Cesarean section', '2026-01-26', 'Surgical delivery of baby', 1500, 5, 34), 810 (35, 'Delivery', '2026-01-27', 'Natural childbirth', 800, 5, 35), 811 (36, 'Cervical biopsy', '2026-01-27', 'Tissue sampling from cervix', 200, 5, 30), 812 (37, 'Audiometry', '2026-01-28', 'Hearing test', 50, 6, 60), 813 (38, 'Tympanometry', '2026-01-28', 'Middle ear function test', 60, 6, 57), 814 (39, 'Nasal endoscopy', '2026-01-29', 'Nasal cavity examination', 120, 6, 59), 815 (40, 'Laryngoscopy', '2026-01-29', 'Throat and voice box examination', 130, 6, 58), 816 (41, 'Tonsillectomy', '2026-01-30', 'Removal of tonsils', 400, 6, 58), 817 (42, 'Sinus surgery', '2026-01-30', 'Surgical sinus treatment', 1200, 6, 59), 818 (43, 'Vision exam', '2026-02-01', 'Eye vision testing', 40, 7, 60), 819 (44, 'Optical coherence tomography', '2026-02-01', 'Retina imaging', 150, 7, 63), 820 (45, 'Perimetry', '2026-02-02', 'Visual field test', 70, 7, 62), 821 (46, 'Cataract surgery', '2026-02-02', 'Lens replacement surgery', 2000, 7, 61), 822 (47, 'Laser eye surgery', '2026-02-03', 'Vision correction procedure', 2500, 7, 61), 823 (48, 'Complete blood count', '2026-02-03', 'Basic blood analysis', 30, 8, 41), 824 (49, 'Biochemistry panel', '2026-02-04', 'Blood chemical analysis', 50, 8, 2), 825 (50, 'Coagulation tests', '2026-02-04', 'Blood clotting tests', 60, 8, 43), 826 (51, 'Hormone tests', '2026-02-05', 'Hormonal level analysis', 80, 8, 47), 827 (52, 'Microbiology tests', '2026-02-05', 'Infection detection tests', 90, 8, 40), 828 (53, 'PCR test', '2026-02-06', 'DNA/RNA detection test', 100, 8, 36), 829 (54, 'X-ray', '2026-02-06', 'Basic imaging scan', 50, 9, 13), 830 (55, 'CT scan', '2026-02-07', 'Cross-sectional imaging', 200, 9, 13), 831 (56, 'MRI', '2026-02-07', 'Magnetic resonance imaging', 350, 9, 7), 832 (57, 'Ultrasound', '2026-02-08', 'Sound wave imaging', 70, 9, 139), 833 (58, 'Mammography', '2026-02-08', 'Breast imaging', 120, 9, 26), 834 (59, 'Interventional radiology', '2026-02-09', 'Image-guided procedures', 800, 9, 74), 835 (60, 'Gastroscopy', '2026-02-09', 'Stomach camera examination', 200, 10, 16), 836 (61, 'Colonoscopy', '2026-02-10', 'Colon examination', 300, 10, 121), 837 (62, 'Biopsy', '2026-02-10', 'Tissue sampling', 250, 10, 26), 838 (63, 'ERCP', '2026-02-11', 'Bile duct procedure', 600, 10, 20), 839 (64, 'Abdominal ultrasound', '2026-02-11', 'Abdominal organ imaging', 90, 9, 19), 840 (65, 'Urinary tract ultrasound', '2026-02-12', 'Kidney and bladder imaging', 90, 9, 23), 841 (66, 'Cystoscopy', '2026-02-12', 'Bladder examination', 200, 11, 23), 842 (67, 'Urodynamic testing', '2026-02-13', 'Urine flow analysis', 150, 11, 134), 843 (68, 'Lithotripsy', '2026-02-13', 'Kidney stone breaking', 500, 11, 25), 844 (69, 'TURP', '2026-02-14', 'Prostate surgery', 1200, 11, 131), 845 (70, 'Prostate biopsy', '2026-02-14', 'Prostate tissue sampling', 250, 11, 131), 846 (71, 'Hemodialysis', '2026-02-15', 'Blood cleaning procedure', 200, 12, 22), 847 (72, 'Peritoneal dialysis', '2026-02-15', 'Abdominal dialysis', 180, 12, 22), 848 (73, 'Kidney biopsy', '2026-02-16', 'Kidney tissue sampling', 300, 12, 21), 849 (74, 'Renal clearance tests', '2026-02-16', 'Kidney function tests', 100, 12, 22), 850 (75, 'Electrolyte tests', '2026-02-17', 'Blood mineral analysis', 60, 12, 100), 851 (76, 'Chemotherapy', '2026-02-17', 'Cancer drug treatment', 2000, 13, 26), 852 (77, 'Radiotherapy', '2026-02-18', 'Radiation cancer treatment', 2500, 13, 27), 853 (78, 'Tumor biopsy', '2026-02-18', 'Cancer tissue sampling', 400, 13, 26), 854 (79, 'PET scan', '2026-02-19', 'Cancer imaging scan', 900, 9, 26), 855 (80, 'Immunotherapy', '2026-02-19', 'Immune cancer treatment', 3000, 13, 28), 856 (81, 'Dermatological exam', '2026-02-20', 'Skin examination', 50, 14, 31), 857 (82, 'Dermatoscopy', '2026-02-20', 'Skin lesion imaging', 80, 14, 30), 858 (83, 'Skin biopsy', '2026-02-21', 'Skin tissue sampling', 200, 14, 31), 859 (84, 'Cryotherapy', '2026-02-21', 'Freezing skin treatment', 150, 14, 34), 860 (85, 'Laser treatments', '2026-02-22', 'Skin laser therapy', 500, 14, 34), 861 (86, 'Pediatric exam', '2026-02-22', 'Child medical checkup', 60, 15, 1), 862 (87, 'Vaccination', '2026-02-23', 'Immunization procedure', 40, 15, 1), 863 (88, 'Neonatal screening', '2026-02-23', 'Newborn testing', 100, 15, 1), 864 (89, 'Growth assessment', '2026-02-24', 'Child development check', 50, 15, 1), 865 (90, 'Psychiatric evaluation', '2026-02-24', 'Mental health assessment', 120, 16, 51), 866 (91, 'Psychotherapy', '2026-02-25', 'Therapy sessions', 100, 16, 51), 867 (92, 'Cognitive testing', '2026-02-25', 'Brain function testing', 80, 16, 54), 868 (93, 'Pharmacotherapy', '2026-02-26', 'Psychiatric medication treatment', 150, 16, 51), 869 (94, 'Physiotherapy', '2026-02-26', 'Physical rehabilitation treatment', 80, 17, 11), 870 (95, 'Kinesiotherapy', '2026-02-27', 'Movement-based therapy', 90, 17, 11), 871 (96, 'Electrotherapy', '2026-02-27', 'Electrical stimulation therapy', 70, 17, 72), 872 (97, 'Hydrotherapy', '2026-02-28', 'Water-based rehabilitation therapy', 100, 17, 72), 873 (98, 'Blood count', '2026-03-01', 'Detailed blood cell analysis', 40, 8, 41), 874 (99, 'Bone marrow biopsy', '2026-03-01', 'Bone marrow sampling', 400, 8, 43), 875 (100, 'Coagulation studies', '2026-03-02', 'Blood clotting analysis', 80, 8, 43), 876 (101, 'Blood transfusion', '2026-03-02', 'Transfer of blood products', 300, 8, 45), 877 (102, 'Serology tests', '2026-03-03', 'Antibody detection tests', 90, 8, 36), 878 (103, 'PCR diagnostics', '2026-03-03', 'Molecular infection detection', 120, 8, 40), 879 (104, 'Microbial cultures', '2026-03-04', 'Bacteria growth testing', 100, 8, 40), 880 (105, 'Antibiotic therapy', '2026-03-04', 'Infection treatment with antibiotics', 200, 1, 40), 881 (106, 'Brain surgery', '2026-03-05', 'Surgical brain intervention', 8000, 3, 82), 882 (107, 'Spine surgery', '2026-03-05', 'Surgical spinal operation', 7000, 4, 117), 883 (108, 'Tumor removal', '2026-03-06', 'Removal of brain tumors', 9000, 3, 82), 884 (109, 'Shunt procedure', '2026-03-06', 'CSF drainage surgery', 6000, 3, 82), 885 (110, 'CABG', '2026-03-07', 'Heart bypass surgery', 10000, 2, 74), 886 (111, 'Valve replacement', '2026-03-07', 'Heart valve surgery', 9500, 2, 75), 887 (112, 'Pacemaker implantation', '2026-03-08', 'Heart rhythm device installation', 5000, 2, 76), 888 (113, 'Reconstructive surgery', '2026-03-08', 'Restoration of body structures', 4000, 4, 35), 889 (114, 'Cosmetic surgery', '2026-03-09', 'Aesthetic body improvement', 3500, 14, 33), 890 (115, 'Liposuction', '2026-03-09', 'Fat removal procedure', 3000, 14, 66), 891 (116, 'Rhinoplasty', '2026-03-10', 'Nose reshaping surgery', 3200, 6, 35), 892 (117, 'Appendectomy', '2026-03-10', 'Appendix removal surgery', 1500, 10, 19), 893 (118, 'Hernia repair', '2026-03-11', 'Hernia correction surgery', 1800, 10, 90), 894 (119, 'Gallbladder removal', '2026-03-11', 'Cholecystectomy procedure', 2000, 10, 20), 895 (120, 'Surgical biopsy', '2026-03-12', 'Tissue sampling surgery', 900, 13, 26), 896 (121, 'Tooth extraction', '2026-03-12', 'Removal of tooth', 100, 18, 35), 897 (122, 'Dental filling', '2026-03-13', 'Cavity repair', 120, 18, 35), 898 (123, 'Dental implants', '2026-03-13', 'Artificial tooth implantation', 1500, 18, 35), 899 (124, 'Teeth cleaning', '2026-03-14', 'Dental plaque removal', 80, 18, 35); 900 901 902 INSERT INTO procedure_results ( 903 result_id, 904 result_description, 905 result_date, 906 procedure_id 907 ) VALUES 908 (1, 'Normal lung capacity detected', '2026-01-10', 1), 909 (2, 'Mild airway obstruction observed', '2026-01-11', 2), 910 (3, 'Reduced diffusion capacity detected', '2026-01-12', 4), 911 (4, 'Elevated blood pressure during stress test', '2026-01-13', 11), 912 (5, 'Normal cardiac rhythm recorded', '2026-01-14', 9), 913 (6, 'Abnormal EEG activity detected', '2026-01-15', 17), 914 (7, 'Reduced nerve conduction velocity', '2026-01-16', 21), 915 (8, 'Successful fracture stabilization', '2026-01-17', 26), 916 (9, 'Normal cervical screening result', '2026-01-18', 30), 917 (10, 'Moderate hearing loss detected', '2026-01-19', 37), 918 (11, 'Cataract successfully removed', '2026-01-20', 46), 919 (12, 'Elevated glucose levels detected', '2026-01-21', 48), 920 (13, 'No abnormalities on CT scan', '2026-01-22', 55), 921 (14, 'Gallstones successfully removed', '2026-01-23', 119), 922 (15, 'Kidney stones fragmented successfully', '2026-01-24', 68), 923 (16, 'Tumor biopsy confirmed malignant cells', '2026-01-25', 78), 924 (17, 'Skin lesion benign after biopsy', '2026-01-26', 83), 925 (18, 'Patient responded well to physiotherapy', '2026-01-27', 94), 926 (19, 'Successful pacemaker implantation', '2026-01-28', 112), 927 (20, 'Dental implant integrated successfully', '2026-01-29', 123); 928 929 INSERT INTO prescriptions (prescription_id, medication_name) VALUES 930 (1, 'Paracetamol'), 931 (2, 'Ibuprofen'), 932 (3, 'Amoxicillin'), 933 (4, 'Azithromycin'), 934 (5, 'Ciprofloxacin'), 935 (6, 'Metformin'), 936 (7, 'Insulin Glargine'), 937 (8, 'Atorvastatin'), 938 (9, 'Simvastatin'), 939 (10, 'Omeprazole'), 940 (11, 'Pantoprazole'), 941 (12, 'Ranitidine'), 942 (13, 'Lisinopril'), 943 (14, 'Amlodipine'), 944 (15, 'Losartan'), 945 (16, 'Bisoprolol'), 946 (17, 'Salbutamol'), 947 (18, 'Fluticasone'), 948 (19, 'Montelukast'), 949 (20, 'Cetirizine'), 950 (21, 'Loratadine'), 951 (22, 'Dexamethasone'), 952 (23, 'Prednisone'), 953 (24, 'Hydrocortisone'), 954 (25, 'Diclofenac'), 955 (26, 'Naproxen'), 956 (27, 'Tramadol'), 957 (28, 'Morphine'), 958 (29, 'Codeine'), 959 (30, 'Diazepam'), 960 (31, 'Lorazepam'), 961 (32, 'Alprazolam'), 962 (33, 'Sertraline'), 963 (34, 'Fluoxetine'), 964 (35, 'Citalopram'), 965 (36, 'Escitalopram'), 966 (37, 'Quetiapine'), 967 (38, 'Risperidone'), 968 (39, 'Haloperidol'), 969 (40, 'Levodopa'), 970 (41, 'Carbidopa'), 971 (42, 'Donepezil'), 972 (43, 'Memantine'), 973 (44, 'Gabapentin'), 974 (45, 'Pregabalin'), 975 (46, 'Carbamazepine'), 976 (47, 'Valproic acid'), 977 (48, 'Lamotrigine'), 978 (49, 'Clopidogrel'), 979 (50, 'Aspirin'), 980 (51, 'Warfarin'), 981 (52, 'Heparin'), 982 (53, 'Enoxaparin'), 983 (54, 'Furosemide'), 984 (55, 'Spironolactone'), 985 (56, 'Hydrochlorothiazide'), 986 (57, 'Digoxin'), 987 (58, 'Nitroglycerin'), 988 (59, 'Isosorbide mononitrate'), 989 (60, 'Sildenafil'), 990 (61, 'Tamsulosin'), 991 (62, 'Finasteride'), 992 (63, 'Dutasteride'), 993 (64, 'Levothyroxine'), 994 (65, 'Methimazole'), 995 (66, 'Propylthiouracil'), 996 (67, 'Metoclopramide'), 997 (68, 'Ondansetron'), 998 (69, 'Loperamide'), 999 (70, 'Lactulose'), 1000 (71, 'Rifaximin'), 1001 (72, 'Metronidazole'), 1002 (73, 'Vancomycin'), 1003 (74, 'Linezolid'), 1004 (75, 'Doxycycline'), 1005 (76, 'Tetracycline'), 1006 (77, 'Clarithromycin'), 1007 (78, 'Erythromycin'), 1008 (79, 'Nystatin'), 1009 (80, 'Fluconazole'), 1010 (81, 'Ketoconazole'), 1011 (82, 'Aciclovir'), 1012 (83, 'Valaciclovir'), 1013 (84, 'Oseltamivir'), 1014 (85, 'Zanamivir'), 1015 (86, 'Ribavirin'), 1016 (87, 'Interferon alfa'), 1017 (88, 'Methotrexate'), 1018 (89, 'Cyclophosphamide'), 1019 (90, 'Cisplatin'), 1020 (91, 'Doxorubicin'), 1021 (92, 'Imatinib'), 1022 (93, 'Trastuzumab'), 1023 (94, 'Bevacizumab'), 1024 (95, 'Epoetin alfa'), 1025 (96, 'Filgrastim'), 1026 (97, 'Calcium carbonate'), 1027 (98, 'Vitamin D3'), 1028 (99, 'Iron sulfate'), 1029 (100, 'Magnesium sulfate'); 1030 1031 1032 INSERT INTO prescription_restriction (restriction_id, description, prescription_id) VALUES 1033 (1, 'Avoid use in patients with severe liver disease', 1), 1034 (2, 'Do not exceed maximum daily dose', 1), 1035 (3, 'Avoid in patients with active stomach ulcer', 2), 1036 (4, 'Use with caution in elderly patients', 2), 1037 (5, 'Contraindicated in penicillin allergy', 3), 1038 (6, 'Avoid in patients with severe kidney impairment', 5), 1039 (7, 'Monitor blood glucose regularly', 6), 1040 (8, 'Risk of hypoglycemia if meals are skipped', 7), 1041 (9, 'Not recommended during pregnancy', 8), 1042 (10, 'Avoid grapefruit juice consumption', 8), 1043 (11, 'May cause stomach irritation', 10), 1044 (12, 'Take before meals for better absorption', 10), 1045 (13, 'Do not stop abruptly without doctor supervision', 14), 1046 (14, 'Monitor blood pressure regularly', 15), 1047 (15, 'May cause dizziness or fatigue', 16), 1048 (16, 'Use with caution in asthma patients', 17), 1049 (17, 'Avoid sudden discontinuation', 18), 1050 (18, 'May cause drowsiness', 19), 1051 (19, 'Do not drive after administration', 30), 1052 (20, 'Avoid alcohol consumption', 30), 1053 (21, 'Risk of dependency with long-term use', 31), 1054 (22, 'Use only for short-term treatment', 31), 1055 (23, 'May increase suicidal thoughts in young patients', 33), 1056 (24, 'Requires regular liver function monitoring', 34), 1057 (25, 'Can cause weight gain', 37), 1058 (26, 'Avoid in Parkinson disease patients', 39), 1059 (27, 'May cause tremors or rigidity worsening', 40), 1060 (28, 'Monitor heart rate regularly', 49), 1061 (29, 'Risk of bleeding increases with NSAIDs', 50), 1062 (30, 'Avoid in pregnancy unless necessary', 51); 1063 1064 1065 INSERT INTO lab_tests (test_id, test_name, description, cost) VALUES 1066 (1, 'Blood test', 'General blood analysis', 30), 1067 (2, 'Urine test', 'Urinalysis examination', 25), 1068 (3, 'Hormone test', 'Endocrine hormone evaluation', 80); 1069 1070 1071 INSERT INTO lab_results (result_id, results, result_date, test_id) VALUES 1072 (1, 'WBC 6.2 x10^9/L | RBC 4.7 x10^12/L | Hemoglobin 14.1 g/dL | Hematocrit 42% | Platelets 240 x10^9/L | MCV 88 fL | MCH 29 pg | MCHC 33 g/dL | Glucose 92 mg/dL | Sodium 140 mmol/L | Potassium 4.2 mmol/L | Chloride 103 mmol/L | Bicarbonate 24 mmol/L | BUN 14 mg/dL | Creatinine 0.9 mg/dL | Albumin 4.3 g/dL | Total protein 7.1 g/dL | ALT 22 U/L | AST 20 U/L | ALP 85 U/L | Bilirubin 0.8 mg/dL | Total cholesterol 180 mg/dL | LDL 110 mg/dL | HDL 55 mg/dL | Triglycerides 130 mg/dL', '2026-05-10', 1), 1073 (2, 'WBC 7.5 x10^9/L | RBC 4.1 x10^12/L | Hemoglobin 12.3 g/dL | Hematocrit 38% | Platelets 220 x10^9/L | MCV 85 fL | MCH 27 pg | MCHC 32 g/dL | Glucose 105 mg/dL | Sodium 138 mmol/L | Potassium 4.5 mmol/L | Chloride 101 mmol/L | Bicarbonate 23 mmol/L | BUN 18 mg/dL | Creatinine 1.1 mg/dL | Albumin 4.0 g/dL | ALT 30 U/L | AST 28 U/L | Total cholesterol 210 mg/dL | LDL 140 mg/dL | HDL 42 mg/dL | Triglycerides 180 mg/dL', '2026-05-09', 1), 1074 (3, 'WBC 5.8 x10^9/L | RBC 5.0 x10^12/L | Hemoglobin 15.0 g/dL | Hematocrit 45% | Platelets 260 x10^9/L | MCV 90 fL | MCH 30 pg | MCHC 34 g/dL | Glucose 88 mg/dL | Sodium 141 mmol/L | Potassium 4.0 mmol/L | Chloride 102 mmol/L | Bicarbonate 25 mmol/L | BUN 12 mg/dL | Creatinine 0.8 mg/dL | Albumin 4.5 g/dL | ALT 18 U/L | AST 19 U/L | Total cholesterol 170 mg/dL | LDL 100 mg/dL | HDL 60 mg/dL | Triglycerides 110 mg/dL', '2026-05-08', 1), 1075 (11, 'TSH 2.1 mIU/L | Free T4 1.2 ng/dL | Free T3 3.2 pg/mL | Testosterone 520 ng/dL | Estradiol 35 pg/mL | Progesterone 1.2 ng/mL | FSH 6 IU/L | LH 5 IU/L | SHBG 40 nmol/L | Cortisol 14 µg/dL | DHEA-S 280 µg/dL | Insulin 8 µIU/mL | Prolactin 12 ng/mL | AMH 3.1 ng/mL', '2026-05-10', 3), 1076 (12, 'TSH 6.5 mIU/L | Free T4 0.7 ng/dL | Free T3 2.0 pg/mL | Testosterone 380 ng/dL | Estradiol 20 pg/mL | Progesterone 0.8 ng/mL | FSH 9 IU/L | LH 7 IU/L | SHBG 55 nmol/L | Cortisol 10 µg/dL | DHEA-S 180 µg/dL | Insulin 14 µIU/mL | Prolactin 18 ng/mL | AMH 1.8 ng/mL', '2026-05-09', 3), 1077 (13, 'TSH 1.8 mIU/L | Free T4 1.3 ng/dL | Free T3 3.5 pg/mL | Testosterone 610 ng/dL | Estradiol 40 pg/mL | Progesterone 1.5 ng/mL | FSH 5 IU/L | LH 4 IU/L | SHBG 38 nmol/L | Cortisol 22 µg/dL | DHEA-S 320 µg/dL | Insulin 6 µIU/mL | Prolactin 10 ng/mL | AMH 4.0 ng/mL', '2026-05-08', 3), 1078 (6, 'pH 6.0 | Specific gravity 1.020 | Protein negative | Glucose negative | Ketones negative | RBC none | WBC 0-2/hpf | Bacteria none', '2026-05-10', 2), 1079 (7, 'pH 5.5 | Specific gravity 1.030 | Trace protein | Glucose negative | Ketones negative | WBC 5-10/hpf | Mild bacteriuria', '2026-05-09', 2), 1080 (8, 'pH 6.2 | Specific gravity 1.015 | Protein negative | Glucose negative | Ketones negative | Normal sediment', '2026-05-08', 2), 1081 (9, 'pH 5.8 | Specific gravity 1.025 | Leukocytes ++ | Nitrites positive | Bacteria present | UTI suspected', '2026-05-07', 2), 1082 (10, 'pH 6.0 | Specific gravity 1.018 | RBC trace | Protein negative | Glucose negative | Further evaluation required', '2026-05-06', 2); 1083 1084 1085 INSERT INTO medical_records (record_id, patient_id) VALUES 1086 (1, 1), 1087 (2, 2), 1088 (3, 3), 1089 (4, 4), 1090 (5, 5), 1091 (6, 6), 1092 (7, 7), 1093 (8, 8), 1094 (9, 9), 1095 (10, 10), 1096 (11, 11), 1097 (12, 12), 1098 (13, 13), 1099 (14, 14), 1100 (15, 15); 1101 1102 1103 INSERT INTO referrals (referral_id, reason, referral_date, record_id, from_doctor_id, to_doctor_id) VALUES 1104 (1, 'Suspected cardiac condition requiring specialist evaluation', '2026-05-10', 3, 1, 5), 1105 (2, 'Neurological symptoms and recurrent headaches', '2026-05-09', 6, 2, 8), 1106 (3, 'Persistent respiratory issues for pulmonology review', '2026-05-08', 1, 3, 6), 1107 (4, 'Orthopedic follow-up for post-surgery assessment', '2026-05-07', 4, 4, 7), 1108 (5, 'Suspected endocrine disorder requiring hormone testing', '2026-05-06', 10, 5, 9), 1109 (6, 'Dermatological evaluation for chronic skin rash', '2026-05-05', 8, 6, 10), 1110 (7, 'Pediatric developmental concern check', '2026-05-04', 7, 7, 11), 1111 (8, 'Gastrointestinal pain requiring endoscopy', '2026-05-03', 9, 8, 12), 1112 (9, 'Abnormal lab results requiring hematology review', '2026-05-02', 10, 9, 13), 1113 (10, 'Possible kidney dysfunction requiring nephrology assessment', '2026-05-01', 10, 10, 14); 1114 1115 1116 INSERT INTO medical_report (report_id, description, report_date, record_id, doctor_id) VALUES 1117 (1, 'Pulmonary function assessment confirms mild asthma. Recommended inhaler therapy.', '2026-05-10', 1, 3), 1118 (2, 'Cardiology report indicates elevated blood pressure and possible hypertension.', '2026-05-09', 2, 1), 1119 (3, 'Neurological evaluation shows no acute abnormalities. Follow-up recommended.', '2026-05-08', 6, 2), 1120 (4, 'Orthopedic post-surgery report shows stable recovery and good mobility.', '2026-05-07', 4, 4), 1121 (5, 'Gynecological report: normal ultrasound findings, no pathological changes.', '2026-05-06', 5, 5), 1122 (6, 'Dermatology report confirms allergic dermatitis. Topical treatment prescribed.', '2026-05-05', 8, 6), 1123 (7, 'Pediatric assessment: normal growth and development indicators.', '2026-05-04', 7, 7), 1124 (8, 'Gastroenterology report suggests possible gastritis. Further endoscopy advised.', '2026-05-03', 9, 8), 1125 (9, 'Laboratory review indicates mild iron deficiency anemia.', '2026-05-02', 10, 9), 1126 (10, 'Nephrology report suggests early signs of reduced kidney function.', '2026-05-01', 10, 10); 1127 1128 1129 INSERT INTO billing (bill_id, total_cost, payment_status, payment_date, record_id, admin_id) VALUES 1130 (1, 230, 'PAID', '2026-05-11', 1, 1), 1131 (2, 340, 'PENDING', NULL, 2, 1), 1132 (3, 900, 'PAID', '2026-05-10', 3, 2), 1133 (4, 5200, 'PAID', '2026-05-09', 4, 1), 1134 (5, 180, 'PAID', '2026-05-08', 5, 3), 1135 (6, 420, 'PENDING', NULL, 6, 2), 1136 (7, 160, 'PAID', '2026-05-07', 7, 3), 1137 (8, 780, 'PENDING', NULL, 8, 1), 1138 (9, 250, 'PAID', '2026-05-06', 9, 2), 1139 (10, 610, 'PENDING', NULL, 10, 3); 1140 1141 1142 INSERT INTO patient_allergies (patient_id, allergy_id) VALUES 1143 -- Patient 1 allergies 1144 (1, 1), -- Penicillin 1145 (1, 3), -- Dust 1146 -- Patient 2 allergies 1147 (2, 2), -- Peanuts 1148 (2, 5), -- Pollen 1149 -- Patient 3 allergies 1150 (3, 4), -- Lactose 1151 -- Patient 4 allergies 1152 (4, 1), -- Penicillin 1153 (4, 6), -- Bee sting 1154 -- Patient 5 allergies 1155 (5, 3), -- Dust 1156 (5, 2), -- Peanuts 1157 -- Patient 6 allergies 1158 (6, 7), -- Shellfish 1159 -- Patient 7 allergies 1160 (7, 5), -- Pollen 1161 (7, 8), -- Latex 1162 -- Patient 8 allergies 1163 (8, 4), -- Lactose 1164 (8, 1), -- Penicillin 1165 -- Patient 9 allergies 1166 (9, 6), -- Bee sting 1167 -- Patient 10 allergies 1168 (10, 2); -- Peanuts 1169 1170 1171 INSERT INTO allergy_prescription_restrictions (allergy_id, restriction_id) VALUES 1172 -- Penicillin allergy restrictions 1173 (1, 1), -- avoid Amoxicillin-based drugs 1174 (1, 2), -- avoid Ampicillin-based drugs 1175 -- Peanuts allergy restrictions 1176 (2, 3), -- avoid capsule-based allergens 1177 (2, 4), -- avoid certain oral suspensions with traces 1178 -- Dust allergy restrictions 1179 (3, 5), -- avoid inhaled powder medications 1180 -- Lactose allergy restrictions 1181 (4, 6), -- avoid lactose-containing tablets 1182 -- Pollen allergy restrictions 1183 (5, 5), -- avoid inhalation-based medications 1184 -- Bee sting allergy restrictions 1185 (6, 7), -- avoid adrenaline-triggering compounds unless emergency 1186 (6, 8), -- caution with immunotherapy drugs 1187 -- Shellfish allergy restrictions 1188 (7, 3), -- capsule-based restrictions (gelatin overlap) 1189 (7, 9), -- contrast media precaution 1190 -- Latex allergy restrictions 1191 (8, 10), -- avoid latex-containing medical devices 1192 -- Mixed severe allergies 1193 (1, 6), 1194 (2, 6), 1195 (3, 10); 1196 1197 1198 INSERT INTO patient_symptoms (patient_id, symptom_id) VALUES 1199 -- Patient 1 1200 (1, 1), -- Fever 1201 (1, 2), -- Cough 1202 (1, 5), -- Fatigue 1203 -- Patient 2 1204 (2, 3), -- Headache 1205 (2, 4), -- Sore throat 1206 -- Patient 3 1207 (3, 6), -- Shortness of breath 1208 (3, 2), -- Cough 1209 -- Patient 4 1210 (4, 7), -- Chest pain 1211 (4, 5), -- Fatigue 1212 -- Patient 5 1213 (5, 8), -- Nausea 1214 (5, 9), -- Dizziness 1215 -- Patient 6 1216 (6, 1), -- Fever 1217 (6, 6), -- Shortness of breath 1218 -- Patient 7 1219 (7, 10), -- Joint pain 1220 (7, 5), -- Fatigue 1221 -- Patient 8 1222 (8, 3), -- Headache 1223 (8, 9), -- Dizziness 1224 -- Patient 9 1225 (9, 4), -- Sore throat 1226 (9, 2), -- Cough 1227 -- Patient 10 1228 (10, 11), -- Skin rash 1229 (10, 5); -- Fatigue 1230 1231 INSERT INTO diagnosis_symptoms (diagnosis_id, symptom_id) VALUES 1232 (1,1), 1233 (1,2), 1234 (1,5), 1235 (2,3), 1236 (2,4), 1237 (3,6), 1238 (3,2), 1239 (4,7), 1240 (4,5), 1241 (5,8), 1242 (5,9), 1243 (6,1), 1244 (6,6), 1245 (7,10), 1246 (7,5), 1247 (8,3), 1248 (8,9), 1249 (9,4), 1250 (9,2), 1251 (10,11), 1252 (10,5); 1253 1254 INSERT INTO specialization_procedures (specialization_id, procedure_id) VALUES 1255 (1,1), 1256 (1,2), 1257 (1,3), 1258 (2,4), 1259 (2,5), 1260 (2,6), 1261 (3,7), 1262 (3,8), 1263 (3,9), 1264 (4,10), 1265 (4,11), 1266 (4,12), 1267 (5,13), 1268 (5,14), 1269 (5,15), 1270 (6,16), 1271 (6,17), 1272 (6,18), 1273 (7,19), 1274 (7,20); 1275 1276 INSERT INTO diagnosis_procedures (diagnosis_id, procedure_id) VALUES 1277 (1,1), 1278 (1,2), 1279 (2,3), 1280 (2,4), 1281 (3,5), 1282 (3,6), 1283 (4,7), 1284 (4,8), 1285 (5,9), 1286 (5,10), 1287 (6,11), 1288 (6,12), 1289 (7,13), 1290 (7,14), 1291 (8,15), 1292 (8,16), 1293 (9,17), 1294 (9,18), 1295 (10,19), 1296 (10,20); 1297 1298 INSERT INTO department_procedures (department_id, procedure_id) VALUES 1299 (1,1), 1300 (1,2), 1301 (1,3), 1302 (2,4), 1303 (2,5), 1304 (2,6), 1305 (3,7), 1306 (3,8), 1307 (3,9), 1308 (4,10), 1309 (4,11), 1310 (4,12), 1311 (5,13), 1312 (5,14), 1313 (5,15), 1314 (6,16), 1315 (6,17), 1316 (6,18), 1317 (7,19), 1318 (7,20); 1319 1320 INSERT INTO billing_procedures (bill_id, procedure_id) VALUES 1321 (1,1), 1322 (1,2), 1323 (1,3), 1324 (2,4), 1325 (2,5), 1326 (2,6), 1327 (3,7), 1328 (3,8), 1329 (3,9), 1330 (4,10), 1331 (4,11), 1332 (4,12), 1333 (5,13), 1334 (5,14), 1335 (5,15), 1336 (6,16), 1337 (6,17), 1338 (6,18), 1339 (7,19), 1340 (7,20); 1341 1342 INSERT INTO billing_lab_tests (bill_id, test_id) VALUES 1343 (1,1), 1344 (1,2), 1345 (1,3), 1346 (2,1), 1347 (2,2), 1348 (2,3), 1349 (3,1), 1350 (3,2), 1351 (4,2), 1352 (4,3), 1353 (5,1), 1354 (5,3), 1355 (6,2), 1356 (6,3), 1357 (7,1), 1358 (7,2), 1359 (8,3), 1360 (9,1), 1361 (10,2); 1362 1363 INSERT INTO doctor_medical_records (doctor_id, record_id) VALUES 1364 (1,1), 1365 (1,2), 1366 (1,3), 1367 (2,4), 1368 (2,5), 1369 (2,6), 1370 (3,7), 1371 (3,8), 1372 (3,9), 1373 (4,10), 1374 (4,11), 1375 (5,12), 1376 (5,13), 1377 (6,14), 1378 (6,15); 1379 1380 INSERT INTO diagnosis_medical_records (diagnosis_id, record_id) VALUES 1381 (1,1), 1382 (2,2), 1383 (3,3), 1384 (4,4), 1385 (5,5), 1386 (6,6), 1387 (7,7), 1388 (8,8), 1389 (9,9), 1390 (10,10), 1391 (1,11), 1392 (2,12), 1393 (3,13), 1394 (4,14), 1395 (5,15); 1396 1397 1398 INSERT INTO prescription_medical_records (prescription_id, record_id, dosage, frequency, duration, notes) VALUES 1399 (1,1,'500mg','Twice daily','7 days','Take after meals'), 1400 (2,2,'250mg','Once daily','5 days','Mild infection treatment'), 1401 (3,3,'10mg','Once daily','10 days','Monitor blood pressure'), 1402 (4,4,'20mg','Once daily','14 days','Use in morning'), 1403 (5,5,'5mg','Twice daily','7 days','Short term therapy'), 1404 (6,6,'1 tablet','Once daily','30 days','Chronic management'), 1405 (7,7,'2 puffs','As needed','14 days','Respiratory relief'), 1406 (8,8,'50mg','Once daily','5 days','Anti-inflammatory'), 1407 (9,9,'100mg','Twice daily','10 days','Pain management'), 1408 (10,10,'1 dose','Once daily','3 days','Acute condition'), 1409 (1,11,'500mg','Twice daily','7 days','Repeat treatment'), 1410 (2,12,'250mg','Once daily','5 days','Follow-up course'), 1411 (3,13,'10mg','Once daily','10 days','Stable condition'), 1412 (4,14,'20mg','Once daily','14 days','Adjusted dosage'), 1413 (5,15,'5mg','Twice daily','7 days','Monitor response'); 1414 1415 1416 INSERT INTO medical_report_lab_results (report_id, result_id) VALUES 1417 (1,1), 1418 (1,2), 1419 (1,3), 1420 (2,1), 1421 (2,2), 1422 (3,3), 1423 (3,1), 1424 (4,2), 1425 (4,3), 1426 (5,1), 1427 (6,2), 1428 (7,3), 1429 (8,1), 1430 (9,2), 1431 (10,3); 1432 1433 INSERT INTO performed_procedures (performed_id, procedure_id, doctor_id, patient_id, diagnosis_id, procedure_date, notes) VALUES 1434 (1,1,1,1,1,'2026-05-01','Routine procedure completed successfully'), 1435 (2,2,1,2,2,'2026-05-02','No complications'), 1436 (3,3,2,3,3,'2026-05-03','Patient stable during procedure'), 1437 (4,4,2,4,4,'2026-05-04','Follow-up recommended'), 1438 (5,5,3,5,5,'2026-05-05','Procedure successful'), 1439 (6,6,3,6,6,'2026-05-06','Mild post-op observation'), 1440 (7,7,4,7,7,'2026-05-07','No issues detected'), 1441 (8,8,4,8,8,'2026-05-08','Standard recovery'), 1442 (9,9,5,9,9,'2026-05-09','Patient responded well'), 1443 (10,10,5,10,10,'2026-05-10','Stable condition'), 1444 (11,11,6,1,1,'2026-05-11','Additional procedure done'), 1445 (12,12,6,2,2,'2026-05-12','Routine check'), 1446 (13,13,7,3,3,'2026-05-13','No complications'), 1447 (14,14,7,4,4,'2026-05-14','Observation required'), 1448 (15,15,8,5,5,'2026-05-15','Procedure completed'), 1449 (16,16,8,6,6,'2026-05-16','Patient recovered well'), 1450 (17,17,9,7,7,'2026-05-17','Stable vitals'), 1451 (18,18,9,8,8,'2026-05-18','Minor discomfort reported'), 1452 (19,19,10,9,9,'2026-05-19','All normal'), 1453 (20,20,10,10,10,'2026-05-20','Discharged after procedure'); 1454 1455 INSERT INTO performed_lab_tests (performed_test_id, test_id, patient_id, doctor_id, technician_id, test_date, notes) VALUES 1456 (1,1,1,1,1,'2026-05-01','Blood test routine check'), 1457 (2,2,2,2,1,'2026-05-02','Urine infection screening'), 1458 (3,3,3,3,2,'2026-05-03','Hormone imbalance check'), 1459 (4,1,4,1,2,'2026-05-04','CBC follow-up'), 1460 (5,2,5,2,3,'2026-05-05','Urine analysis repeat'), 1461 (6,3,6,3,3,'2026-05-06','Hormone panel evaluation'), 1462 (7,1,7,4,1,'2026-05-07','General blood screening'), 1463 (8,2,8,5,2,'2026-05-08','UTI suspicion test'), 1464 (9,3,9,6,3,'2026-05-09','Endocrine evaluation'), 1465 (10,1,10,7,1,'2026-05-10','Blood count check'), 1466 (11,2,1,8,2,'2026-05-11','Kidney/urine check'), 1467 (12,3,2,9,3,'2026-05-12','Thyroid hormone test'), 1468 (13,1,3,10,1,'2026-05-13','Routine blood panel'), 1469 (14,2,4,1,2,'2026-05-14','Urine follow-up'), 1470 (15,3,5,2,3,'2026-05-15','Hormone monitoring'), 1471 (16,1,6,3,1,'2026-05-16','CBC repeat test'), 1472 (17,2,7,4,2,'2026-05-17','Urine culture'), 1473 (18,3,8,5,3,'2026-05-18','Hormone levels check'), 1474 (19,1,9,6,1,'2026-05-19','Inflammation blood test'), 1475 (20,2,10,7,2,'2026-05-20','Routine urinalysis'); 1476 1477 INSERT INTO medical_record_lab_results (record_id, result_id) VALUES 1478 (1,1), 1479 (1,2), 1480 (1,3), 1481 (2,1), 1482 (2,2), 1483 (2,3), 1484 (3,1), 1485 (3,2), 1486 (4,1), 1487 (4,2), 1488 (5,3), 1489 (6,1), 1490 (7,2), 1491 (8,3), 1492 (9,1), 1493 (10,2); 1494 1495 INSERT INTO medical_record_procedures (record_id, procedure_id) VALUES 1496 (1,1), 1497 (1,2), 1498 (1,3), 1499 (2,4), 1500 (2,5), 1501 (2,6), 1502 (3,7), 1503 (3,8), 1504 (3,9), 1505 (4,10), 1506 (4,11), 1507 (4,12), 1508 (5,13), 1509 (5,14), 1510 (5,15), 1511 (6,16), 1512 (6,17), 1513 (6,18), 1514 (7,19), 1515 (7,20), 1516 (8,1), 1517 (8,2), 1518 (9,3), 1519 (9,4), 1520 (10,5), 1521 (10,6); 1522 1523 INSERT INTO medical_record_symptoms (record_id, symptom_id, severity) VALUES 1524 (1,1,'HIGH'), 1525 (1,2,'MEDIUM'), 1526 (1,5,'LOW'), 1527 (2,3,'MEDIUM'), 1528 (2,4,'LOW'), 1529 (3,6,'HIGH'), 1530 (3,2,'MEDIUM'), 1531 (4,7,'HIGH'), 1532 (4,5,'MEDIUM'), 1533 (5,8,'LOW'), 1534 (5,9,'MEDIUM'), 1535 (6,1,'HIGH'), 1536 (6,6,'HIGH'), 1537 (7,10,'MEDIUM'), 1538 (7,5,'LOW'), 1539 (8,3,'MEDIUM'), 1540 (8,9,'LOW'), 1541 (9,4,'MEDIUM'), 1542 (9,2,'LOW'), 1543 (10,11,'LOW'), 1544 (10,5,'MEDIUM'); 1545 1546 INSERT INTO medical_record_allergies (record_id, allergy_id, reaction, severity) VALUES 1547 (1,1,'Rash','HIGH'), 1548 (1,2,'Swelling','MEDIUM'), 1549 (2,3,'Sneezing','LOW'), 1550 (2,4,'Skin irritation','MEDIUM'), 1551 (3,5,'Coughing','MEDIUM'), 1552 (3,6,'Breathing difficulty','HIGH'), 1553 (4,7,'Nausea','LOW'), 1554 (4,8,'Itching','MEDIUM'), 1555 (5,1,'Hives','HIGH'), 1556 (5,3,'Mild reaction','LOW'), 1557 (6,2,'Swelling','HIGH'), 1558 (6,4,'Skin redness','MEDIUM'), 1559 (7,5,'Respiratory reaction','HIGH'), 1560 (7,6,'Fatigue','MEDIUM'), 1561 (8,7,'Sneezing','LOW'), 1562 (8,8,'Irritation','MEDIUM'), 1563 (9,1,'Rash','MEDIUM'), 1564 (9,2,'Swelling','HIGH'), 1565 (10,3,'Mild itching','LOW'), 1566 (10,4,'Skin reaction','MEDIUM'); 1567 1568 COMMIT; 1569
Note:
See TracChangeset
for help on using the changeset viewer.
