You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<sqlCheckexpectedResult="1">select count(*) from patient_identifier_type where name='ABHA'</sqlCheck>
23
+
<sqlCheckexpectedResult="0">select count(*) from patient_identifier_type where name='ABHA Number'</sqlCheck>
24
24
</preConditions>
25
-
<comment>Removing ABHA identifier from global property</comment>
25
+
<comment>Adding ABHA Number Identifier type</comment>
26
26
<sql>
27
-
update global_property set property_value=replace(property_value,concat((SELECT uuid from patient_identifier_type where name='ABHA'),","),"") where property = 'bahmni.extraPatientIdentifierTypes';
27
+
insert into patient_identifier_type( name, description,creator, uuid, uniqueness_behavior, location_behavior, date_created) Select 'ABHA Number','Health Id identifier type',creator,uuid(),'UNIQUE','NOT_USED',now() from users where username='admin';
<sqlCheckexpectedResult="1">select count(*) from patient_identifier_type where name='ABHA'</sqlCheck>
33
+
<sqlCheckexpectedResult="1">select count(*) from patient_identifier_type where name='ABHA Number'</sqlCheck>
34
+
<sqlCheckexpectedResult="0">select count(*) from global_property where property = 'bahmni.extraPatientIdentifierTypes' and property_value LIKE CONCAT('%', (Select uuid from patient_identifier_type where name = 'ABHA Number'))</sqlCheck>
34
35
</preConditions>
35
-
<comment>Removing ABHA Identifier type</comment>
36
+
<comment>Updating global property for ABHA Number</comment>
36
37
<sql>
37
-
delete from patient_identifier where identifier_type=(select patient_identifier_type_id from patient_identifier_type where name='ABHA');
38
-
delete from patient_identifier_type where name='ABHA';
38
+
update global_property set property_value=(SELECT CONCAT(IF(ISNULL(property_value),'',CONCAT(property_value,',')),uuid) from patient_identifier_type where name = 'ABHA Number') where property = 'bahmni.extraPatientIdentifierTypes';
0 commit comments