-- SQL statements which are executed at application startup if hibernate.hbm2ddl.auto is 'create' or 'create-drop'

INSERT INTO app_configuration(id, variable, value) VALUES (1,'gazelle_bin','/opt/gazelle/bin');
INSERT INTO app_configuration(id, variable, value) VALUES (2,'xcpd_request_schema','/opt/gazelle/bin/schematron/xcpd/xcpd-identification/schemas/HL7V3/NE2008/multicacheschemas/PRPA_IN201305UV02PLA.xsd');
INSERT INTO app_configuration(id, variable, value) VALUES (3,'xcpd_response_schema','/opt/gazelle/bin/schematron/xcpd/xcpd-identification/schemas/HL7V3/NE2008/multicacheschemas/PRPA_IN201306UV02PLA.xsd');
INSERT INTO app_configuration(id, variable, value) VALUES (4,'family','NOVAK');
INSERT INTO app_configuration(id, variable, value) VALUES (5,'given','JAN');
INSERT INTO app_configuration(id, variable, value) VALUES (6,'birthdate','19501201');
INSERT INTO app_configuration(id, variable, value) VALUES (7,'root','');
INSERT INTO app_configuration(id, variable, value) VALUES (8,'gender','');
INSERT INTO app_configuration(id, variable, value) VALUES (9,'extension','');
INSERT INTO app_configuration(id, variable, value) VALUES (10,'street','');
INSERT INTO app_configuration(id, variable, value) VALUES (11,'city','');
INSERT INTO app_configuration(id, variable, value) VALUES (12,'country','');
INSERT INTO app_configuration(id, variable, value) VALUES (13,'postalcode','');
INSERT INTO app_configuration(id, variable, value) VALUES (14,'maidenname','');
INSERT INTO app_configuration(id, variable, value) VALUES (15,'is_xua','True');
INSERT INTO app_configuration(id, variable, value) VALUES (16,'nameID','ihelocal');
INSERT INTO app_configuration(id, variable, value) VALUES (20,'epsosFolder','/opt/XCPD/INIT');
INSERT INTO app_configuration(id, variable, value) VALUES (21,'keyStorePassword','gazelle');
INSERT INTO app_configuration(id, variable, value) VALUES (22,'trustStorePassword','gazelle');
INSERT INTO app_configuration(id, variable, value) VALUES (24,'homeCommunityID','1.3.6.1.4.1.12559.11.1.2.2.2.1');
INSERT INTO app_configuration(id, variable, value) VALUES (25, 'application_admin_email', 'eric.poiseau@inria.fr');
INSERT INTO app_configuration(id, variable, value) VALUES (26, 'application_issue_tracker_url', 'http://gazelle.ihe.net/jira');
INSERT INTO app_configuration(id, variable, value) VALUES (27, 'application_name', 'XCPD Initiating Gateway Simulator');
INSERT INTO app_configuration(id, variable, value) VALUES (28, 'application_release_notes_url', 'http://gazelle.ihe.net');
INSERT INTO app_configuration(id, variable, value) VALUES (29, 'application_time_zone', 'UTC+01');
INSERT INTO app_configuration(id, variable, value) VALUES (30, 'application_admin_name', 'Eric Poiseau');
INSERT INTO app_configuration(id, variable, value) VALUES (31, 'path_ass_keystore', '/usr/local/jboss-5.1.0.GA/');
INSERT INTO app_configuration(id, variable, value) VALUES (32, 'url', 'http://localhost:8080/XCPDINITSimulator/');
INSERT INTO app_configuration(id, variable, value) VALUES (33, 'schematron_validator', 'http://jumbo.irisa.fr:8080/SchematronValidator-SchematronValidator-ejb/GazelleObjectValidatorWS?wsdl');
INSERT INTO app_configuration(id, variable, value) VALUES (34, 'application_documentation', 'http://gazelle.ihe.net/jira/browse/XCPDINIT#selectedTab=com.atlassian.jira.plugin.system.project%3Achangelog-panel');

SELECT pg_catalog.setval('app_configuration_id_seq', 34, true);

-- admin password is blank
insert into user_account (id, username, password_hash, enabled) values (1, 'admin', 'Ss/jICpf9c9GeJj8WKqx1hUClEE=', true);
insert into user_role (id, name, conditional) values (1, 'admin', false);
insert into user_role (id, name, conditional) values (2, 'member', false);
insert into user_role (id, name, conditional) values (3, 'guest', true);
insert into user_account_role (account_id, member_of_role) values (1, 1);
insert into user_role_group (role_id, member_of_role) values (1, 2);

SELECT pg_catalog.setval('user_account_id_seq', 1, true);
SELECT pg_catalog.setval('user_role_id_seq', 3, true);

INSERT INTO xcpd_responder(id, ws_url, description) VALUES (1,'http://localhost:8080/XCPDRESPSimulator-XCPDRESPSimulator/RespondingGatewayPortTypeImpl?wsdl','local Responder Gateway');
INSERT INTO xcpd_responder(id, ws_url, description) VALUES (2,'http://jumbo-2.irisa.fr:8080/XCPDRESPSimulator-XCPDRESPSimulator/RespondingGatewayPortTypeImpl?wsdl','local Responder Gateway');
INSERT INTO xcpd_responder(id, ws_url, description) VALUES (3,'http://office.tiani-spirit.com:6102/SpiritProxy/XCPD','local Responder Gateway');
SELECT pg_catalog.setval('xcpd_responder_id_seq', 3, true);

--INSERT INTO gs_contextual_information(id, label, path, value) VALUES (1, 'family', 'family', '');
--INSERT INTO gs_contextual_information(id, label, path, value) VALUES (2, 'given', 'given', '');
--INSERT INTO gs_contextual_information(id, label, path, value) VALUES (3, 'birthdate', 'birthdate', '');
--INSERT INTO gs_contextual_information(id, label, path, value) VALUES (4, 'root', 'root', '');
--INSERT INTO gs_contextual_information(id, label, path, value) VALUES (5, 'gender', 'gender', '');
--INSERT INTO gs_contextual_information(id, label, path, value) VALUES (6, 'extension', 'extension', '');
--INSERT INTO gs_contextual_information(id, label, path, value) VALUES (7, 'street', 'street', '');
--INSERT INTO gs_contextual_information(id, label, path, value) VALUES (8, 'city', 'city', '');
--INSERT INTO gs_contextual_information(id, label, path, value) VALUES (9, 'country', 'country', '');
--INSERT INTO gs_contextual_information(id, label, path, value) VALUES (10, 'postalcode', 'postalcode', '');
--INSERT INTO gs_contextual_information(id, label, path, value) VALUES (11, 'maidenname', 'maidenname', '');

--SELECT pg_catalog.setval('gs_contextual_information_id_seq', 11, true);

INSERT INTO tf_transaction(id, description, keyword, name) VALUES (1, 'Cross Gateway Patient Discovery', 'ITI-55', 'Cross Gateway Patient Discovery');
SELECT pg_catalog.setval('tf_transaction_id_seq', 1, true);

INSERT INTO gs_test_instance_status(id, keyword, label_to_display, description) VALUES (1, 'started', 'started', 'started');
INSERT INTO gs_test_instance_status(id, keyword, label_to_display, description) VALUES (2, 'completed', 'completed', 'completed');
SELECT pg_catalog.setval('gs_test_instance_status_id_seq', 2, true);


