
INSERT INTO patient.incident_entry_types (name,mime_type) VALUES (E'labo.result',E'text/plain');

------------------------------------------------------------------------------
-- User management related inserts
------------------------------------------------------------------------------

-- Labo Roles

INSERT INTO usermanagement.role (name, description) values (E'LaboModule.Downloading',E'Users who are granted full access to laboratory functions');
-- INSERT INTO usermanagement.role (name, description) values (E'LaboModule.Viewing',E'Users who are allowed to only view laboratory related data');

-- Labo Permissions

insert into usermanagement.permission (name, description) values (E'LaboModule.downloadResults'              ,E'User is allowed to download results');

insert into usermanagement.rel_role_permission (role_id,permission_id) values ((select id from usermanagement.role where name=E'LaboModule.Downloading'),(select id from usermanagement.permission where name=E'LaboModule.downloadResults'));

-- insert the labo Root CAs of Tudor and the Agence-eSanté
INSERT INTO labo.certifier
(label, certificate, last_modified)
VALUES
('chain', null, 'now'),
('labo.admin.healthnet.lu/home/ftp/labokeys/chainCA.crt', E'-----BEGIN CERTIFICATE-----
MIIF3jCCA8agAwIBAgIJALnLTNAvoVgyMA0GCSqGSIb3DQEBBQUAMIGVMQswCQYD
VQQGEwJMVTETMBEGA1UECBMKTHV4ZW1ib3VyZzETMBEGA1UEBxMKTHV4ZW1ib3Vy
ZzEWMBQGA1UEChMNQWdlbmNlIGVTYW50ZTEgMB4GA1UECxMXQ2VydGlmaWNhdGlv
biBBdXRob3JpdHkxIjAgBgkqhkiG9w0BCQEWE2NhQGFnZW5jZS1lc2FudGUubHUw
HhcNMTMwMTA3MDYyNzIwWhcNNDUwMTA3MDYyNzIwWjCBlTELMAkGA1UEBhMCTFUx
EzARBgNVBAgTCkx1eGVtYm91cmcxEzARBgNVBAcTCkx1eGVtYm91cmcxFjAUBgNV
BAoTDUFnZW5jZSBlU2FudGUxIDAeBgNVBAsTF0NlcnRpZmljYXRpb24gQXV0aG9y
aXR5MSIwIAYJKoZIhvcNAQkBFhNjYUBhZ2VuY2UtZXNhbnRlLmx1MIICIjANBgkq
hkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAvPoTyIedbBdDsE5jtoh0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