All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dbmigration.i2b2-data-schema-changelog.xml Maven / Gradle / Ivy

Go to download

AIW i2b2 ETL is a Protempa query results handler for loading data and abstractions into i2b2.

There is a newer version: 4.7
Show newest version
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
  #%L
  AIW i2b2 ETL
  %%
  Copyright (C) 2012 - 2015 Emory University
  %%
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
       http://www.apache.org/licenses/LICENSE-2.0
  
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
#L%
-->

<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" 
                   xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" 
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                   xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.3.xsd">

    <property name="date.type" value="DATE" dbms="oracle"/>
    <property name="date.type" value="DATETIME" dbms="h2"/>
    <property name="date.type" value="DATETIME" dbms="sqlserver"/>
    <property name="date.type" value="DATETIME" dbms="postgresql"/>

    <property name="int.type" value="NUMBER(18, 0)" dbms="oracle"/>
    <property name="int.type" value="NUMBER(18, 0)" dbms="h2"/>
    <property name="int.type" value="INT" dbms="sqlserver"/>
    <property name="int.type" value="INT" dbms="postgresql"/>

    <property name="float.type" value="NUMBER(18, 5)" dbms="oracle"/>
    <property name="float.type" value="NUMBER(18, 5)" dbms="h2"/>
    <property name="float.type" value="DECIMAL(18, 5)" dbms="sqlserver"/>
    <property name="float.type" value="DECIMAL(18, 5)" dbms="postgresql"/>
	
    <changeSet author="arpost" id="DATA-EK-1">
        <createTable tableName="EK_REJECTED_OBSERVATION_FACT">
            <column name="ENCOUNTER_NUM" type="BIGINT"/>
            <column name="ENCOUNTER_ID" type="VARCHAR(200)"/>
            <column name="ENCOUNTER_ID_SOURCE" type="VARCHAR(50)"/>
            <column name="CONCEPT_CD" type="VARCHAR(50)"/>
            <column name="PATIENT_NUM" type="BIGINT"/>
            <column name="PATIENT_ID" type="VARCHAR(200)"/>
            <column name="PATIENT_ID_SOURCE" type="VARCHAR(50)"/>
            <column name="PROVIDER_ID" type="VARCHAR(50)"/>
            <column name="START_DATE" type="${date.type}"/>
            <column name="MODIFIER_CD" type="VARCHAR(100)"/>
            <column name="INSTANCE_NUM" type="${int.type}"/>
            <column name="VALTYPE_CD" type="VARCHAR(50)"/>
            <column name="TVAL_CHAR" type="VARCHAR(255)"/>
            <column name="NVAL_NUM" type="${float.type}"/>
            <column name="VALUEFLAG_CD" type="CHAR(50)"/>
            <column name="QUANTITY_NUM" type="${float.type}"/>
            <column name="CONFIDENCE_NUM" type="${int.type}"/>
            <column name="OBSERVATION_BLOB" type="CLOB"/>
            <column name="UNITS_CD" type="VARCHAR(50)"/>
            <column name="END_DATE" type="${date.type}"/>
            <column name="LOCATION_CD" type="VARCHAR(50)"/>
            <column name="UPDATE_DATE" type="${date.type}"/>
            <column name="DOWNLOAD_DATE" type="${date.type}"/>
            <column name="IMPORT_DATE" type="${date.type}"/>
            <column name="SOURCESYSTEM_CD" type="VARCHAR(50)"/>
            <column name="UPLOAD_ID" type="BIGINT"/>
            <column name="REASON" type="VARCHAR(255)"/>
        </createTable>
        <createTable tableName="EK_TEMP_CONCEPT">
            <column name="CONCEPT_CD" type="VARCHAR(50)"/>
            <column name="CONCEPT_PATH" type="VARCHAR(700)"/>
            <column name="NAME_CHAR" type="VARCHAR(2000)"/>
            <column name="CONCEPT_BLOB" type="CLOB"/>
            <column name="UPDATE_DATE" type="${date.type}"/>
            <column name="DOWNLOAD_DATE" type="${date.type}"/>
            <column name="IMPORT_DATE" type="${date.type}"/>
            <column name="SOURCESYSTEM_CD" type="VARCHAR(50)"/>
            <column name="DELETE_DATE" type="${date.type}"/>
        </createTable>
        <createTable tableName="EK_TEMP_ENCOUNTER_MAPPING">
            <column name="ENCOUNTER_MAP_ID" type="VARCHAR(200)"/>
            <column name="ENCOUNTER_MAP_ID_SOURCE" type="VARCHAR(50)"/>
            <column name="PATIENT_MAP_ID" type="VARCHAR(200)"/>
            <column name="PATIENT_MAP_ID_SOURCE" type="VARCHAR(50)"/>
            <column name="ENCOUNTER_ID" type="VARCHAR(200)"/>
            <column name="ENCOUNTER_ID_SOURCE" type="VARCHAR(50)"/>
            <column name="ENCOUNTER_NUM" type="BIGINT"/>
            <column name="ENCOUNTER_MAP_ID_STATUS" type="VARCHAR(50)"/>
            <column name="PROCESS_STATUS_FLAG" type="CHAR(1)"/>
            <column name="UPDATE_DATE" type="${date.type}"/>
            <column name="DOWNLOAD_DATE" type="${date.type}"/>
            <column name="IMPORT_DATE" type="${date.type}"/>
            <column name="SOURCESYSTEM_CD" type="VARCHAR(50)"/>
            <column name="DELETE_DATE" type="${date.type}"/>
        </createTable>
        <createTable tableName="EK_TEMP_MODIFIER">
            <column name="MODIFIER_CD" type="VARCHAR(50)"/>
            <column name="MODIFIER_PATH" type="VARCHAR(900)"/>
            <column name="NAME_CHAR" type="VARCHAR(2000)"/>
            <column name="MODIFIER_BLOB" type="CLOB"/>
            <column name="UPDATE_DATE" type="${date.type}"/>
            <column name="DOWNLOAD_DATE" type="${date.type}"/>
            <column name="IMPORT_DATE" type="${date.type}"/>
            <column name="SOURCESYSTEM_CD" type="VARCHAR(50)"/>
            <column name="DELETE_DATE" type="${date.type}"/>
        </createTable>
        <createTable tableName="EK_TEMP_OBSERVATION">
            <column name="ENCOUNTER_NUM" type="BIGINT"/>
            <column name="ENCOUNTER_ID" type="VARCHAR(200)"/>
            <column name="ENCOUNTER_ID_SOURCE" type="VARCHAR(50)"/>
            <column name="CONCEPT_CD" type="VARCHAR(50)"/>
            <column name="PATIENT_NUM" type="BIGINT"/>
            <column name="PATIENT_ID" type="VARCHAR(200)"/>
            <column name="PATIENT_ID_SOURCE" type="VARCHAR(50)"/>
            <column name="PROVIDER_ID" type="VARCHAR(50)"/>
            <column name="START_DATE" type="${date.type}"/>
            <column name="MODIFIER_CD" type="VARCHAR(100)"/>
            <column name="INSTANCE_NUM" type="${int.type}"/>
            <column name="VALTYPE_CD" type="VARCHAR(50)"/>
            <column name="TVAL_CHAR" type="VARCHAR(255)"/>
            <column name="NVAL_NUM" type="${float.type}"/>
            <column name="VALUEFLAG_CD" type="VARCHAR(50)"/>
            <column name="QUANTITY_NUM" type="${float.type}"/>
            <column name="CONFIDENCE_NUM" type="${int.type}"/>
            <column name="OBSERVATION_BLOB" type="CLOB"/>
            <column name="UNITS_CD" type="VARCHAR(50)"/>
            <column name="END_DATE" type="${date.type}"/>
            <column name="LOCATION_CD" type="VARCHAR(50)"/>
            <column name="UPDATE_DATE" type="${date.type}"/>
            <column name="DOWNLOAD_DATE" type="${date.type}"/>
            <column name="IMPORT_DATE" type="${date.type}"/>
            <column name="SOURCESYSTEM_CD" type="VARCHAR(50)"/>
            <column name="UPLOAD_ID" type="BIGINT"/>
            <column name="DELETE_DATE" type="${date.type}"/>
        </createTable>
        <createTable tableName="EK_TEMP_OBSERVATION_COMPLETE">
            <column name="ENCOUNTER_NUM" type="BIGINT"/>
            <column name="ENCOUNTER_ID" type="VARCHAR(200)"/>
            <column name="ENCOUNTER_ID_SOURCE" type="VARCHAR(50)"/>
            <column name="CONCEPT_CD" type="VARCHAR(50)"/>
            <column name="PATIENT_NUM" type="BIGINT"/>
            <column name="PATIENT_ID" type="VARCHAR(200)"/>
            <column name="PATIENT_ID_SOURCE" type="VARCHAR(50)"/>
            <column name="PROVIDER_ID" type="VARCHAR(50)"/>
            <column name="START_DATE" type="${date.type}"/>
            <column name="MODIFIER_CD" type="VARCHAR(100)"/>
            <column name="INSTANCE_NUM" type="${int.type}"/>
            <column name="VALTYPE_CD" type="VARCHAR(50)"/>
            <column name="TVAL_CHAR" type="VARCHAR(255)"/>
            <column name="NVAL_NUM" type="${float.type}"/>
            <column name="VALUEFLAG_CD" type="CHAR(50)"/>
            <column name="QUANTITY_NUM" type="${float.type}"/>
            <column name="CONFIDENCE_NUM" type="${int.type}"/>
            <column name="OBSERVATION_BLOB" type="CLOB"/>
            <column name="UNITS_CD" type="VARCHAR(50)"/>
            <column name="END_DATE" type="${date.type}"/>
            <column name="LOCATION_CD" type="VARCHAR(50)"/>
            <column name="UPDATE_DATE" type="${date.type}"/>
            <column name="DOWNLOAD_DATE" type="${date.type}"/>
            <column name="IMPORT_DATE" type="${date.type}"/>
            <column name="SOURCESYSTEM_CD" type="VARCHAR(50)"/>
            <column name="UPLOAD_ID" type="BIGINT"/>
            <column name="DELETE_DATE" type="${date.type}"/>
        </createTable>
        <createTable tableName="EK_TEMP_PATIENT">
            <column name="PATIENT_ID" type="VARCHAR(200)"/>
            <column name="PATIENT_ID_SOURCE" type="VARCHAR(50)"/>
            <column name="PATIENT_NUM" type="BIGINT"/>
            <column name="VITAL_STATUS_CD" type="VARCHAR(50)"/>
            <column name="BIRTH_DATE" type="${date.type}"/>
            <column name="DEATH_DATE" type="${date.type}"/>
            <column name="SEX_CD" type="VARCHAR(50)"/>
            <column name="AGE_IN_YEARS_NUM" type="BIGINT"/>
            <column name="LANGUAGE_CD" type="VARCHAR(50)"/>
            <column name="RACE_CD" type="VARCHAR(50)"/>
            <column name="MARITAL_STATUS_CD" type="VARCHAR(50)"/>
            <column name="RELIGION_CD" type="VARCHAR(50)"/>
            <column name="ZIP_CD" type="VARCHAR(50)"/>
            <column name="STATECITYZIP_PATH" type="VARCHAR(700)"/>
            <column name="PATIENT_BLOB" type="CLOB"/>
            <column name="UPDATE_DATE" type="${date.type}"/>
            <column name="DOWNLOAD_DATE" type="${date.type}"/>
            <column name="IMPORT_DATE" type="${date.type}"/>
            <column name="SOURCESYSTEM_CD" type="VARCHAR(50)"/>
            <column name="DELETE_DATE" type="${date.type}"/>
        </createTable>
        <createTable tableName="EK_TEMP_PATIENT_MAPPING">
            <column name="PATIENT_MAP_ID" type="VARCHAR(200)"/>
            <column name="PATIENT_MAP_ID_SOURCE" type="VARCHAR(50)"/>
            <column name="PATIENT_ID_STATUS" type="VARCHAR(50)"/>
            <column name="PATIENT_ID" type="VARCHAR(200)"/>
            <column name="PATIENT_ID_SOURCE" type="VARCHAR(50)"/>
            <column name="PATIENT_NUM" type="BIGINT"/>
            <column name="PATIENT_MAP_ID_STATUS" type="VARCHAR(50)"/>
            <column name="PROCESS_STATUS_FLAG" type="CHAR(1)"/>
            <column name="UPDATE_DATE" type="${date.type}"/>
            <column name="DOWNLOAD_DATE" type="${date.type}"/>
            <column name="IMPORT_DATE" type="${date.type}"/>
            <column name="SOURCESYSTEM_CD" type="VARCHAR(50)"/>
            <column name="DELETE_DATE" type="${date.type}"/>
        </createTable>
        <createTable tableName="EK_TEMP_PROVIDER">
            <column name="PROVIDER_ID" type="VARCHAR(50)"/>
            <column name="PROVIDER_PATH" type="VARCHAR(700)"/>
            <column name="NAME_CHAR" type="VARCHAR(2000)"/>
            <column name="PROVIDER_BLOB" type="CLOB"/>
            <column name="UPDATE_DATE" type="${date.type}"/>
            <column name="DOWNLOAD_DATE" type="${date.type}"/>
            <column name="IMPORT_DATE" type="${date.type}"/>
            <column name="SOURCESYSTEM_CD" type="VARCHAR(50)"/>
            <column name="UPLOAD_ID" type="BIGINT"/>
            <column name="DELETE_DATE" type="${date.type}"/>
        </createTable>
        <createTable tableName="EK_TEMP_VISIT">
            <column name="ENCOUNTER_ID" type="VARCHAR(200)"/>
            <column name="ENCOUNTER_ID_SOURCE" type="VARCHAR(50)"/>
            <column name="PATIENT_ID" type="VARCHAR(200)"/>
            <column name="PATIENT_ID_SOURCE" type="VARCHAR(50)"/>
            <column name="ENCOUNTER_NUM" type="BIGINT"/>
            <column name="INOUT_CD" type="VARCHAR(50)"/>
            <column name="LOCATION_CD" type="VARCHAR(50)"/>
            <column name="LOCATION_PATH" type="VARCHAR(900)"/>
            <column name="START_DATE" type="${date.type}"/>
            <column name="END_DATE" type="${date.type}"/>
            <column name="VISIT_BLOB" type="CLOB"/>
            <column name="UPDATE_DATE" type="${date.type}"/>
            <column name="DOWNLOAD_DATE" type="${date.type}"/>
            <column name="IMPORT_DATE" type="${date.type}"/>
            <column name="SOURCESYSTEM_CD" type="VARCHAR(50)"/>
            <column name="ACTIVE_STATUS_CD" type="VARCHAR(50)"/>
            <column name="LENGTH_OF_STAY" type="BIGINT"/>
            <column name="DELETE_DATE" type="${date.type}"/>
        </createTable>
    </changeSet>
    <changeSet id="DATA-EK-2" author="arpost" dbms="postgresql">
        <sql>
            CREATE UNLOGGED TABLE EK_REJECTED_OBSERVATION_FACT_N (LIKE EK_REJECTED_OBSERVATION_FACT);
            DROP TABLE EK_REJECTED_OBSERVATION_FACT;
            ALTER TABLE EK_REJECTED_OBSERVATION_FACT_N RENAME TO EK_REJECTED_OBSERVATION_FACT;
            
            CREATE UNLOGGED TABLE EK_TEMP_CONCEPT_N (LIKE EK_TEMP_CONCEPT);
            DROP TABLE EK_TEMP_CONCEPT;
            ALTER TABLE EK_TEMP_CONCEPT_N RENAME TO EK_TEMP_CONCEPT;
            
            CREATE UNLOGGED TABLE EK_TEMP_ENCOUNTER_MAPPING_N (LIKE EK_TEMP_ENCOUNTER_MAPPING);
            DROP TABLE EK_TEMP_ENCOUNTER_MAPPING;
            ALTER TABLE EK_TEMP_ENCOUNTER_MAPPING_N RENAME TO EK_TEMP_ENCOUNTER_MAPPING;
            
            CREATE UNLOGGED TABLE EK_TEMP_MODIFIER_N (LIKE EK_TEMP_MODIFIER);
            DROP TABLE EK_TEMP_MODIFIER;
            ALTER TABLE EK_TEMP_MODIFIER_N RENAME TO EK_TEMP_MODIFIER;
            
            CREATE UNLOGGED TABLE EK_TEMP_OBSERVATION_N (LIKE EK_TEMP_OBSERVATION);
            DROP TABLE EK_TEMP_OBSERVATION;
            ALTER TABLE EK_TEMP_OBSERVATION_N RENAME TO EK_TEMP_OBSERVATION;
            
            CREATE UNLOGGED TABLE EK_TEMP_OBSERVATION_COMPLETE_N (LIKE EK_TEMP_OBSERVATION_COMPLETE);
            DROP TABLE EK_TEMP_OBSERVATION_COMPLETE;
            ALTER TABLE EK_TEMP_OBSERVATION_COMPLETE_N RENAME TO EK_TEMP_OBSERVATION_COMPLETE;
            
            CREATE UNLOGGED TABLE EK_TEMP_PATIENT_N (LIKE EK_TEMP_PATIENT);
            DROP TABLE EK_TEMP_PATIENT;
            ALTER TABLE EK_TEMP_PATIENT_N RENAME TO EK_TEMP_PATIENT;
            
            CREATE UNLOGGED TABLE EK_TEMP_PATIENT_MAPPING_N (LIKE EK_TEMP_PATIENT_MAPPING);
            DROP TABLE EK_TEMP_PATIENT_MAPPING;
            ALTER TABLE EK_TEMP_PATIENT_MAPPING_N RENAME TO EK_TEMP_PATIENT_MAPPING;
            
            CREATE UNLOGGED TABLE EK_TEMP_PROVIDER_N (LIKE EK_TEMP_PROVIDER);
            DROP TABLE EK_TEMP_PROVIDER;
            ALTER TABLE EK_TEMP_PROVIDER_N RENAME TO EK_TEMP_PROVIDER;
            
            CREATE UNLOGGED TABLE EK_TEMP_VISIT_N (LIKE EK_TEMP_VISIT);
            DROP TABLE EK_TEMP_VISIT;
            ALTER TABLE EK_TEMP_VISIT_N RENAME TO EK_TEMP_VISIT;
        </sql>
        <rollback>
            CREATE TABLE EK_REJECTED_OBSERVATION_FACT_N (LIKE EK_REJECTED_OBSERVATION_FACT);
            DROP TABLE EK_REJECTED_OBSERVATION_FACT;
            ALTER TABLE EK_REJECTED_OBSERVATION_FACT_N RENAME TO EK_REJECTED_OBSERVATION_FACT;
            
            CREATE TABLE EK_TEMP_CONCEPT_N (LIKE EK_TEMP_CONCEPT);
            DROP TABLE EK_TEMP_CONCEPT;
            ALTER TABLE EK_TEMP_CONCEPT_N RENAME TO EK_TEMP_CONCEPT;
            
            CREATE TABLE EK_TEMP_ENCOUNTER_MAPPING_N (LIKE EK_TEMP_ENCOUNTER_MAPPING);
            DROP TABLE EK_TEMP_ENCOUNTER_MAPPING;
            ALTER TABLE EK_TEMP_ENCOUNTER_MAPPING_N RENAME TO EK_TEMP_ENCOUNTER_MAPPING;
            
            CREATE TABLE EK_TEMP_MODIFIER_N (LIKE EK_TEMP_MODIFIER);
            DROP TABLE EK_TEMP_MODIFIER;
            ALTER TABLE EK_TEMP_MODIFIER_N RENAME TO EK_TEMP_MODIFIER;
            
            CREATE TABLE EK_TEMP_OBSERVATION_N (LIKE EK_TEMP_OBSERVATION);
            DROP TABLE EK_TEMP_OBSERVATION;
            ALTER TABLE EK_TEMP_OBSERVATION_N RENAME TO EK_TEMP_OBSERVATION;
            
            CREATE TABLE EK_TEMP_OBSERVATION_COMPLETE_N (LIKE EK_TEMP_OBSERVATION_COMPLETE);
            DROP TABLE EK_TEMP_OBSERVATION_COMPLETE;
            ALTER TABLE EK_TEMP_OBSERVATION_COMPLETE_N RENAME TO EK_TEMP_OBSERVATION_COMPLETE;
            
            CREATE TABLE EK_TEMP_PATIENT_N (LIKE EK_TEMP_PATIENT);
            DROP TABLE EK_TEMP_PATIENT;
            ALTER TABLE EK_TEMP_PATIENT_N RENAME TO EK_TEMP_PATIENT;
            
            CREATE TABLE EK_TEMP_PATIENT_MAPPING_N (LIKE EK_TEMP_PATIENT_MAPPING);
            DROP TABLE EK_TEMP_PATIENT_MAPPING;
            ALTER TABLE EK_TEMP_PATIENT_MAPPING_N RENAME TO EK_TEMP_PATIENT_MAPPING;
            
            CREATE TABLE EK_TEMP_PROVIDER_N (LIKE EK_TEMP_PROVIDER);
            DROP TABLE EK_TEMP_PROVIDER;
            ALTER TABLE EK_TEMP_PROVIDER_N RENAME TO EK_TEMP_PROVIDER;
            
            CREATE TABLE EK_TEMP_VISIT_N (LIKE EK_TEMP_VISIT);
            DROP TABLE EK_TEMP_VISIT;
            ALTER TABLE EK_TEMP_VISIT_N RENAME TO EK_TEMP_VISIT;
        </rollback>
    </changeSet>
    <changeSet author="arpost" id="DATA-EK-3">
        <createIndex indexName="EK_IDX_TEMP_CONCEPT_PAT_ID" tableName="EK_TEMP_CONCEPT" unique="false">
            <column name="CONCEPT_PATH"/>
        </createIndex>
        <createIndex indexName="EK_IDX_TEMP_ENCMAP_EID_ID" tableName="EK_TEMP_ENCOUNTER_MAPPING" unique="false">
            <column name="ENCOUNTER_ID"/>
            <column name="ENCOUNTER_ID_SOURCE"/>
            <column name="ENCOUNTER_MAP_ID"/>
            <column name="ENCOUNTER_MAP_ID_SOURCE"/>
            <column name="ENCOUNTER_NUM"/>
        </createIndex>
        <createIndex indexName="EK_IDX_TEMP_ENCMAP_STAT_EID_ID" tableName="EK_TEMP_ENCOUNTER_MAPPING" unique="false">
            <column name="PROCESS_STATUS_FLAG"/>
        </createIndex>
        <createIndex indexName="EK_IDX_TEMP_MODIFIER_PAT_ID" tableName="EK_TEMP_MODIFIER" unique="false">
            <column name="MODIFIER_PATH"/>
        </createIndex>
        <createIndex indexName="EK_IDX_TEMP_OBX_COM_ENC_PAT_ID" tableName="EK_TEMP_OBSERVATION_COMPLETE" unique="false">
            <column name="ENCOUNTER_ID"/>
            <column name="ENCOUNTER_ID_SOURCE"/>
            <column name="PATIENT_ID"/>
            <column name="PATIENT_ID_SOURCE"/>
        </createIndex>
        <createIndex indexName="EK_IDX_TEMP_OBX_COM_PK" tableName="EK_TEMP_OBSERVATION_COMPLETE" unique="false">
            <column name="ENCOUNTER_NUM"/>
            <column name="PATIENT_NUM"/>
            <column name="CONCEPT_CD"/>
            <column name="PROVIDER_ID"/>
            <column name="START_DATE"/>
            <column name="MODIFIER_CD"/>
            <column name="INSTANCE_NUM"/>
        </createIndex>
        <createIndex indexName="EK_IDX_TEMP_PATIENT_PAT_ID" tableName="EK_TEMP_PATIENT" unique="false">
            <column name="PATIENT_ID"/>
            <column name="PATIENT_ID_SOURCE"/>
            <column name="PATIENT_NUM"/>
        </createIndex>
        <createIndex indexName="EK_IDX_TEMP_PATMAP_MAP_PID_ID" tableName="EK_TEMP_PATIENT_MAPPING" unique="false">
            <column name="PATIENT_ID"/>
            <column name="PATIENT_ID_SOURCE"/>
            <column name="PATIENT_MAP_ID"/>
            <column name="PATIENT_MAP_ID_SOURCE"/>
            <column name="PATIENT_NUM"/>
        </createIndex>
        <createIndex indexName="EK_IDX_TEMP_PATMAP_PID_ID" tableName="EK_TEMP_PATIENT_MAPPING" unique="false">
            <column name="PATIENT_ID"/>
            <column name="PATIENT_ID_SOURCE"/>
        </createIndex>
        <createIndex indexName="EK_IDX_TEMP_PATMAP_STAT_PID_ID" tableName="EK_TEMP_PATIENT_MAPPING" unique="false">
            <column name="PROCESS_STATUS_FLAG"/>
        </createIndex>
        <createIndex indexName="EK_IDX_TEMP_PROVIDER_PPATH_ID" tableName="EK_TEMP_PROVIDER" unique="false">
            <column name="PROVIDER_PATH"/>
        </createIndex>
        <createIndex indexName="EK_IDX_TEMP_VISIT_ENC_ID" tableName="EK_TEMP_VISIT" unique="false">
            <column name="ENCOUNTER_ID"/>
            <column name="ENCOUNTER_ID_SOURCE"/>
            <column name="PATIENT_ID"/>
            <column name="PATIENT_ID_SOURCE"/>
        </createIndex>
        <createIndex indexName="EK_IDX_TEMP_VISIT_PATIENT_ID" tableName="EK_TEMP_VISIT" unique="false">
            <column name="PATIENT_ID"/>
            <column name="PATIENT_ID_SOURCE"/>
        </createIndex>
    </changeSet>
    <changeSet id="DATA-EK-4" author="arpost" dbms="oracle">
        <sql>
            ALTER TABLE EK_REJECTED_OBSERVATION_FACT NOLOGGING;
            ALTER TABLE EK_TEMP_CONCEPT NOLOGGING;
            ALTER TABLE EK_TEMP_ENCOUNTER_MAPPING NOLOGGING;
            ALTER TABLE EK_TEMP_MODIFIER NOLOGGING;
            ALTER TABLE EK_TEMP_OBSERVATION NOLOGGING;
            ALTER TABLE EK_TEMP_OBSERVATION_COMPLETE NOLOGGING;
            ALTER TABLE EK_TEMP_PATIENT NOLOGGING;
            ALTER TABLE EK_TEMP_PATIENT_MAPPING NOLOGGING;
            ALTER TABLE EK_TEMP_PROVIDER NOLOGGING;
            ALTER TABLE EK_TEMP_VISIT NOLOGGING;
            ALTER INDEX EK_IDX_TEMP_CONCEPT_PAT_ID NOLOGGING;
            ALTER INDEX EK_IDX_TEMP_ENCMAP_EID_ID NOLOGGING;
            ALTER INDEX EK_IDX_TEMP_ENCMAP_STAT_EID_ID NOLOGGING;
            ALTER INDEX EK_IDX_TEMP_MODIFIER_PAT_ID NOLOGGING;
            ALTER INDEX EK_IDX_TEMP_OBX_COM_ENC_PAT_ID NOLOGGING;
            ALTER INDEX EK_IDX_TEMP_OBX_COM_PK NOLOGGING;
            ALTER INDEX EK_IDX_TEMP_PATIENT_PAT_ID NOLOGGING;
            ALTER INDEX EK_IDX_TEMP_PATMAP_MAP_PID_ID NOLOGGING;
            ALTER INDEX EK_IDX_TEMP_PATMAP_PID_ID NOLOGGING;
            ALTER INDEX EK_IDX_TEMP_PATMAP_STAT_PID_ID NOLOGGING;
            ALTER INDEX EK_IDX_TEMP_PROVIDER_PPATH_ID NOLOGGING;
            ALTER INDEX EK_IDX_TEMP_VISIT_ENC_ID NOLOGGING;
            ALTER INDEX EK_IDX_TEMP_VISIT_PATIENT_ID NOLOGGING;
        </sql>
        <rollback>
            ALTER TABLE EK_REJECTED_OBSERVATION_FACT LOGGING;
            ALTER TABLE EK_TEMP_CONCEPT LOGGING;
            ALTER TABLE EK_TEMP_ENCOUNTER_MAPPING LOGGING;
            ALTER TABLE EK_TEMP_MODIFIER LOGGING;
            ALTER TABLE EK_TEMP_OBSERVATION LOGGING;
            ALTER TABLE EK_TEMP_OBSERVATION_COMPLETE LOGGING;
            ALTER TABLE EK_TEMP_PATIENT LOGGING;
            ALTER TABLE EK_TEMP_PATIENT_MAPPING LOGGING;
            ALTER TABLE EK_TEMP_PROVIDER LOGGING;
            ALTER TABLE EK_TEMP_VISIT LOGGING;
            ALTER INDEX EK_IDX_TEMP_CONCEPT_PAT_ID LOGGING;
            ALTER INDEX EK_IDX_TEMP_ENCMAP_EID_ID LOGGING;
            ALTER INDEX EK_IDX_TEMP_ENCMAP_STAT_EID_ID LOGGING;
            ALTER INDEX EK_IDX_TEMP_MODIFIER_PAT_ID LOGGING;
            ALTER INDEX EK_IDX_TEMP_OBX_COM_ENC_PAT_ID LOGGING;
            ALTER INDEX EK_IDX_TEMP_OBX_COM_PK LOGGING;
            ALTER INDEX EK_IDX_TEMP_PATIENT_PAT_ID LOGGING;
            ALTER INDEX EK_IDX_TEMP_PATMAP_MAP_PID_ID LOGGING;
            ALTER INDEX EK_IDX_TEMP_PATMAP_PID_ID LOGGING;
            ALTER INDEX EK_IDX_TEMP_PATMAP_STAT_PID_ID LOGGING;
            ALTER INDEX EK_IDX_TEMP_PROVIDER_PPATH_ID LOGGING;
            ALTER INDEX EK_IDX_TEMP_VISIT_ENC_ID LOGGING;
            ALTER INDEX EK_IDX_TEMP_VISIT_PATIENT_ID LOGGING;
        </rollback>
    </changeSet>
    <changeSet id="DATA-EK-5" author="arpost" dbms="oracle">
        <sql>
            ALTER TABLE EK_REJECTED_OBSERVATION_FACT PARALLEL;
            ALTER TABLE EK_TEMP_CONCEPT PARALLEL;
            ALTER TABLE EK_TEMP_ENCOUNTER_MAPPING PARALLEL;
            ALTER TABLE EK_TEMP_MODIFIER PARALLEL;
            ALTER TABLE EK_TEMP_OBSERVATION PARALLEL;
            ALTER TABLE EK_TEMP_OBSERVATION_COMPLETE PARALLEL;
            ALTER TABLE EK_TEMP_PATIENT PARALLEL;
            ALTER TABLE EK_TEMP_PATIENT_MAPPING PARALLEL;
            ALTER TABLE EK_TEMP_PROVIDER PARALLEL;
            ALTER TABLE EK_TEMP_VISIT PARALLEL;
            ALTER INDEX EK_IDX_TEMP_CONCEPT_PAT_ID PARALLEL;
            ALTER INDEX EK_IDX_TEMP_ENCMAP_EID_ID PARALLEL;
            ALTER INDEX EK_IDX_TEMP_ENCMAP_STAT_EID_ID PARALLEL;
            ALTER INDEX EK_IDX_TEMP_MODIFIER_PAT_ID PARALLEL;
            ALTER INDEX EK_IDX_TEMP_OBX_COM_ENC_PAT_ID PARALLEL;
            ALTER INDEX EK_IDX_TEMP_OBX_COM_PK PARALLEL;
            ALTER INDEX EK_IDX_TEMP_PATIENT_PAT_ID PARALLEL;
            ALTER INDEX EK_IDX_TEMP_PATMAP_MAP_PID_ID PARALLEL;
            ALTER INDEX EK_IDX_TEMP_PATMAP_PID_ID PARALLEL;
            ALTER INDEX EK_IDX_TEMP_PATMAP_STAT_PID_ID PARALLEL;
            ALTER INDEX EK_IDX_TEMP_PROVIDER_PPATH_ID PARALLEL;
            ALTER INDEX EK_IDX_TEMP_VISIT_ENC_ID PARALLEL;
            ALTER INDEX EK_IDX_TEMP_VISIT_PATIENT_ID PARALLEL;
        </sql>
        <rollback>
            ALTER TABLE EK_REJECTED_OBSERVATION_FACT NOPARALLEL;
            ALTER TABLE EK_TEMP_CONCEPT NOPARALLEL;
            ALTER TABLE EK_TEMP_ENCOUNTER_MAPPING NOPARALLEL;
            ALTER TABLE EK_TEMP_MODIFIER NOPARALLEL;
            ALTER TABLE EK_TEMP_OBSERVATION NOPARALLEL;
            ALTER TABLE EK_TEMP_OBSERVATION_COMPLETE NOPARALLEL;
            ALTER TABLE EK_TEMP_PATIENT NOPARALLEL;
            ALTER TABLE EK_TEMP_PATIENT_MAPPING NOPARALLEL;
            ALTER TABLE EK_TEMP_PROVIDER NOPARALLEL;
            ALTER TABLE EK_TEMP_VISIT NOPARALLEL;
            ALTER INDEX EK_IDX_TEMP_CONCEPT_PAT_ID NOPARALLEL;
            ALTER INDEX EK_IDX_TEMP_ENCMAP_EID_ID NOPARALLEL;
            ALTER INDEX EK_IDX_TEMP_ENCMAP_STAT_EID_ID NOPARALLEL;
            ALTER INDEX EK_IDX_TEMP_MODIFIER_PAT_ID NOPARALLEL;
            ALTER INDEX EK_IDX_TEMP_OBX_COM_ENC_PAT_ID NOPARALLEL;
            ALTER INDEX EK_IDX_TEMP_OBX_COM_PK NOPARALLEL;
            ALTER INDEX EK_IDX_TEMP_PATIENT_PAT_ID NOPARALLEL;
            ALTER INDEX EK_IDX_TEMP_PATMAP_MAP_PID_ID NOPARALLEL;
            ALTER INDEX EK_IDX_TEMP_PATMAP_PID_ID NOPARALLEL;
            ALTER INDEX EK_IDX_TEMP_PATMAP_STAT_PID_ID NOPARALLEL;
            ALTER INDEX EK_IDX_TEMP_PROVIDER_PPATH_ID NOPARALLEL;
            ALTER INDEX EK_IDX_TEMP_VISIT_ENC_ID NOPARALLEL;
            ALTER INDEX EK_IDX_TEMP_VISIT_PATIENT_ID NOPARALLEL;
        </rollback>
    </changeSet>
    <changeSet id="DATA-EK-6" author="arpost">
        <addNotNullConstraint tableName="EK_REJECTED_OBSERVATION_FACT" columnName="ENCOUNTER_ID" columnDataType="VARCHAR(200)"/>
        <addNotNullConstraint tableName="EK_REJECTED_OBSERVATION_FACT" columnName="ENCOUNTER_ID_SOURCE" columnDataType="VARCHAR(50)"/>
        <addNotNullConstraint tableName="EK_REJECTED_OBSERVATION_FACT" columnName="CONCEPT_CD" columnDataType="VARCHAR(50)"/>
        <addNotNullConstraint tableName="EK_REJECTED_OBSERVATION_FACT" columnName="PATIENT_ID" columnDataType="VARCHAR(200)"/>
        <addNotNullConstraint tableName="EK_REJECTED_OBSERVATION_FACT" columnName="PATIENT_ID_SOURCE" columnDataType="VARCHAR(50)"/>
        <addNotNullConstraint tableName="EK_TEMP_CONCEPT" columnName="CONCEPT_CD" columnDataType="VARCHAR(50)"/>
        <addNotNullConstraint tableName="EK_TEMP_CONCEPT" columnName="CONCEPT_PATH" columnDataType="VARCHAR(700)"/>
        <addNotNullConstraint tableName="EK_TEMP_ENCOUNTER_MAPPING" columnName="ENCOUNTER_MAP_ID" columnDataType="VARCHAR(200)"/>
        <addNotNullConstraint tableName="EK_TEMP_ENCOUNTER_MAPPING" columnName="ENCOUNTER_MAP_ID_SOURCE" columnDataType="VARCHAR(50)"/>
        <addNotNullConstraint tableName="EK_TEMP_ENCOUNTER_MAPPING" columnName="ENCOUNTER_ID" columnDataType="VARCHAR(200)"/>
        <addNotNullConstraint tableName="EK_TEMP_MODIFIER" columnName="MODIFIER_CD" columnDataType="VARCHAR(50)"/>
        <addNotNullConstraint tableName="EK_TEMP_MODIFIER" columnName="MODIFIER_PATH" columnDataType="VARCHAR(900)"/>
        <addNotNullConstraint tableName="EK_TEMP_OBSERVATION" columnName="ENCOUNTER_ID" columnDataType="VARCHAR(200)"/>
        <addNotNullConstraint tableName="EK_TEMP_OBSERVATION" columnName="ENCOUNTER_ID_SOURCE" columnDataType="VARCHAR(50)"/>
        <addNotNullConstraint tableName="EK_TEMP_OBSERVATION" columnName="CONCEPT_CD" columnDataType="VARCHAR(50)"/>
        <addNotNullConstraint tableName="EK_TEMP_OBSERVATION" columnName="PATIENT_ID" columnDataType="VARCHAR(200)"/>
        <addNotNullConstraint tableName="EK_TEMP_OBSERVATION" columnName="PATIENT_ID_SOURCE" columnDataType="VARCHAR(50)"/>
        <addNotNullConstraint tableName="EK_TEMP_OBSERVATION_COMPLETE" columnName="ENCOUNTER_ID" columnDataType="VARCHAR(200)"/>
        <addNotNullConstraint tableName="EK_TEMP_OBSERVATION_COMPLETE" columnName="ENCOUNTER_ID_SOURCE" columnDataType="VARCHAR(50)"/>
        <addNotNullConstraint tableName="EK_TEMP_OBSERVATION_COMPLETE" columnName="CONCEPT_CD" columnDataType="VARCHAR(50)"/>
        <addNotNullConstraint tableName="EK_TEMP_OBSERVATION_COMPLETE" columnName="PATIENT_ID" columnDataType="VARCHAR(200)"/>
        <addNotNullConstraint tableName="EK_TEMP_OBSERVATION_COMPLETE" columnName="PATIENT_ID_SOURCE" columnDataType="VARCHAR(50)"/>
        <addNotNullConstraint tableName="EK_TEMP_PROVIDER" columnName="PROVIDER_ID" columnDataType="VARCHAR(50)"/>
        <addNotNullConstraint tableName="EK_TEMP_PROVIDER" columnName="PROVIDER_PATH" columnDataType="VARCHAR(700)"/>
        <addNotNullConstraint tableName="EK_TEMP_VISIT" columnName="ENCOUNTER_ID" columnDataType="VARCHAR(200)"/>
        <addNotNullConstraint tableName="EK_TEMP_VISIT" columnName="ENCOUNTER_ID_SOURCE" columnDataType="VARCHAR(50)"/>
        <addNotNullConstraint tableName="EK_TEMP_VISIT" columnName="PATIENT_ID" columnDataType="VARCHAR(200)"/>
        <addNotNullConstraint tableName="EK_TEMP_VISIT" columnName="PATIENT_ID_SOURCE" columnDataType="VARCHAR(50)"/>
    </changeSet>
</databaseChangeLog>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy