From 01705550f9c8e180602907e80501d997d41329b4 Mon Sep 17 00:00:00 2001 From: chris-s-friedman Date: Wed, 28 Aug 2024 15:27:04 -0400 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20D3B-725=20add=20has=5Fmatch=5Fnorma?= =?UTF-8?q?l=20and=20external=5Fcollection=5Fid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kf_lib_data_ingest/common/concept_schema.py | 1 + .../target_api_plugins/kids_first_dataservice.py | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/kf_lib_data_ingest/common/concept_schema.py b/kf_lib_data_ingest/common/concept_schema.py index 463eaf8b..670cd924 100644 --- a/kf_lib_data_ingest/common/concept_schema.py +++ b/kf_lib_data_ingest/common/concept_schema.py @@ -182,6 +182,7 @@ class VOLUME(QuantityMixin): VOLUME_UL = None SAMPLE_PROCUREMENT = None PRESERVATION_METHOD = None + HAS_MATCHED_NORMAL_SAMPLE = None class BIOSPECIMEN(SAMPLE): class QUANTITY(QuantityMixin): diff --git a/kf_lib_data_ingest/target_api_plugins/kids_first_dataservice.py b/kf_lib_data_ingest/target_api_plugins/kids_first_dataservice.py index 49361212..0013527e 100644 --- a/kf_lib_data_ingest/target_api_plugins/kids_first_dataservice.py +++ b/kf_lib_data_ingest/target_api_plugins/kids_first_dataservice.py @@ -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), @@ -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)