Versions Compared

Key

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

We need to merge duplicate fields ,when some one one one  has created forms  forms Schema Design with Duplicated fields .. which have the same field Properties ie ;

...

that is `Field Name`, `Description` ,`field-type`, `concept` , `default-value`,`select-multi`     

Image Added

Step-by-step guide

  1. you simply go to the Admin page > Merge duplicate fields  , under "Forms"
  2. click Merge duplicate fields and if there are any Duplicated fields, It will automatically merge them

Effects of "Merge Duplicate Fields"

the The function merges simiilarsimilar/ Duplicared  Duplicated  fields per each form,  simmilar implying they have same "Field name"  , "Select multi" , "Field Type" , "Concept" , "Table name " , "Default Value",and  and it points all the duplicated fields to the first field. 

NB . the The function does not delete the duplicated fields from the given Form_Field table in the Dtabase Database , neither  from the form Layout, but t just points the duplicated Fields to one single Field.

an example below is a duplicated field "NewX" in a form.before

  1. Before the Duplicated Fields are merged

...

  1.                                                                                                                                                                                                                                                                                     when u search in "Find field Elements" for a field to add to the form,

...

  1. all the Duplicated Fields are returned as

...

  

...

  1. different fields.


  2. After

...

  1. you Merge the Duplicated Fields                                                                                                                                                                                                                                                                                          when u search for the Duplicated field, it is returned as a merged field



code

https://github.com/openmrs/openmrs-core/blob/58a4d93c9f1fd514f84e99cd7ce4054f53db8ddd/api/src/main/java/org/openmrs/api/impl/FormServiceImpl.java#L634

...