Pequeñas correcciones en SQL

This commit is contained in:
Roberto Orden Erena
2019-12-28 22:59:26 +01:00
parent af0a2cf98c
commit be08aaff6e
2 changed files with 11 additions and 11 deletions

View File

@@ -201,7 +201,7 @@ CREATE TABLE myhealth.medicaltest
"time" TIME NOT NULL, "time" TIME NOT NULL,
observations TEXT COLLATE pg_catalog."default", observations TEXT COLLATE pg_catalog."default",
highresimage TEXT, highresimage TEXT,
type VARCHAR(30) NOT NULL, type VARCHAR(50) NOT NULL,
patientid INTEGER REFERENCES myhealth.patient(id) NOT NULL, patientid INTEGER REFERENCES myhealth.patient(id) NOT NULL,
specialistdoctorid INTEGER REFERENCES myhealth.specialistdoctor(id) NOT NULL, specialistdoctorid INTEGER REFERENCES myhealth.specialistdoctor(id) NOT NULL,
CONSTRAINT medicaltest_pkey PRIMARY KEY (id) CONSTRAINT medicaltest_pkey PRIMARY KEY (id)

View File

@@ -459,13 +459,13 @@ INSERT INTO myhealth.visit(date, "time", observations, result, patientid, family
-- Insertar datos de prueba para medical test -- Insertar datos de prueba para medical test
INSERT INTO myhealth.medicaltest(date, "time", observations, highresimage, type, patientid, specialistdoctorid) VALUES INSERT INTO myhealth.medicaltest(date, "time", observations, highresimage, type, patientid, specialistdoctorid) VALUES
('2019-12-23','09:00:00','Observaciones del medical test1','somehighresimage1', 'Radiografía Tórax', 1, 1), ('2019-12-23','09:00:00','Observaciones del medical test1','somehighresimage1', 'MAGNETIC_RESONANCE_IMAGING', 1, 1),
('2019-12-24','19:20:00','Observaciones del medical test2','somehighresimage2', 'TAC Craneal', 2, 1), ('2019-12-24','19:20:00','Observaciones del medical test2','somehighresimage2', 'CT_SCAN', 1, 1),
('2019-12-25','18:35:20','Observaciones del medical test3','somehighresimage3', 'Radiografía Cadera', 3, 2), ('2019-12-25','18:35:20','Observaciones del medical test3','somehighresimage3', 'BLOOD_TEST', 1, 1),
('2019-12-26','08:15:10','Observaciones del medical test4','somehighresimage4', 'TAC Rodilla', 4, 2), ('2019-12-26','08:15:10','Observaciones del medical test4','somehighresimage4', 'CT_SCAN', 4, 2),
('2019-12-27','18:15:10','Observaciones del medical test5','somehighresimage5', 'TAC Pie Izquierdo', 5, 1), ('2019-12-27','18:15:10','Observaciones del medical test5','somehighresimage5', 'CT_SCAN', 5, 1),
('2019-12-28','22:15:40','Observaciones del medical test6','somehighresimage6', 'Radiografía Tórax', 6, 3), ('2019-12-28','22:15:40','Observaciones del medical test6','somehighresimage6', 'MAGNETIC_RESONANCE_IMAGING', 6, 3),
('2019-12-28','23:15:40','Observaciones del medical test7','somehighresimage7', 'Radiografía Tibia', 7, 1), ('2019-12-28','23:15:40','Observaciones del medical test7','somehighresimage7', 'MAGNETIC_RESONANCE_IMAGING', 7, 1),
('2019-12-29','11:12:20','Observaciones del medical test8','somehighresimage8', 'TAC Craneal', 8, 1), ('2019-12-29','11:12:20','Observaciones del medical test8','somehighresimage8', 'CT_SCAN', 8, 1),
('2019-12-30','13:17:50','Observaciones del medical test9','somehighresimage9', 'Radiografía Cadera', 2, 2), ('2019-12-30','13:17:50','Observaciones del medical test9','somehighresimage9', 'MAGNETIC_RESONANCE_IMAGING', 2, 2),
('2019-12-31','05:08:30','Observaciones del medical test10','somehighresimage10', 'Radiografía rodilla', 4, 1); ('2019-12-31','05:08:30','Observaciones del medical test10','somehighresimage10', 'MAGNETIC_RESONANCE_IMAGING', 4, 1);