Skip to content

Commit

Permalink
add datasetSubType
Browse files Browse the repository at this point in the history
  • Loading branch information
calmacx committed Jan 31, 2024
1 parent 269e492 commit 941c8c5
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 8 deletions.
21 changes: 17 additions & 4 deletions hdr_schemata/models/GWDM/1.1/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down Expand Up @@ -1605,7 +1618,7 @@
"description": "Date when the tissue sample metadata was created",
"title": "Creation Date"
},
"AnatomicalSiteOntologyCode": {
"anatomicalSiteOntologyCode": {
"anyOf": [
{
"$ref": "#/$defs/CommaSeparatedValues"
Expand All @@ -1618,7 +1631,7 @@
"description": "Ontology code for the anatomical site",
"title": "Anatomical Site Ontology Code"
},
"AnatomicalSiteOntologyDescription": {
"anatomicalSiteOntologyDescription": {
"anyOf": [
{
"$ref": "#/$defs/CommaSeparatedValues"
Expand All @@ -1631,7 +1644,7 @@
"description": "Ontology description for the anatomical site",
"title": "Anatomical Site Ontology Description"
},
"AnatomicalSiteFreeText": {
"anatomicalSiteFreeText": {
"anyOf": [
{
"$ref": "#/$defs/CommaSeparatedValues"
Expand All @@ -1657,7 +1670,7 @@
"description": "Diagnosis related to the sample content",
"title": "Sample Content Diagnosis"
},
"useReCommaSeparatedValuesictions": {
"useRestrictions": {
"anyOf": [
{
"$ref": "#/$defs/CommaSeparatedValues"
Expand Down
9 changes: 9 additions & 0 deletions hdr_schemata/models/GWDM/v1_1/Summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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",
)
9 changes: 5 additions & 4 deletions hdr_schemata/models/GWDM/v1_1/TissueSampleMetadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit 941c8c5

Please sign in to comment.