insert into usr_institution (id,keyword,name,url,institution_type_id) values (nextval('usr_institution_id_seq'),'IHE','IHE','http://gazelle.ihe.net',1);

insert into usr_users (id,email,password,username,institution_id,activated,is_institution_informations_entered,blocked,counter_logins,counter_failed_login_attempts,firstname) values (nextval('usr_users_id_seq'),'admin@gazelle.com','ab4f63f9ac65152575886860dde480a1','admin',(SELECT  id from usr_institution where keyword = 'IHE'),true,true,false,0,0,'admin');

insert into usr_user_role (user_id,role_id) values ((select id from usr_users where username = 'admin'), (select id from usr_role where name ='admin_role'));
--
-- Data for Name: tm_system; Type: TABLE DATA; Schema: public; Owner: gazelle
--

INSERT INTO tm_system (id, last_changed, last_modifier_id, hl7_conformance_statement_url, dicom_conformance_statement_url, events_history, integration_statement_date, integration_statement_size, integration_statement_url, is_dicom_system, is_hl7_system, name, version, comment, keyword_suffix, owner_user_id, system_type_id, keyword, is_tool, dtype, url, publication_request_date, counter_crawler_jobs_with_unmatching_hashcode, counter_crawler_jobs_with_unreachable_url, integration_statement_generated_checksum, integration_statement_generated_date, integration_statement_referenced_checksum, integration_statement_status, integration_statement_validated_by_admin_checksum, integration_statement_validated_by_admin_comment, integration_statement_validated_by_admin_date, integration_statement_validated_last_time, is_email_sent_because_unmatching_hashcode, is_email_sent_because_unreachable_url) VALUES (nextval('tm_system_id_seq'), 'now', 'admin', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, 'Patient Manager', '8.0.0', NULL, 'PATIENT_MANAGER', (select id from usr_users were username = 'admin'), (select id from sys_system_type where keyword = 'TOOL'), 'TOOL_IHE_PATIENT_MANAGER', true, 'SYS', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO tm_system (id, last_changed, last_modifier_id, hl7_conformance_statement_url, dicom_conformance_statement_url, events_history, integration_statement_date, integration_statement_size, integration_statement_url, is_dicom_system, is_hl7_system, name, version, comment, keyword_suffix, owner_user_id, system_type_id, keyword, is_tool, dtype, url, publication_request_date, counter_crawler_jobs_with_unmatching_hashcode, counter_crawler_jobs_with_unreachable_url, integration_statement_generated_checksum, integration_statement_generated_date, integration_statement_referenced_checksum, integration_statement_status, integration_statement_validated_by_admin_checksum, integration_statement_validated_by_admin_comment, integration_statement_validated_by_admin_date, integration_statement_validated_last_time, is_email_sent_because_unmatching_hashcode, is_email_sent_because_unreachable_url) VALUES (nextval('tm_system_id_seq'), 'now', 'admin', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, 'XDS Tools 2', '200', NULL, 'XDSTOOLS2', (select id from usr_users where username='admin'), (select id from sys_system_type where keyword = 'TOOL'), 'TOOL_IHE_XDSTOOLS2', true, 'SYS', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

--
-- Data for Name: tm_testing_session; Type: TABLE DATA; Schema: public; Owner: gazelle
--

INSERT INTO tm_testing_session (id, last_changed, last_modifier_id, active, beginning_date, description, ending_date, invoice_payment_deadline_date, registration_deadline_date, type, year, zone, address_id, currency_id, networkconfiguration_id, mailing_list_url, hidden, order_in_gui, is_critical_status_enabled, configuration_overview, is_proxy_use_enabled, contact_email, contact_firstname, contact_lastname, domain_fee, fee_additional_system, fee_first_system, vat_percent, wiki_url, required_contract, contract_template_path, logo_link_url, logo_url, next_invoice_number, invoice_template_path, ti_accessed_by_qr, ti_claimed_by_qr, ti_verified_on_smartphone, fee_participant, iso3_vat_countries, session_closed, results_compute, internettesting, disable_auto_results, enable_precat_tests, target_color, allowparticipantregistration, certificates_rul, display_certificates_menu, default_testing_session, disable_patient_generation_and_sharing) VALUES (nextval('tm_testing_session_id_seq'), 'now', '', true, '2015-02-13 12:00:00+01', 'default testing session ', '2016-02-12 12:00:00+01', NULL, '2016-02-04 12:00:00+01', 'Connectathon', 2015, 'Demo', NULL, NULL, NULL, '', false, 1, false, NULL, false, 'admin@gazelle.com', 'Admin', 'Admin', NULL, 0.00, 0.00, NULL, '', false, NULL, '', '', 1, NULL, NULL, NULL, NULL, 0.00, NULL, false, '2015-04-09 15:13:13.98751+02', false, false, true, '#4a75b5', false, null, true, true, NULL);


--
-- Data for Name: tm_system_in_session; Type: TABLE DATA; Schema: public; Owner: gazelle
--

INSERT INTO tm_system_in_session (id, last_changed, last_modifier_id, accepted_to_session, ampere, blog, extra_ip_address, is_conf_stat_provided, is_copy, is_ihe_is_provided, is_ihe_is_required, power, skype, storage_volume, table_label, voltage, person_servicing, system_id, system_in_session_status_id, table_session_id, testing_session_id, dtype, comment, registration_status, noteslist) VALUES (nextval('tm_system_in_session_id_seq'), 'now', 'admin', true, NULL, NULL, NULL, NULL, false, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, (select id from tm_system where keyword = 'TOOL_IHE_PATIENT_MANAGER'), 5, NULL, (select id from tm_testing_session where zone = 'Demo'), 'SYS', NULL, 2, NULL);
INSERT INTO tm_system_in_session (id, last_changed, last_modifier_id, accepted_to_session, ampere, blog, extra_ip_address, is_conf_stat_provided, is_copy, is_ihe_is_provided, is_ihe_is_required, power, skype, storage_volume, table_label, voltage, person_servicing, system_id, system_in_session_status_id, table_session_id, testing_session_id, dtype, comment, registration_status, noteslist) VALUES (nextval('tm_system_in_session_id_seq'), 'now', 'admin', true, NULL, NULL, NULL, NULL, false, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,  (select id from tm_system where keyword = 'TOOL_IHE_XDSTOOLS2'), 5, NULL, (select id from tm_testing_session where zone = 'Demo'), 'SYS', NULL, 2, NULL);


--
-- Data for Name: tm_institution_system; Type: TABLE DATA; Schema: public; Owner: gazelle
--

INSERT INTO tm_institution_system (id, last_changed, last_modifier_id, comment, institution_id, system_id) VALUES (nextval('tm_institution_system_id_seq'), 'now', 'admin', NULL, (select id from usr_institution where keyword = 'IHE'), (select id from tm_system where keyword = 'TOOL_IHE_XDSTOOLS2'));
INSERT INTO tm_institution_system (id, last_changed, last_modifier_id, comment, institution_id, system_id) VALUES (nextval('tm_institution_system_id_seq'), 'now', 'admin', NULL, (select id from usr_institution where keyword = 'IHE'), (select id from tm_system where keyword = 'TOOL_IHE_PATIENT_MANAGER'));


--
-- Name: tm_institution_system_id_seq; Type: SEQUENCE SET; Schema: public; Owner: gazelle
--

SELECT pg_catalog.setval('tm_institution_system_id_seq', 1508, true);


--
-- Data for Name: tm_system_actor_profiles; Type: TABLE DATA; Schema: public; Owner: gazelle
--

INSERT INTO tm_system_actor_profiles (id, last_changed, last_modifier_id, actor_integration_profile_option_id, system_id, testing_type_id, wanted_testing_type_id, testing_type_reviewed) VALUES (nextval('tm_system_actor_profiles_id_seq'), 'now', 'admin', 260, (select id from tm_system where keyword = 'TOOL_IHE_PATIENT_MANAGER'), 1, NULL, NULL);
INSERT INTO tm_system_actor_profiles (id, last_changed, last_modifier_id, actor_integration_profile_option_id, system_id, testing_type_id, wanted_testing_type_id, testing_type_reviewed) VALUES (nextval('tm_system_actor_profiles_id_seq'), 'now', 'admin', 738, (select id from tm_system where keyword = 'TOOL_IHE_PATIENT_MANAGER'), 1, NULL, NULL);
INSERT INTO tm_system_actor_profiles (id, last_changed, last_modifier_id, actor_integration_profile_option_id, system_id, testing_type_id, wanted_testing_type_id, testing_type_reviewed) VALUES (nextval('tm_system_actor_profiles_id_seq'), 'now', 'admin', 261, (select id from tm_system where keyword = 'TOOL_IHE_PATIENT_MANAGER'), 1, NULL, NULL);
INSERT INTO tm_system_actor_profiles (id, last_changed, last_modifier_id, actor_integration_profile_option_id, system_id, testing_type_id, wanted_testing_type_id, testing_type_reviewed) VALUES (nextval('tm_system_actor_profiles_id_seq'), 'now', 'admin', 739, (select id from tm_system where keyword = 'TOOL_IHE_PATIENT_MANAGER'), 1, NULL, NULL);
INSERT INTO tm_system_actor_profiles (id, last_changed, last_modifier_id, actor_integration_profile_option_id, system_id, testing_type_id, wanted_testing_type_id, testing_type_reviewed) VALUES (nextval('tm_system_actor_profiles_id_seq'), 'now', 'admin', 266, (select id from tm_system where keyword = 'TOOL_IHE_PATIENT_MANAGER'), 1, NULL, NULL);
INSERT INTO tm_system_actor_profiles (id, last_changed, last_modifier_id, actor_integration_profile_option_id, system_id, testing_type_id, wanted_testing_type_id, testing_type_reviewed) VALUES (nextval('tm_system_actor_profiles_id_seq'), 'now', 'admin', 859, (select id from tm_system where keyword = 'TOOL_IHE_PATIENT_MANAGER'), 1, NULL, NULL);
INSERT INTO tm_system_actor_profiles (id, last_changed, last_modifier_id, actor_integration_profile_option_id, system_id, testing_type_id, wanted_testing_type_id, testing_type_reviewed) VALUES (nextval('tm_system_actor_profiles_id_seq'), 'now', 'admin', 265, (select id from tm_system where keyword = 'TOOL_IHE_PATIENT_MANAGER'), 1, NULL, NULL);
INSERT INTO tm_system_actor_profiles (id, last_changed, last_modifier_id, actor_integration_profile_option_id, system_id, testing_type_id, wanted_testing_type_id, testing_type_reviewed) VALUES (nextval('tm_system_actor_profiles_id_seq'), 'now', 'admin', 858, (select id from tm_system where keyword = 'TOOL_IHE_PATIENT_MANAGER'), 1, NULL, NULL);
INSERT INTO tm_system_actor_profiles (id, last_changed, last_modifier_id, actor_integration_profile_option_id, system_id, testing_type_id, wanted_testing_type_id, testing_type_reviewed) VALUES (nextval('tm_system_actor_profiles_id_seq'), 'now', 'admin', 13,  (select id from tm_system where keyword = 'TOOL_IHE_PATIENT_MANAGER'), 1, NULL, NULL);
INSERT INTO tm_system_actor_profiles (id, last_changed, last_modifier_id, actor_integration_profile_option_id, system_id, testing_type_id, wanted_testing_type_id, testing_type_reviewed) VALUES (nextval('tm_system_actor_profiles_id_seq'), 'now', 'admin', 857, (select id from tm_system where keyword = 'TOOL_IHE_PATIENT_MANAGER'), 1, NULL, NULL);
INSERT INTO tm_system_actor_profiles (id, last_changed, last_modifier_id, actor_integration_profile_option_id, system_id, testing_type_id, wanted_testing_type_id, testing_type_reviewed) VALUES (nextval('tm_system_actor_profiles_id_seq'), 'now', 'admin', 247, (select id from tm_system where keyword = 'TOOL_IHE_PATIENT_MANAGER'), 1, NULL, NULL);
INSERT INTO tm_system_actor_profiles (id, last_changed, last_modifier_id, actor_integration_profile_option_id, system_id, testing_type_id, wanted_testing_type_id, testing_type_reviewed) VALUES (nextval('tm_system_actor_profiles_id_seq'), 'now', 'admin', 856, (select id from tm_system where keyword = 'TOOL_IHE_PATIENT_MANAGER'), 1, NULL, NULL);
INSERT INTO tm_system_actor_profiles (id, last_changed, last_modifier_id, actor_integration_profile_option_id, system_id, testing_type_id, wanted_testing_type_id, testing_type_reviewed) VALUES (nextval('tm_system_actor_profiles_id_seq'), 'now', 'admin', 262, (select id from tm_system where keyword = 'TOOL_IHE_PATIENT_MANAGER'), 1, NULL, NULL);
INSERT INTO tm_system_actor_profiles (id, last_changed, last_modifier_id, actor_integration_profile_option_id, system_id, testing_type_id, wanted_testing_type_id, testing_type_reviewed) VALUES (nextval('tm_system_actor_profiles_id_seq'), 'now', 'admin', 855, (select id from tm_system where keyword = 'TOOL_IHE_PATIENT_MANAGER'), 1, NULL, NULL);
INSERT INTO tm_system_actor_profiles (id, last_changed, last_modifier_id, actor_integration_profile_option_id, system_id, testing_type_id, wanted_testing_type_id, testing_type_reviewed) VALUES (nextval('tm_system_actor_profiles_id_seq'), 'now', 'admin', 860, (select id from tm_system where keyword = 'TOOL_IHE_PATIENT_MANAGER'), 1, NULL, NULL);
INSERT INTO tm_system_actor_profiles (id, last_changed, last_modifier_id, actor_integration_profile_option_id, system_id, testing_type_id, wanted_testing_type_id, testing_type_reviewed) VALUES (nextval('tm_system_actor_profiles_id_seq'), 'now', 'admin', 861, (select id from tm_system where keyword = 'TOOL_IHE_PATIENT_MANAGER'), 1, NULL, NULL);      
INSERT INTO tm_system_actor_profiles (id, last_changed, last_modifier_id, actor_integration_profile_option_id, system_id, testing_type_id, wanted_testing_type_id, testing_type_reviewed) VALUES (nextval('tm_system_actor_profiles_id_seq'), 'now', 'admin', 862, (select id from tm_system where keyword = 'TOOL_IHE_PATIENT_MANAGER'), 1, NULL, NULL);
INSERT INTO tm_system_actor_profiles (id, last_changed, last_modifier_id, actor_integration_profile_option_id, system_id, testing_type_id, wanted_testing_type_id, testing_type_reviewed) VALUES (nextval('tm_system_actor_profiles_id_seq'), 'now', 'admin', 863, (select id from tm_system where keyword = 'TOOL_IHE_PATIENT_MANAGER'), 1, NULL, NULL);
INSERT INTO tm_system_actor_profiles (id, last_changed, last_modifier_id, actor_integration_profile_option_id, system_id, testing_type_id, wanted_testing_type_id, testing_type_reviewed) VALUES (nextval('tm_system_actor_profiles_id_seq'), 'now', 'admin', 341, (select id from tm_system where keyword = 'TOOL_IHE_PATIENT_MANAGER'), 1, NULL, NULL);


