0% found this document useful (0 votes)
2 views2 pages

Create Table Patients

The document outlines the creation of four database tables: Patients, Medecins, Consultations, and Medicaments, each with specific fields and relationships. It includes sample data insertion for patients, doctors, consultations, and medications. The structure is designed to manage patient information, medical consultations, and prescribed treatments effectively.

Uploaded by

ALPHA KONGOLO
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Create Table Patients

The document outlines the creation of four database tables: Patients, Medecins, Consultations, and Medicaments, each with specific fields and relationships. It includes sample data insertion for patients, doctors, consultations, and medications. The structure is designed to manage patient information, medical consultations, and prescribed treatments effectively.

Uploaded by

ALPHA KONGOLO
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

CREATE TABLE Patients (

ID_Patient NUMBER GENERATED AS IDENTITY PRIMARY KEY,

Nom VARCHAR2(50),

Prenom VARCHAR2(50),

Date_Naissance DATE,

Adresse VARCHAR2(255),

Telephone VARCHAR2(20)

);

CREATE TABLE Medecins (

ID_Medecin NUMBER GENERATED AS IDENTITY PRIMARY KEY,

Nom VARCHAR2(50),

Prenom VARCHAR2(50),

Specialite VARCHAR2(100)

);

CREATE TABLE Consultations (

ID_Consultation NUMBER GENERATED AS IDENTITY PRIMARY KEY,

Date_Consultation DATE,

ID_Patient NUMBER,

ID_Medecin NUMBER,

Diagnostic CLOB,

Traitement_Prescrit CLOB,

FOREIGN KEY (ID_Patient) REFERENCES Patients(ID_Patient),

FOREIGN KEY (ID_Medecin) REFERENCES Medecins(ID_Medecin)

);

CREATE TABLE Medicaments (

ID_Medicament NUMBER GENERATED AS IDENTITY PRIMARY KEY,

Nom VARCHAR2(100),

Description CLOB,
Dosage VARCHAR2(50)

);

-- Insertion de données fictives

INSERT INTO Patients (Nom, Prenom, Date_Naissance, Adresse, Telephone) VALUES

('Doe', 'John', TO_DATE('1990-05-10', 'YYYY-MM-DD'), '123 Rue Principale', '0123456789'),

('Smith', 'Jane', TO_DATE('1985-08-15', 'YYYY-MM-DD'), '456 Avenue Centrale', '0987654321'),

('Dupont', 'Luc', TO_DATE('1992-11-20', 'YYYY-MM-DD'), '789 Boulevard Sud', '0345678901'),

('Martin', 'Claire', TO_DATE('1980-03-25', 'YYYY-MM-DD'), '321 Rue Ouest', '0234567890'),

('Nguyen', 'Paul', TO_DATE('1975-09-12', 'YYYY-MM-DD'), '654 Avenue Est', '0456789012');

INSERT INTO Medecins (Nom, Prenom, Specialite) VALUES

('Durand', 'Marc', 'Cardiologie'),

('Bernard', 'Sophie', 'Pédiatrie'),

('Lefevre', 'Hugo', 'Dermatologie');

INSERT INTO Consultations (Date_Consultation, ID_Patient, ID_Medecin, Diagnostic,


Traitement_Prescrit) VALUES

(TO_DATE('2024-02-20', 'YYYY-MM-DD'), 1, 1, 'Hypertension', 'Médicaments antihypertenseurs'),

(TO_DATE('2024-02-21', 'YYYY-MM-DD'), 2, 2, 'Fièvre persistante', 'Antibiotiques et repos'),

(TO_DATE('2024-02-22', 'YYYY-MM-DD'), 3, 3, 'Eruption cutanée', 'Crème anti-inflammatoire');

INSERT INTO Medicaments (Nom, Description, Dosage) VALUES

('Paracétamol', 'Antalgique et antipyrétique', '500mg'),

('Ibuprofène', 'Anti-inflammatoire non stéroïdien', '400mg'),

('Amoxicilline', 'Antibiotique à large spectre', '1g');

You might also like