DeletionHandler for Patient module

Hi all,

Currently, when we enter a patient with attribute values, relationship…, we cannot delete this object and throw exception because of violating constraints.

I’m building Deletion Handler for Patient module. And to do this function, please help me the answer questions below:

  1. When deleting a patient, we will delete all the values and constraints, includes relationships, attributes, attribute values, programs, program instances.

  2. The same question for other objects, includes attribute, program, programstage, …

Thank you.

Best regards,

···

Châu Thu Trân
HISP Viet Nam
Email: tran.hispvietnam@gmail.com

Cell phone: +84 97 324 1542

Hi Tran,

Yes you need to consider all the associations. And also make sure that we don’t have recorded values for the patient to be removed. If there is value (patientdatavalue table) registered for the patient to be removed, providing an option like “are you sure you want to delete this patient and all its recorded values” might be a good approach. If users select yes, then remove everything including datavalue if not then abort the removal process.

While deleting attributes, there is also attributevalue that you need to consider.

Abyot.

···

On Fri, Oct 1, 2010 at 6:57 AM, Chau Thu Tran tran.hispvietnam@gmail.com wrote:

Hi all,

Currently, when we enter a patient with attribute values, relationship…, we cannot delete this object and throw exception because of violating constraints.

I’m building Deletion Handler for Patient module. And to do this function, please help me the answer questions below:

  1. When deleting a patient, we will delete all the values and constraints, includes relationships, attributes, attribute values, programs, program instances.
  1. The same question for other objects, includes attribute, program, programstage, …

Thank you.

Best regards,

Châu Thu Trân
HISP Viet Nam
Email: tran.hispvietnam@gmail.com

Cell phone: +84 97 324 1542


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Hi Abyot,

If patient A have relationship with other patient as B, do we remove the patient B or remove only values of the patient A ?

Best regards,

···

Châu Thu Trân
HISP Viet Nam
Email: tran.hispvietnam@gmail.com
Cell phone: +84 97 324 1542

On Fri, Oct 1, 2010 at 4:08 PM, Abyot Gizaw abyota@gmail.com wrote:

Hi Tran,

Yes you need to consider all the associations. And also make sure that we don’t have recorded values for the patient to be removed. If there is value (patientdatavalue table) registered for the patient to be removed, providing an option like “are you sure you want to delete this patient and all its recorded values” might be a good approach. If users select yes, then remove everything including datavalue if not then abort the removal process.

While deleting attributes, there is also attributevalue that you need to consider.

Abyot.

On Fri, Oct 1, 2010 at 6:57 AM, Chau Thu Tran tran.hispvietnam@gmail.com wrote:

Hi all,

Currently, when we enter a patient with attribute values, relationship…, we cannot delete this object and throw exception because of violating constraints.

I’m building Deletion Handler for Patient module. And to do this function, please help me the answer questions below:

  1. When deleting a patient, we will delete all the values and constraints, includes relationships, attributes, attribute values, programs, program instances.
  1. The same question for other objects, includes attribute, program, programstage, …

Thank you.

Best regards,

Châu Thu Trân
HISP Viet Nam
Email: tran.hispvietnam@gmail.com

Cell phone: +84 97 324 1542


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Hi Lars,

I sent you the patch file of Deletion Handler for patient module.

Please open attachment file. Thank so much, Lars

Best regards,

patch.diff (74.3 KB)

···

Châu Thu Trân
HISP Viet Nam
Email: tran.hispvietnam@gmail.com
Cell phone: +84 97 324 1542

On Fri, Oct 1, 2010 at 4:08 PM, Abyot Gizaw abyota@gmail.com wrote:

Hi Tran,

Yes you need to consider all the associations. And also make sure that we don’t have recorded values for the patient to be removed. If there is value (patientdatavalue table) registered for the patient to be removed, providing an option like “are you sure you want to delete this patient and all its recorded values” might be a good approach. If users select yes, then remove everything including datavalue if not then abort the removal process.

While deleting attributes, there is also attributevalue that you need to consider.

Abyot.

On Fri, Oct 1, 2010 at 6:57 AM, Chau Thu Tran tran.hispvietnam@gmail.com wrote:

Hi all,

Currently, when we enter a patient with attribute values, relationship…, we cannot delete this object and throw exception because of violating constraints.

I’m building Deletion Handler for Patient module. And to do this function, please help me the answer questions below:

  1. When deleting a patient, we will delete all the values and constraints, includes relationships, attributes, attribute values, programs, program instances.
  1. The same question for other objects, includes attribute, program, programstage, …

Thank you.

Best regards,

Châu Thu Trân
HISP Viet Nam
Email: tran.hispvietnam@gmail.com

Cell phone: +84 97 324 1542


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp