-- application preferences
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'application_issue_tracker_url', 'http://gazelle.ihe.net/jira/');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'application_name', 'Patient Manager');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'application_release_notes_url', 'http://gazelle.ihe.net/jira/browse/PAM#selectedTab=com.atlassian.jira.plugin.system.project%3Achangelog-panel');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'sending_application', 'PatientManager');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'sending_facility', 'IHE');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'svs_repository_url', 'https://gazelle.ihe.net');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'dds_ws_endpoint', 'https://gazelle.ihe.net/DemographicDataServer-DemographicDataServer-ejb/DemographicDataServerBean?wsdl');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'url_EVCS_ws', 'https://gazelle.ihe.net/GazelleHL7v2Validator-ejb/gazelleHL7v2ValidationWSService/gazelleHL7v2ValidationWS?wsdl');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'timeout_for_receiving_messages', '30000');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'documentation_url', 'https://gazelle.ihe.net/content/pam-simulator-user-manual');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'application_url', 'http://localhost:8280/PatientManager');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'gazelle_hl7v2_validator_url', 'https://gazelle.ihe.net/GazelleHL7Validator');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'number_of_segments_to_display', '40');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'create_worklist_url', 'http://localhost:8280/OrderManager/dispatcher.seam');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'time_zone', 'Europe/Paris');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'application_universal_id', 'to be defined');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'application_namespace_id', 'IHEPAM');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'use_ids_from_dds', 'true');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'application_works_without_cas', 'false');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'application_universal_id_type', 'ISO');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'dds_mode', 'full');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'cas_url', 'https://gazelle.ihe.net/cas');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'ip_login', 'false');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'ip_login_admin', '.*');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'message_permanent_link', 'http://localhost:8280/PatientManager/messages/messageDisplay.seam?id=');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'NUMBER_OF_ITEMS_PER_PAGE', '20');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'hl7v3_validator_url', 'https://gazelle.ihe.net/GazelleHL7v2Validator-ejb/ModelBasedValidationWSService/ModelBasedValidationWS?wsdl');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'default_pdq_domain', 'ITI');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'hl7v3_organization_oid', 'TBD');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'hl7v3_pdq_pdc_device_id', 'TBD');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'hl7v3_pdq_pds_device_id', 'TBD');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'hl7v3_validation_xsl_location', 'https://gazelle.ihe.net/xsl/hl7v3validatorDetailedResult.xsl');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'hl7v3_pix_consumer_device_id', 'TBD');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'hl7v3_pix_organization_oid', 'TBD');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'hl7v3_pix_mgr_device_id', 'TBD');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'pixv3_mgr_url', 'http://localhost:8280/PAMSimulator-ejb/PIXManager_Service/PIXManager_PortType');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'pdqv3_pds_url', 'http://localhost:8280/PAMSimulator-ejb/PDQSupplier_Service/PDQSupplier_Port_Soap12?wsdl');
insert into app_configuration (id, variable, value) values (nextval('app_configuration_id_seq'), 'use_predefined_authorities', 'true');
insert into app_configuration (id, variable, value) values (nextval('app_configuration_id_seq'), 'contact_email', 'anne-gaelle.berge@ihe-europe.net');
insert into app_configuration (id, variable, value) values (nextval('app_configuration_id_seq'), 'contact_name', 'Anne-Gaelle Berge');
insert into app_configuration (id, variable, value) values (nextval('app_configuration_id_seq'), 'contact_title', 'Application administrator');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'hl7v3_xcpd_respgw_url', 'http://localhost:8280/PAMSimulator-ejb/RespondingGateway_Service/RespondingGateway_PortType?wsdl');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'hl7v3_xcpd_respgw_device_id', '1.2.3');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'hl7v3_xcpd_initgw_device_id', '1.2.3');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'hl7v3_xcpd_initgw_home_community_id', '1.2.3');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'hl7v3_xcpd_respgw_home_community_id', '1.2.3');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'hl7v3_xcpd_initgw_url', 'http://localhost:8280/PAMSimulator-ejb/InitiatingGateway_Service/InitiatingGateway_PortType?wsdl');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'xcpd_respgw_cron_trigger', '1 * * * * ?');
--INSERT INTO app_configuration (id, variable, value) values (nextval('app_configuration_id_seq'), 'bp6_mode_enabled', 'false');
INSERT INTO app_configuration (id, variable, value) values (nextval('app_configuration_id_seq'), 'pam_automate_enabled', 'false');
INSERT INTO app_configuration (id, variable, value) values (nextval('app_configuration_id_seq'), 'graph_resources', '/opt/PatientManager/');
INSERT INTO app_configuration (id, variable, value) values (nextval('app_configuration_id_seq'), 'hl7v2_xsl_location', 'https://gazelle.ihe.net/xsl/hl7Validation/resultStylesheet.xsl');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'hl7v3_pix_src_device_id', '1.3.6.1.4.1.12559.11.20.1.11');
INSERT INTO app_configuration (id, variable, value) VALUES (nextval('app_configuration_id_seq'), 'enable_worklist', 'false');
insert into app_configuration(id, variable, value) values (nextval('app_configuration_id_seq'), 'visit_assigning_authority', 'GZL');
insert into app_configuration(id, variable, value) values (nextval('app_configuration_id_seq'), 'patient_assigning_authority', 'GZL');
insert into app_configuration(id, variable, value) values (nextval('app_configuration_id_seq'), 'account_assigning_authority', 'GZL');
insert into app_configuration(id, variable, value) values (nextval('app_configuration_id_seq'), 'movement_assigning_authority', 'GZL');
insert into app_configuration(id, variable, value) values (nextval('app_configuration_id_seq'), 'pdqm_service_pdc_messaging_client', 'http://localhost:8088/mockMessagingServicePortBinding?wsdl');

-- hierarchic designator
insert into pam_hierarchic_designator (id, namespace_id, universal_id, universal_id_type, type, is_default, index, is_tool_assigning_authority, prefix, usage) values (nextval('pam_hierarchic_designator_id_seq'),'GZL', 'TBD', 'ISO', 'PI', true, 0, true, 'PREFIXPI', 1);
insert into pam_hierarchic_designator (id, namespace_id, universal_id, universal_id_type, type, is_default, index, is_tool_assigning_authority, prefix, usage) values (nextval('pam_hierarchic_designator_id_seq'),'GZL', 'TBD', 'ISO', 'AN', true, 0, true, 'PREFIXAN', 2);
insert into pam_hierarchic_designator (id, namespace_id, universal_id, universal_id_type, type, is_default, index, is_tool_assigning_authority, prefix, usage) values (nextval('pam_hierarchic_designator_id_seq'),'GZL', 'TBD', 'ISO', 'VN', true, 0, true, 'PREFIXVN', 0);
insert into pam_hierarchic_designator (id, namespace_id, universal_id, universal_id_type, type, is_default, index, is_tool_assigning_authority, prefix, usage) values (nextval('pam_hierarchic_designator_id_seq'),'GZL', 'TBD', 'ISO', 'MOV', true, 0, true, 'PREFIXMOV', 3);

-- transaction definition
INSERT INTO tf_transaction(id, description, keyword, name) VALUES (nextval('tf_transaction_id_seq'), 'Patient Encounter Management', 'ITI-31', 'ITI-31');
INSERT INTO tf_transaction(id, description, keyword, name) VALUES (nextval('tf_transaction_id_seq'), 'Patient Identification Management', 'ITI-30', 'ITI-30');
INSERT INTO tf_transaction(id, description, keyword, name) VALUES (nextval('tf_transaction_id_seq'), 'Patient Demographics Query', 'ITI-21', 'ITI-21');
INSERT INTO tf_transaction(id, description, keyword, name) VALUES (nextval('tf_transaction_id_seq'), 'Patient Demographics and Visit Query', 'ITI-22', 'ITI-22');
INSERT INTO tf_transaction (id, keyword, name, description) values (nextval('tf_transaction_id_seq'), 'ITI-8', 'Patient Identity Feed', 'Patient Identity Feed');
INSERT INTO tf_transaction (id, keyword, name, description) values (nextval('tf_transaction_id_seq'), 'ITI-9', 'PIX Query', 'PIX Query');
INSERT INTO tf_transaction (id, keyword, name, description) values (nextval('tf_transaction_id_seq'), 'ITI-10', 'ITI-10', 'PIX Update notification');
INSERT INTO tf_transaction (id, keyword, name, description) values (nextval('tf_transaction_id_seq'), 'RAD-1', 'Patient Registration', 'Patient Registration');
INSERT INTO tf_transaction (id, keyword, name, description) values (nextval('tf_transaction_id_seq'), 'ITI-47', 'Patient Demographics Query HL7v3', 'Patient Demographics Query HL7v3');
INSERT INTO tf_transaction (id, keyword, name, description) values (nextval('tf_transaction_id_seq'), 'RAD-12', 'Patient Update', 'Patient Update');
INSERT INTO tf_transaction (id, keyword, name, description) values (nextval('tf_transaction_id_seq'), 'ITI-55', 'Cross Gateway Patient Discovery', 'Cross Gateway Patient Discovery');
INSERT INTO tf_transaction (id, keyword, name, description) values (nextval('tf_transaction_id_seq'), 'ITI-56', 'Patient Location Query', 'Patient Location Query');
INSERT INTO tf_transaction(id, description, keyword, name) VALUES (nextval('tf_transaction_id_seq'), 'Unknown transaction', 'UNKNOWN', 'UNKNOWN');
INSERT INTO tf_transaction(id, description, keyword, name) VALUES (nextval('tf_transaction_id_seq'), 'PIXV3 Query', 'ITI-45', 'ITI-45');
INSERT INTO tf_transaction(id, description, keyword, name) VALUES (nextval('tf_transaction_id_seq'), 'Patient Identity Feed HL7V3', 'ITI-44', 'ITI-44');
INSERT INTO tf_transaction(id, description, keyword, name) VALUES (nextval('tf_transaction_id_seq'), 'PIXV3 Update notification', 'ITI-46', 'ITI-46');
INSERT INTO tf_transaction(id, description, keyword, name) VALUES (nextval('tf_transaction_id_seq'), 'None', 'None', 'NONE');


-- domains
insert into tf_domain (id, description, keyword, name) values (nextval('tf_domain_id_seq'), 'ITI', 'ITI', 'IT-Infrasctructure');
insert into tf_domain (id, description, keyword, name) values (nextval('tf_domain_id_seq'), 'RAD', 'RAD', 'Radiology');
insert into tf_domain (id, description, keyword, name) values (nextval('tf_domain_id_seq'), 'IT-Insfrastructure in France', 'ITI-FR', 'IT-Infrastructure (France)');
insert into tf_domain (id, description, keyword, name) values (nextval('tf_domain_id_seq'), 'KSA', 'KSA', 'KSA MoH');

-- actor definition
INSERT INTO tf_actor(id, description, keyword, name, can_act_as_responder) VALUES (nextval('tf_actor_id_seq'), 'Patient Demographic Consumer', 'PDC', 'Patient Demographic Consumer', true);
INSERT INTO tf_actor(id, description, keyword, name, can_act_as_responder) VALUES (nextval('tf_actor_id_seq'), 'Patient Demographic Supplier', 'PDS', 'Patient Demographic Supplier', true);
INSERT INTO tf_actor(id, description, keyword, name, can_act_as_responder) VALUES (nextval('tf_actor_id_seq'), 'Patient Encounter Consumer', 'PEC', 'Patient Encounter Consumer', true);
INSERT INTO tf_actor(id, description, keyword, name, can_act_as_responder) VALUES (nextval('tf_actor_id_seq'), 'Patient Encounter Supplier', 'PES', 'Patient Encounter Supplier', false);
INSERT INTO tf_actor (id, keyword, name, description, can_act_as_responder) values (nextval('tf_actor_id_seq'), 'PAT_IDENTITY_SRC', 'Patient Identity Source', 'Patient Identity Source', false);
INSERT INTO tf_actor (id, keyword, name, description, can_act_as_responder) values (nextval('tf_actor_id_seq'), 'PAT_IDENTITY_CONSUMER', 'Patient Identity Consumer', 'Patient Identity Consumer', true);
INSERT INTO tf_actor (id, keyword, name, description, can_act_as_responder) values (nextval('tf_actor_id_seq'), 'PAT_IDENTITY_X_REF_MGR', 'Patient Identity Cross-Reference Manager', 'Patient Identity Cross-Reference Manager', true);
INSERT INTO tf_actor (id, keyword, name, description, can_act_as_responder) values (nextval('tf_actor_id_seq'), 'ADT', 'ADT', 'ADT', false);
INSERT INTO tf_actor (id, keyword, name, description, can_act_as_responder) values (nextval('tf_actor_id_seq'), 'MPI', 'ADT Client', 'MPI, OF, OP, IM, RM', true);
INSERT INTO tf_actor(id, description, keyword, name, can_act_as_responder) VALUES (nextval('tf_actor_id_seq'), 'Unknown actor', 'UNKNOWN', 'UNKNOWN', false);
INSERT INTO tf_actor (id, keyword, name, description, can_act_as_responder) VALUES (nextval('tf_actor_id_seq'), 'INIT_GW' ,'Initiating Gateway', 'Initiating Gateway', true);
INSERT INTO tf_actor (id, keyword, name, description, can_act_as_responder) VALUES (nextval('tf_actor_id_seq'), 'RESP_GW' ,'Responding Gateway', 'Responding Gateway', true);


-- set there the charset used by your simulator
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (nextval('hl7_charset_id_seq'),  'ASCII','ASCII', 'US-ASCII' );
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (nextval('hl7_charset_id_seq'),  'ISO8859-1',	'8859/1'	,'ISO8859_1');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (nextval('hl7_charset_id_seq'),  'ISO8859-2', 	'8859/2'	, 'ISO8859_2');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (nextval('hl7_charset_id_seq'),  'ISO8859-3', 	'8859/3'	, 'ISO8859_3');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (nextval('hl7_charset_id_seq'),  'ISO8859-4', 	'8859/4'	, 'ISO8859_4');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (nextval('hl7_charset_id_seq'),  'ISO8859-5', 	'8859/5'	, 'ISO8859_5');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (nextval('hl7_charset_id_seq'),  'ISO8859-6', 	'8859/6'	, 'ISO8859_6');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (nextval('hl7_charset_id_seq'),  'ISO8859-7', 	'8859/7'	, 'ISO8859_7');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (nextval('hl7_charset_id_seq'),  'ISO8859-8', 	'8859/8'	, 'ISO8859_8');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (nextval('hl7_charset_id_seq'), 'ISO8859-9', 	'8859/9'	, 'ISO8859_9');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (nextval('hl7_charset_id_seq'), 'Japanese (JIS X 0201)', 	'ISO IR14', 'JIS0201' );
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (nextval('hl7_charset_id_seq'), 'Japanese (JIS X 0208)', 	'ISO IR87', 'JIS0208' );
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (nextval('hl7_charset_id_seq'), 'Japanese (JIS X 0212)', 	'ISO IR159',  'JIS0212');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (nextval('hl7_charset_id_seq'), 'Chinese', 	'GB 18030-2000'	, 'EUC_CN');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (nextval('hl7_charset_id_seq'), 'Korean', 	'KS X 1001'	, 'EUC_KR');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (nextval('hl7_charset_id_seq'), 'Taiwanese', 	'CNS 11643-1992', 'EUC_TW');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (nextval('hl7_charset_id_seq'), 'Taiwanese (BIG 5)', 'BIG-5', 'Big5');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (nextval('hl7_charset_id_seq'), 'UTF-8', 		'UNICODE UTF-8' , 'UTF8'    );
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (nextval('hl7_charset_id_seq'), 'UTF-16', 		'UNICODE UTF-16', 'UTF-16');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (nextval('hl7_charset_id_seq'), 'UTF-32', 		'UNICODE UTF-32', 'UTF-32');
INSERT INTO hl7_charset (id, display_name, hl7_code, java_code) VALUES (nextval('hl7_charset_id_seq'), 'ISO8859-15', '8859/15', 'ISO8859_15');

INSERT INTO affinity_domain (id, keyword, label_to_display, profile) VALUES (nextval('affinity_domain_id_seq'), 'IHE', 'IHE', 'All');
INSERT INTO affinity_domain (id, label_to_display, profile, keyword) VALUES (nextval('affinity_domain_id_seq'), 'KSA', 'KPDQ', 'KSA');

-- set there the configuration of the simulated actors acting as responders
INSERT INTO hl7_simulator_responder_configuration (id, name, listening_port, simulated_actor_id, transaction_id, accepted_message_type, accepted_trigger_event, server_bean_name, ip_address, receiving_application, receiving_facility, is_running) VALUES (nextval('hl7_simulator_responder_configuration_id_seq'), 'PAM PDC', 10010, (select id from tf_actor where keyword = 'PDC'), (select id from tf_transaction where keyword = 'ITI-30'), '*', '*', 'pdcServer', '127.0.0.1', 'PatientManager', 'IHE', false);
INSERT INTO hl7_simulator_responder_configuration (id, name, listening_port, simulated_actor_id, transaction_id, accepted_message_type, accepted_trigger_event, server_bean_name, ip_address, receiving_application, receiving_facility, is_running) VALUES (nextval('hl7_simulator_responder_configuration_id_seq'), 'PAM PEC', 10050, (select id from tf_actor where keyword = 'PEC'), (select id from tf_transaction where keyword = 'ITI-31'), '*', '*', 'pecServer', '127.0.0.1', 'PatientManager', 'IHE', false);
INSERT INTO hl7_simulator_responder_configuration (id, name, listening_port, simulated_actor_id, transaction_id, accepted_message_type, accepted_trigger_event, server_bean_name, ip_address, receiving_application, receiving_facility, is_running) VALUES (nextval('hl7_simulator_responder_configuration_id_seq'), 'PDQ PDS', 10055, (select id from tf_actor where keyword = 'PDS'), null, '*', '*', 'pdqpdsServer', '127.0.0.1', 'PatientManager', 'IHE', false);
INSERT INTO hl7_simulator_responder_configuration (id, name, listening_port, simulated_actor_id, transaction_id, accepted_message_type, accepted_trigger_event, server_bean_name, ip_address, receiving_application, receiving_facility, is_running) VALUES (nextval('hl7_simulator_responder_configuration_id_seq'), 'PIX Manager', 10056, (select id from tf_actor where keyword = 'PAT_IDENTITY_X_REF_MGR'), null, '*', '*', 'pixManager', '127.0.0.1', 'PIXManager', 'IHE', false);
INSERT INTO hl7_simulator_responder_configuration (id, name, listening_port, simulated_actor_id, transaction_id, accepted_message_type, accepted_trigger_event, server_bean_name, ip_address, receiving_application, receiving_facility, is_running) VALUES (nextval('hl7_simulator_responder_configuration_id_seq'), 'PIX Consumer', 10054, (select id from tf_actor where keyword = 'PAT_IDENTITY_CONSUMER'), null, '*', '*', 'pixConsumer', '127.0.0.1', 'PIXConsumer', 'IHE', false);
UPDATE hl7_simulator_responder_configuration SET message_encoding = 1;
UPDATE hl7_simulator_responder_configuration SET hl7_protocol = 1;

INSERT INTO pam_message_id_generator (id, index, issuing_actor_id, oid) VALUES (nextval('pam_message_id_generator_id_seq'), 0, (select id from tf_actor where keyword = 'PDS'), 'TBD');
INSERT INTO pam_message_id_generator (id, index, issuing_actor_id, oid) VALUES (nextval('pam_message_id_generator_id_seq'), 0, (select id from tf_actor where keyword = 'PDC'), 'TBD');
INSERT INTO pam_message_id_generator (id, index, issuing_actor_id, oid) VALUES (nextval('pam_message_id_generator_id_seq'), 0, (select id from tf_actor where keyword = 'PAT_IDENTITY_SRC'), 'TBD');
INSERT INTO pam_message_id_generator (id, index, issuing_actor_id, oid) VALUES (nextval('pam_message_id_generator_id_seq'), 0, (select id from tf_actor where keyword = 'PAT_IDENTITY_CONSUMER'), 'TBD');
INSERT INTO pam_message_id_generator (id, index, issuing_actor_id, oid) VALUES (nextval('pam_message_id_generator_id_seq'), 0, (select id from tf_actor where keyword = 'PAT_IDENTITY_X_REF_MGR'), 'TBD');
INSERT INTO pam_message_id_generator (id, index, issuing_actor_id, oid) VALUES (nextval('pam_message_id_generator_id_seq'), 0, (select id from tf_actor where keyword = 'RESP_GW'), 'TBD');
INSERT INTO pam_message_id_generator (id, index, issuing_actor_id, oid) VALUES (nextval('pam_message_id_generator_id_seq'), 0, (select id from tf_actor where keyword = 'INIT_GW'), 'TBD');

INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A28^ADT_A05', '1.3.6.1.4.12559.11.1.1.36', (select id from tf_transaction where keyword = 'ITI-30'), (select id from tf_actor where keyword = 'PDS'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A31^ADT_A05', '1.3.6.1.4.12559.11.1.1.39', (select id from tf_transaction where keyword = 'ITI-30'), (select id from tf_actor where keyword = 'PDS'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A47^ADT_A30', '1.3.6.1.4.12559.11.1.1.38', (select id from tf_transaction where keyword = 'ITI-30'), (select id from tf_actor where keyword = 'PDS'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A40^ADT_A39', '1.3.6.1.4.12559.11.1.1.40', (select id from tf_transaction where keyword = 'ITI-30'), (select id from tf_actor where keyword = 'PDS'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A24^ADT_A24', '1.3.6.1.4.12559.11.1.1.41', (select id from tf_transaction where keyword = 'ITI-30'), (select id from tf_actor where keyword = 'PDS'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A37^ADT_A37', '1.3.6.1.4.12559.11.1.1.37', (select id from tf_transaction where keyword = 'ITI-30'), (select id from tf_actor where keyword = 'PDS'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A01^ADT_A01', '1.3.6.1.4.12559.11.1.1.60', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A04^ADT_A01', '1.3.6.1.4.12559.11.1.1.67', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A03^ADT_A03', '1.3.6.1.4.12559.11.1.1.64', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A08^ADT_A01', '1.3.6.1.4.12559.11.1.1.49', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A40^ADT_A39', '1.3.6.1.4.12559.11.1.1.69', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A11^ADT_A09', '1.3.6.1.4.12559.11.1.1.61', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A13^ADT_A01', '1.3.6.1.4.12559.11.1.1.66', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A05^ADT_A05', '1.3.6.1.4.12559.11.1.1.71', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A06^ADT_A06', '1.3.6.1.4.12559.11.1.1.74', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A07^ADT_A06', '1.3.6.1.4.12559.11.1.1.46', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A02^ADT_A02', '1.3.6.1.4.12559.11.1.1.62', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A38^ADT_A38', '1.3.6.1.4.12559.11.1.1.57', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A12^ADT_A12', '1.3.6.1.4.12559.11.1.1.63', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A14^ADT_A05', '1.3.6.1.4.12559.11.1.1.70', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A15^ADT_A15', '1.3.6.1.4.12559.11.1.1.73', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A16^ADT_A16', '1.3.6.1.4.12559.11.1.1.45', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A27^ADT_A21', '1.3.6.1.4.12559.11.1.1.54', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A26^ADT_A21', '1.3.6.1.4.12559.11.1.1.50', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A25^ADT_A21', '1.3.6.1.4.12559.11.1.1.47', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A21^ADT_A21', '1.3.6.1.4.12559.11.1.1.65', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A54^ADT_A54', '1.3.6.1.4.12559.11.1.1.55', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A22^ADT_A21', '1.3.6.1.4.12559.11.1.1.68', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A44^ADT_A43', '1.3.6.1.4.12559.11.1.1.51', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A55^ADT_A52', '1.3.6.1.4.12559.11.1.1.56', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A52^ADT_A52', '1.3.6.1.4.12559.11.1.1.48', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A53^ADT_A52', '1.3.6.1.4.12559.11.1.1.52', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A09^ADT_A09', '1.3.6.1.4.12559.11.1.1.53', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A10^ADT_A09', '1.3.6.1.4.12559.11.1.1.59', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A33^ADT_A21', '1.3.6.1.4.12559.11.1.1.75', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A32^ADT_A21', '1.3.6.1.4.12559.11.1.1.72', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ACK^ALL^ACK', '1.3.6.1.4.12559.11.1.1.33', (select id from tf_transaction where keyword = 'ITI-30'), (select id from tf_actor where keyword = 'PDC'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ACK^ALL^ACK', '1.3.6.1.4.12559.11.1.1.44', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PEC'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^Z99^ADT_A01', '1.3.6.1.4.12559.11.1.1.58', (select id from tf_transaction where keyword = 'ITI-31'), (select id from tf_actor where keyword = 'PES'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'QBP^Q22^QBP_Q21', '1.3.6.1.4.12559.11.1.1.31', (select id from tf_transaction where keyword = 'ITI-21'), (select id from tf_actor where keyword = 'PDC'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'RSP^K22^RSP_K21', '1.3.6.1.4.12559.11.1.1.35', (select id from tf_transaction where keyword = 'ITI-21'), (select id from tf_actor where keyword = 'PDS'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'QBP^ZV1^QBP_Q21', '1.3.6.1.4.12559.11.1.1.34', (select id from tf_transaction where keyword = 'ITI-22'), (select id from tf_actor where keyword = 'PDC'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'RSP^ZV2^RSP_ZV2', '1.3.6.1.4.12559.11.1.1.42', (select id from tf_transaction where keyword = 'ITI-22'), (select id from tf_actor where keyword = 'PDS'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A28^ADT_A05', '1.3.6.1.4.12559.11.1.1.36', (select id from tf_actor where keyword = 'PAT_IDENTITY_SRC'), (select id from tf_transaction where keyword = 'ITI-30'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A31^ADT_A05', '1.3.6.1.4.12559.11.1.1.39', (select id from tf_actor where keyword = 'PAT_IDENTITY_SRC'), (select id from tf_transaction where keyword = 'ITI-30'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A47^ADT_A30', '1.3.6.1.4.12559.11.1.1.38', (select id from tf_actor where keyword = 'PAT_IDENTITY_SRC'), (select id from tf_transaction where keyword = 'ITI-30'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A40^ADT_A39', '1.3.6.1.4.12559.11.1.1.40', (select id from tf_actor where keyword = 'PAT_IDENTITY_SRC'), (select id from tf_transaction where keyword = 'ITI-30'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A24^ADT_A24', '1.3.6.1.4.12559.11.1.1.41', (select id from tf_actor where keyword = 'PAT_IDENTITY_SRC'), (select id from tf_transaction where keyword = 'ITI-30'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A37^ADT_A37', '1.3.6.1.4.12559.11.1.1.37', (select id from tf_actor where keyword = 'PAT_IDENTITY_SRC'), (select id from tf_transaction where keyword = 'ITI-30'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ACK^ALL^ACK', '1.3.6.1.4.12559.11.1.1.33', (select id from tf_actor where keyword = 'PAT_IDENTITY_X_REF_MGR'), (select id from tf_transaction where keyword = 'ITI-30'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A31^ADT_A05', '1.3.6.1.4.12559.11.1.1.28', (select id from tf_actor where keyword = 'PAT_IDENTITY_X_REF_MGR'), (select id from tf_transaction where keyword = 'ITI-10'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ACK^ALL^ACK', '1.3.6.1.4.12559.11.1.1.33', (select id from tf_actor where keyword = 'PAT_IDENTITY_CONSUMER'), (select id from tf_transaction where keyword = 'ITI-10'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ACK^A01^ACK', '1.3.6.1.4.12559.11.1.1.147', (select id from tf_actor where keyword = 'PAT_IDENTITY_X_REF_MGR'), (select id from tf_transaction where keyword = 'ITI-8'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ACK^A04^ACK', '1.3.6.1.4.12559.11.1.1.148', (select id from tf_actor where keyword = 'PAT_IDENTITY_X_REF_MGR'), (select id from tf_transaction where keyword = 'ITI-8'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ACK^A05^ACK', '1.3.6.1.4.12559.11.1.1.149', (select id from tf_actor where keyword = 'PAT_IDENTITY_X_REF_MGR'), (select id from tf_transaction where keyword = 'ITI-8'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ACK^A08^ACK', '1.3.6.1.4.12559.11.1.1.150', (select id from tf_actor where keyword = 'PAT_IDENTITY_X_REF_MGR'), (select id from tf_transaction where keyword = 'ITI-8'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ACK^A40^ACK', '1.3.6.1.4.12559.11.1.1.151', (select id from tf_actor where keyword = 'PAT_IDENTITY_X_REF_MGR'), (select id from tf_transaction where keyword = 'ITI-8'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A08^ADT_A01', '1.3.6.1.4.12559.11.1.1.23', (select id from tf_actor where keyword = 'PAT_IDENTITY_SRC'), (select id from tf_transaction where keyword = 'ITI-8'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A01^ADT_A01', '1.3.6.1.4.12559.11.1.1.24', (select id from tf_actor where keyword = 'PAT_IDENTITY_SRC'), (select id from tf_transaction where keyword = 'ITI-8'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A04^ADT_A01', '1.3.6.1.4.12559.11.1.1.25', (select id from tf_actor where keyword = 'PAT_IDENTITY_SRC'), (select id from tf_transaction where keyword = 'ITI-8'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A40^ADT_A39', '1.3.6.1.4.12559.11.1.1.26', (select id from tf_actor where keyword = 'PAT_IDENTITY_SRC'), (select id from tf_transaction where keyword = 'ITI-8'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A05^ADT_A01', '1.3.6.1.4.12559.11.1.1.27', (select id from tf_actor where keyword = 'PAT_IDENTITY_SRC'), (select id from tf_transaction where keyword = 'ITI-8'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ACK^ALL^ACK', '1.3.6.1.4.12559.11.1.1.29', (select id from tf_actor where keyword = 'PAT_IDENTITY_X_REF_MGR'), (select id from tf_transaction where keyword = 'ITI-8'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'QBP^Q23^QBP_Q21', '1.3.6.1.4.12559.11.1.1.92', (select id from tf_actor where keyword = 'PAT_IDENTITY_CONSUMER'), (select id from tf_transaction where keyword = 'ITI-9'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'RSP^K23^RSP_K23', '1.3.6.1.4.12559.11.1.1.30', (select id from tf_actor where keyword = 'PAT_IDENTITY_X_REF_MGR'), (select id from tf_transaction where keyword = 'ITI-9'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'QCN^J01^QCN_J01', '1.3.6.1.4.12559.11.1.1.32', (select id from tf_actor where keyword = 'PDC'), (select id from tf_transaction where keyword = 'ITI-21'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'QCN^J01^QCN_J01', '1.3.6.1.4.12559.11.1.1.43', (select id from tf_actor where keyword = 'PDC'), (select id from tf_transaction where keyword = 'ITI-22'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ACK^J01^ACK', '1.3.6.1.4.12559.11.1.1.192', (select id from tf_actor where keyword = 'PDS'), (select id from tf_transaction where keyword = 'ITI-21'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ACK^J01^ACK', '1.3.6.1.4.12559.11.1.1.193', (select id from tf_actor where keyword = 'PDS'), (select id from tf_transaction where keyword = 'ITI-22'), (select id from tf_domain where keyword = 'ITI'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A01^ADT_A01', '1.3.6.1.4.12559.11.1.1.77', (select id from tf_actor where keyword = 'ADT'), (select id from tf_transaction where keyword = 'RAD-1'), (select id from tf_domain where keyword = 'RAD'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A04^ADT_A01', '1.3.6.1.4.12559.11.1.1.79', (select id from tf_actor where keyword = 'ADT'), (select id from tf_transaction where keyword = 'RAD-1'), (select id from tf_domain where keyword = 'RAD'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A05^ADT_A01', '1.3.6.1.4.12559.11.1.1.80', (select id from tf_actor where keyword = 'ADT'), (select id from tf_transaction where keyword = 'RAD-1'), (select id from tf_domain where keyword = 'RAD'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A11^ADT_A09', '1.3.6.1.4.12559.11.1.1.78', (select id from tf_actor where keyword = 'ADT'), (select id from tf_transaction where keyword = 'RAD-1'), (select id from tf_domain where keyword = 'RAD'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A38^ADT_A38', '1.3.6.1.4.12559.11.1.1.76', (select id from tf_actor where keyword = 'ADT'), (select id from tf_transaction where keyword = 'RAD-1'), (select id from tf_domain where keyword = 'RAD'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A08^ADT_A01', '1.3.6.1.4.12559.11.1.1.82', (select id from tf_actor where keyword = 'ADT'), (select id from tf_transaction where keyword = 'RAD-12'), (select id from tf_domain where keyword = 'RAD'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A40^ADT_A39', '1.3.6.1.4.12559.11.1.1.87', (select id from tf_actor where keyword = 'ADT'), (select id from tf_transaction where keyword = 'RAD-12'), (select id from tf_domain where keyword = 'RAD'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A06^ADT_A06', '1.3.6.1.4.12559.11.1.1.88', (select id from tf_actor where keyword = 'ADT'), (select id from tf_transaction where keyword = 'RAD-12'), (select id from tf_domain where keyword = 'RAD'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A07^ADT_A06', '1.3.6.1.4.12559.11.1.1.81', (select id from tf_actor where keyword = 'ADT'), (select id from tf_transaction where keyword = 'RAD-12'), (select id from tf_domain where keyword = 'RAD'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A03^ADT_A03', '1.3.6.1.4.12559.11.1.1.84', (select id from tf_actor where keyword = 'ADT'), (select id from tf_transaction where keyword = 'RAD-12'), (select id from tf_domain where keyword = 'RAD'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A13^ADT_A01', '1.3.6.1.4.12559.11.1.1.86', (select id from tf_actor where keyword = 'ADT'), (select id from tf_transaction where keyword = 'RAD-12'), (select id from tf_domain where keyword = 'RAD'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A02^ADT_A02', '1.3.6.1.4.12559.11.1.1.83', (select id from tf_actor where keyword = 'ADT'), (select id from tf_transaction where keyword = 'RAD-12'), (select id from tf_domain where keyword = 'RAD'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ADT^A12^ADT_A12', '1.3.6.1.4.12559.11.1.1.85', (select id from tf_actor where keyword = 'ADT'), (select id from tf_transaction where keyword = 'RAD-12'), (select id from tf_domain where keyword = 'RAD'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ACK^ALL^ACK', '1.3.6.1.4.12559.11.1.1.29', (select id from tf_actor where keyword = 'MPI'), (select id from tf_transaction where keyword = 'RAD-1'), (select id from tf_domain where keyword = 'RAD'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'ACK^ALL^ACK', '1.3.6.1.4.12559.11.1.1.29', (select id from tf_actor where keyword = 'MPI'), (select id from tf_transaction where keyword = 'RAD-1'), (select id from tf_domain where keyword = 'RAD'), 'V2');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'PRPA_IN201305UV02', '[ITI-47] Patient Demographics Query', (select id from tf_actor where keyword = 'PDC'), (select id from tf_transaction where keyword = 'ITI-47'), (select id from tf_domain where keyword = 'ITI'), 'V3');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'QUQI_IN000003UV01', '[ITI-47] Patient Demographics Query HL7V3 Continuation', (select id from tf_actor where keyword = 'PDC'), (select id from tf_transaction where keyword = 'ITI-47'), (select id from tf_domain where keyword = 'ITI'), 'V3');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'QUQI_IN000003UV01_Cancel', '[ITI-47] Patient Demographics Query HL7V3 Cancellation', (select id from tf_actor where keyword = 'PDC'), (select id from tf_transaction where keyword = 'ITI-47'), (select id from tf_domain where keyword = 'ITI'), 'V3');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'PRPA_IN201306UV02', '[ITI-47] Patient Demographics Query Response', (select id from tf_actor where keyword = 'PDS'), (select id from tf_transaction where keyword = 'ITI-47'), (select id from tf_domain where keyword = 'ITI'), 'V3');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'MCCI_IN000002UV01', '[ITI-47] Accept Acknowledgement', (select id from tf_actor where keyword = 'PDS'), (select id from tf_transaction where keyword = 'ITI-47'), (select id from tf_domain where keyword = 'ITI'), 'V3');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'MCCI_IN000002UV01', '[ITI-44] Patient Identity Feed HL7V3 - Acknowledgement', (select id from tf_actor where keyword = 'PAT_IDENTITY_X_REF_MGR'), (select id from tf_transaction where keyword = 'ITI-44'), (select id from tf_domain where keyword = 'ITI'), 'V3');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'PRPA_IN201309UV02', '[ITI-45] PIXV3 Query', (select id from tf_actor where keyword = 'PAT_IDENTITY_CONSUMER'), (select id from tf_transaction where keyword = 'ITI-45'), (select id from tf_domain where keyword = 'ITI'), 'V3');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'PRPA_IN201302UV02', '[ITI-45] PIXV3 Update Notification', (select id from tf_actor where keyword = 'PAT_IDENTITY_X_REF_MGR'), (select id from tf_transaction where keyword = 'ITI-46'), (select id from tf_domain where keyword = 'ITI'), 'V3');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'MCCI_IN000002UV01', '[ITI-45] PIXV3 Update Notification acknowledgement', (select id from tf_actor where keyword = 'PAT_IDENTITY_CONSUMER'), (select id from tf_transaction where keyword = 'ITI-46'), (select id from tf_domain where keyword = 'ITI'), 'V3');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'PRPA_IN201301UV02', '[ITI-44] Patient Identity Feed HL7V3 - Add Patient Record', (select id from tf_actor where keyword = 'PAT_IDENTITY_SRC'), (select id from tf_transaction where keyword = 'ITI-44'), (select id from tf_domain where keyword = 'ITI'), 'V3');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'PRPA_IN201302UV02', '[ITI-44] Patient Identity Feed HL7V3 - Revise Patient Record', (select id from tf_actor where keyword = 'PAT_IDENTITY_SRC'), (select id from tf_transaction where keyword = 'ITI-44'), (select id from tf_domain where keyword = 'ITI'), 'V3');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'PRPA_IN201304UV02', '[ITI-44] Patient Identity Feed HL7V3 - Patient Identity Merge', (select id from tf_actor where keyword = 'PAT_IDENTITY_SRC'), (select id from tf_transaction where keyword = 'ITI-44'), (select id from tf_domain where keyword = 'ITI'), 'V3');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'PRPA_IN201310UV02', '[ITI-45] PIXV3 Query Response', (select id from tf_actor where keyword = 'PAT_IDENTITY_X_REF_MGR'), (select id from tf_transaction where keyword = 'ITI-45'), (select id from tf_domain where keyword = 'ITI'), 'V3');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'PRPA_IN201305UV02', '[ITI-55] Cross Gateway Patient Discovery Request', (select id from tf_actor where keyword = 'INIT_GW'), (select id from tf_transaction where keyword = 'ITI-55'), (select id from tf_domain where keyword = 'ITI'), 'V3');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'PRPA_IN201305UV02 (deferred)', '[ITI-55] Cross Gateway Patient Discovery Request (Deferred option)',  (select id from tf_actor where keyword = 'INIT_GW'), (select id from tf_transaction where keyword = 'ITI-55'), (select id from tf_domain where keyword = 'ITI'), 'V3');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'PRPA_IN201306UV02', '[ITI-55] Cross Gateway Patient Discovery Response',  (select id from tf_actor where keyword = 'RESP_GW'), (select id from tf_transaction where keyword = 'ITI-55'), (select id from tf_domain where keyword = 'ITI'), 'V3');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'MCCI_IN000002UV01', '[ITI-55] Accept Acknowledgement',  (select id from tf_actor where keyword = 'RESP_GW'), (select id from tf_transaction where keyword = 'ITI-55'), (select id from tf_domain where keyword = 'ITI'), 'V3');
INSERT INTO validation_parameters (id, message_type, profile_oid, actor_id, transaction_id, domain_id, validator_type) VALUES (nextval('ort_validation_parameters_id_seq'), 'MCCI_IN000002UV01', '[ITI-55] Accept Acknowledgement',  (select id from tf_actor where keyword = 'INIT_GW'), (select id from tf_transaction where keyword = 'ITI-55'), (select id from tf_domain where keyword = 'ITI'), 'V3');

INSERT INTO pam_encounter_management_event (id, available, cancel_trigger_event, event_name, insert_trigger_event, page_id, update_trigger_event, selection) VALUES (20, true, 'A12', 'Transfer patient', 'A02', 'IHE_RAD12', NULL, 4);
INSERT INTO pam_encounter_management_event (id, available, cancel_trigger_event, event_name, insert_trigger_event, page_id, update_trigger_event, selection) VALUES (21, true, 'A13', 'Discharge patient', 'A03', 'IHE_RAD12', NULL, 1);
INSERT INTO pam_encounter_management_event (id, available, cancel_trigger_event, event_name, insert_trigger_event, page_id, update_trigger_event, selection) VALUES (11, true, NULL, 'Registration of an out-patient', 'A04', 'IHE_PIX', NULL, 2);
INSERT INTO pam_encounter_management_event (id, available, cancel_trigger_event, event_name, insert_trigger_event, page_id, update_trigger_event, selection) VALUES (16, true, 'A11', 'Registration of an out-patient', 'A04', 'IHE_RAD1', NULL, 2);
INSERT INTO pam_encounter_management_event (id, available, cancel_trigger_event, event_name, insert_trigger_event, page_id, update_trigger_event, selection) VALUES (14, true, NULL, 'Pre-admission of an in-patient', 'A05', 'IHE_PIX', NULL, 2);
INSERT INTO pam_encounter_management_event (id, available, cancel_trigger_event, event_name, insert_trigger_event, page_id, update_trigger_event, selection) VALUES (17, true, 'A38', 'Pre-admission of an in-patient', 'A05', 'IHE_RAD1', NULL, 2);
INSERT INTO pam_encounter_management_event (id, available, cancel_trigger_event, event_name, insert_trigger_event, page_id, update_trigger_event, selection) VALUES (7, true, NULL, 'Change patient class to inpatient', 'A06', 'IHE', NULL, 4);
INSERT INTO pam_encounter_management_event (id, available, cancel_trigger_event, event_name, insert_trigger_event, page_id, update_trigger_event, selection) VALUES (22, true, NULL, 'Change patient class to inpatient', 'A06', 'IHE_RAD12', NULL, 4);
INSERT INTO pam_encounter_management_event (id, available, cancel_trigger_event, event_name, insert_trigger_event, page_id, update_trigger_event, selection) VALUES (8, true, NULL, 'Change patient class to outpatient', 'A07', 'IHE', NULL, 4);
INSERT INTO pam_encounter_management_event (id, available, cancel_trigger_event, event_name, insert_trigger_event, page_id, update_trigger_event, selection) VALUES (23, true, NULL, 'Change patient class to outpatient', 'A07', 'IHE_RAD12', NULL, 4);
INSERT INTO pam_encounter_management_event (id, available, cancel_trigger_event, event_name, insert_trigger_event, page_id, update_trigger_event, selection) VALUES (4, true, NULL, 'Update patient information', 'A08', 'IHE', NULL, 2);
INSERT INTO pam_encounter_management_event (id, available, cancel_trigger_event, event_name, insert_trigger_event, page_id, update_trigger_event, selection) VALUES (12, true, NULL, 'Update Patient Information', 'A08', 'IHE_PIX', NULL, 2);
INSERT INTO pam_encounter_management_event (id, available, cancel_trigger_event, event_name, insert_trigger_event, page_id, update_trigger_event, selection) VALUES (18, true, NULL, 'Update Patient Information', 'A08', 'IHE_RAD12', NULL, 2);
INSERT INTO pam_encounter_management_event (id, available, cancel_trigger_event, event_name, insert_trigger_event, page_id, update_trigger_event, selection) VALUES (5, true, NULL, 'Merge patient identifier lists', 'A40', 'IHE', NULL, 2);
INSERT INTO pam_encounter_management_event (id, available, cancel_trigger_event, event_name, insert_trigger_event, page_id, update_trigger_event, selection) VALUES (13, true, NULL, 'Merge patient - Internal ID', 'A40', 'IHE_PIX', NULL, 2);
INSERT INTO pam_encounter_management_event (id, available, cancel_trigger_event, event_name, insert_trigger_event, page_id, update_trigger_event, selection) VALUES (19, true, NULL, 'Merge patient - Internal ID', 'A40', 'IHE_RAD12', NULL, 2);
INSERT INTO pam_encounter_management_event (id, available, cancel_trigger_event, event_name, insert_trigger_event, page_id, update_trigger_event, selection) VALUES (10, true, NULL, 'Admission of an in-patient', 'A01', 'IHE_PIX', NULL, 2);
INSERT INTO pam_encounter_management_event (id, available, cancel_trigger_event, event_name, insert_trigger_event, page_id, update_trigger_event, selection) VALUES (15, true, 'A11', 'Admission of an in-patient', 'A01', 'IHE_RAD1', NULL, 2);
INSERT INTO pam_encounter_management_event (id, available, cancel_trigger_event, event_name, insert_trigger_event, page_id, update_trigger_event, selection) VALUES (27, true, NULL, 'Move account information', 'A44', 'IHE', NULL, 1);
INSERT INTO pam_encounter_management_event (id, available, cancel_trigger_event, event_name, insert_trigger_event, page_id, update_trigger_event, selection) VALUES (9, true, 'A12', 'Transfer patient', 'A02', 'IHE', 'Z99', 4);
INSERT INTO pam_encounter_management_event (id, available, cancel_trigger_event, event_name, insert_trigger_event, page_id, update_trigger_event, selection) VALUES (3, true, 'A13', 'Discharge patient', 'A03', 'IHE', 'Z99', 1);
INSERT INTO pam_encounter_management_event (id, available, cancel_trigger_event, event_name, insert_trigger_event, page_id, update_trigger_event, selection) VALUES (2, true, 'A11', 'Register outpatient', 'A04', 'IHE', 'Z99', 2);
INSERT INTO pam_encounter_management_event (id, available, cancel_trigger_event, event_name, insert_trigger_event, page_id, update_trigger_event, selection) VALUES (6, true, 'A38', 'Pre-admit patient', 'A05', 'IHE', 'Z99', 2);
INSERT INTO pam_encounter_management_event (id, available, cancel_trigger_event, event_name, insert_trigger_event, page_id, update_trigger_event, selection) VALUES (1, true, 'A11', 'Admit inpatient', 'A01', 'IHE', 'Z99', 2);
INSERT INTO pam_encounter_management_event (id, available, cancel_trigger_event, event_name, insert_trigger_event, page_id, update_trigger_event, selection) VALUES (24, true, 'A55', 'Change attending doctor', 'A54', 'IHE', 'Z99', 1);
INSERT INTO pam_encounter_management_event (id, available, cancel_trigger_event, event_name, insert_trigger_event, page_id, update_trigger_event, selection) VALUES (25, true, 'A52', 'Leave of absence', 'A21', 'IHE', 'Z99', 1);
INSERT INTO pam_encounter_management_event (id, available, cancel_trigger_event, event_name, insert_trigger_event, page_id, update_trigger_event, selection) VALUES (26, true, 'A53', 'Return from leave of absence', 'A22', 'IHE', 'Z99', 1);
SELECT pg_catalog.setval('pam_encounter_management_event_id_seq', 28, true);
--
-- Data for Name: cmn_home; Type: TABLE DATA; Schema: public; Owner: gazelle
--

INSERT INTO cmn_home VALUES (1, 'Welcome to PAM Simulator', 'eng', 'PAM simulator');
INSERT INTO cmn_home VALUES (2, 'Bienvenue dans le Simulateur PAM', 'fra', 'PAM simulator');
SELECT pg_catalog.setval('cmn_home_id_seq', 2, true);

INSERT INTO usage_metadata (id, transaction_id, affinity_id, action, keyword) VALUES (nextval('usage_id_seq'), (select id from tf_transaction where keyword = 'ITI-47'), (select id from affinity_domain where keyword = 'IHE'), 'PDQV3 Supplier', 'IHE_PDQV3_PDS');
INSERT INTO usage_metadata (id, transaction_id, affinity_id, action, keyword) VALUES (nextval('usage_id_seq'), (select id from tf_transaction where keyword = 'ITI-55'), (select id from affinity_domain where keyword = 'IHE'), 'XCPD Responding Gateway', 'IHE_XCPD_RESP');
INSERT INTO usage_metadata (id, transaction_id, affinity_id, action, keyword) VALUES (nextval('usage_id_seq'), (select id from tf_transaction where keyword = 'ITI-56'), (select id from affinity_domain where keyword = 'IHE'), 'XCPD Responding Gateway - Health Data Locator option', 'IHE_XCPD_RESP_PLQ');
INSERT INTO usage_metadata (id, transaction_id, affinity_id, action, keyword) VALUES (nextval('usage_id_seq'), (select id from tf_transaction where keyword = 'ITI-55'), (select id from affinity_domain where keyword = 'IHE'), 'XCPD Initiating Gateway - Deferred response option', 'IHE_XCPD_INIT_DEFERRED');
INSERT INTO usage_metadata (id, transaction_id, affinity_id, action, keyword) VALUES (nextval('usage_id_seq'), (select id from tf_transaction where keyword = 'ITI-55'), (select id from affinity_domain where keyword = 'IHE'), 'XCPD Responding Gateway - Deferred response option', 'IHE_XCPD_RESP_DEFERRED');
INSERT INTO usage_metadata (id, transaction_id, affinity_id, action, keyword) VALUES (nextval('usage_id_seq'), (select id from tf_transaction where keyword = 'ITI-45'), (select id from affinity_domain where keyword = 'IHE'), 'PIXV3 Manager', 'IHE_PIX_MGR_ITI45');
INSERT INTO usage_metadata (id, transaction_id, affinity_id, action, keyword) VALUES (nextval('usage_id_seq'), (select id from tf_transaction where keyword = 'ITI-44'), (select id from affinity_domain where keyword = 'IHE'), 'PIXV3 Manager', 'IHE_PIX_MGR_ITI44');
INSERT INTO usage_metadata (id, transaction_id, affinity_id, action, keyword) VALUES (nextval('usage_id_seq'), (select id from tf_transaction where keyword = 'ITI-46'), (select id from affinity_domain where keyword = 'IHE'), 'PIXV3 Consumer', 'IHE_PIX_CONS');
INSERT INTO usage_metadata (id, transaction_id, affinity_id, action, keyword) VALUES (nextval('usage_id_seq'), (SELECT id FROM tf_transaction WHERE keyword = 'ITI-30'), (SELECT id FROM affinity_domain WHERE keyword = 'IHE'), 'PAM PDC', 'IHE_ITI30_PDC');
INSERT INTO usage_metadata (id, transaction_id, affinity_id, action, keyword) VALUES (nextval('usage_id_seq'), (SELECT id FROM tf_transaction WHERE keyword = 'ITI-31'), (SELECT id  FROM affinity_domain WHERE keyword = 'IHE'), 'PAM PEC', 'IHE_ITI31_PEC');
INSERT INTO usage_metadata (id, transaction_id, affinity_id, action, keyword) VALUES (nextval('usage_id_seq'), (SELECT id FROM tf_transaction WHERE keyword = 'ITI-30'), (SELECT id FROM affinity_domain WHERE keyword = 'IHE'), 'PIX Manager', 'IHE_ITI30_PIXMgr');
INSERT INTO usage_metadata (id, transaction_id, affinity_id, action, keyword) VALUES (nextval('usage_id_seq'), (SELECT id FROM tf_transaction WHERE keyword = 'RAD-1'), (SELECT id FROM affinity_domain WHERE keyword = 'IHE'), 'ADT Client', 'IHE_RAD1');
INSERT INTO usage_metadata (id, transaction_id, affinity_id, action, keyword) VALUES (nextval('usage_id_seq'), (SELECT id FROM tf_transaction WHERE keyword = 'RAD-12'), (SELECT id FROM affinity_domain WHERE keyword = 'IHE'), 'ADT Client', 'IHE_RAD12');
INSERT INTO usage_metadata (id, transaction_id, affinity_id, action, keyword)VALUES (nextval('usage_id_seq'), (SELECT id FROM tf_transaction WHERE keyword = 'ITI-21'), (SELECT id FROM affinity_domain WHERE keyword = 'IHE'), 'PDQ PDS', 'IHE_PDQ_PDS');
INSERT INTO usage_metadata (id, transaction_id, affinity_id, action, keyword) VALUES (nextval('usage_id_seq'), (SELECT id FROM tf_transaction WHERE keyword = 'ITI-22'), (SELECT id FROM affinity_domain WHERE keyword = 'IHE'), 'PDQ PDS (VISIT)', 'IHE_PDQ_PDS_VISIT');
INSERT INTO usage_metadata (id, transaction_id, affinity_id, action, keyword) VALUES (nextval('usage_id_seq'), (SELECT id FROM tf_transaction WHERE keyword = 'ITI-8'), (SELECT id FROM affinity_domain  WHERE keyword = 'IHE'), 'PIX Manager', 'IHE_ITI8_PIXMgr');
INSERT INTO usage_metadata (id, transaction_id, affinity_id, action, keyword) VALUES (nextval('usage_id_seq'), (SELECT id FROM tf_transaction WHERE keyword = 'ITI-9'), (SELECT id FROM affinity_domain WHERE keyword = 'IHE'), 'PIX Manager', 'IHE_ITI9_PIXMgr');
INSERT INTO usage_metadata (id, transaction_id, affinity_id, action, keyword) VALUES (nextval('usage_id_seq'), (SELECT id FROM tf_transaction WHERE keyword = 'ITI-10'), (SELECT id FROM affinity_domain WHERE keyword = 'IHE'), 'PIX Consumer', 'IHE_ITI10_CONS');

INSERT INTO pam_simulator_feature (id, keyword, label, enabled) VALUES (nextval('pam_simulator_feature_id_seq'), 'ADT', 'Radiology ADT', true);
INSERT INTO pam_simulator_feature (id, keyword, label, enabled) VALUES (nextval('pam_simulator_feature_id_seq'), 'PAM', 'PAM - Patient Administration Management', true);
INSERT INTO pam_simulator_feature (id, keyword, label, enabled) VALUES (nextval('pam_simulator_feature_id_seq'), 'PAM_AUTOMATON', 'PAM Automaton', true);
INSERT INTO pam_simulator_feature (id, keyword, label, enabled) VALUES (nextval('pam_simulator_feature_id_seq'), 'PIX', 'PIX - 	Patient Identifier Cross-referencing for MPI', true);
INSERT INTO pam_simulator_feature (id, keyword, label, enabled) VALUES (nextval('pam_simulator_feature_id_seq'), 'PIXV3', 'PIXV3 - 	Patient Identifier Cross-referencing HL7V3', true);
INSERT INTO pam_simulator_feature (id, keyword, label, enabled) VALUES (nextval('pam_simulator_feature_id_seq'), 'PIXM', 'PIXm - 	Patient Identifier Cross-referencing for Mobile', true);
INSERT INTO pam_simulator_feature (id, keyword, label, enabled) VALUES (nextval('pam_simulator_feature_id_seq'), 'PDQ', 'PDQ - 	Patient Demographic Query', true);
INSERT INTO pam_simulator_feature (id, keyword, label, enabled) VALUES (nextval('pam_simulator_feature_id_seq'), 'PDQV3', 'PDQV3 - 	Patient Demographic Query HL7V3', true);
INSERT INTO pam_simulator_feature (id, keyword, label, enabled) VALUES (nextval('pam_simulator_feature_id_seq'), 'PDQM', 'PDQm - 	Patient Demographic Query for Mobile', true);
INSERT INTO pam_simulator_feature (id, keyword, label, enabled) VALUES (nextval('pam_simulator_feature_id_seq'), 'XCPD', 'XCPD - 	Cross-Community Patient Discovery', true);
INSERT INTO pam_simulator_feature (id, keyword, label, enabled) VALUES (nextval('pam_simulator_feature_id_seq'), 'XUA', 'XUA - 	Cross-Enterprise User Access', true);
INSERT INTO pam_simulator_feature (id, keyword, label, enabled) VALUES (nextval('pam_simulator_feature_id_seq'), 'IHE', 'IHE - Default version of the profiles', false);
INSERT INTO pam_simulator_feature (id, keyword, label, enabled) VALUES (nextval('pam_simulator_feature_id_seq'), 'BP6', 'ITI-FR - French version of the ITI profiles', false);
INSERT INTO pam_simulator_feature (id, keyword, label, enabled) VALUES (nextval('pam_simulator_feature_id_seq'), 'CONNECTATHON', 'Connectathon demographics sharing', true);
INSERT INTO pam_simulator_feature (id, keyword, label, enabled) VALUES (nextval('pam_simulator_feature_id_seq'), 'SEQUOIA', 'Sequoia - Extensions for The Sequoia project', false);

