Skip to content

Commit

Permalink
✨ D3B-725 add has_match_normal and external_collection_id
Browse files Browse the repository at this point in the history
✨ Add external_collection_id
  • Loading branch information
chris-s-friedman committed Aug 28, 2024
1 parent 4e28f86 commit c1703ae
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kf_lib_data_ingest/common/concept_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ class VOLUME(QuantityMixin):
VOLUME_UL = None
SAMPLE_PROCUREMENT = None
PRESERVATION_METHOD = None
HAS_MATCHED_NORMAL_SAMPLE = None
EXTERNAL_COLLECTION_ID = None

class BIOSPECIMEN(SAMPLE):
class QUANTITY(QuantityMixin):
Expand Down
12 changes: 12 additions & 0 deletions kf_lib_data_ingest/target_api_plugins/kids_first_dataservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,14 @@ def build_entity(cls, record, get_target_id_from_record):
record.get(CONCEPT.SAMPLE.TISSUE_TYPE)
or record.get(CONCEPT.BIOSPECIMEN.TISSUE_TYPE)
),
"has_matched_normal_sample": (
record.get(CONCEPT.SAMPLE.HAS_MATCHED_NORMAL_SAMPLE)
or record.get(CONCEPT.BIOSPECIMEN.HAS_MATCHED_NORMAL_SAMPLE)
),
"external_collection_id": (
record.get(CONCEPT.SAMPLE.EXTERNAL_COLLECTION_ID)
or record.get(CONCEPT.BIOSPECIMEN.EXTERNAL_COLLECTION_ID)
),
"visible": record.get(CONCEPT.SAMPLE.VISIBLE),
"visibility_comment": record.get(CONCEPT.SAMPLE.VISIBILITY_COMMENT),
"visibility_reason": record.get(CONCEPT.SAMPLE.VISIBILTIY_REASON),
Expand Down Expand Up @@ -673,6 +681,10 @@ def build_entity(cls, record, get_target_id_from_record):
"concentration_mg_per_ml": record.get(
CONCEPT.BIOSPECIMEN.CONCENTRATION_MG_PER_ML
),
"has_matched_normal_sample": (
record.get(CONCEPT.SAMPLE.HAS_MATCHED_NORMAL_SAMPLE)
or record.get(CONCEPT.BIOSPECIMEN.HAS_MATCHED_NORMAL_SAMPLE)
),
"volume_ul": (
record.get(CONCEPT.SAMPLE.VOLUME_UL)
or record.get(CONCEPT.BIOSPECIMEN.VOLUME_UL)
Expand Down

0 comments on commit c1703ae

Please sign in to comment.