Uploaded image for project: 'PhenoTips'
  1. PT-2782

Individual controllers should not save the patient document directly

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.3-milestone-3
    • Component/s: patient-data
    • Labels:
      None
    • Sprint:

      Description

      Currently each patient data controller calls xwiki.save (e.g. when updating a patient from JSON)

      instead, save() should take patient doc as a parameter, update it, and be done. Then Patient class code, which calls all the controllers, should do one save() after all controllers finish their work. Those unnecessary saves slow down the system, which is aggravated by all the event listeners listening to PatientChangingEvent fired for each save (e.g. see PT-2781 Closed )

      This becomes especially problematic with family studies, where one pedigree save may trigger multiple patient saves, all via updateFromJSON() - but it is a problem withot family studies as well

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                veronikaslc Veronika Koltunova
                Reporter:
                asm Andriy Misyura
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: