avniproject / IPH-CTRITH

GNU General Public License v3.0
0 stars 0 forks source link

[IPH-CITRITH] Freeze Unique ID once created #39

Closed arjunk closed 1 year ago

arjunk commented 1 year ago

Context

Project has a common scenario where Individuals change location as women move to their maternal home during pregnancy. This requires changing the address of the individual in the registration form. In registration form we also generate unique ids. This unique id generation creation is dependent on the address. Once it is generated the id is used to put on samples, etc. Hence even if the address is changed, the ID should not be changed. Since there is technical limitation in the product as the rule cannot differentiate whether it is create or edit flow of the form, we will not differentiate and freeze the id even within the create flow.

Acceptance Criteria

  1. Given that there is an individual with already existing id generated part of registration, when i go to edit the address the system should not change the ID
  2. Side Effect due to product limitation : Given that i registering a new Individual where i have provided the address and an id is generated and i have not saved the form, if i come back and change the address, its ok that the id will not change.

Technical Approach

Change the rule such that it checks whether the id is already existing in the observation. if it is existing then it does not regenerate.

vedfordev commented 1 year ago

Developer's Note :

Org : ctrith_iph_uat

Logic :

Checking if concept Individual id have value or not with getObservationValue. If No then perform value set.

Issue:

When I clicked to Admin->Identifier User Assignment, One Error popped up

Private Zenhub Image

Dinesh2019 commented 1 year ago

@arjunk @vedfordev Do we need to fix this scenario for households also because household also have generated ID

vedfordev commented 1 year ago

changed rule in individual registration for Individual id.