Pedigree import should not import patient records which are not already in the family, but keep those who are


If a new Phenpotips JSON is imported in pedigree, it currently will unlink all patient records and place them in the unlinked legend.

There are two problems:
1) if patient records are not in the family, there may be multiple problems, e.g. they already belong to another family. IN that case "save" will correctly fail, but this is not a good state to be in. So they should be completely removed and ignored

(this may affect some code pieces which are only needed before is implemented, so this should be implemented after )

2) on the other hand, for patient records already in the family, there is no reason to unlink them, they can be kept linked to the pedigree nodes as imported (e.g. when a backup pedigree from before is restored)


One way to reproduce a related problematic behaviour (intorduced in one of the previous rc1 commits):

  • create a family, add one un-linked (hanging) patient record

  • save pedigree and export it (using PhenotTips JSON format)

  • create new patient; open pedigree editor; import JSON

  • problem: the hanging patient from previous family is also "hanging" in this new family
    if you try to save pedigree, you will be prompted that the hanging patient already belongs to another family




Andrew Misyura


Andrew Misyura



External issue ID



Fix versions

Affects versions