Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Current »

From release 1.3, we have added a check for uniquely identifying the reg num of a treatment, when a user enters a duplicate reg num the system throws an error.

Prior to 1.3 if there are any patients which have the same reg num, they can be identified using the below query

SELECT ppa.value_reference AS 'Duplicate Identifiers' from patient_program_attribute ppa 
INNER JOIN program_attribute_type pat ON pat.name = 'Registration Number' AND pat.program_attribute_type_id = ppa.attribute_type_id 
GROUP BY ppa.value_reference 
HAVING count(*) >= 2;

If any treatments are returned in this query, then one must change the reg num of the treatment in a way that it should be unique to be able to see this treatment on the "Patient Records" page. 

Please look at the sample query below to do that

update patient_program_attribute set value_reference = '<unique_reg_num>' where patient_program_id ='<existing patient program id>';
  • No labels