Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ CREATE TABLE hormoneassay.instruments (
CONSTRAINT PK_instruments PRIMARY KEY (instrument)
);

-- @SkipOnEmptySchemasBegin
INSERT INTO hormoneassay.rochee411_tests (test,code,sampletype,samplevolume,rangemin,rangemax,units,assaytype,controlmodule,samplediluent,testkey) VALUES ('ACTH', null, 'P(EDTA)', 50, 1, 2000, 'pg/ml', 'sand', 'PCMM', 'MD1', '80');
INSERT INTO hormoneassay.rochee411_tests (test,code,sampletype,samplevolume,rangemin,rangemax,units,assaytype,controlmodule,samplediluent,testkey) VALUES ('Cortisol', null, 'S,P,Sal,U', 20, 0.036, 63.4, 'ug/dl', 'comp', 'PCU', 'DU', '160');
INSERT INTO hormoneassay.rochee411_tests (test,code,sampletype,samplevolume,rangemin,rangemax,units,assaytype,controlmodule,samplediluent,testkey) VALUES ('C-Peptide', null, 'S,P,U', 20, 0.01, 40, 'ng/ml', 'sand', 'MA/MM?', 'MA', '70');
Expand All @@ -65,3 +66,4 @@ INSERT INTO hormoneassay.rochee411_tests (test,code,sampletype,samplevolume,rang
INSERT INTO hormoneassay.rochee411_tests (test,code,sampletype,samplevolume,rangemin,rangemax,units,assaytype,controlmodule,samplediluent,testkey) VALUES ('Total T4', null, 'S,P', 15, 0.42, 24.9, 'ug/dl', 'comp', 'PCU', 'none', '21');
INSERT INTO hormoneassay.rochee411_tests (test,code,sampletype,samplevolume,rangemin,rangemax,units,assaytype,controlmodule,samplediluent,testkey) VALUES ('Testosterone', 'TESTO', 'S,P', 20, 0.025, 15, 'ng/ml', 'comp', 'PCU', 'MD1', '111');
INSERT INTO hormoneassay.rochee411_tests (test,code,sampletype,samplevolume,rangemin,rangemax,units,assaytype,controlmodule,samplediluent,testkey) VALUES ('TSH', null, 'S,P', 50, 0.005, 100, 'uIU/ml', 'sand', 'PCU', 'MA', '10');
-- @SkipOnEmptySchemasEnd
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
-- @SkipOnEmptySchemasBegin
DELETE FROM hormoneassay.instruments WHERE instrument = 'Roche E411';
INSERT INTO hormoneassay.instruments (instrument) VALUES ('Roche E411');
-- @SkipOnEmptySchemasEnd

CREATE TABLE hormoneassay.assay_tests (
test varchar(100),
Expand All @@ -9,6 +11,7 @@ CREATE TABLE hormoneassay.assay_tests (
constraint PK_assay_tests PRIMARY KEY (test)
);

-- @SkipOnEmptySchemasBegin
INSERT INTO hormoneassay.assay_tests (test, code, units) VALUES ('ACTH', null, 'pg/ml');
INSERT INTO hormoneassay.assay_tests (test, code, units) VALUES ('Cortisol', null, 'ug/dl');
INSERT INTO hormoneassay.assay_tests (test, code, units) VALUES ('C-Peptide', null, 'ng/ml');
Expand All @@ -29,16 +32,16 @@ INSERT INTO hormoneassay.assay_tests (test, code, units) VALUES ('Free T4', null
INSERT INTO hormoneassay.assay_tests (test, code, units) VALUES ('Total T4', null, 'ug/dl');
INSERT INTO hormoneassay.assay_tests (test, code, units) VALUES ('Testosterone', 'TESTO', 'ng/ml');
INSERT INTO hormoneassay.assay_tests (test, code, units) VALUES ('TSH', null, 'uIU/ml');

-- @SkipOnEmptySchemasEnd

CREATE TABLE hormoneassay.diluents (
diluent varchar(100),

constraint PK_diluents PRIMARY KEY (diluent)
);

-- @SkipOnEmptySchemasBegin
INSERT INTO hormoneassay.diluents (diluent) VALUES ('DU');
INSERT INTO hormoneassay.diluents (diluent) VALUES ('MA');
INSERT INTO hormoneassay.diluents (diluent) VALUES ('MD1');


-- @SkipOnEmptySchemasEnd
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
-- @SkipOnEmptySchemasBegin
DELETE FROM hormoneassay.assay_tests WHERE test = 'Progesterone';
INSERT INTO hormoneassay.assay_tests (test, code, units) VALUES ('Progesterone', 'P4', 'ng/ml');
INSERT INTO hormoneassay.assay_tests (test, code, units) VALUES ('Progesterone', 'P4', 'ng/ml');
-- @SkipOnEmptySchemasEnd
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ CREATE TABLE mergesync.mergetolkmapping (
CONSTRAINT PK_mergetolkmapping PRIMARY KEY (mergetestname)
);

-- @SkipOnEmptySchemasBegin
INSERT INTO mergesync.testnamemapping (servicename, mergetestname, automaticresults) VALUES ('Albumin', 'ALB', true);
INSERT INTO mergesync.testnamemapping (servicename, mergetestname, automaticresults) VALUES ('Amylase', 'AMYL', true);
INSERT INTO mergesync.testnamemapping (servicename, mergetestname, automaticresults) VALUES ('Anaerobic Culture', 'ANCULT', false);
Expand Down Expand Up @@ -77,7 +78,6 @@ INSERT INTO mergesync.testnamemapping (servicename, mergetestname, automaticresu
INSERT INTO mergesync.testnamemapping (servicename, mergetestname, automaticresults) VALUES ('Urinalysis', 'URINE', false);
INSERT INTO mergesync.testnamemapping (servicename, mergetestname, automaticresults) VALUES ('Yersinia culture', 'YERSNA', false);

TRUNCATE TABLE mergesync.mergetolkmapping;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not understanding why this line is getting deleted. In the normal bootstrap scenario, mergesync-0.04-0.05.sql will have inserted rows.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The table was dropped and recreated just before this INSERT chunk, so the TRUNCATE is a no-op. Not causing any harm, of course.

INSERT INTO mergesync.mergetolkmapping (mergetestname, servicename) VALUES ('ALB', 'Albumin');
INSERT INTO mergesync.mergetolkmapping (mergetestname, servicename) VALUES ('AMYL', 'Amylase');
INSERT INTO mergesync.mergetolkmapping (mergetestname, servicename) VALUES ('ANCULT', 'Anaerobic Culture');
Expand Down Expand Up @@ -118,3 +118,4 @@ INSERT INTO mergesync.mergetolkmapping (mergetestname, servicename) VALUES ('SEN
INSERT INTO mergesync.mergetolkmapping (mergetestname, servicename) VALUES ('SENSI', 'Antibiotic Sensitivity');
INSERT INTO mergesync.mergetolkmapping (mergetestname, servicename) VALUES ('URINE', 'Urinalysis');
INSERT INTO mergesync.mergetolkmapping (mergetestname, servicename) VALUES ('YERSNA', 'Yersinia culture');
-- @SkipOnEmptySchemasEnd
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
* limitations under the License.
*/

-- @SkipOnEmptySchemasBegin
DELETE FROM mergesync.mergetolkmapping WHERE mergetestname = 'SENSI2';
INSERT INTO mergesync.mergetolkmapping (mergetestname, servicename) VALUES ('SENSI2', 'Antibiotic Sensitivity');

DELETE FROM mergesync.mergetolkmapping WHERE mergetestname = 'SENSI3';
INSERT INTO mergesync.mergetolkmapping (mergetestname, servicename) VALUES ('SENSI3', 'Antibiotic Sensitivity');
INSERT INTO mergesync.mergetolkmapping (mergetestname, servicename) VALUES ('SENSI3', 'Antibiotic Sensitivity');
-- @SkipOnEmptySchemasEnd