<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ The contents of this file are subject to the Mozilla Public License
  ~ Version 1.1 (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.mozilla.org/MPL/
  ~
  ~ Software distributed under the License is distributed on an "AS IS"
  ~ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
  ~ License for the specific language governing rights and limitations under
  ~ the License.
  ~
  ~ The Original Code is OpenELIS code.
  ~
  ~ Copyright (C) ITECH, University of Washington, Seattle WA.  All Rights Reserved.
  -->

<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd">
<changeSet author="paulsc" id="1">
    <comment>Add tag to site logo information and update the name</comment>
    <update tableName="site_information" >
        <column name="name" value="headerRightImage" />
        <column name="lastupdated" valueDate=" now() " />
        <column name="description" value="Image for the right side of report header" />
        <column name="value" value="" />
        <column name="instruction_key" value="siteInfo.instruction.labLogo.right" />
        <column name="description_key" value="siteInfo.lab.logo.right" />
        <where>name = 'lab logo'</where>
    </update>
    <insert schemaName="clinlims" tableName="site_information" >
        <column name="id" valueNumeric=" nextval( 'site_information_seq' ) " />
        <column name="name"  value="headerLeftImage" />
        <column name="description" value="Image for the left side of report header" />
        <column name="domain_id" valueNumeric=" (select id from clinlims.site_information_domain where name = 'printedReportsConfig' ) " />
        <column name="lastupdated" valueDate=" now() " />
        <column name="value_type" value="logoUpload" />
        <column name="value" value="" />
        <column name="instruction_key" value="siteInfo.instruction.labLogo.left" />
        <column name="description_key" value="siteInfo.lab.logo.left" />
    </insert>
</changeSet>
    <changeSet id="2" author="paulsc" >
        <comment>Removes the use logo entry from site information</comment>
        <delete tableName="site_information" >
            <where>name = 'useLogoInReport'</where>
        </delete>
    </changeSet>
    <changeSet id="3" author="paulsc" context="CI_IPCI, ciLNSP, haiti, haitiLNSP, ci_regional">
        <comment>Backfills admin permission</comment>
        <insert schemaName="clinlims" tableName="system_module">
            <column name="id" valueNumeric=" nextval( 'system_module_seq' )  "/>
            <column name="name" value="PatientConfiguration"/>
            <column name="description" value="Admin=&gt;patient config"/>
            <column name="has_select_flag" value="Y"/>
            <column name="has_add_flag" value="Y"/>
            <column name="has_update_flag" value="Y"  />
            <column name="has_delete_flag" value="Y"/>
        </insert>
        <insert schemaName="clinlims" tableName="system_module">
            <column name="id" valueNumeric=" nextval( 'system_module_seq' )  "/>
            <column name="name" value="ResultConfiguration"/>
            <column name="description" value="Admin=&gt;Result config"/>
            <column name="has_select_flag" value="Y"/>
            <column name="has_add_flag" value="Y"/>
            <column name="has_update_flag" value="Y"  />
            <column name="has_delete_flag" value="Y"/>
        </insert>
        <insert schemaName="clinlims" tableName="system_module">
            <column name="id" valueNumeric=" nextval( 'system_module_seq' )  "/>
            <column name="name" value="PrintedReportsConfiguration"/>
            <column name="description" value="Admin=&gt;printed reports config"/>
            <column name="has_select_flag" value="Y"/>
            <column name="has_add_flag" value="Y"/>
            <column name="has_update_flag" value="Y"  />
            <column name="has_delete_flag" value="Y"/>
        </insert>
        <insert schemaName="clinlims" tableName="system_module">
            <column name="id" valueNumeric=" nextval( 'system_module_seq' )  "/>
            <column name="name" value="NonConformityConfiguration"/>
            <column name="description" value="Admin=&gt;non-conformity config"/>
            <column name="has_select_flag" value="Y"/>
            <column name="has_add_flag" value="Y"/>
            <column name="has_update_flag" value="Y"  />
            <column name="has_delete_flag" value="Y"/>
        </insert>
        <insert tableName="system_role_module">
            <column name="id" valueNumeric=" nextval( 'system_user_module_seq' )  " />
            <column name="system_role_id" valueNumeric=" ( select id from clinlims.system_role where name = 'Maintenance Admin' ) " />
            <column name="system_module_id" valueNumeric=" ( select id from clinlims.system_module where name = 'PatientConfiguration' ) " />
        </insert>
        <insert tableName="system_role_module">
            <column name="id" valueNumeric=" nextval( 'system_user_module_seq' )  " />
            <column name="system_role_id" valueNumeric=" ( select id from clinlims.system_role where name = 'Maintenance Admin' ) " />
            <column name="system_module_id" valueNumeric=" ( select id from clinlims.system_module where name = 'ResultConfiguration' ) " />
        </insert>
        <insert tableName="system_role_module">
            <column name="id" valueNumeric=" nextval( 'system_user_module_seq' )  " />
            <column name="system_role_id" valueNumeric=" ( select id from clinlims.system_role where name = 'Maintenance Admin' ) " />
            <column name="system_module_id" valueNumeric=" ( select id from clinlims.system_module where name = 'PrintedReportsConfiguration' ) " />
        </insert>
        <insert tableName="system_role_module">
            <column name="id" valueNumeric=" nextval( 'system_user_module_seq' )  " />
            <column name="system_role_id" valueNumeric=" ( select id from clinlims.system_role where name = 'Maintenance Admin' ) " />
            <column name="system_module_id" valueNumeric=" ( select id from clinlims.system_module where name = 'NonConformityConfiguration' ) " />
        </insert>
    </changeSet>
</databaseChangeLog><commit_msg>Correction of permission updates, RetroCI and ciLNSP already had some of the updates<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ The contents of this file are subject to the Mozilla Public License
  ~ Version 1.1 (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.mozilla.org/MPL/
  ~
  ~ Software distributed under the License is distributed on an "AS IS"
  ~ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
  ~ License for the specific language governing rights and limitations under
  ~ the License.
  ~
  ~ The Original Code is OpenELIS code.
  ~
  ~ Copyright (C) ITECH, University of Washington, Seattle WA.  All Rights Reserved.
  -->

<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd">
<changeSet author="paulsc" id="1">
    <comment>Add tag to site logo information and update the name</comment>
    <update tableName="site_information" >
        <column name="name" value="headerRightImage" />
        <column name="lastupdated" valueDate=" now() " />
        <column name="description" value="Image for the right side of report header" />
        <column name="value" value="" />
        <column name="instruction_key" value="siteInfo.instruction.labLogo.right" />
        <column name="description_key" value="siteInfo.lab.logo.right" />
        <where>name = 'lab logo'</where>
    </update>
    <insert schemaName="clinlims" tableName="site_information" >
        <column name="id" valueNumeric=" nextval( 'site_information_seq' ) " />
        <column name="name"  value="headerLeftImage" />
        <column name="description" value="Image for the left side of report header" />
        <column name="domain_id" valueNumeric=" (select id from clinlims.site_information_domain where name = 'printedReportsConfig' ) " />
        <column name="lastupdated" valueDate=" now() " />
        <column name="value_type" value="logoUpload" />
        <column name="value" value="" />
        <column name="instruction_key" value="siteInfo.instruction.labLogo.left" />
        <column name="description_key" value="siteInfo.lab.logo.left" />
    </insert>
</changeSet>
    <changeSet id="2" author="paulsc" >
        <comment>Removes the use logo entry from site information</comment>
        <delete tableName="site_information" >
            <where>name = 'useLogoInReport'</where>
        </delete>
    </changeSet>
    <changeSet id="3" author="paulsc" context="CI_IPCI, haiti, haitiLNSP, ci_regional">
        <comment>Backfills admin permission</comment>
        <insert schemaName="clinlims" tableName="system_module">
            <column name="id" valueNumeric=" nextval( 'system_module_seq' )  "/>
            <column name="name" value="PatientConfiguration"/>
            <column name="description" value="Admin=&gt;patient config"/>
            <column name="has_select_flag" value="Y"/>
            <column name="has_add_flag" value="Y"/>
            <column name="has_update_flag" value="Y"  />
            <column name="has_delete_flag" value="Y"/>
        </insert>
        <insert schemaName="clinlims" tableName="system_module">
            <column name="id" valueNumeric=" nextval( 'system_module_seq' )  "/>
            <column name="name" value="ResultConfiguration"/>
            <column name="description" value="Admin=&gt;Result config"/>
            <column name="has_select_flag" value="Y"/>
            <column name="has_add_flag" value="Y"/>
            <column name="has_update_flag" value="Y"  />
            <column name="has_delete_flag" value="Y"/>
        </insert>
        <insert schemaName="clinlims" tableName="system_module">
            <column name="id" valueNumeric=" nextval( 'system_module_seq' )  "/>
            <column name="name" value="PrintedReportsConfiguration"/>
            <column name="description" value="Admin=&gt;printed reports config"/>
            <column name="has_select_flag" value="Y"/>
            <column name="has_add_flag" value="Y"/>
            <column name="has_update_flag" value="Y"  />
            <column name="has_delete_flag" value="Y"/>
        </insert>
        <insert schemaName="clinlims" tableName="system_module">
            <column name="id" valueNumeric=" nextval( 'system_module_seq' )  "/>
            <column name="name" value="NonConformityConfiguration"/>
            <column name="description" value="Admin=&gt;non-conformity config"/>
            <column name="has_select_flag" value="Y"/>
            <column name="has_add_flag" value="Y"/>
            <column name="has_update_flag" value="Y"  />
            <column name="has_delete_flag" value="Y"/>
        </insert>
        <insert tableName="system_role_module">
            <column name="id" valueNumeric=" nextval( 'system_user_module_seq' )  " />
            <column name="system_role_id" valueNumeric=" ( select id from clinlims.system_role where name = 'Maintenance Admin' ) " />
            <column name="system_module_id" valueNumeric=" ( select id from clinlims.system_module where name = 'PatientConfiguration' ) " />
        </insert>
        <insert tableName="system_role_module">
            <column name="id" valueNumeric=" nextval( 'system_user_module_seq' )  " />
            <column name="system_role_id" valueNumeric=" ( select id from clinlims.system_role where name = 'Maintenance Admin' ) " />
            <column name="system_module_id" valueNumeric=" ( select id from clinlims.system_module where name = 'ResultConfiguration' ) " />
        </insert>
        <insert tableName="system_role_module">
            <column name="id" valueNumeric=" nextval( 'system_user_module_seq' )  " />
            <column name="system_role_id" valueNumeric=" ( select id from clinlims.system_role where name = 'Maintenance Admin' ) " />
            <column name="system_module_id" valueNumeric=" ( select id from clinlims.system_module where name = 'PrintedReportsConfiguration' ) " />
        </insert>
        <insert tableName="system_role_module">
            <column name="id" valueNumeric=" nextval( 'system_user_module_seq' )  " />
            <column name="system_role_id" valueNumeric=" ( select id from clinlims.system_role where name = 'Maintenance Admin' ) " />
            <column name="system_module_id" valueNumeric=" ( select id from clinlims.system_module where name = 'NonConformityConfiguration' ) " />
        </insert>
    </changeSet>
    <changeSet id="4" author="paulsc" context="ciLNSP, CDIRetroCI">
        <comment>Backfills admin permission</comment>
        <insert schemaName="clinlims" tableName="system_module">
            <column name="id" valueNumeric=" nextval( 'system_module_seq' )  "/>
            <column name="name" value="PatientConfiguration"/>
            <column name="description" value="Admin=&gt;patient config"/>
            <column name="has_select_flag" value="Y"/>
            <column name="has_add_flag" value="Y"/>
            <column name="has_update_flag" value="Y"  />
            <column name="has_delete_flag" value="Y"/>
        </insert>
        <insert schemaName="clinlims" tableName="system_module">
            <column name="id" valueNumeric=" nextval( 'system_module_seq' )  "/>
            <column name="name" value="NonConformityConfiguration"/>
            <column name="description" value="Admin=&gt;non-conformity config"/>
            <column name="has_select_flag" value="Y"/>
            <column name="has_add_flag" value="Y"/>
            <column name="has_update_flag" value="Y"  />
            <column name="has_delete_flag" value="Y"/>
        </insert>
        <insert tableName="system_role_module">
            <column name="id" valueNumeric=" nextval( 'system_user_module_seq' )  " />
            <column name="system_role_id" valueNumeric=" ( select id from clinlims.system_role where name = 'Maintenance Admin' ) " />
            <column name="system_module_id" valueNumeric=" ( select id from clinlims.system_module where name = 'PatientConfiguration' ) " />
        </insert>
        <insert tableName="system_role_module">
            <column name="id" valueNumeric=" nextval( 'system_user_module_seq' )  " />
            <column name="system_role_id" valueNumeric=" ( select id from clinlims.system_role where name = 'Maintenance Admin' ) " />
            <column name="system_module_id" valueNumeric=" ( select id from clinlims.system_module where name = 'NonConformityConfiguration' ) " />
        </insert>
    </changeSet>
</databaseChangeLog>
{'fraction_non_alphanumeric': 0.13653232632332835, 'fraction_numerical': 0.0025392278143108273, 'mean_word_length': 3.19672131147541, 'pattern_counts': {'":': 0, '<': 229, '<?xml version=': 2, '>': 229, 'https://': 0, 'lorem ipsum': 0, 'www.': 10, 'xml': 12}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4711506', 'n_tokens_mistral': 4489, 'n_tokens_neox': 4394, 'n_words': 1035}