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 @@ -34,10 +34,12 @@ CREATE TABLE Viral_Load_Assay.assays
-- ----------------------------
-- Records of assays
-- ----------------------------
-- @SkipOnEmptySchemasBegin
INSERT INTO Viral_Load_Assay.assays
(assayName, virus)
VALUES
('SIVmac239-Gag', 'SIVmac239');
-- @SkipOnEmptySchemasEnd

-- ----------------------------
-- Table structure for vl_category
Expand Down Expand Up @@ -71,8 +73,10 @@ WITH (OIDS=FALSE);
-- ----------------------------
-- Records of vl_instrument
-- ----------------------------
-- @SkipOnEmptySchemasBegin
INSERT INTO Viral_Load_Assay.vl_instrument VALUES ('LC480');
INSERT INTO Viral_Load_Assay.vl_instrument VALUES ('Light Cycler');
-- @SkipOnEmptySchemasEnd

-- ----------------------------
-- Table structure for vl_sampletype
Expand Down Expand Up @@ -105,7 +109,9 @@ WITH (OIDS=FALSE);
-- ----------------------------
-- Records of vl_technique
-- ----------------------------
-- @SkipOnEmptySchemasBegin
INSERT INTO Viral_Load_Assay.vl_technique VALUES ('Lifson 1-Step VL');
-- @SkipOnEmptySchemasEnd

-- ----------------------------
-- Table structure for vl_virus
Expand All @@ -122,5 +128,3 @@ WITH (OIDS=FALSE);
-- Records of vl_virus
-- ----------------------------
INSERT INTO Viral_Load_Assay.vl_virus VALUES ('SIVmac239');


Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

-- @SkipOnEmptySchemasBegin
INSERT INTO viral_load_assay.vl_instrument VALUES ('ABI 7500');
-- @SkipOnEmptySchemasEnd

DROP TABLE viral_load_assay.vl_category;
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ CREATE TABLE viral_load_assay.fluors (
constraint PK_fluors PRIMARY KEY (name)
);

INSERT INTO viral_load_assay.fluors (name) VALUES ('FAM');
-- @SkipOnEmptySchemasBegin
INSERT INTO viral_load_assay.fluors (name) VALUES ('FAM');
-- @SkipOnEmptySchemasEnd
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
-- @SkipOnEmptySchemasBegin
INSERT INTO viral_load_assay.vl_instrument (instrument)
SELECT 'LC96'
WHERE
NOT EXISTS (
SELECT instrument FROM viral_load_assay.vl_instrument WHERE instrument = 'LC96'
);
);
-- @SkipOnEmptySchemasEnd
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@
import java.util.List;
import java.util.Set;

/**
* Created with IntelliJ IDEA.
* User: bimber
* Date: 9/28/12
* Time: 4:17 PM
*/
public class ViralLoadAssayDataProvider extends AbstractAssayDataProvider
{
public ViralLoadAssayDataProvider(Module m)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ CREATE TABLE ehr.notificationTypes
CONSTRAINT PK_notificationTypes PRIMARY KEY (NotificationType)
);

-- @SkipOnEmptySchemasBegin
INSERT into ehr.notificationTypes
(NotificationType, description)
VALUES
Expand All @@ -285,6 +286,7 @@ VALUES
('Animal Care Service Request', ''),
('Colony Validation - General', 'Subscribing to this notification will result in emails for general colony records issues like records needing attention, animals missing from the demographics table, etc.')
;
-- @SkipOnEmptySchemasEnd

CREATE TABLE ehr.notificationRecipients
(
Expand Down Expand Up @@ -407,6 +409,7 @@ CREATE TABLE ehr.qcStateMetadata
CONSTRAINT PK_qcStateMetadata PRIMARY KEY (QCStateLabel)
);

-- @SkipOnEmptySchemasBegin
INSERT INTO ehr.qcStateMetadata
(QCStateLabel,draftData,isDeleted,isRequest)
VALUES
Expand All @@ -421,6 +424,7 @@ VALUES
('Request: Approved', TRUE, FALSE, TRUE),
('Request: Complete', FALSE, FALSE, TRUE)
;
-- @SkipOnEmptySchemasEnd

DROP TABLE IF EXISTS ehr.module_properties;

Expand Down Expand Up @@ -507,12 +511,14 @@ ALTER TABLE ehr.reports
add column description varchar(4000)
;

-- @SkipOnEmptySchemasBegin
INSERT INTO ehr.qcStateMetadata
(QCStateLabel,draftData,isDeleted,isRequest)
VALUES
('Completed', FALSE, FALSE, FALSE),
('Scheduled', TRUE, FALSE, FALSE)
;
-- @SkipOnEmptySchemasEnd

ALTER TABLE ehr.formTypes ADD COLUMN configJson text;

Expand Down Expand Up @@ -601,6 +607,7 @@ ALTER table ehr.qcStateMetadata

DELETE from ehr.qcStateMetadata;

-- @SkipOnEmptySchemasBegin
INSERT INTO ehr.qcStateMetadata
(QCStateLabel,DraftData,isDeleted,isRequest,allowFutureDates)
VALUES
Expand All @@ -616,6 +623,7 @@ VALUES
('Request: Complete', FALSE, FALSE, TRUE, TRUE),
('Scheduled', TRUE, FALSE, FALSE, TRUE)
;
-- @SkipOnEmptySchemasEnd

UPDATE ehr.qcStateMetadata
SET DraftData = FALSE
Expand All @@ -625,10 +633,12 @@ ALTER table ehr.reports
add column sort_order integer
;

-- @SkipOnEmptySchemasBegin
insert into ehr.notificationtypes
(notificationtype,description) VALUES
('Incompleted Treatments', 'An email will be sent each day at 8:30, 15:30 and 20:30 notifying of any incompleted treatments')
;
-- @SkipOnEmptySchemasEnd

CREATE TABLE ehr.automatic_alerts (
rowid serial not null,
Expand Down Expand Up @@ -685,13 +695,15 @@ UPDATE ehr.qcStateMetadata
SET DraftData = TRUE
WHERE QCStateLabel = 'Review Requested';

-- @SkipOnEmptySchemasBegin
insert into ehr.notificationtypes
(notificationtype,description) VALUES
('Blood Draw Request Completed', 'An email will be sent each time a blood draw request is completed'),
('Blood Draw Request Denied', 'An email will be sent each time a blood draw request is denied'),
('Clinpath Request Completed', 'An email will be sent each time a clinpath request is completed'),
('Clinpath Request Denied', 'An email will be sent each time a clinpath request is denied')
;
-- @SkipOnEmptySchemasEnd

alter TABLE ehr.notificationRecipients
add column Recipient2 integer
Expand Down Expand Up @@ -779,10 +791,12 @@ alter TABLE ehr.protocol
add column maxAnimals integer
;

-- @SkipOnEmptySchemasBegin
insert into ehr.notificationtypes
(notificationtype,description) VALUES
('Prenatal Death', 'An email will be sent each time a prenatal death is reported')
;
-- @SkipOnEmptySchemasEnd

delete from ehr.notificationtypes where notificationtype in (
'Clinpath Abnormal Results',
Expand All @@ -803,6 +817,7 @@ delete from ehr.notificationtypes where notificationtype in (

delete from ehr.notificationtypes where notificationtype = 'Colony Validation - General';

-- @SkipOnEmptySchemasBegin
insert into ehr.notificationtypes
(notificationtype,description) VALUES
('Clinpath Abnormal Results', 'An email will be sent periodically to summarize abnormal clinpath results'),
Expand All @@ -819,6 +834,7 @@ insert into ehr.notificationtypes
('Overdue Weight Alerts', 'An email will be sent daily to summarize animals overdue for weights.'),
('Site Error Alerts', 'An hourly email will be sent if a new site error is reported.')
;
-- @SkipOnEmptySchemasEnd

drop TABLE ehr.client_errors;

Expand Down Expand Up @@ -1263,8 +1279,10 @@ ALTER TABLE ehr.reports ADD subjectIdFieldName varchar(200);

ALTER TABLE ehr.project ADD alwaysavailable bool;

-- @SkipOnEmptySchemasBegin
INSERT INTO ehr.qcstateMetadata (QCStateLabel,draftData,isDeleted,isRequest)
VALUES ('Request: Sample Delivered', TRUE, FALSE, TRUE);
-- @SkipOnEmptySchemasEnd

CREATE TABLE ehr.protocolexemptions (
rowid SERIAL,
Expand Down Expand Up @@ -1337,7 +1355,9 @@ CREATE INDEX snomed_tags_taskid ON ehr.snomed_tags (taskid);

CREATE INDEX treatment_times_container_treatmentid ON ehr.treatment_times (container, treatmentid);

-- @SkipOnEmptySchemasBegin
INSERT INTO ehr.qcStateMetadata (QCStateLabel,DraftData,isDeleted,isRequest,allowFutureDates) VALUES ('Request: Cancelled', false, false, true, true);
-- @SkipOnEmptySchemasEnd

ALTER TABLE ehr.project ADD projecttype varchar(100);

Expand Down Expand Up @@ -1634,6 +1654,7 @@ DROP FUNCTION ehr.handleAddContactToProtocol();
DELETE FROM ehr.qcStateMetadata WHERE QCStateLabel = 'Started';
DELETE FROM ehr.status WHERE Label = 'Started';

-- @SkipOnEmptySchemasBegin
INSERT INTO ehr.qcStateMetadata
(QCStateLabel,draftData,isDeleted,isRequest)
VALUES
Expand All @@ -1642,7 +1663,7 @@ INSERT INTO ehr.status
(label,Description,PublicData,DraftData,isDeleted,isRequest,allowFutureDates)
VALUES
('Started', 'Record has started, but not completed',TRUE,FALSE,FALSE,FALSE,FALSE);

-- @SkipOnEmptySchemasEnd

-- ehr-17.21-17.22.sql
-- contents of ehr-17.21-17.22.sql script are not in rolled up ehr-0.00-18.10.sql, since they got added and merged after the rollup.
Expand Down Expand Up @@ -1781,6 +1802,7 @@ DROP FUNCTION ehr.addConstraintToFormFrameworkTypes();
DELETE FROM ehr.qcStateMetadata WHERE QCStateLabel = 'Request: On Hold';
DELETE FROM ehr.status WHERE Label = 'Request: On Hold';

-- @SkipOnEmptySchemasBegin
INSERT INTO ehr.qcStateMetadata
(QCStateLabel, draftData, isDeleted, isRequest, allowFutureDates)
VALUES
Expand All @@ -1790,6 +1812,7 @@ INSERT INTO ehr.status
(label, description, publicData, draftData, isDeleted, isRequest, allowFutureDates)
VALUES
('Request: On Hold', 'Request has been put on hold', FALSE, FALSE, FALSE, TRUE, TRUE);
-- @SkipOnEmptySchemasEnd

CREATE INDEX snomed_tags_recordid ON ehr.snomed_tags (recordid);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3345,6 +3345,7 @@ WITH (OIDS=FALSE)
-- ----------------------------
-- Records of months
-- ----------------------------
-- @SkipOnEmptySchemasBegin
INSERT into ehr_lookups.months (month) VALUES
('January'),
('February'),
Expand All @@ -3358,7 +3359,7 @@ INSERT into ehr_lookups.months (month) VALUES
('October'),
('November'),
('December');

-- @SkipOnEmptySchemasEnd


-- ----------------------------
Expand Down Expand Up @@ -3807,9 +3808,11 @@ WITH (OIDS=FALSE)
-- ----------------------------
-- Records of tb_eye
-- ----------------------------
-- @SkipOnEmptySchemasBegin
INSERT INTO ehr_lookups.tb_eye VALUES ('b', 'Both');
INSERT INTO ehr_lookups.tb_eye VALUES ('l', 'Left');
INSERT INTO ehr_lookups.tb_eye VALUES ('r', 'Right');
-- @SkipOnEmptySchemasEnd

-- ----------------------------
-- Table structure for tb_result
Expand Down Expand Up @@ -3992,9 +3995,11 @@ WITH (OIDS=FALSE)
-- ----------------------------
-- Records of yesno
-- ----------------------------
-- @SkipOnEmptySchemasBegin
INSERT INTO ehr_lookups.yesno VALUES ('Yes');
INSERT INTO ehr_lookups.yesno VALUES ('No');
INSERT INTO ehr_lookups.yesno VALUES ('NA');
-- @SkipOnEmptySchemasEnd



Expand Down Expand Up @@ -4443,13 +4448,14 @@ WITH (OIDS=FALSE)
-- ----------------------------
-- Records of normal_abnormal
-- ----------------------------
-- @SkipOnEmptySchemasBegin
INSERT INTO ehr_lookups.normal_abnormal
(state)
VALUES
('Normal'),
('Abnormal')
;

-- @SkipOnEmptySchemasEnd

-- ----------------------------
-- Table structure for observations_anesthesia_recovery
Expand Down Expand Up @@ -4620,12 +4626,14 @@ WITH (OIDS=FALSE)

;

-- @SkipOnEmptySchemasBegin
INSERT INTO ehr_lookups.oor_indicators
(indicator)
VALUES
('<'),
('>')
;
-- @SkipOnEmptySchemasEnd

INSERT INTO ehr_lookups.blood_draw_services
(service) VALUES
Expand Down Expand Up @@ -5009,13 +5017,14 @@ WITH (OIDS=FALSE)

;

-- @SkipOnEmptySchemasBegin
INSERT INTO ehr_lookups.qualitative_results
(result) VALUES
('Positive'),
('Negative'),
('Indeterminate')
;

-- @SkipOnEmptySchemasEnd

DROP TABLE IF EXISTS ehr_lookups.urine_method;
-- ----------------------------
Expand Down Expand Up @@ -7031,11 +7040,12 @@ update ehr_lookups.lab_test_range set type = 'Chemistry' where test = 'UA';
update ehr_lookups.lab_test_range set type = 'Hematology' where test = 'WBC';

delete from ehr.notificationtypes where notificationtype = 'Animal Death';
-- @SkipOnEmptySchemasBegin
insert into ehr.notificationtypes
(notificationtype,description) VALUES
('Animal Death', 'An email will be sent each time an animal is marked as dead')
;

-- @SkipOnEmptySchemasEnd

-- ----------------------------
-- Table structure for ehr_lookups.death_remarks
Expand Down
Loading