From 941c8c5a36f1dfc1c8d151e2d31e2ed9bc737c64 Mon Sep 17 00:00:00 2001 From: Calum Macdonald Date: Wed, 31 Jan 2024 14:41:55 +0000 Subject: [PATCH] add datasetSubType --- hdr_schemata/models/GWDM/1.1/schema.json | 21 +++++++++++++++---- hdr_schemata/models/GWDM/v1_1/Summary.py | 9 ++++++++ .../models/GWDM/v1_1/TissueSampleMetadata.py | 9 ++++---- 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/hdr_schemata/models/GWDM/1.1/schema.json b/hdr_schemata/models/GWDM/1.1/schema.json index e88d039..fda9abb 100644 --- a/hdr_schemata/models/GWDM/1.1/schema.json +++ b/hdr_schemata/models/GWDM/1.1/schema.json @@ -1412,6 +1412,19 @@ "default": null, "description": "Summary population size of the cohort", "title": "Population size" + }, + "datasetSubType": { + "anyOf": [ + { + "$ref": "#/$defs/DatasetType" + }, + { + "type": "null" + } + ], + "default": null, + "description": "What us the subtype for this dataset?", + "title": "Dataset sub type" } }, "required": [ @@ -1605,7 +1618,7 @@ "description": "Date when the tissue sample metadata was created", "title": "Creation Date" }, - "AnatomicalSiteOntologyCode": { + "anatomicalSiteOntologyCode": { "anyOf": [ { "$ref": "#/$defs/CommaSeparatedValues" @@ -1618,7 +1631,7 @@ "description": "Ontology code for the anatomical site", "title": "Anatomical Site Ontology Code" }, - "AnatomicalSiteOntologyDescription": { + "anatomicalSiteOntologyDescription": { "anyOf": [ { "$ref": "#/$defs/CommaSeparatedValues" @@ -1631,7 +1644,7 @@ "description": "Ontology description for the anatomical site", "title": "Anatomical Site Ontology Description" }, - "AnatomicalSiteFreeText": { + "anatomicalSiteFreeText": { "anyOf": [ { "$ref": "#/$defs/CommaSeparatedValues" @@ -1657,7 +1670,7 @@ "description": "Diagnosis related to the sample content", "title": "Sample Content Diagnosis" }, - "useReCommaSeparatedValuesictions": { + "useRestrictions": { "anyOf": [ { "$ref": "#/$defs/CommaSeparatedValues" diff --git a/hdr_schemata/models/GWDM/v1_1/Summary.py b/hdr_schemata/models/GWDM/v1_1/Summary.py index f617155..d21e7ec 100644 --- a/hdr_schemata/models/GWDM/v1_1/Summary.py +++ b/hdr_schemata/models/GWDM/v1_1/Summary.py @@ -3,6 +3,8 @@ from typing import Optional from .Organisation import Organisation +from hdr_schemata.definitions.HDRUK import DatasetType + class Summary(BaseSummary): # switch publisher to be an Organisation @@ -18,3 +20,10 @@ class Summary(BaseSummary): description="Summary population size of the cohort", title="Population size", ) + + # include a new subType for a dataset to be paired with datasetType + datasetSubType: Optional[DatasetType] = Field( + None, + description="What us the subtype for this dataset?", + title="Dataset sub type", + ) diff --git a/hdr_schemata/models/GWDM/v1_1/TissueSampleMetadata.py b/hdr_schemata/models/GWDM/v1_1/TissueSampleMetadata.py index 269c49b..b43fbe1 100644 --- a/hdr_schemata/models/GWDM/v1_1/TissueSampleMetadata.py +++ b/hdr_schemata/models/GWDM/v1_1/TissueSampleMetadata.py @@ -31,18 +31,19 @@ class TissueSampleMetadata(BaseModel): description="Date when the tissue sample metadata was created", ) - AnatomicalSiteOntologyCode: Optional[CommaSeparatedValues] = Field( + anatomicalSiteOntologyCode: Optional[CommaSeparatedValues] = Field( None, title="Anatomical Site Ontology Code", description="Ontology code for the anatomical site", ) - AnatomicalSiteOntologyDescription: Optional[CommaSeparatedValues] = Field( + + anatomicalSiteOntologyDescription: Optional[CommaSeparatedValues] = Field( None, title="Anatomical Site Ontology Description", description="Ontology description for the anatomical site", ) - AnatomicalSiteFreeText: Optional[CommaSeparatedValues] = Field( + anatomicalSiteFreeText: Optional[CommaSeparatedValues] = Field( None, title="Anatomical Site Free Text", description="Free text describing the anatomical site", @@ -54,7 +55,7 @@ class TissueSampleMetadata(BaseModel): description="Diagnosis related to the sample content", ) - useReCommaSeparatedValuesictions: Optional[CommaSeparatedValues] = Field( + useRestrictions: Optional[CommaSeparatedValues] = Field( None, title="Use Restrictions", description="Restrictions on the use of the tissue sample",