Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Add a migration in the bahmni_config/openmrs/migrations folder.
  2. This migrations can be added directly to the liquibase.xml file or other based on your migrations folder structure.
  3. The migration should contain the following two changesets.

    Code Block
    languagesql
    titleChangesets to be added
    <changeSet id="IMPL-PERSON-ATTRIBUTE-TELEPHONE-NUMBER" author="Swathi, Jaswanth" context="rel0.76">
        <preConditions onFail="MARK_RAN">
            <sqlCheck expectedResult="0">
                SELECT COUNT(*) FROM person_attribute_type where name = 'Telephone Number';
            </sqlCheck>
        </preConditions>
        <comment>Adding Telephone Number person attribute type</comment>
        <sql>
            INSERT INTO person_attribute_type (name, description, format, searchable, creator, date_created, retired, sort_weight, uuid) VALUES ('Telephone Number', 'Telephone Number', 'java.lang.String', '0', 1, now(), 0, 3, uuid());
        </sql>
    </changeSet>

...

  1. 
     

...

  1. 
    <changeSet id="IMPL-PERSON-ATTRIBUTE-UNKNOWN-PATIENT" author="Swathi, Jaswanth" context="rel0.76">

...

  1. 
        <preConditions onFail="MARK_RAN">

...

  1. 
            <sqlCheck expectedResult="0">

...

  1. 
                SELECT COUNT(*) FROM person_attribute_type where name = 'Unknown patient';

...

  1. 
            </sqlCheck>

...

  1. 
        </preConditions>

...

  1. 
        <comment>Adding Unknown patient person attribute type</comment>

...

  1. 
        <sql>

...

  1. 
            INSERT INTO person_attribute_type (name, description, format, searchable, creator, date_created, retired, sort_weight, uuid) VALUES ('Unknown patient', 'Unknown Patient', 'java.lang.String', '0', 1, now(), 0, 3, uuid());

...

  1. 
        </sql>

...

  1. 
    </changeSet>