We're updating the issue view to help you get more done. 

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

Description

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

Environment

None

Status

Assignee

Andrew Misyura

Reporter

Andrew Misyura

Labels

None

External issue ID

None

External issue ID

None

Components

Fix versions

Affects versions

1.4-milestone-4

Priority

Medium