-- create a table
CREATE TABLE diagnostico (
    codigo_dx INTEGER PRIMARY KEY autoincrement,
    descripcion TEXT NOT NULL,
    cie TEXT NOT NULL
);

create table paciente(
    ci_paciente integer primary key,
    nro_seguro_social integer not null,
    nombre text not null,
    apellidos text not null,
    fecha_nacimiento date not null
);

create table medico(
    cmp integer primary key,
    nombre text not null,
    apellidos text not null
);

create table visita_medica(
    id_visita_medica integer primary key autoincrement,
    cmp integer not null,
    ci_paciente text not null,
    fecha_hora date not null
);

create table diagnostico_paciente(
    id_dx_paciente integer primary key autoincrement,
    codigo_dx integer not null,
    ci_paciente integer not null,
    fecha_dx date not null
);

create table cama(
    nro_cama integer primary key,
    nro_sala integer
);

create table sala_hospitalizacion(
    nro_sala integer primary key,
    nro_camas integer not null,
    nombre text not null
);

create table paciente_cama(
    id_paciente_cama integer primary key autoincrement,
    nro_cama integer not null,
    nro_sala integer not null,
    ci_paciente integer not null,
    fecha_asignacion date not null,
    fecha_alta date
);

create table tarjeta_visita(
    nro_tarjeta integer primary key,
    id_paciente_cama integer not null,
    hora_comienzo time not null,
    hora_final ttime not null
);

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: