-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement multiple external IDs for families (#896)
* Create family_external_id database table * Replace family.external_id with external_ids etc * In api/graphql/schema.py, add external_ids alongside external_id * In ParticipantGridRow.tsx, reuse prepareExternalIds() to handle family multiple extids * Complete rewrite of insert_or_update_multiple_families() The previous INSERT ... ON DUPLICATE KEY UPDATE code inserts a new family or, if the same project+external_id entry already exists, updates description and coded_phenotype -- as external_id is part of the key used to locate the record, it can't be updated. With external_id moving to a separate table, we need to write this logic out explicitly. We search by any external id, but only insert the primary external id for new records. (At present, this functionality is used only by FamilyLayer.import_families(), which parses only the primary external id.) * Use transactions in create_family() and update_family() * FamilyTable.get_id_map_by_internal_ids() returns only primary extids Most users of this function want a single external id (per internal id) that they can use to populate a pedigree or for use with seqr. (The call in ParticipantLayer.generic_individual_metadata_importer() has complex wants but is mostly similar.) Hence, at least for now, it is simplest to keep the 1:1 map return type and return only the primary external ids.
- Loading branch information
Showing
17 changed files
with
470 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.