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


INSERT INTO app_configuration (id, value, variable) VALUES (1, 'PDCSimulator', 'sendingApplication');
INSERT INTO app_configuration (id, value, variable) VALUES (2, 'IHE2', 'sendingFacility');
INSERT INTO app_configuration (id, value, variable) VALUES (3, '@PID.5.1^A*', 'queryString');
INSERT INTO app_configuration (id, value, variable) VALUES (4, '23', 'numberOfRowsToReturn');
INSERT INTO app_configuration (id, value, variable) VALUES (5, '', 'continuationPointer');

INSERT INTO app_configuration(id, variable, value) VALUES (6, 'application_admin_email', 'eric.poiseau@inria.fr');
INSERT INTO app_configuration(id, variable, value) VALUES (7, 'application_issue_tracker_url', 'http://gazelle.ihe.net/jira');
INSERT INTO app_configuration(id, variable, value) VALUES (8, 'application_name', 'PDQ PDC Simulator');
INSERT INTO app_configuration(id, variable, value) VALUES (9, 'application_release_notes_url', 'http://gazelle.ihe.net');
INSERT INTO app_configuration(id, variable, value) VALUES (10, 'application_time_zone', 'UTC+01');
INSERT INTO app_configuration(id, variable, value) VALUES (11, 'application_admin_name', 'Eric Poiseau');

INSERT INTO "app_configuration" (id, variable, value) VALUES ('50', 'timeout_for_receiving_messages', '500');
INSERT INTO "app_configuration" (id, variable, value) VALUES ('51', 'xsl_location', 'http://gazelle.ihe.net/xsl/hl7Validation/resultStylesheet.xsl');
INSERT INTO "app_configuration" (id, variable, value) VALUES ('52', 'url_EVCS_ws', 'http://kujira.irisa.fr:8080/Hl7V2Evs-prod-InriaHL7Validator-ejb/InriaHL7CupWS?wsdl');
INSERT INTO "app_configuration" (id, variable, value) VALUES ('53', 'hl7_version', '2.5');
INSERT INTO "app_configuration" (id, variable, value) VALUES ('54', 'application_url', 'http://gazelle.ihe.net/PDQPDCSimulator');
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);

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');

INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (1,  'ASCII','ASCII', 'US-ASCII' );                                
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (2,  'Latin alphabet No.1',	'8859/1'	,'ISO-8859-1');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (3,  'Latin alphabet No.2', 	'8859/2'	, 'ISO8859_2');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (4,  'Latin alphabet No.3', 	'8859/3'	, 'ISO8859_3');    
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (5,  'Latin alphabet No.4', 	'8859/4'	, 'ISO8859_4');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (6,  'Latin/Cyrillic alphabet', 	'8859/5'	, 'ISO8859_5');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (7,  'Latin/Arabic alphabet', 	'8859/6'	, 'ISO8859_6');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (8,  'Latin/Greek alphabet', 	'8859/7'	, 'ISO8859_7');   
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (9,  'Latin/Hebrew alphabet', 	'8859/8'	, 'ISO8859_8');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (10, 'Latin alphabet No.5', 	'8859/9'	, 'ISO8859_9');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (11, 'Japanese (JIS X 0201)', 	'ISO IR14', 'JIS0201' );
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (12, 'Japanese (JIS X 0208)', 	'ISO IR87', 'JIS0208' );            
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (13, 'Japanese (JIS X 0212)', 	'ISO IR159',  'JIS0212');       
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (14, 'Chinese', 	'GB 18030-2000'	, 'EUC_CN');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (15, 'Korean', 	'KS X 1001'	, 'EUC_KR');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (16, 'Taiwanese', 	'CNS 11643-1992', 'EUC_TW');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (17, 'Taiwanese (BIG 5)', 'BIG-5', 'Big5');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (19, 'UTF-8', 		'UNICODE UTF-8' , 'UTF8'    ); 
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (20, 'UTF-16', 		'UNICODE UTF-16', 'UTF-16');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (21, 'UTF-32', 		'UNICODE UTF-32', 'UTF-32');

INSERT INTO tf_actor (id, name, keyword, description, can_act_as_responder) VALUES (1, 'Patient Demographic Supplier', 'PDS', 'Patient Demographic Supplier', true);
INSERT INTO tf_actor (id, name, keyword, description) VALUES (2, 'Patient Demographic Consumer', 'PDC', 'Patient Demographic Consumer');

INSERT INTO tf_transaction (id, name, keyword, description) VALUES (1, 'ITI-21', 'ITI-21', 'ITI-21');

INSERT INTO "validation_parameters" (id, message_type, actor_id, transaction_id, profile_oid) VALUES (1, 'QBP^Q22^QBP_Q21', 2, 1,'1.3.6.1.4.12559.11.1.1.31');
INSERT INTO "validation_parameters" (id, message_type, actor_id, transaction_id, profile_oid) VALUES (2, 'RSP^K22^RSP_K22', 1, 1,'1.3.6.1.4.12559.11.1.1.35');

INSERT INTO affinity_domain (id, keyword, label_to_display, description) VALUES (1, 'IHE', 'IHE', 'IHE');

INSERT INTO hl7_validation_parameters_affinity_domain (affinity_domain_id, validation_parameters_id) VALUES (1,1); 
INSERT INTO hl7_validation_parameters_affinity_domain (affinity_domain_id, validation_parameters_id) VALUES (1,2); 


