From 60f221a267c3a1874a3d39cddcc1dbed34a69f6b Mon Sep 17 00:00:00 2001 From: Calum Macdonald Date: Thu, 2 Nov 2023 08:57:25 +0000 Subject: [PATCH 01/21] add model v1.1 --- docs/GWDM/1.1.md | 680 +++++++ docs/GWDM/1.1.structure.json | 801 ++++++++ docs/public/GDM_to_SchemaOrg.html | 273 +++ hdr_schemata/models/GWDM/1.1/schema.json | 1761 +++++++++++++++++ hdr_schemata/models/GWDM/__init__.py | 1 + .../models/GWDM/create_json_schema.py | 4 +- hdr_schemata/models/GWDM/latest/schema.json | 422 +++- .../models/GWDM/v1_1/Accessibility.py | 13 + hdr_schemata/models/GWDM/v1_1/Coverage.py | 126 ++ hdr_schemata/models/GWDM/v1_1/Omop.py | 55 + hdr_schemata/models/GWDM/v1_1/Organisation.py | 27 + hdr_schemata/models/GWDM/v1_1/Required.py | 13 + hdr_schemata/models/GWDM/v1_1/Summary.py | 14 + hdr_schemata/models/GWDM/v1_1/Usage.py | 13 + hdr_schemata/models/GWDM/v1_1/__init__.py | 46 + mkdocs.yml | 1 + 16 files changed, 4189 insertions(+), 61 deletions(-) create mode 100644 docs/GWDM/1.1.md create mode 100644 docs/GWDM/1.1.structure.json create mode 100644 docs/public/GDM_to_SchemaOrg.html create mode 100644 hdr_schemata/models/GWDM/1.1/schema.json create mode 100644 hdr_schemata/models/GWDM/v1_1/Accessibility.py create mode 100644 hdr_schemata/models/GWDM/v1_1/Coverage.py create mode 100644 hdr_schemata/models/GWDM/v1_1/Omop.py create mode 100644 hdr_schemata/models/GWDM/v1_1/Organisation.py create mode 100644 hdr_schemata/models/GWDM/v1_1/Required.py create mode 100644 hdr_schemata/models/GWDM/v1_1/Summary.py create mode 100644 hdr_schemata/models/GWDM/v1_1/Usage.py create mode 100644 hdr_schemata/models/GWDM/v1_1/__init__.py diff --git a/docs/GWDM/1.1.md b/docs/GWDM/1.1.md new file mode 100644 index 0000000..22d48f0 --- /dev/null +++ b/docs/GWDM/1.1.md @@ -0,0 +1,680 @@ + +## required + +required metadata needed for the GWDM + + + +### gatewayId + +Need a field in Mauro that captures the datasetID to link to gateway database - or can we just use the one created in Mauro? + +| title | examples | required | type | +|:----------|:-----------|:-----------|:-------| +| Gatewayid | | True | str | + +### gatewayPid + +Need a field in Mauro that captures the dataset pid to link to gateway database + +| title | examples | required | type | +|:-----------|:-----------|:-----------|:-------| +| Gatewaypid | | True | str | + +### issued + +Aren't issued and modified always the same because of versioning? Is that fine to duplicate because datasets in dcat might look different? + +| title | examples | required | type | +|:--------|:-----------|:-----------|:---------| +| Issued | | True | datetime | + +### modified + +Aren't issued and modified always the same because of versioning? Is that fine to duplicate because datasets in dcat might look different? + +| title | examples | required | type | +|:---------|:-----------|:-----------|:---------| +| Modified | | True | datetime | + +### revisions + +None + + + +#### version + +Version number used for previous version of this dataset + +| title | examples | required | type | +|:-----------------|:-----------|:-----------|:-------| +| revision version | | True | str | + +#### url + +Some url with a reference to the record of a previous version of this dataset + +| title | examples | required | type | +|:-------------|:-----------|:-----------|:-------| +| revision url | | True | Url | + +### version + +Dataset metadata version + +| title | examples | required | type | +|:----------------|:-----------|:-----------|:-------| +| Dataset Version | ['1.1.0'] | True | str | + +## summary + +Summary of metadata describing key pieces of information. + + + +### title + +The main title of the dataset + +| title | examples | required | type | +|:--------|:-----------|:-----------|:------------------------------| +| Title | | True | TwoHundredFiftyFiveCharacters | + +### shortTitle + +A shorter descriptive title of the dataset + +| title | examples | required | type | +|:-----------|:-----------|:-----------|:-----------| +| Shorttitle | | True | ShortTitle | + +### doiName + +DOI associated to this dataset + +| title | examples | required | type | +|:--------|:-----------|:-----------|:-------| +| Doiname | | True | Doi | + +### abstract + +Longer abstract detailing the dataset. + +| title | examples | required | type | +|:---------|:-----------|:-----------|:-----------------| +| Abstract | | True | LongAbstractText | + +### keywords + +Comma separated key words associated to this dataset. + +| title | examples | required | type | +|:---------|:-----------|:-----------|:---------------------| +| Keywords | | True | CommaSeparatedValues | + +### controlledKeywords + +Keywords that have been filtered and limited + +| title | examples | required | type | +|:--------------------|:-----------|:-----------|:---------------------| +| Controlled Keywords | | True | CommaSeparatedValues | + +### contactPoint + +email of a person who can be the main contact point of this dataset + +| title | examples | required | type | +|:--------------|:-----------|:-----------|:---------| +| Contact Point | | True | EmailStr | + +### datasetType + +What type of dataset is this? + +| title | examples | required | type | +|:-------------|:-----------|:-----------|:------------| +| Dataset type | | True | DatasetType | + +### description + +Longer description of the dataset in detail + +| title | examples | required | type | +|:------------|:-----------|:-----------|:----------------| +| Description | | True | LongDescription | + +### publisher + +Link to details about the publisher of this dataset + + + +#### name + +The organisation responsible for running or supporting the data access request process, as well as publishing and maintaining the metadata. In most this will be the same as the HDR UK Organisation (Hub or Alliance Member)/ + +| title | examples | required | type | +|:--------|:-----------|:-----------|:-------| +| Name | | True | Name | + +#### gatewayId + +The link to an ID somewhere in the gateway where more information on the publisher can be retrieved. + +| title | examples | required | type | +|:---------------------|:-----------|:-----------|:-------| +| Publisher gateway id | | False | str | + +#### rorId + +The Research Organization Registry (ROR) for the organisation, if applicable + +| title | examples | required | type | +|:------------------------------------------|:-----------|:-----------|:-------| +| Research Organization Registry Identifier | | False | str | + +## coverage + +Observational, Spatial and Temporal coverage + + + +### spatial + +List of countries where the data was taken from + +| title | examples | required | type | +|:--------|:-----------|:-----------|:---------------------| +| Spatial | | False | CommaSeparatedValues | + +### pathway + +Long description of the clinical/diagnostic/treatment pathway if applicable. This could include if the dataset is from a single speciality or area, a single tier of care, linked across two tier (e.g. primary and secondary care), or an integrated care record covering the whole patient pathway. + +| title | examples | required | type | +|:--------|:-----------|:-----------|:----------------| +| Pathway | | False | LongDescription | + +### followup + +What is the typical time span that a patient appears in the dataset (follow up period) + +| title | examples | required | type | +|:---------|:-----------|:-----------|:---------| +| Followup | | False | Followup | + +### typicalAgeRange + +Age range in whole years of participants in the dataset. Please provide range in the following format '[min age] – [max age]' where both the minimum and maximum are whole numbers (integers). + +| title | examples | required | type | +|:------------------|:-----------|:-----------|:---------| +| Typical Age Range | | False | AgeRange | + +### gender + +Male, Female, Other + +| title | examples | required | type | +|:--------|:-----------|:-----------|:-------| +| Gender | | False | Gender | + +### biologicalsamples + +Blood, Saliva, Urine, Other + +| title | examples | required | type | +|:-------------------|:-----------|:-----------|:------------------| +| Biological Samples | | False | BiologicalSamples | + +### psychological + +Mental health, Cognitive function + +| title | examples | required | type | +|:--------------|:-----------|:-----------|:--------------| +| Psychological | | False | Psychological | + +### physical + +Cardiovascular, Respiratory, Musculoskeletal, Hearing and Vision, Reproductive + +| title | examples | required | type | +|:---------|:-----------|:-----------|:---------| +| Physical | | False | Physical | + +### anthropometric + +Height, Weight, Waist circumference, Hip circumference, Blood pressure + +| title | examples | required | type | +|:---------------|:-----------|:-----------|:---------------| +| Anthropometric | | False | Anthropometric | + +### lifestyle + +Cohort lifestyle habits: Smoking, Physical activity, Dietary habits, Alcohol + +| title | examples | required | type | +|:----------|:-----------|:-----------|:-----------| +| Lifestyle | | False | Lifestyles | + +### socioeconomic + +Occupation, Family circumstances, Housing, Education, Ethnic group, Martial status, Social support + +| title | examples | required | type | +|:---------------|:-----------|:-----------|:--------------| +| Socio-economic | | False | SocioEconomic | + +## provenance + +Provenance information + + + +### origin + +None + + + +#### purpose + +Indicates the purpose(s) that the dataset was collected. + +| title | examples | required | type | +|:--------|:-----------|:-----------|:---------------------| +| Purpose | | False | CommaSeparatedValues | + +#### source + +Indicates the source of the data extraction + +| title | examples | required | type | +|:--------|:-----------|:-----------|:---------------------| +| Source | | False | CommaSeparatedValues | + +#### collectionSituation + +Indicate the setting(s) where data was collected. Multiple settings may be provided + +| title | examples | required | type | +|:--------|:-----------|:-----------|:---------------------| +| Setting | | False | CommaSeparatedValues | + +### temporal + +None + + + +#### startDate + +The start of the time period that the dataset provides coverage for + +| title | examples | required | type | +|:-----------|:-----------|:-----------|:-------| +| Start Date | | True | date | + +#### endDate + +The end of the time period that the dataset provides coverage for + +| title | examples | required | type | +|:---------|:-----------|:-----------|:-------| +| End Date | | False | date | + +#### timeLag + +Rypical time-lag between an event and the data for that event appearing in the dataset + +| title | examples | required | type | +|:---------|:-----------|:-----------|:--------| +| Time Lag | | True | TimeLag | + +#### accrualPeriodicity + +frequency of distribution release. If a dataset is distributed regularly please choose a distribution release periodicity from the constrained list and indicate the next release date. When the release date becomes historical, a new release date will be calculated based on the publishing periodicity. + +| title | examples | required | type | +|:------------|:-----------|:-----------|:------------| +| Periodicity | | True | Periodicity | + +#### distributionReleaseDate + +Date of the latest release of the dataset. If this is a regular release i.e. quarterly, or this is a static dataset please complete this alongside Periodicity. + +| title | examples | required | type | +|:-------------|:-----------|:-----------|:-------| +| Release Date | | False | date | + +## accessibility + +Accessibility information. + + + +### usage + +This section includes information about how the data can be used and how it is currently being used + + + +#### dataUseLimitation + +Any restrictions to its usage + +| title | examples | required | type | +|:--------------------|:-----------|:-----------|:---------------------| +| Data Use Limitation | | True | CommaSeparatedValues | + +#### dataUseRequirement + +Any requirements needed for data usage + +| title | examples | required | type | +|:----------------------|:-----------|:-----------|:---------------------| +| Data Use Requirements | | True | CommaSeparatedValues | + +#### resourceCreator + +Who has created this resource + + + +##### name + +The organisation responsible for running or supporting the data access request process, as well as publishing and maintaining the metadata. In most this will be the same as the HDR UK Organisation (Hub or Alliance Member)/ + +| title | examples | required | type | +|:--------|:-----------|:-----------|:-------| +| Name | | True | Name | + +##### gatewayId + +The link to an ID somewhere in the gateway where more information on the publisher can be retrieved. + +| title | examples | required | type | +|:---------------------|:-----------|:-----------|:-------| +| Publisher gateway id | | False | str | + +##### rorId + +The Research Organization Registry (ROR) for the organisation, if applicable + +| title | examples | required | type | +|:------------------------------------------|:-----------|:-----------|:-------| +| Research Organization Registry Identifier | | False | str | + +### access + +This section includes information about data access + + + +#### accessRights + +Optional link(s) or a description of where the license associated to accessing this dataset + +| title | examples | required | type | +|:--------------|:-----------|:-----------|:---------------------| +| Access Rights | | True | CommaSeparatedValues | + +#### accessService + + + +| title | examples | required | type | +|:---------------|:-----------|:-----------|:----------------| +| Access Service | | False | LongDescription | + +#### accessRequestCost + + + +| title | examples | required | type | +|:---------------------------------|:-----------|:-----------|:----------------| +| Organisation Access Request Cost | | False | LongDescription | + +#### deliveryLeadTime + +An arbitrary guess at the time to gain access to the dataset... + +| title | examples | required | type | +|:------------------------|:-----------|:-----------|:-----------------| +| Access Request Duration | | False | DeliveryLeadTime | + +#### jurisdiction + +Comma separated country codes of where the data jurisdiction is. + +| title | examples | required | type | +|:-------------|:-----------|:-----------|:---------------------| +| Jurisdiction | | True | CommaSeparatedValues | + +#### dataController + +Name of the data controller + +| title | examples | required | type | +|:----------------|:-----------|:-----------|:----------------| +| Data Controller | | True | LongDescription | + +#### dataProcessor + +Name of the data processors + +| title | examples | required | type | +|:---------------|:-----------|:-----------|:----------------| +| Data Processor | | False | LongDescription | + +### formatAndStandards + +Section includes technical attributes for language vocabularies, sizes etc. and gives researchers facts about and processing the underlying data in the dataset. + + + +#### vocabularyEncodingSchemes + +Code value of the ontology vocabulary encoding + +| title | examples | required | type | +|:----------------------|:-----------|:-----------|:---------------------| +| Controlled Vocabulary | | True | CommaSeparatedValues | + +#### conformsTo + +What the vocabulary conforms to. + +| title | examples | required | type | +|:------------|:-----------|:-----------|:---------------------| +| Conforms To | | True | CommaSeparatedValues | + +#### languages + +Language code(s) of the language of the dataset metadata and underlying data is made available. + +| title | examples | required | type | +|:-----------------|:-----------|:-----------|:---------------------| +| Language Code(s) | | True | CommaSeparatedValues | + +#### formats + +Format(s) the dataset can be made available in + +| title | examples | required | type | +|:---------------|:-----------|:-----------|:---------------------| +| Dataset Format | | True | CommaSeparatedValues | + +## linkage + +Linkage and enrichment. + + + +### isGeneratedUsing + +?? + +| title | examples | required | type | +|:-------------------|:-----------|:-----------|:---------------------| +| Is Generated Using | | False | CommaSeparatedValues | + +### associatedMedia + +Any media associated with the Gateway Organisation using a valid URI for the content. This is an opportunity to provide additional context that could be useful for researchers wanting to understand more about the dataset and its relevance to their research question + +| title | examples | required | type | +|:-----------------|:-----------|:-----------|:---------------------| +| Associated Media | | False | CommaSeparatedValues | + +### dataUses + +?? + +| title | examples | required | type | +|:----------|:-----------|:-----------|:---------------------| +| Data Uses | | False | CommaSeparatedValues | + +### isReferenceIn + +Rhe keystone paper associated with the dataset. Also include a list of known citations, if available and should be links to existing resources where the dataset has been used or referenced. + +| title | examples | required | type | +|:----------------|:-----------|:-----------|:---------------------| +| Is Reference in | | False | CommaSeparatedValues | + +### tools + +URL of any analysis tools or models that have been created for this dataset and are available for further use + +| title | examples | required | type | +|:--------|:-----------|:-----------|:---------------------| +| Tools | | False | CommaSeparatedValues | + +### datasetLinkage + +Dataset Linkage copied over from + + + +#### isDerivedFrom + +Indicate if derived datasets or predefined extracts are available and the type of derivation available. Notes. Single or multiple dimensions can be provided as a derived extract alongside the dataset + +| title | examples | required | type | +|:------------|:-----------|:-----------|:---------------------| +| Derivations | | False | CommaSeparatedValues | + +#### isPartOf + +If the dataset is part of a group or family + +| title | examples | required | type | +|:----------|:-----------|:-----------|:---------------------| +| Is PartOf | | False | CommaSeparatedValues | + +#### isMemberOf + +Dataset is a member of XXX(?) + +| title | examples | required | type | +|:------------|:-----------|:-----------|:---------------------| +| Is MemberOf | | False | CommaSeparatedValues | + +#### linkedDatasets + +Links to other datasets. + +| title | examples | required | type | +|:----------------|:-----------|:-----------|:---------------------| +| Linked Datasets | | False | CommaSeparatedValues | + +### investigations + +Please provide the keystone paper associated with the dataset. + +| title | examples | required | type | +|:---------------|:-----------|:-----------|:---------------------| +| Investigations | | False | CommaSeparatedValues | + +## observations + +Obsservations + +| title | examples | required | type | +|:-------------|:-----------|:-----------|:------------| +| Observations | | False | Observation | + +## structuralMetadata + +Descriptions of all tables and data elements that can be included in the dataset + +| title | examples | required | type | +|:--------------------|:-----------|:-----------|:----------| +| Structural Metadata | | False | DataTable | + +## omopIDs + +Collection of OMOP IDs that are contained within the dataset. + + + +### measurements + +OMOP Concept IDs for measured quantities. E.g. 44810410 - https://athena.ohdsi.org/search-terms/terms/44810410 + +| title | examples | required | type | +|:------------------|:-----------|:-----------|:-----------------------| +| OMOP Measurements | | False | CommaSeparatedIntegers | + +### drug + +OMOP Concept IDs for drug exposures. E.g. 602396 - https://athena.ohdsi.org/search-terms/terms/602396 + +| title | examples | required | type | +|:-----------|:-----------|:-----------|:-----------------------| +| OMOP Drugs | | False | CommaSeparatedIntegers | + +### observations + +OMOP Concept IDs for observations. + +| title | examples | required | type | +|:------------------|:-----------|:-----------|:-----------------------| +| OMOP Observations | | False | CommaSeparatedIntegers | + +### specimens + +OMOP Concept IDs for specimens. + +| title | examples | required | type | +|:---------------|:-----------|:-----------|:-----------------------| +| OMOP Specimens | | False | CommaSeparatedIntegers | + +### conditions + +OMOP Concept IDs for condition occurrences. + +| title | examples | required | type | +|:---------------------------|:-----------|:-----------|:-----------------------| +| OMOP Condition Occurrences | | False | CommaSeparatedIntegers | + +### procedures + +OMOP Concept IDs for procedure occurrences. + +| title | examples | required | type | +|:---------------------------|:-----------|:-----------|:-----------------------| +| OMOP Procedure Occurrences | | False | CommaSeparatedIntegers | + +### device_exposures + +OMOP Concept IDs for device exposures. + +| title | examples | required | type | +|:--------|:-----------|:-----------|:-----------------------| +| OMOP | | False | CommaSeparatedIntegers | diff --git a/docs/GWDM/1.1.structure.json b/docs/GWDM/1.1.structure.json new file mode 100644 index 0000000..961e4de --- /dev/null +++ b/docs/GWDM/1.1.structure.json @@ -0,0 +1,801 @@ +[ + { + "name": "required", + "required": true, + "title": "Required", + "description": "required metadata needed for the GWDM", + "examples": null, + "type": "Required", + "subItems": [ + { + "name": "gatewayId", + "required": true, + "title": "Gatewayid", + "description": "Need a field in Mauro that captures the datasetID to link to gateway database - or can we just use the one created in Mauro?", + "examples": null, + "type": "str" + }, + { + "name": "gatewayPid", + "required": true, + "title": "Gatewaypid", + "description": "Need a field in Mauro that captures the dataset pid to link to gateway database", + "examples": null, + "type": "str" + }, + { + "name": "issued", + "required": true, + "title": "Issued", + "description": "Aren't issued and modified always the same because of versioning? Is that fine to duplicate because datasets in dcat might look different?", + "examples": null, + "type": "datetime" + }, + { + "name": "modified", + "required": true, + "title": "Modified", + "description": "Aren't issued and modified always the same because of versioning? Is that fine to duplicate because datasets in dcat might look different?", + "examples": null, + "type": "datetime" + }, + { + "name": "revisions", + "required": true, + "title": "Revisions", + "description": null, + "examples": null, + "type": "Revision", + "subItems": [ + { + "name": "version", + "required": true, + "title": "revision version", + "description": "Version number used for previous version of this dataset", + "examples": null, + "type": "str" + }, + { + "name": "url", + "required": true, + "title": "revision url", + "description": "Some url with a reference to the record of a previous version of this dataset", + "examples": null, + "type": "Url", + "subItems": [] + } + ] + }, + { + "name": "version", + "required": true, + "title": "Dataset Version", + "description": "Dataset metadata version", + "examples": [ + "1.1.0" + ], + "type": "str" + } + ] + }, + { + "name": "summary", + "required": true, + "title": "Summary", + "description": "Summary of metadata describing key pieces of information.", + "examples": null, + "type": "Summary", + "subItems": [ + { + "name": "title", + "required": true, + "title": "Title", + "description": "The main title of the dataset", + "examples": null, + "type": "TwoHundredFiftyFiveCharacters", + "subItems": [] + }, + { + "name": "shortTitle", + "required": true, + "title": "Shorttitle", + "description": "A shorter descriptive title of the dataset", + "examples": null, + "type": "ShortTitle", + "subItems": [] + }, + { + "name": "doiName", + "required": true, + "title": "Doiname", + "description": "DOI associated to this dataset", + "examples": null, + "type": "Doi", + "subItems": [] + }, + { + "name": "abstract", + "required": true, + "title": "Abstract", + "description": "Longer abstract detailing the dataset.", + "examples": null, + "type": "LongAbstractText", + "subItems": [] + }, + { + "name": "keywords", + "required": true, + "title": "Keywords", + "description": "Comma separated key words associated to this dataset.", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + }, + { + "name": "controlledKeywords", + "required": true, + "title": "Controlled Keywords", + "description": "Keywords that have been filtered and limited", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + }, + { + "name": "contactPoint", + "required": true, + "title": "Contact Point", + "description": "email of a person who can be the main contact point of this dataset", + "examples": null, + "type": "EmailStr" + }, + { + "name": "datasetType", + "required": true, + "title": "Dataset type", + "description": "What type of dataset is this?", + "examples": null, + "type": "DatasetType", + "subItems": [] + }, + { + "name": "description", + "required": true, + "title": "Description", + "description": "Longer description of the dataset in detail", + "examples": null, + "type": "LongDescription", + "subItems": [] + }, + { + "name": "publisher", + "required": true, + "title": "Publisher", + "description": "Link to details about the publisher of this dataset", + "examples": null, + "type": "Organisation", + "subItems": [ + { + "name": "name", + "required": true, + "title": "Name", + "description": "The organisation responsible for running or supporting the data access request process, as well as publishing and maintaining the metadata. In most this will be the same as the HDR UK Organisation (Hub or Alliance Member)/", + "examples": null, + "type": "Name", + "subItems": [] + }, + { + "name": "gatewayId", + "required": false, + "title": "Publisher gateway id", + "description": "The link to an ID somewhere in the gateway where more information on the publisher can be retrieved.", + "examples": null, + "type": "str" + }, + { + "name": "rorId", + "required": false, + "title": "Research Organization Registry Identifier", + "description": "The Research Organization Registry (ROR) for the organisation, if applicable", + "examples": null, + "type": "str" + } + ] + } + ] + }, + { + "name": "coverage", + "required": false, + "title": "Coverage", + "description": "Observational, Spatial and Temporal coverage", + "examples": null, + "type": "Coverage", + "subItems": [ + { + "name": "spatial", + "required": false, + "title": "Spatial", + "description": "List of countries where the data was taken from", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + }, + { + "name": "pathway", + "required": false, + "title": "Pathway", + "description": "Long description of the clinical/diagnostic/treatment pathway if applicable. This could include if the dataset is from a single speciality or area, a single tier of care, linked across two tier (e.g. primary and secondary care), or an integrated care record covering the whole patient pathway.", + "examples": null, + "type": "LongDescription", + "subItems": [] + }, + { + "name": "followup", + "required": false, + "title": "Followup", + "description": "What is the typical time span that a patient appears in the dataset (follow up period)", + "examples": null, + "type": "Followup" + }, + { + "name": "typicalAgeRange", + "required": false, + "title": "Typical Age Range", + "description": "Age range in whole years of participants in the dataset. Please provide range in the following format '[min age] \u2013 [max age]' where both the minimum and maximum are whole numbers (integers).", + "examples": null, + "type": "AgeRange", + "subItems": [] + }, + { + "name": "gender", + "required": false, + "title": "Gender", + "description": "Male, Female, Other", + "examples": null, + "type": "Gender", + "subItems": [] + }, + { + "name": "biologicalsamples", + "required": false, + "title": "Biological Samples", + "description": "Blood, Saliva, Urine, Other", + "examples": null, + "type": "BiologicalSamples", + "subItems": [] + }, + { + "name": "psychological", + "required": false, + "title": "Psychological", + "description": "Mental health, Cognitive function", + "examples": null, + "type": "Psychological", + "subItems": [] + }, + { + "name": "physical", + "required": false, + "title": "Physical", + "description": "Cardiovascular, Respiratory, Musculoskeletal, Hearing and Vision, Reproductive", + "examples": null, + "type": "Physical", + "subItems": [] + }, + { + "name": "anthropometric", + "required": false, + "title": "Anthropometric", + "description": "Height, Weight, Waist circumference, Hip circumference, Blood pressure", + "examples": null, + "type": "Anthropometric", + "subItems": [] + }, + { + "name": "lifestyle", + "required": false, + "title": "Lifestyle", + "description": "Cohort lifestyle habits: Smoking, Physical activity, Dietary habits, Alcohol", + "examples": null, + "type": "Lifestyles", + "subItems": [] + }, + { + "name": "socioeconomic", + "required": false, + "title": "Socio-economic", + "description": "Occupation, Family circumstances, Housing, Education, Ethnic group, Martial status, Social support", + "examples": null, + "type": "SocioEconomic", + "subItems": [] + } + ] + }, + { + "name": "provenance", + "required": false, + "title": "Provenance", + "description": "Provenance information", + "examples": null, + "type": "Provenance", + "subItems": [ + { + "name": "origin", + "required": false, + "title": null, + "description": null, + "examples": null, + "type": "Origin", + "subItems": [ + { + "name": "purpose", + "required": false, + "title": "Purpose", + "description": "Indicates the purpose(s) that the dataset was collected.", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + }, + { + "name": "source", + "required": false, + "title": "Source", + "description": "Indicates the source of the data extraction", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + }, + { + "name": "collectionSituation", + "required": false, + "title": "Setting", + "description": "Indicate the setting(s) where data was collected. Multiple settings may be provided", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + } + ] + }, + { + "name": "temporal", + "required": true, + "title": null, + "description": null, + "examples": null, + "type": "Temporal", + "subItems": [ + { + "name": "startDate", + "required": true, + "title": "Start Date", + "description": "The start of the time period that the dataset provides coverage for", + "examples": null, + "type": "date" + }, + { + "name": "endDate", + "required": false, + "title": "End Date", + "description": "The end of the time period that the dataset provides coverage for", + "examples": null, + "type": "date" + }, + { + "name": "timeLag", + "required": true, + "title": "Time Lag", + "description": "Rypical time-lag between an event and the data for that event appearing in the dataset", + "examples": null, + "type": "TimeLag" + }, + { + "name": "accrualPeriodicity", + "required": true, + "title": "Periodicity", + "description": "frequency of distribution release. If a dataset is distributed regularly please choose a distribution release periodicity from the constrained list and indicate the next release date. When the release date becomes historical, a new release date will be calculated based on the publishing periodicity.", + "examples": null, + "type": "Periodicity" + }, + { + "name": "distributionReleaseDate", + "required": false, + "title": "Release Date", + "description": "Date of the latest release of the dataset. If this is a regular release i.e. quarterly, or this is a static dataset please complete this alongside Periodicity.", + "examples": null, + "type": "date" + } + ] + } + ] + }, + { + "name": "accessibility", + "required": false, + "title": "Accessibility", + "description": "Accessibility information.", + "examples": null, + "type": "Accessibility", + "subItems": [ + { + "name": "usage", + "required": false, + "title": "Usage", + "description": "This section includes information about how the data can be used and how it is currently being used", + "examples": null, + "type": "Usage", + "subItems": [ + { + "name": "dataUseLimitation", + "required": true, + "title": "Data Use Limitation", + "description": "Any restrictions to its usage", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + }, + { + "name": "dataUseRequirement", + "required": true, + "title": "Data Use Requirements", + "description": "Any requirements needed for data usage", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + }, + { + "name": "resourceCreator", + "required": false, + "title": "Resource Creator", + "description": "Who has created this resource", + "examples": null, + "type": "Organisation", + "subItems": [ + { + "name": "name", + "required": true, + "title": "Name", + "description": "The organisation responsible for running or supporting the data access request process, as well as publishing and maintaining the metadata. In most this will be the same as the HDR UK Organisation (Hub or Alliance Member)/", + "examples": null, + "type": "Name", + "subItems": [] + }, + { + "name": "gatewayId", + "required": false, + "title": "Publisher gateway id", + "description": "The link to an ID somewhere in the gateway where more information on the publisher can be retrieved.", + "examples": null, + "type": "str" + }, + { + "name": "rorId", + "required": false, + "title": "Research Organization Registry Identifier", + "description": "The Research Organization Registry (ROR) for the organisation, if applicable", + "examples": null, + "type": "str" + } + ] + } + ] + }, + { + "name": "access", + "required": true, + "title": "Access", + "description": "This section includes information about data access", + "examples": null, + "type": "Access", + "subItems": [ + { + "name": "accessRights", + "required": true, + "title": "Access Rights", + "description": "Optional link(s) or a description of where the license associated to accessing this dataset", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + }, + { + "name": "accessService", + "required": false, + "title": "Access Service", + "description": "", + "examples": null, + "type": "LongDescription", + "subItems": [] + }, + { + "name": "accessRequestCost", + "required": false, + "title": "Organisation Access Request Cost", + "description": "", + "examples": null, + "type": "LongDescription", + "subItems": [] + }, + { + "name": "deliveryLeadTime", + "required": false, + "title": "Access Request Duration", + "description": "An arbitrary guess at the time to gain access to the dataset...", + "examples": null, + "type": "DeliveryLeadTime" + }, + { + "name": "jurisdiction", + "required": true, + "title": "Jurisdiction", + "description": "Comma separated country codes of where the data jurisdiction is.", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + }, + { + "name": "dataController", + "required": true, + "title": "Data Controller", + "description": "Name of the data controller", + "examples": null, + "type": "LongDescription", + "subItems": [] + }, + { + "name": "dataProcessor", + "required": false, + "title": "Data Processor", + "description": "Name of the data processors", + "examples": null, + "type": "LongDescription", + "subItems": [] + } + ] + }, + { + "name": "formatAndStandards", + "required": false, + "title": "Format and Standards", + "description": "Section includes technical attributes for language vocabularies, sizes etc. and gives researchers facts about and processing the underlying data in the dataset.", + "examples": null, + "type": "FormatAndStandards", + "subItems": [ + { + "name": "vocabularyEncodingSchemes", + "required": true, + "title": "Controlled Vocabulary", + "description": "Code value of the ontology vocabulary encoding", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + }, + { + "name": "conformsTo", + "required": true, + "title": "Conforms To", + "description": "What the vocabulary conforms to.", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + }, + { + "name": "languages", + "required": true, + "title": "Language Code(s)", + "description": "Language code(s) of the language of the dataset metadata and underlying data is made available.", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + }, + { + "name": "formats", + "required": true, + "title": "Dataset Format", + "description": "Format(s) the dataset can be made available in", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + } + ] + } + ] + }, + { + "name": "linkage", + "required": false, + "title": "Linkage", + "description": "Linkage and enrichment.", + "examples": null, + "type": "Linkage", + "subItems": [ + { + "name": "isGeneratedUsing", + "required": false, + "title": "Is Generated Using", + "description": "??", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + }, + { + "name": "associatedMedia", + "required": false, + "title": "Associated Media", + "description": "Any media associated with the Gateway Organisation using a valid URI for the content. This is an opportunity to provide additional context that could be useful for researchers wanting to understand more about the dataset and its relevance to their research question", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + }, + { + "name": "dataUses", + "required": false, + "title": "Data Uses", + "description": "??", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + }, + { + "name": "isReferenceIn", + "required": false, + "title": "Is Reference in", + "description": "Rhe keystone paper associated with the dataset. Also include a list of known citations, if available and should be links to existing resources where the dataset has been used or referenced.", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + }, + { + "name": "tools", + "required": false, + "title": "Tools", + "description": "URL of any analysis tools or models that have been created for this dataset and are available for further use", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + }, + { + "name": "datasetLinkage", + "required": false, + "title": "Dataset Linkage", + "description": "Dataset Linkage copied over from", + "examples": null, + "type": "DatasetLinkage", + "subItems": [ + { + "name": "isDerivedFrom", + "required": false, + "title": "Derivations", + "description": "Indicate if derived datasets or predefined extracts are available and the type of derivation available. Notes. Single or multiple dimensions can be provided as a derived extract alongside the dataset", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + }, + { + "name": "isPartOf", + "required": false, + "title": "Is PartOf", + "description": "If the dataset is part of a group or family", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + }, + { + "name": "isMemberOf", + "required": false, + "title": "Is MemberOf", + "description": "Dataset is a member of XXX(?)", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + }, + { + "name": "linkedDatasets", + "required": false, + "title": "Linked Datasets", + "description": "Links to other datasets.", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + } + ] + }, + { + "name": "investigations", + "required": false, + "title": "Investigations", + "description": "Please provide the keystone paper associated with the dataset.", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + } + ] + }, + { + "name": "observations", + "required": false, + "title": "Observations", + "description": "Obsservations", + "examples": null, + "type": "Observation" + }, + { + "name": "structuralMetadata", + "required": false, + "title": "Structural Metadata", + "description": "Descriptions of all tables and data elements that can be included in the dataset", + "examples": null, + "type": "DataTable" + }, + { + "name": "omopIDs", + "required": false, + "title": "OMOP IDs", + "description": "Collection of OMOP IDs that are contained within the dataset.", + "examples": null, + "type": "OmopIDs", + "subItems": [ + { + "name": "measurements", + "required": false, + "title": "OMOP Measurements", + "description": "OMOP Concept IDs for measured quantities. E.g. 44810410 - https://athena.ohdsi.org/search-terms/terms/44810410", + "examples": null, + "type": "CommaSeparatedIntegers", + "subItems": [] + }, + { + "name": "drug", + "required": false, + "title": "OMOP Drugs", + "description": "OMOP Concept IDs for drug exposures. E.g. 602396 - https://athena.ohdsi.org/search-terms/terms/602396", + "examples": null, + "type": "CommaSeparatedIntegers", + "subItems": [] + }, + { + "name": "observations", + "required": false, + "title": "OMOP Observations", + "description": "OMOP Concept IDs for observations.", + "examples": null, + "type": "CommaSeparatedIntegers", + "subItems": [] + }, + { + "name": "specimens", + "required": false, + "title": "OMOP Specimens", + "description": "OMOP Concept IDs for specimens.", + "examples": null, + "type": "CommaSeparatedIntegers", + "subItems": [] + }, + { + "name": "conditions", + "required": false, + "title": "OMOP Condition Occurrences", + "description": "OMOP Concept IDs for condition occurrences.", + "examples": null, + "type": "CommaSeparatedIntegers", + "subItems": [] + }, + { + "name": "procedures", + "required": false, + "title": "OMOP Procedure Occurrences", + "description": "OMOP Concept IDs for procedure occurrences.", + "examples": null, + "type": "CommaSeparatedIntegers", + "subItems": [] + }, + { + "name": "device_exposures", + "required": false, + "title": "OMOP ", + "description": "OMOP Concept IDs for device exposures.", + "examples": null, + "type": "CommaSeparatedIntegers", + "subItems": [] + } + ] + } +] \ No newline at end of file diff --git a/docs/public/GDM_to_SchemaOrg.html b/docs/public/GDM_to_SchemaOrg.html new file mode 100644 index 0000000..5cfc51f --- /dev/null +++ b/docs/public/GDM_to_SchemaOrg.html @@ -0,0 +1,273 @@ + + + + + + + + + +
+

+
+ + + + + + +
+

+
+ + + + + +
+ + +
+
+ + +
+
+
0%
+
+
+
+
+
+ + +
+ + + + + \ No newline at end of file diff --git a/hdr_schemata/models/GWDM/1.1/schema.json b/hdr_schemata/models/GWDM/1.1/schema.json new file mode 100644 index 0000000..24237fd --- /dev/null +++ b/hdr_schemata/models/GWDM/1.1/schema.json @@ -0,0 +1,1761 @@ +{ + "$defs": { + "AbstractText": { + "anyOf": [ + { + "maxLength": 500, + "minLength": 5, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "AbstractText" + }, + "Access": { + "additionalProperties": false, + "properties": { + "accessRights": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "description": "Optional link(s) or a description of where the license associated to accessing this dataset", + "example": "https://raw.githubusercontent.com/HDRUK/papers/master/LICENSE", + "title": "Access Rights" + }, + "accessService": { + "anyOf": [ + { + "$ref": "#/$defs/LongDescription" + }, + { + "type": "null" + } + ], + "default": null, + "description": "", + "example": "The SAIL Databank is powered by the UK Secure e-Research Platform (UKSeRP). Following approval through safeguard processes, access to project-specific data within the secure environment is permitted using two-factor authentication.", + "title": "Access Service" + }, + "accessRequestCost": { + "anyOf": [ + { + "$ref": "#/$defs/LongDescription" + }, + { + "type": "null" + } + ], + "default": null, + "description": "", + "example": "Data provision is free from SAIL. Overall project costing depends on the number of people that require access to the SAIL Gateway, the activities that SAIL needs to complete (e.g. loading non-standard datasets), data refreshes, analytical work required, disclosure control process, and special case technological requirements.", + "title": "Organisation Access Request Cost" + }, + "deliveryLeadTime": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryLeadTime" + }, + { + "type": "null" + } + ], + "default": null, + "description": "An arbitrary guess at the time to gain access to the dataset...", + "example": "2-6 MONTHS", + "title": "Access Request Duration" + }, + "jurisdiction": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "description": "Comma separated country codes of where the data jurisdiction is.", + "example": "GB-WLS,GB-GBN,GB-SCT", + "title": "Jurisdiction" + }, + "dataController": { + "anyOf": [ + { + "$ref": "#/$defs/LongDescription" + }, + { + "type": "null" + } + ], + "description": "Name of the data controller", + "example": "SAIL Databank", + "title": "Data Controller" + }, + "dataProcessor": { + "anyOf": [ + { + "$ref": "#/$defs/LongDescription" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Name of the data processors", + "example": "SAIL Databank", + "title": "Data Processor" + } + }, + "required": [ + "accessRights", + "jurisdiction", + "dataController" + ], + "title": "Access", + "type": "object" + }, + "Accessibility": { + "additionalProperties": false, + "properties": { + "usage": { + "anyOf": [ + { + "$ref": "#/$defs/Usage" + }, + { + "type": "null" + } + ], + "default": null, + "description": "This section includes information about how the data can be used and how it is currently being used", + "title": "Usage" + }, + "access": { + "allOf": [ + { + "$ref": "#/$defs/Access" + } + ], + "description": "This section includes information about data access" + }, + "formatAndStandards": { + "anyOf": [ + { + "$ref": "#/$defs/FormatAndStandards" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Section includes technical attributes for language vocabularies, sizes etc. and gives researchers facts about and processing the underlying data in the dataset.", + "title": "Format and Standards" + } + }, + "required": [ + "access" + ], + "title": "Accessibility", + "type": "object" + }, + "AgeRange": { + "anyOf": [ + { + "pattern": "Not Known|(150|1[0-4][0-9]|[0-9]|[1-8][0-9]|9[0-9])-(150|1[0-4][0-9]|[0-9]|[1-8][0-9]|9[0-9])", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "AgeRange" + }, + "Anthropometric": { + "anyOf": [ + { + "pattern": "\\b(?:Blood Pressure|Hip Circumference|Height|Waist Circumference|Weight)(?:,(?:Blood Pressure|Hip Circumference|Height|Waist Circumference|Weight))*\\b", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Anthropometric" + }, + "BiologicalSamples": { + "anyOf": [ + { + "pattern": "\\b(?:Blood|Other|Urine|Saliva)(?:,(?:Blood|Other|Urine|Saliva))*\\b", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "BiologicalSamples" + }, + "CommaSeparatedIntegers": { + "anyOf": [ + { + "pattern": "^\\d+(,\\d+)*$", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "CommaSeparatedIntegers" + }, + "CommaSeparatedValues": { + "anyOf": [ + { + "pattern": "([^,]+)", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "CommaSeparatedValues" + }, + "Coverage": { + "properties": { + "spatial": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "List of countries where the data was taken from", + "example": "United Kingdom,Wales,England", + "title": "Spatial" + }, + "pathway": { + "anyOf": [ + { + "$ref": "#/$defs/LongDescription" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Long description of the clinical/diagnostic/treatment pathway if applicable. This could include if the dataset is from a single speciality or area, a single tier of care, linked across two tier (e.g. primary and secondary care), or an integrated care record covering the whole patient pathway.", + "example": "The lookup contains references to link data held elsewhere on:\n\u2022 individuals appearing as defendants in criminal cases dealt with by the magistrates' or Crown Court in England and Wales (including Youth Courts). \n\u2022 individuals supervised by the probation service in England and Wales\n\u2022 individuals serving custodial sentences in England & Wales who appear within records from the prison data source, p-NOMIS. Young Offenders are included if resident at prisons or Young Offender Institutes (YOIs) that use p-NOMIS, however, this excludes the majority of Secure Schools and Secure Training Centres. \"\n\n\"The linking dataset includes a person ID and link to record in other data first datasets for: \n\u2022 Disposals in the magistrates\u2019 court from 1 January 2011 to 31 December 2020\n\u2022 Disposals in the Crown Court from 1 January 2013 to 31 December 2020\n\u2022 Custodial sentences of offenders in custody from January 2011 to September 2021 (including sentences begun before 2011) \n\u2022 Offender probation records from January 2014 to December 2020.", + "title": "Pathway" + }, + "followup": { + "anyOf": [ + { + "$ref": "#/$defs/Followup" + }, + { + "type": "null" + } + ], + "default": null, + "description": "What is the typical time span that a patient appears in the dataset (follow up period)", + "example": "CONTINUOUS", + "title": "Followup" + }, + "typicalAgeRange": { + "anyOf": [ + { + "$ref": "#/$defs/AgeRange" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Age range in whole years of participants in the dataset. Please provide range in the following format '[min age] \u2013 [max age]' where both the minimum and maximum are whole numbers (integers).", + "example": "1-150", + "title": "Typical Age Range" + }, + "gender": { + "anyOf": [ + { + "$ref": "#/$defs/Gender" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Male, Female, Other", + "title": "Gender" + }, + "biologicalsamples": { + "anyOf": [ + { + "$ref": "#/$defs/BiologicalSamples" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Blood, Saliva, Urine, Other", + "title": "Biological Samples" + }, + "psychological": { + "anyOf": [ + { + "$ref": "#/$defs/Psychological" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Mental health, Cognitive function", + "title": "Psychological" + }, + "physical": { + "anyOf": [ + { + "$ref": "#/$defs/Physical" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Cardiovascular, Respiratory, Musculoskeletal, Hearing and Vision, Reproductive", + "title": "Physical" + }, + "anthropometric": { + "anyOf": [ + { + "$ref": "#/$defs/Anthropometric" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Height, Weight, Waist circumference, Hip circumference, Blood pressure", + "title": "Anthropometric" + }, + "lifestyle": { + "anyOf": [ + { + "$ref": "#/$defs/Lifestyles" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Cohort lifestyle habits: Smoking, Physical activity, Dietary habits, Alcohol", + "title": "Lifestyle" + }, + "socioeconomic": { + "anyOf": [ + { + "$ref": "#/$defs/SocioEconomic" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Occupation, Family circumstances, Housing, Education, Ethnic group, Martial status, Social support", + "title": "Socio-economic" + } + }, + "title": "Coverage", + "type": "object" + }, + "DataColumn": { + "properties": { + "name": { + "allOf": [ + { + "$ref": "#/$defs/Name" + } + ], + "description": "The name of a column in a table.", + "title": "Column Name" + }, + "dataType": { + "description": "The data type of values in the column", + "title": "Data Type", + "type": "string" + }, + "description": { + "anyOf": [ + { + "maxLength": 20000, + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A description of a column in a table.", + "title": "Column Description" + }, + "sensitive": { + "description": "A True or False value, indicating if the field is sensitive or not", + "title": "Sensitive", + "type": "boolean" + }, + "values": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/DataValue" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Data values contained within the column", + "title": "Values" + } + }, + "required": [ + "name", + "dataType", + "sensitive" + ], + "title": "DataColumn", + "type": "object" + }, + "DataTable": { + "additionalProperties": false, + "properties": { + "name": { + "anyOf": [ + { + "maxLength": 500, + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The name of a table in a dataset.", + "title": "Table Name" + }, + "description": { + "anyOf": [ + { + "maxLength": 20000, + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A description of a table in a dataset.", + "title": "Table Description" + }, + "columns": { + "description": "A list of columns contained within a table in a dataset.", + "items": { + "$ref": "#/$defs/DataColumn" + }, + "title": "Data Columns", + "type": "array" + } + }, + "required": [ + "name", + "columns" + ], + "title": "DataTable", + "type": "object" + }, + "DataValue": { + "properties": { + "name": { + "allOf": [ + { + "$ref": "#/$defs/Name" + } + ], + "description": "Unique value in a column .", + "title": "Value Name" + }, + "description": { + "anyOf": [ + { + "maxLength": 20000, + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A description of a unique value in a column.", + "title": "Value Description" + }, + "frequency": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The frequency of occurrance of a value in a column", + "title": "Value Frequency" + } + }, + "required": [ + "name" + ], + "title": "DataValue", + "type": "object" + }, + "DatasetLinkage": { + "additionalProperties": false, + "properties": { + "isDerivedFrom": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Indicate if derived datasets or predefined extracts are available and the type of derivation available. Notes. Single or multiple dimensions can be provided as a derived extract alongside the dataset", + "example": "Data will be minimised as appropriate relative to the data access application", + "title": "Derivations" + }, + "isPartOf": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "If the dataset is part of a group or family", + "example": "UKCRC Tissue Directory and Coordination Centre", + "title": "Is PartOf" + }, + "isMemberOf": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Dataset is a member of XXX(?)", + "title": "Is MemberOf" + }, + "linkedDatasets": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Links to other datasets.", + "example": "Yes. To any SAIL dataset & reference data.,ALL", + "title": "Linked Datasets" + } + }, + "title": "DatasetLinkage", + "type": "object" + }, + "DatasetType": { + "anyOf": [ + { + "maxLength": 100, + "minLength": 2, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "DatasetType" + }, + "DeliveryLeadTime": { + "enum": [ + "LESS 1 WEEK", + "1-2 WEEKS", + "2-4 WEEKS", + "1-2 MONTHS", + "2-6 MONTHS", + "MORE 6 MONTHS", + "VARIABLE", + "NOT APPLICABLE", + "OTHER", + null + ], + "title": "DeliveryLeadTime" + }, + "Doi": { + "anyOf": [ + { + "pattern": "^10.\\d{4,9}/[-._;()/:a-zA-Z0-9]+$", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Doi" + }, + "Followup": { + "enum": [ + "0 - 6 MONTHS", + "6 - 12 MONTHS", + "1 - 10 YEARS", + "> 10 YEARS", + "UNKNOWN", + "CONTINUOUS", + "OTHER", + null + ], + "title": "Followup" + }, + "FormatAndStandards": { + "additionalProperties": false, + "properties": { + "vocabularyEncodingSchemes": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "description": "Code value of the ontology vocabulary encoding", + "example": "OPCS4,NHS NATIONAL CODES,ICD10,OTHER", + "title": "Controlled Vocabulary" + }, + "conformsTo": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "description": "What the vocabulary conforms to.", + "example": "LOCAL,NHS DATA DICTIONARY", + "title": "Conforms To" + }, + "languages": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "description": "Language code(s) of the language of the dataset metadata and underlying data is made available.", + "example": "en", + "title": "Language Code(s)" + }, + "formats": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "description": "Format(s) the dataset can be made available in", + "example": "CSV,JSON,SQL database table", + "title": "Dataset Format" + } + }, + "required": [ + "vocabularyEncodingSchemes", + "conformsTo", + "languages", + "formats" + ], + "title": "FormatAndStandards", + "type": "object" + }, + "Gender": { + "anyOf": [ + { + "pattern": "\\b(?:Male|Female|Other)(?:,(?:Male|Female|Other))*\\b", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Gender" + }, + "Lifestyles": { + "anyOf": [ + { + "pattern": "\\b(?:Smoking|Dietary Habits|Physical Activity|Alcohol)(?:,(?:Smoking|Dietary Habits|Physical Activity|Alcohol))*\\b", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Lifestyles" + }, + "Linkage": { + "additionalProperties": false, + "properties": { + "isGeneratedUsing": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "??", + "title": "Is Generated Using" + }, + "associatedMedia": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Any media associated with the Gateway Organisation using a valid URI for the content. This is an opportunity to provide additional context that could be useful for researchers wanting to understand more about the dataset and its relevance to their research question", + "example": "https://popdatasci.swan.ac.uk/centres-of-excellence/sail/,https://www.youtube.com/watch?v=ZK9-Jw3uVkw,https://saildatabank.com/,https://saildatabank.com/about-us/", + "title": "Associated Media" + }, + "dataUses": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "??", + "title": "Data Uses" + }, + "isReferenceIn": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Rhe keystone paper associated with the dataset. Also include a list of known citations, if available and should be links to existing resources where the dataset has been used or referenced.", + "title": "Is Reference in" + }, + "tools": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "URL of any analysis tools or models that have been created for this dataset and are available for further use", + "example": "https://conceptlibrary.saildatabank.com/", + "title": "Tools" + }, + "datasetLinkage": { + "anyOf": [ + { + "$ref": "#/$defs/DatasetLinkage" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Dataset Linkage copied over from", + "title": "Dataset Linkage" + }, + "investigations": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Please provide the keystone paper associated with the dataset.", + "example": "https://digital.nhs.uk/services/data-access-request-service-dars/register-of-approved-data-releases", + "title": "Investigations" + } + }, + "title": "Linkage", + "type": "object" + }, + "LongAbstractText": { + "anyOf": [ + { + "maxLength": 5000, + "minLength": 5, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "LongAbstractText" + }, + "LongDescription": { + "anyOf": [ + { + "maxLength": 50000, + "minLength": 2, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "LongDescription" + }, + "MeasuredProperty": { + "title": "MeasuredProperty" + }, + "Name": { + "title": "Name" + }, + "Observation": { + "additionalProperties": false, + "properties": { + "observedNode": { + "allOf": [ + { + "$ref": "#/$defs/StatisticalPopulationConstrained" + } + ], + "description": "Please select one of the following statistical populations for you observation", + "examples": [ + "PERSONS" + ], + "title": "Statistical Population" + }, + "measuredValue": { + "description": "Please provide the population size associated with the population type the dataset i.e. 1000 people in a study, or 87 images (MRI) of Knee Usage Note: Used with Statistical Population, which specifies the type of the population in the dataset.", + "title": "Measured Value", + "type": "integer" + }, + "disambiguatingDescription": { + "anyOf": [ + { + "$ref": "#/$defs/AbstractText" + }, + { + "type": "null" + } + ], + "default": null, + "description": "If SNOMED CT term does not provide sufficient detail, please provide a description that disambiguates the population type.", + "title": "Disambiguating Description" + }, + "observationDate": { + "anyOf": [ + { + "format": "date", + "type": "string" + }, + { + "format": "date-time", + "type": "string" + } + ], + "description": "Please provide the date that the observation was made. Some datasets may be continuously updated and the number of records will change regularly, so the observation date provides users with the date that the analysis or query was run to generate the particular observation. Multiple observations can be made i.e. an observation of cumulative COVID positive cases by specimen on the 1/1/2021 could be 2M. On the 8/1/2021 a new observation could be 2.1M. Users can add multiple observations.", + "title": "Observation Date" + }, + "measuredProperty": { + "allOf": [ + { + "$ref": "#/$defs/MeasuredProperty" + } + ], + "description": "Initially this will be defaulted to \"COUNT\"", + "title": "Measured Property" + } + }, + "required": [ + "observedNode", + "measuredValue", + "observationDate", + "measuredProperty" + ], + "title": "Observation", + "type": "object" + }, + "OmopIDs": { + "properties": { + "measurements": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedIntegers" + }, + { + "type": "null" + } + ], + "default": null, + "description": "OMOP Concept IDs for measured quantities. E.g. 44810410 - https://athena.ohdsi.org/search-terms/terms/44810410", + "example": "44810410", + "title": "OMOP Measurements" + }, + "drug": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedIntegers" + }, + { + "type": "null" + } + ], + "default": null, + "description": "OMOP Concept IDs for drug exposures. E.g. 602396 - https://athena.ohdsi.org/search-terms/terms/602396", + "example": "602396", + "title": "OMOP Drugs" + }, + "observations": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedIntegers" + }, + { + "type": "null" + } + ], + "default": null, + "description": "OMOP Concept IDs for observations.", + "example": "12345,6789", + "title": "OMOP Observations" + }, + "specimens": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedIntegers" + }, + { + "type": "null" + } + ], + "default": null, + "description": "OMOP Concept IDs for specimens.", + "example": "12345,6789", + "title": "OMOP Specimens" + }, + "conditions": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedIntegers" + }, + { + "type": "null" + } + ], + "default": null, + "description": "OMOP Concept IDs for condition occurrences.", + "example": "12345,6789", + "title": "OMOP Condition Occurrences" + }, + "procedures": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedIntegers" + }, + { + "type": "null" + } + ], + "default": null, + "description": "OMOP Concept IDs for procedure occurrences.", + "example": "12345,6789", + "title": "OMOP Procedure Occurrences" + }, + "device_exposures": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedIntegers" + }, + { + "type": "null" + } + ], + "default": null, + "description": "OMOP Concept IDs for device exposures.", + "example": "12345,6789", + "title": "OMOP " + } + }, + "title": "OmopIDs", + "type": "object" + }, + "Organisation": { + "properties": { + "name": { + "anyOf": [ + { + "$ref": "#/$defs/Name" + }, + { + "type": "null" + } + ], + "description": "The organisation responsible for running or supporting the data access request process, as well as publishing and maintaining the metadata. In most this will be the same as the HDR UK Organisation (Hub or Alliance Member)/", + "example": "SAIL", + "title": "Name" + }, + "gatewayId": { + "anyOf": [ + { + "maxLength": 50, + "minLength": 2, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The link to an ID somewhere in the gateway where more information on the publisher can be retrieved.", + "title": "Publisher gateway id" + }, + "rorId": { + "anyOf": [ + { + "maxLength": 9, + "minLength": 9, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The Research Organization Registry (ROR) for the organisation, if applicable", + "title": "Research Organization Registry Identifier" + } + }, + "required": [ + "name" + ], + "title": "Organisation", + "type": "object" + }, + "Origin": { + "additionalProperties": false, + "properties": { + "purpose": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Indicates the purpose(s) that the dataset was collected.", + "example": "ADMINISTRATIVE,STATUTORY", + "title": "Purpose" + }, + "source": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Indicates the source of the data extraction", + "example": "PAPER BASED,ELECTRONIC SURVEY", + "title": "Source" + }, + "collectionSituation": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Indicate the setting(s) where data was collected. Multiple settings may be provided", + "example": "IN-PATIENTS,PRIMARY CARE", + "title": "Setting" + } + }, + "title": "Origin", + "type": "object" + }, + "Periodicity": { + "enum": [ + "STATIC", + "IRREGULAR", + "CONTINUOUS", + "BIENNIAL", + "ANNUAL", + "BIANNUAL", + "QUARTERLY", + "BIMONTHLY", + "MONTHLY", + "BIWEEKLY", + "WEEKLY", + "SEMIWEEKLY", + "DAILY", + "OTHER", + null + ], + "title": "Periodicity" + }, + "Physical": { + "anyOf": [ + { + "pattern": "\\b(?:Respiratory|Vision|Hearing|Musculoskeletal|Cardiovascular|Reproductive)(?:,(?:Respiratory|Vision|Hearing|Musculoskeletal|Cardiovascular|Reproductive))*\\b", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Physical" + }, + "Provenance": { + "additionalProperties": false, + "properties": { + "origin": { + "anyOf": [ + { + "$ref": "#/$defs/Origin" + }, + { + "type": "null" + } + ], + "default": null + }, + "temporal": { + "$ref": "#/$defs/Temporal" + } + }, + "required": [ + "temporal" + ], + "title": "Provenance", + "type": "object" + }, + "Psychological": { + "anyOf": [ + { + "pattern": "\\b(?:Cognitive Function|Mental Health)(?:,(?:Cognitive Function|Mental Health))*\\b", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Psychological" + }, + "Required": { + "properties": { + "gatewayId": { + "description": "Need a field in Mauro that captures the datasetID to link to gateway database - or can we just use the one created in Mauro?", + "maxLength": 50, + "minLength": 2, + "title": "Gatewayid", + "type": "string" + }, + "gatewayPid": { + "description": "Need a field in Mauro that captures the dataset pid to link to gateway database", + "maxLength": 50, + "minLength": 2, + "title": "Gatewaypid", + "type": "string" + }, + "issued": { + "description": "Aren't issued and modified always the same because of versioning? Is that fine to duplicate because datasets in dcat might look different?", + "format": "date-time", + "title": "Issued", + "type": "string" + }, + "modified": { + "description": "Aren't issued and modified always the same because of versioning? Is that fine to duplicate because datasets in dcat might look different?", + "format": "date-time", + "title": "Modified", + "type": "string" + }, + "revisions": { + "items": { + "$ref": "#/$defs/Revision" + }, + "title": "Revisions", + "type": "array" + }, + "version": { + "description": "Dataset metadata version", + "examples": [ + "1.1.0" + ], + "maxLength": 100, + "minLength": 2, + "title": "Dataset Version", + "type": "string" + } + }, + "required": [ + "gatewayId", + "gatewayPid", + "issued", + "modified", + "revisions", + "version" + ], + "title": "Required", + "type": "object" + }, + "Revision": { + "properties": { + "version": { + "description": "Version number used for previous version of this dataset", + "example": "6.0.0", + "maxLength": 100, + "minLength": 2, + "title": "revision version", + "type": "string" + }, + "url": { + "allOf": [ + { + "$ref": "#/$defs/Url" + } + ], + "description": "Some url with a reference to the record of a previous version of this dataset", + "example": "https://api.service.nhs.uk/health-research-data-catalogue/datasetrevisions/841f7da2-b018-41f6-b4ae-2e0aadab6561", + "title": "revision url" + } + }, + "required": [ + "version", + "url" + ], + "title": "Revision", + "type": "object" + }, + "ShortTitle": { + "anyOf": [ + { + "maxLength": 100, + "minLength": 2, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "ShortTitle" + }, + "SocioEconomic": { + "anyOf": [ + { + "pattern": "\\b(?:Finances|Family Circumstances|Housing|Education|Marital Status|Occupation|Ethnic Group|Social Support)(?:,(?:Finances|Family Circumstances|Housing|Education|Marital Status|Occupation|Ethnic Group|Social Support))*\\b", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "SocioEconomic" + }, + "StatisticalPopulationConstrained": { + "enum": [ + "PERSONS", + "EVENTS", + "FINDINGS" + ], + "title": "StatisticalPopulationConstrained", + "type": "string" + }, + "Summary": { + "properties": { + "title": { + "allOf": [ + { + "$ref": "#/$defs/TwoHundredFiftyFiveCharacters" + } + ], + "description": "The main title of the dataset", + "example": "Publications that mention HDR-UK (or any variant thereof) in Acknowledgements or Author Affiliations", + "title": "Title" + }, + "shortTitle": { + "anyOf": [ + { + "$ref": "#/$defs/ShortTitle" + }, + { + "type": "null" + } + ], + "description": "A shorter descriptive title of the dataset", + "example": "ONS 2011 Census Wales (CENW)", + "title": "Shorttitle" + }, + "doiName": { + "anyOf": [ + { + "$ref": "#/$defs/Doi" + }, + { + "type": "null" + } + ], + "description": "DOI associated to this dataset", + "example": "10.1093/ije/dyx196", + "title": "Doiname" + }, + "abstract": { + "allOf": [ + { + "$ref": "#/$defs/LongAbstractText" + } + ], + "description": "Longer abstract detailing the dataset.", + "example": "COVID-19 Key Worker Testing Results data is required by NHS Digital to support COVID-19 requests for linkage, analysis and dissemination to other organisations who require the data in a timely manner.", + "title": "Abstract" + }, + "keywords": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "description": "Comma separated key words associated to this dataset.", + "example": "Preprints,Papers,HDR UK", + "title": "Keywords" + }, + "controlledKeywords": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "description": "Keywords that have been filtered and limited", + "title": "Controlled Keywords" + }, + "contactPoint": { + "anyOf": [ + { + "format": "email", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "email of a person who can be the main contact point of this dataset", + "example": "susheel.varma@hdruk.ac.uk", + "title": "Contact Point" + }, + "datasetType": { + "anyOf": [ + { + "$ref": "#/$defs/DatasetType" + }, + { + "type": "null" + } + ], + "description": "What type of dataset is this?", + "title": "Dataset type" + }, + "description": { + "anyOf": [ + { + "$ref": "#/$defs/LongDescription" + }, + { + "type": "null" + } + ], + "description": "Longer description of the dataset in detail", + "example": "Publications that mention HDR-UK (or any variant thereof) in Acknowledgements or Author Affiliations\n\nThis will include:\n- Papers\n- COVID-19 Papers\n- COVID-19 Preprint", + "title": "Description" + }, + "publisher": { + "anyOf": [ + { + "$ref": "#/$defs/Organisation" + }, + { + "type": "null" + } + ], + "description": "Link to details about the publisher of this dataset", + "title": "Publisher" + } + }, + "required": [ + "title", + "shortTitle", + "doiName", + "abstract", + "keywords", + "controlledKeywords", + "contactPoint", + "datasetType", + "description", + "publisher" + ], + "title": "Summary", + "type": "object" + }, + "Temporal": { + "additionalProperties": false, + "properties": { + "startDate": { + "anyOf": [ + { + "format": "date", + "type": "string" + }, + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The start of the time period that the dataset provides coverage for", + "example": "12/03/2020", + "title": "Start Date" + }, + "endDate": { + "anyOf": [ + { + "format": "date", + "type": "string" + }, + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The end of the time period that the dataset provides coverage for", + "example": "12/03/2020", + "title": "End Date" + }, + "timeLag": { + "allOf": [ + { + "$ref": "#/$defs/TimeLag" + } + ], + "description": "Rypical time-lag between an event and the data for that event appearing in the dataset", + "example": "LESS 1 WEEK", + "title": "Time Lag" + }, + "accrualPeriodicity": { + "allOf": [ + { + "$ref": "#/$defs/Periodicity" + } + ], + "description": "frequency of distribution release. If a dataset is distributed regularly please choose a distribution release periodicity from the constrained list and indicate the next release date. When the release date becomes historical, a new release date will be calculated based on the publishing periodicity.", + "example": "MONTHLY" + }, + "distributionReleaseDate": { + "anyOf": [ + { + "format": "date", + "type": "string" + }, + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Date of the latest release of the dataset. If this is a regular release i.e. quarterly, or this is a static dataset please complete this alongside Periodicity.", + "title": "Release Date" + } + }, + "required": [ + "startDate", + "timeLag", + "accrualPeriodicity" + ], + "title": "Temporal", + "type": "object" + }, + "TimeLag": { + "enum": [ + "LESS 1 WEEK", + "1-2 WEEKS", + "2-4 WEEKS", + "1-2 MONTHS", + "2-6 MONTHS", + "MORE 6 MONTHS", + "VARIABLE", + "NO TIMELAG", + "NOT APPLICABLE", + "OTHER", + null + ], + "title": "TimeLag" + }, + "TwoHundredFiftyFiveCharacters": { + "maxLength": 255, + "minLength": 2, + "title": "TwoHundredFiftyFiveCharacters", + "type": "string" + }, + "Url": { + "anyOf": [ + { + "format": "uri", + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Url" + }, + "Usage": { + "additionalProperties": false, + "properties": { + "dataUseLimitation": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "description": "Any restrictions to its usage", + "example": "GENERAL RESEARCH USE,PROJECT SPECIFIC RESTRICTIONS", + "title": "Data Use Limitation" + }, + "dataUseRequirement": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "description": "Any requirements needed for data usage", + "example": "PROJECT SPECIFIC RESTRICTIONS,TIME LIMIT ON USE,USER SPECIFIC RESTRICTION", + "title": "Data Use Requirements" + }, + "resourceCreator": { + "anyOf": [ + { + "$ref": "#/$defs/Organisation" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Who has created this resource", + "title": "Resource Creator" + } + }, + "required": [ + "dataUseLimitation", + "dataUseRequirement" + ], + "title": "Usage", + "type": "object" + } + }, + "additionalProperties": false, + "properties": { + "required": { + "allOf": [ + { + "$ref": "#/$defs/Required" + } + ], + "description": "required metadata needed for the GWDM" + }, + "summary": { + "allOf": [ + { + "$ref": "#/$defs/Summary" + } + ], + "description": "Summary of metadata describing key pieces of information." + }, + "coverage": { + "anyOf": [ + { + "$ref": "#/$defs/Coverage" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Observational, Spatial and Temporal coverage", + "title": "Coverage" + }, + "provenance": { + "anyOf": [ + { + "$ref": "#/$defs/Provenance" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Provenance information", + "title": "Provenance" + }, + "accessibility": { + "allOf": [ + { + "$ref": "#/$defs/Accessibility" + } + ], + "default": null, + "description": "Accessibility information.", + "title": "Accessibility" + }, + "linkage": { + "anyOf": [ + { + "$ref": "#/$defs/Linkage" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Linkage and enrichment.", + "title": "Linkage" + }, + "observations": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/Observation" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Obsservations", + "title": "Observations" + }, + "structuralMetadata": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/DataTable" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Descriptions of all tables and data elements that can be included in the dataset", + "title": "Structural Metadata" + }, + "omopIDs": { + "anyOf": [ + { + "$ref": "#/$defs/OmopIDs" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Collection of OMOP IDs that are contained within the dataset.", + "title": "OMOP IDs" + } + }, + "required": [ + "required", + "summary" + ], + "title": "Gwdm11", + "type": "object" +} \ No newline at end of file diff --git a/hdr_schemata/models/GWDM/__init__.py b/hdr_schemata/models/GWDM/__init__.py index f5cc9f9..e12346d 100644 --- a/hdr_schemata/models/GWDM/__init__.py +++ b/hdr_schemata/models/GWDM/__init__.py @@ -1 +1,2 @@ from .v1_0 import Gwdm10 +from .v1_1 import Gwdm11 diff --git a/hdr_schemata/models/GWDM/create_json_schema.py b/hdr_schemata/models/GWDM/create_json_schema.py index aeb5ce8..f4aab2f 100644 --- a/hdr_schemata/models/GWDM/create_json_schema.py +++ b/hdr_schemata/models/GWDM/create_json_schema.py @@ -1,8 +1,10 @@ from pydantic import ValidationError from v1_0 import Gwdm10 +from v1_1 import Gwdm11 import json Gwdm10.save_schema('1.0/schema.json') -Gwdm10.save_schema('latest/schema.json') +Gwdm11.save_schema('1.1/schema.json') +Gwdm11.save_schema('latest/schema.json') diff --git a/hdr_schemata/models/GWDM/latest/schema.json b/hdr_schemata/models/GWDM/latest/schema.json index 4c08331..24237fd 100644 --- a/hdr_schemata/models/GWDM/latest/schema.json +++ b/hdr_schemata/models/GWDM/latest/schema.json @@ -176,6 +176,42 @@ ], "title": "AgeRange" }, + "Anthropometric": { + "anyOf": [ + { + "pattern": "\\b(?:Blood Pressure|Hip Circumference|Height|Waist Circumference|Weight)(?:,(?:Blood Pressure|Hip Circumference|Height|Waist Circumference|Weight))*\\b", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Anthropometric" + }, + "BiologicalSamples": { + "anyOf": [ + { + "pattern": "\\b(?:Blood|Other|Urine|Saliva)(?:,(?:Blood|Other|Urine|Saliva))*\\b", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "BiologicalSamples" + }, + "CommaSeparatedIntegers": { + "anyOf": [ + { + "pattern": "^\\d+(,\\d+)*$", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "CommaSeparatedIntegers" + }, "CommaSeparatedValues": { "anyOf": [ { @@ -204,20 +240,6 @@ "example": "United Kingdom,Wales,England", "title": "Spatial" }, - "physicalSampleAvailability": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "default": null, - "description": "A list of what the dataset actually contains in terms of sample measurements", - "example": "DNA,PLASMA,SERUM,URINE,WHOLE BLOOD", - "title": "Physical Sample Availability" - }, "pathway": { "anyOf": [ { @@ -259,6 +281,97 @@ "description": "Age range in whole years of participants in the dataset. Please provide range in the following format '[min age] \u2013 [max age]' where both the minimum and maximum are whole numbers (integers).", "example": "1-150", "title": "Typical Age Range" + }, + "gender": { + "anyOf": [ + { + "$ref": "#/$defs/Gender" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Male, Female, Other", + "title": "Gender" + }, + "biologicalsamples": { + "anyOf": [ + { + "$ref": "#/$defs/BiologicalSamples" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Blood, Saliva, Urine, Other", + "title": "Biological Samples" + }, + "psychological": { + "anyOf": [ + { + "$ref": "#/$defs/Psychological" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Mental health, Cognitive function", + "title": "Psychological" + }, + "physical": { + "anyOf": [ + { + "$ref": "#/$defs/Physical" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Cardiovascular, Respiratory, Musculoskeletal, Hearing and Vision, Reproductive", + "title": "Physical" + }, + "anthropometric": { + "anyOf": [ + { + "$ref": "#/$defs/Anthropometric" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Height, Weight, Waist circumference, Hip circumference, Blood pressure", + "title": "Anthropometric" + }, + "lifestyle": { + "anyOf": [ + { + "$ref": "#/$defs/Lifestyles" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Cohort lifestyle habits: Smoking, Physical activity, Dietary habits, Alcohol", + "title": "Lifestyle" + }, + "socioeconomic": { + "anyOf": [ + { + "$ref": "#/$defs/SocioEconomic" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Occupation, Family circumstances, Housing, Education, Ethnic group, Martial status, Social support", + "title": "Socio-economic" } }, "title": "Coverage", @@ -599,6 +712,30 @@ "title": "FormatAndStandards", "type": "object" }, + "Gender": { + "anyOf": [ + { + "pattern": "\\b(?:Male|Female|Other)(?:,(?:Male|Female|Other))*\\b", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Gender" + }, + "Lifestyles": { + "anyOf": [ + { + "pattern": "\\b(?:Smoking|Dietary Habits|Physical Activity|Alcohol)(?:,(?:Smoking|Dietary Habits|Physical Activity|Alcohol))*\\b", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Lifestyles" + }, "Linkage": { "additionalProperties": false, "properties": { @@ -798,6 +935,162 @@ "title": "Observation", "type": "object" }, + "OmopIDs": { + "properties": { + "measurements": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedIntegers" + }, + { + "type": "null" + } + ], + "default": null, + "description": "OMOP Concept IDs for measured quantities. E.g. 44810410 - https://athena.ohdsi.org/search-terms/terms/44810410", + "example": "44810410", + "title": "OMOP Measurements" + }, + "drug": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedIntegers" + }, + { + "type": "null" + } + ], + "default": null, + "description": "OMOP Concept IDs for drug exposures. E.g. 602396 - https://athena.ohdsi.org/search-terms/terms/602396", + "example": "602396", + "title": "OMOP Drugs" + }, + "observations": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedIntegers" + }, + { + "type": "null" + } + ], + "default": null, + "description": "OMOP Concept IDs for observations.", + "example": "12345,6789", + "title": "OMOP Observations" + }, + "specimens": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedIntegers" + }, + { + "type": "null" + } + ], + "default": null, + "description": "OMOP Concept IDs for specimens.", + "example": "12345,6789", + "title": "OMOP Specimens" + }, + "conditions": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedIntegers" + }, + { + "type": "null" + } + ], + "default": null, + "description": "OMOP Concept IDs for condition occurrences.", + "example": "12345,6789", + "title": "OMOP Condition Occurrences" + }, + "procedures": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedIntegers" + }, + { + "type": "null" + } + ], + "default": null, + "description": "OMOP Concept IDs for procedure occurrences.", + "example": "12345,6789", + "title": "OMOP Procedure Occurrences" + }, + "device_exposures": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedIntegers" + }, + { + "type": "null" + } + ], + "default": null, + "description": "OMOP Concept IDs for device exposures.", + "example": "12345,6789", + "title": "OMOP " + } + }, + "title": "OmopIDs", + "type": "object" + }, + "Organisation": { + "properties": { + "name": { + "anyOf": [ + { + "$ref": "#/$defs/Name" + }, + { + "type": "null" + } + ], + "description": "The organisation responsible for running or supporting the data access request process, as well as publishing and maintaining the metadata. In most this will be the same as the HDR UK Organisation (Hub or Alliance Member)/", + "example": "SAIL", + "title": "Name" + }, + "gatewayId": { + "anyOf": [ + { + "maxLength": 50, + "minLength": 2, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The link to an ID somewhere in the gateway where more information on the publisher can be retrieved.", + "title": "Publisher gateway id" + }, + "rorId": { + "anyOf": [ + { + "maxLength": 9, + "minLength": 9, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The Research Organization Registry (ROR) for the organisation, if applicable", + "title": "Research Organization Registry Identifier" + } + }, + "required": [ + "name" + ], + "title": "Organisation", + "type": "object" + }, "Origin": { "additionalProperties": false, "properties": { @@ -867,6 +1160,18 @@ ], "title": "Periodicity" }, + "Physical": { + "anyOf": [ + { + "pattern": "\\b(?:Respiratory|Vision|Hearing|Musculoskeletal|Cardiovascular|Reproductive)(?:,(?:Respiratory|Vision|Hearing|Musculoskeletal|Cardiovascular|Reproductive))*\\b", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Physical" + }, "Provenance": { "additionalProperties": false, "properties": { @@ -891,42 +1196,17 @@ "title": "Provenance", "type": "object" }, - "Publisher": { - "properties": { - "publisherName": { - "anyOf": [ - { - "$ref": "#/$defs/Name" - }, - { - "type": "null" - } - ], - "description": "The organisation responsible for running or supporting the data access request process, as well as publishing and maintaining the metadata. In most this will be the same as the HDR UK Organisation (Hub or Alliance Member)/", - "example": "SAIL", - "title": "Publisher name" + "Psychological": { + "anyOf": [ + { + "pattern": "\\b(?:Cognitive Function|Mental Health)(?:,(?:Cognitive Function|Mental Health))*\\b", + "type": "string" }, - "publisherGatewayId": { - "anyOf": [ - { - "maxLength": 50, - "minLength": 2, - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "The link to an ID somewhere in the gateway where more information on the publisher can be retrieved.", - "title": "Publisher gateway id" + { + "type": "null" } - }, - "required": [ - "publisherName" ], - "title": "Publisher", - "type": "object" + "title": "Psychological" }, "Required": { "properties": { @@ -962,6 +1242,16 @@ }, "title": "Revisions", "type": "array" + }, + "version": { + "description": "Dataset metadata version", + "examples": [ + "1.1.0" + ], + "maxLength": 100, + "minLength": 2, + "title": "Dataset Version", + "type": "string" } }, "required": [ @@ -969,7 +1259,8 @@ "gatewayPid", "issued", "modified", - "revisions" + "revisions", + "version" ], "title": "Required", "type": "object" @@ -1002,10 +1293,10 @@ "title": "Revision", "type": "object" }, - "ShortDescription": { + "ShortTitle": { "anyOf": [ { - "maxLength": 1000, + "maxLength": 100, "minLength": 2, "type": "string" }, @@ -1013,20 +1304,19 @@ "type": "null" } ], - "title": "ShortDescription" + "title": "ShortTitle" }, - "ShortTitle": { + "SocioEconomic": { "anyOf": [ { - "maxLength": 100, - "minLength": 2, + "pattern": "\\b(?:Finances|Family Circumstances|Housing|Education|Marital Status|Occupation|Ethnic Group|Social Support)(?:,(?:Finances|Family Circumstances|Housing|Education|Marital Status|Occupation|Ethnic Group|Social Support))*\\b", "type": "string" }, { "type": "null" } ], - "title": "ShortTitle" + "title": "SocioEconomic" }, "StatisticalPopulationConstrained": { "enum": [ @@ -1152,7 +1442,7 @@ "publisher": { "anyOf": [ { - "$ref": "#/$defs/Publisher" + "$ref": "#/$defs/Organisation" }, { "type": "null" @@ -1330,7 +1620,7 @@ "resourceCreator": { "anyOf": [ { - "$ref": "#/$defs/ShortDescription" + "$ref": "#/$defs/Organisation" }, { "type": "null" @@ -1338,7 +1628,6 @@ ], "default": null, "description": "Who has created this resource", - "example": "Ministry of Justice", "title": "Resource Creator" } }, @@ -1378,7 +1667,7 @@ } ], "default": null, - "description": "Spatial and Temporal coverage", + "description": "Observational, Spatial and Temporal coverage", "title": "Coverage" }, "provenance": { @@ -1448,12 +1737,25 @@ "default": null, "description": "Descriptions of all tables and data elements that can be included in the dataset", "title": "Structural Metadata" + }, + "omopIDs": { + "anyOf": [ + { + "$ref": "#/$defs/OmopIDs" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Collection of OMOP IDs that are contained within the dataset.", + "title": "OMOP IDs" } }, "required": [ "required", "summary" ], - "title": "Gwdm10", + "title": "Gwdm11", "type": "object" } \ No newline at end of file diff --git a/hdr_schemata/models/GWDM/v1_1/Accessibility.py b/hdr_schemata/models/GWDM/v1_1/Accessibility.py new file mode 100644 index 0000000..8aabf11 --- /dev/null +++ b/hdr_schemata/models/GWDM/v1_1/Accessibility.py @@ -0,0 +1,13 @@ +from typing import Optional +from pydantic import Field +from .Usage import Usage +from hdr_schemata.models.GWDM.v1_0 import Accessibility as BaseAccessibility + + +class Accessibility(BaseAccessibility): + + usage: Optional[Usage] = Field( + None, + description='This section includes information about how the data can be used and how it is currently being used', + title='Usage', + ) diff --git a/hdr_schemata/models/GWDM/v1_1/Coverage.py b/hdr_schemata/models/GWDM/v1_1/Coverage.py new file mode 100644 index 0000000..be3c52d --- /dev/null +++ b/hdr_schemata/models/GWDM/v1_1/Coverage.py @@ -0,0 +1,126 @@ +from hdr_schemata.models import remove_fields_from_cls +from hdr_schemata.models.GWDM.v1_0 import Coverage as BaseCoverage +import re +from typing import Optional,List +from pydantic import Field, RootModel, constr + + +def get_pattern(allowed_phrases): + return r'\b(?:' + '|'.join(allowed_phrases) + r')(?:,(?:' + '|'.join(allowed_phrases) + r'))*\b' + + +class Anthropometric(RootModel): + root: Optional[constr(pattern=get_pattern( + [ + 'Blood Pressure', + 'Hip Circumference', + 'Height', + 'Waist Circumference', + 'Weight', + ]))] + +class BiologicalSamples(RootModel): + root: Optional[constr(pattern=get_pattern( + [ + 'Blood', + 'Other', + 'Urine', + 'Saliva' + ]))] + +class Physical(RootModel): + root: Optional[constr(pattern=get_pattern( + [ + 'Respiratory', + 'Vision', + 'Hearing', + 'Musculoskeletal', + 'Cardiovascular', + 'Reproductive' + ]))] + +class Psychological(RootModel): + root: Optional[constr(pattern=get_pattern( + [ + 'Cognitive Function', + 'Mental Health' + ]))] + +class Lifestyles(RootModel): + root: Optional[constr(pattern=get_pattern( + [ + 'Smoking', + 'Dietary Habits', + 'Physical Activity', + 'Alcohol' + ]))] + +class Gender(RootModel): + root: Optional[constr(pattern=get_pattern( + [ + 'Male', + 'Female', + 'Other' + ]))] + +class SocioEconomic(RootModel): + root: Optional[constr(pattern=get_pattern( + [ + 'Finances', + 'Family Circumstances', + 'Housing', + 'Education', + 'Marital Status', + 'Occupation', + 'Ethnic Group', + 'Social Support' + ]))] + + +class Coverage(BaseCoverage): + + gender: Optional[Gender] = Field( + None, + title='Gender', + description='Male, Female, Other' + ) + + biologicalsamples: Optional[BiologicalSamples] = Field( + None, + title='Biological Samples', + description='Blood, Saliva, Urine, Other' + ) + + psychological: Optional[Psychological] = Field( + None, + title='Psychological', + description='Mental health, Cognitive function' + ) + + physical: Optional[Physical] = Field( + None, + title='Physical', + description='Cardiovascular, Respiratory, Musculoskeletal, Hearing and Vision, Reproductive' + ) + + anthropometric: Optional[Anthropometric] = Field( + None, + title='Anthropometric', + description='Height, Weight, Waist circumference, Hip circumference, Blood pressure' + ) + + lifestyle: Optional[Lifestyles] = Field( + None, + title='Lifestyle', + description='Cohort lifestyle habits: Smoking, Physical activity, Dietary habits, Alcohol' + ) + + + socioeconomic: Optional[SocioEconomic] = Field( + None, + title='Socio-economic', + description='Occupation, Family circumstances, Housing, Education, Ethnic group, Martial status, Social support' + ) + +#inherited physicalSampleAvailability but this has now been replaced by biologicalsamples +remove_fields_from_cls(Coverage,['physicalSampleAvailability']) diff --git a/hdr_schemata/models/GWDM/v1_1/Omop.py b/hdr_schemata/models/GWDM/v1_1/Omop.py new file mode 100644 index 0000000..f3f7faa --- /dev/null +++ b/hdr_schemata/models/GWDM/v1_1/Omop.py @@ -0,0 +1,55 @@ +from typing import Optional +from pydantic import BaseModel, Field + +from hdr_schemata.definitions.HDRUK import CommaSeparatedIntegers + +class OmopIDs(BaseModel): + measurements: Optional[CommaSeparatedIntegers] = Field( + None, + description="OMOP Concept IDs for measured quantities. E.g. 44810410 - https://athena.ohdsi.org/search-terms/terms/44810410", + example="44810410", + title="OMOP Measurements" + ) + + drug: Optional[CommaSeparatedIntegers] = Field( + None, + description="OMOP Concept IDs for drug exposures. E.g. 602396 - https://athena.ohdsi.org/search-terms/terms/602396", + example="602396", + title="OMOP Drugs" + ) + + observations: Optional[CommaSeparatedIntegers] = Field( + None, + description="OMOP Concept IDs for observations.", + example="12345,6789", + title="OMOP Observations" + ) + + specimens: Optional[CommaSeparatedIntegers] = Field( + None, + description="OMOP Concept IDs for specimens.", + example="12345,6789", + title="OMOP Specimens" + ) + + conditions: Optional[CommaSeparatedIntegers] = Field( + None, + description="OMOP Concept IDs for condition occurrences.", + example="12345,6789", + title="OMOP Condition Occurrences" + ) + + procedures: Optional[CommaSeparatedIntegers] = Field( + None, + description="OMOP Concept IDs for procedure occurrences.", + example="12345,6789", + title="OMOP Procedure Occurrences" + ) + + device_exposures: Optional[CommaSeparatedIntegers] = Field( + None, + description="OMOP Concept IDs for device exposures.", + example="12345,6789", + title="OMOP " + ) + diff --git a/hdr_schemata/models/GWDM/v1_1/Organisation.py b/hdr_schemata/models/GWDM/v1_1/Organisation.py new file mode 100644 index 0000000..f99f150 --- /dev/null +++ b/hdr_schemata/models/GWDM/v1_1/Organisation.py @@ -0,0 +1,27 @@ +from typing import Optional +from pydantic import AnyUrl, BaseModel, EmailStr, Field, constr +from hdr_schemata.definitions.HDRUK import * + + +class Organisation(BaseModel): + + name: Optional[Name] = Field( + ..., + description="The organisation responsible for running or supporting the data access request process, as well as publishing and maintaining the metadata. In most this will be the same as the HDR UK Organisation (Hub or Alliance Member)/", + example="SAIL", + title='Name' + ) + + #note: will need to do something about this in the future + # should match a pattern? sha256? integer? + gatewayId: Optional[constr(min_length=2,max_length=50)] = Field( + None, + description="The link to an ID somewhere in the gateway where more information on the publisher can be retrieved.", + title='Publisher gateway id' + ) + + rorId: Optional[constr(min_length=9,max_length=9)] = Field( + None, + description="The Research Organization Registry (ROR) for the organisation, if applicable", + title="Research Organization Registry Identifier" + ) diff --git a/hdr_schemata/models/GWDM/v1_1/Required.py b/hdr_schemata/models/GWDM/v1_1/Required.py new file mode 100644 index 0000000..0db3986 --- /dev/null +++ b/hdr_schemata/models/GWDM/v1_1/Required.py @@ -0,0 +1,13 @@ +from hdr_schemata.models.GWDM.v1_0 import Required as BaseRequired +from typing import Optional +from pydantic import Field, constr + +class Required(BaseRequired): + + version: constr(min_length=2,max_length=100) = Field( + ..., + description='Dataset metadata version', + examples=['1.1.0'], + title='Dataset Version', + ) + diff --git a/hdr_schemata/models/GWDM/v1_1/Summary.py b/hdr_schemata/models/GWDM/v1_1/Summary.py new file mode 100644 index 0000000..02265f0 --- /dev/null +++ b/hdr_schemata/models/GWDM/v1_1/Summary.py @@ -0,0 +1,14 @@ +from hdr_schemata.models.GWDM.v1_0 import Summary as BaseSummary +from pydantic import Field +from typing import Optional +from .Organisation import Organisation + +class Summary(BaseSummary): + + #switch publisher to be an Organisation + publisher: Optional[Organisation] = Field( + ..., + description="Link to details about the publisher of this dataset", + title='Publisher', + ) + diff --git a/hdr_schemata/models/GWDM/v1_1/Usage.py b/hdr_schemata/models/GWDM/v1_1/Usage.py new file mode 100644 index 0000000..571afe1 --- /dev/null +++ b/hdr_schemata/models/GWDM/v1_1/Usage.py @@ -0,0 +1,13 @@ +from typing import Optional, Union, List +from pydantic import BaseModel, Field +from hdr_schemata.models.GWDM.v1_0 import Usage as BaseUsage + +from .Organisation import Organisation + + +class Usage(BaseUsage): + resourceCreator: Optional[Organisation] = Field( + None, + description='Who has created this resource', + title='Resource Creator', + ) diff --git a/hdr_schemata/models/GWDM/v1_1/__init__.py b/hdr_schemata/models/GWDM/v1_1/__init__.py new file mode 100644 index 0000000..bef6e62 --- /dev/null +++ b/hdr_schemata/models/GWDM/v1_1/__init__.py @@ -0,0 +1,46 @@ +from hdr_schemata.models.GWDM import Gwdm10 +from .Coverage import Coverage +from .Accessibility import Accessibility +from .Omop import OmopIDs +from .Required import Required +from .Summary import Summary +from typing import Optional +from pydantic import Field, BaseModel, constr + + +class Gwdm11(Gwdm10): + + summary: Summary = Field( + ..., + description='Summary of metadata describing key pieces of information.', + title='Summary', + ) + + + required: Required = Field( + ..., + description='required metadata needed for the GWDM', + title='Required' + ) + + #overload Coverage with an updated version of it.. + coverage: Optional[Coverage] = Field( + None, + description='Observational, Spatial and Temporal coverage', + title='Coverage', + ) + + #modifying Accessibility --> modifying Usage + accessibility: Accessibility = Field( + None, + description='Accessibility information.', + title='Accessibility', + ) + + omopIDs: Optional[OmopIDs] = Field( + None, + description='Collection of OMOP IDs that are contained within the dataset.', + title='OMOP IDs', + ) + + diff --git a/mkdocs.yml b/mkdocs.yml index e974480..09c3f26 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -15,6 +15,7 @@ nav: - Welcome: index.md - Gateway Data Model: - Version 1.0: GWDM/1.0.md + - Version 1.1: GWDM/1.1.md - HDRUK Schema: - Version 2.1.2: HDRUK/2.1.2.md From 97c082fd8ddbd19c5d5d78d017c53af750789827 Mon Sep 17 00:00:00 2001 From: Calum Macdonald Date: Thu, 2 Nov 2023 09:36:49 +0000 Subject: [PATCH 02/21] remove adding omop ids --- hdr_schemata/models/GWDM/1.1/schema.json | 129 -------------------- hdr_schemata/models/GWDM/latest/schema.json | 129 -------------------- hdr_schemata/models/GWDM/v1_1/Omop.py | 55 --------- hdr_schemata/models/GWDM/v1_1/__init__.py | 8 -- 4 files changed, 321 deletions(-) delete mode 100644 hdr_schemata/models/GWDM/v1_1/Omop.py diff --git a/hdr_schemata/models/GWDM/1.1/schema.json b/hdr_schemata/models/GWDM/1.1/schema.json index 24237fd..2bd89fd 100644 --- a/hdr_schemata/models/GWDM/1.1/schema.json +++ b/hdr_schemata/models/GWDM/1.1/schema.json @@ -200,18 +200,6 @@ ], "title": "BiologicalSamples" }, - "CommaSeparatedIntegers": { - "anyOf": [ - { - "pattern": "^\\d+(,\\d+)*$", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "CommaSeparatedIntegers" - }, "CommaSeparatedValues": { "anyOf": [ { @@ -935,110 +923,6 @@ "title": "Observation", "type": "object" }, - "OmopIDs": { - "properties": { - "measurements": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedIntegers" - }, - { - "type": "null" - } - ], - "default": null, - "description": "OMOP Concept IDs for measured quantities. E.g. 44810410 - https://athena.ohdsi.org/search-terms/terms/44810410", - "example": "44810410", - "title": "OMOP Measurements" - }, - "drug": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedIntegers" - }, - { - "type": "null" - } - ], - "default": null, - "description": "OMOP Concept IDs for drug exposures. E.g. 602396 - https://athena.ohdsi.org/search-terms/terms/602396", - "example": "602396", - "title": "OMOP Drugs" - }, - "observations": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedIntegers" - }, - { - "type": "null" - } - ], - "default": null, - "description": "OMOP Concept IDs for observations.", - "example": "12345,6789", - "title": "OMOP Observations" - }, - "specimens": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedIntegers" - }, - { - "type": "null" - } - ], - "default": null, - "description": "OMOP Concept IDs for specimens.", - "example": "12345,6789", - "title": "OMOP Specimens" - }, - "conditions": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedIntegers" - }, - { - "type": "null" - } - ], - "default": null, - "description": "OMOP Concept IDs for condition occurrences.", - "example": "12345,6789", - "title": "OMOP Condition Occurrences" - }, - "procedures": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedIntegers" - }, - { - "type": "null" - } - ], - "default": null, - "description": "OMOP Concept IDs for procedure occurrences.", - "example": "12345,6789", - "title": "OMOP Procedure Occurrences" - }, - "device_exposures": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedIntegers" - }, - { - "type": "null" - } - ], - "default": null, - "description": "OMOP Concept IDs for device exposures.", - "example": "12345,6789", - "title": "OMOP " - } - }, - "title": "OmopIDs", - "type": "object" - }, "Organisation": { "properties": { "name": { @@ -1737,19 +1621,6 @@ "default": null, "description": "Descriptions of all tables and data elements that can be included in the dataset", "title": "Structural Metadata" - }, - "omopIDs": { - "anyOf": [ - { - "$ref": "#/$defs/OmopIDs" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Collection of OMOP IDs that are contained within the dataset.", - "title": "OMOP IDs" } }, "required": [ diff --git a/hdr_schemata/models/GWDM/latest/schema.json b/hdr_schemata/models/GWDM/latest/schema.json index 24237fd..2bd89fd 100644 --- a/hdr_schemata/models/GWDM/latest/schema.json +++ b/hdr_schemata/models/GWDM/latest/schema.json @@ -200,18 +200,6 @@ ], "title": "BiologicalSamples" }, - "CommaSeparatedIntegers": { - "anyOf": [ - { - "pattern": "^\\d+(,\\d+)*$", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "CommaSeparatedIntegers" - }, "CommaSeparatedValues": { "anyOf": [ { @@ -935,110 +923,6 @@ "title": "Observation", "type": "object" }, - "OmopIDs": { - "properties": { - "measurements": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedIntegers" - }, - { - "type": "null" - } - ], - "default": null, - "description": "OMOP Concept IDs for measured quantities. E.g. 44810410 - https://athena.ohdsi.org/search-terms/terms/44810410", - "example": "44810410", - "title": "OMOP Measurements" - }, - "drug": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedIntegers" - }, - { - "type": "null" - } - ], - "default": null, - "description": "OMOP Concept IDs for drug exposures. E.g. 602396 - https://athena.ohdsi.org/search-terms/terms/602396", - "example": "602396", - "title": "OMOP Drugs" - }, - "observations": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedIntegers" - }, - { - "type": "null" - } - ], - "default": null, - "description": "OMOP Concept IDs for observations.", - "example": "12345,6789", - "title": "OMOP Observations" - }, - "specimens": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedIntegers" - }, - { - "type": "null" - } - ], - "default": null, - "description": "OMOP Concept IDs for specimens.", - "example": "12345,6789", - "title": "OMOP Specimens" - }, - "conditions": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedIntegers" - }, - { - "type": "null" - } - ], - "default": null, - "description": "OMOP Concept IDs for condition occurrences.", - "example": "12345,6789", - "title": "OMOP Condition Occurrences" - }, - "procedures": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedIntegers" - }, - { - "type": "null" - } - ], - "default": null, - "description": "OMOP Concept IDs for procedure occurrences.", - "example": "12345,6789", - "title": "OMOP Procedure Occurrences" - }, - "device_exposures": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedIntegers" - }, - { - "type": "null" - } - ], - "default": null, - "description": "OMOP Concept IDs for device exposures.", - "example": "12345,6789", - "title": "OMOP " - } - }, - "title": "OmopIDs", - "type": "object" - }, "Organisation": { "properties": { "name": { @@ -1737,19 +1621,6 @@ "default": null, "description": "Descriptions of all tables and data elements that can be included in the dataset", "title": "Structural Metadata" - }, - "omopIDs": { - "anyOf": [ - { - "$ref": "#/$defs/OmopIDs" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Collection of OMOP IDs that are contained within the dataset.", - "title": "OMOP IDs" } }, "required": [ diff --git a/hdr_schemata/models/GWDM/v1_1/Omop.py b/hdr_schemata/models/GWDM/v1_1/Omop.py deleted file mode 100644 index f3f7faa..0000000 --- a/hdr_schemata/models/GWDM/v1_1/Omop.py +++ /dev/null @@ -1,55 +0,0 @@ -from typing import Optional -from pydantic import BaseModel, Field - -from hdr_schemata.definitions.HDRUK import CommaSeparatedIntegers - -class OmopIDs(BaseModel): - measurements: Optional[CommaSeparatedIntegers] = Field( - None, - description="OMOP Concept IDs for measured quantities. E.g. 44810410 - https://athena.ohdsi.org/search-terms/terms/44810410", - example="44810410", - title="OMOP Measurements" - ) - - drug: Optional[CommaSeparatedIntegers] = Field( - None, - description="OMOP Concept IDs for drug exposures. E.g. 602396 - https://athena.ohdsi.org/search-terms/terms/602396", - example="602396", - title="OMOP Drugs" - ) - - observations: Optional[CommaSeparatedIntegers] = Field( - None, - description="OMOP Concept IDs for observations.", - example="12345,6789", - title="OMOP Observations" - ) - - specimens: Optional[CommaSeparatedIntegers] = Field( - None, - description="OMOP Concept IDs for specimens.", - example="12345,6789", - title="OMOP Specimens" - ) - - conditions: Optional[CommaSeparatedIntegers] = Field( - None, - description="OMOP Concept IDs for condition occurrences.", - example="12345,6789", - title="OMOP Condition Occurrences" - ) - - procedures: Optional[CommaSeparatedIntegers] = Field( - None, - description="OMOP Concept IDs for procedure occurrences.", - example="12345,6789", - title="OMOP Procedure Occurrences" - ) - - device_exposures: Optional[CommaSeparatedIntegers] = Field( - None, - description="OMOP Concept IDs for device exposures.", - example="12345,6789", - title="OMOP " - ) - diff --git a/hdr_schemata/models/GWDM/v1_1/__init__.py b/hdr_schemata/models/GWDM/v1_1/__init__.py index bef6e62..bfaf404 100644 --- a/hdr_schemata/models/GWDM/v1_1/__init__.py +++ b/hdr_schemata/models/GWDM/v1_1/__init__.py @@ -1,7 +1,6 @@ from hdr_schemata.models.GWDM import Gwdm10 from .Coverage import Coverage from .Accessibility import Accessibility -from .Omop import OmopIDs from .Required import Required from .Summary import Summary from typing import Optional @@ -36,11 +35,4 @@ class Gwdm11(Gwdm10): description='Accessibility information.', title='Accessibility', ) - - omopIDs: Optional[OmopIDs] = Field( - None, - description='Collection of OMOP IDs that are contained within the dataset.', - title='OMOP IDs', - ) - From 1ba17ac7334f7bd821167ab884b9c3f1e3a16a40 Mon Sep 17 00:00:00 2001 From: Calum Macdonald Date: Thu, 2 Nov 2023 13:33:11 +0000 Subject: [PATCH 03/21] forbid extra --- hdr_schemata/models/GWDM/v1_1/Coverage.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hdr_schemata/models/GWDM/v1_1/Coverage.py b/hdr_schemata/models/GWDM/v1_1/Coverage.py index be3c52d..f260ada 100644 --- a/hdr_schemata/models/GWDM/v1_1/Coverage.py +++ b/hdr_schemata/models/GWDM/v1_1/Coverage.py @@ -79,6 +79,10 @@ class SocioEconomic(RootModel): class Coverage(BaseCoverage): + class Config: + extra = 'forbid' + + gender: Optional[Gender] = Field( None, title='Gender', From c5fb20a53dcc8c7b2ee67c3092a3ff67a18a1d8f Mon Sep 17 00:00:00 2001 From: Calum Macdonald Date: Thu, 2 Nov 2023 13:33:27 +0000 Subject: [PATCH 04/21] dont allow additional properties --- hdr_schemata/models/GWDM/1.1/schema.json | 1 + hdr_schemata/models/GWDM/latest/schema.json | 1 + 2 files changed, 2 insertions(+) diff --git a/hdr_schemata/models/GWDM/1.1/schema.json b/hdr_schemata/models/GWDM/1.1/schema.json index 2bd89fd..7b7e390 100644 --- a/hdr_schemata/models/GWDM/1.1/schema.json +++ b/hdr_schemata/models/GWDM/1.1/schema.json @@ -213,6 +213,7 @@ "title": "CommaSeparatedValues" }, "Coverage": { + "additionalProperties": false, "properties": { "spatial": { "anyOf": [ diff --git a/hdr_schemata/models/GWDM/latest/schema.json b/hdr_schemata/models/GWDM/latest/schema.json index 2bd89fd..7b7e390 100644 --- a/hdr_schemata/models/GWDM/latest/schema.json +++ b/hdr_schemata/models/GWDM/latest/schema.json @@ -213,6 +213,7 @@ "title": "CommaSeparatedValues" }, "Coverage": { + "additionalProperties": false, "properties": { "spatial": { "anyOf": [ From b4f6d4546f97acf496fdab40f66a52b9d3e47c81 Mon Sep 17 00:00:00 2001 From: Calum Macdonald Date: Thu, 2 Nov 2023 14:31:25 +0000 Subject: [PATCH 05/21] update ci just for master --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c67b2d0..1381059 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,6 +26,8 @@ jobs: pytest deploy: runs-on: ubuntu-latest + needs: test + if: success() && github.ref == 'refs/heads/master' steps: - uses: actions/setup-python@v2 with: From 5e134d2788922ddd38652db9893e36cd8409ed87 Mon Sep 17 00:00:00 2001 From: Calum Macdonald Date: Mon, 13 Nov 2023 12:00:01 +0000 Subject: [PATCH 06/21] little cleanup --- hdr_schemata/models/GWDM/v1_0/Summary.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/hdr_schemata/models/GWDM/v1_0/Summary.py b/hdr_schemata/models/GWDM/v1_0/Summary.py index 047de76..0bf81f8 100644 --- a/hdr_schemata/models/GWDM/v1_0/Summary.py +++ b/hdr_schemata/models/GWDM/v1_0/Summary.py @@ -1,10 +1,14 @@ -from datetime import date, datetime -from enum import Enum -from typing import List, Optional, Union - -from pydantic import AnyUrl, BaseModel, EmailStr, Field, constr - -from hdr_schemata.definitions.HDRUK import * +from typing import List, Optional +from pydantic import AnyUrl, BaseModel, EmailStr, Field +from hdr_schemata.definitions.HDRUK import ( + TwoHundredFiftyFiveCharacters, + ShortTitle, + Doi, + LongAbstractText, + CommaSeparatedValues, + DatasetType, + LongDescription +) from .Publisher import Publisher From 4c4f9b08878716f24719b6317a364355c9f758f8 Mon Sep 17 00:00:00 2001 From: Calum Macdonald Date: Mon, 8 Jan 2024 15:04:46 +0000 Subject: [PATCH 07/21] add a version 2.1.3 --- hdr_schemata/models/HDRUK/2.1.3/schema.json | 2132 +++++++++++++++++ hdr_schemata/models/HDRUK/__init__.py | 1 + hdr_schemata/models/HDRUK/test.py | 2 + .../models/HDRUK/v2_1_3/Provenance.py | 6 + hdr_schemata/models/HDRUK/v2_1_3/Temporal.py | 11 + hdr_schemata/models/HDRUK/v2_1_3/__init__.py | 9 + 6 files changed, 2161 insertions(+) create mode 100644 hdr_schemata/models/HDRUK/2.1.3/schema.json create mode 100644 hdr_schemata/models/HDRUK/v2_1_3/Provenance.py create mode 100644 hdr_schemata/models/HDRUK/v2_1_3/Temporal.py create mode 100644 hdr_schemata/models/HDRUK/v2_1_3/__init__.py diff --git a/hdr_schemata/models/HDRUK/2.1.3/schema.json b/hdr_schemata/models/HDRUK/2.1.3/schema.json new file mode 100644 index 0000000..9718b60 --- /dev/null +++ b/hdr_schemata/models/HDRUK/2.1.3/schema.json @@ -0,0 +1,2132 @@ +{ + "$defs": { + "AbstractText": { + "anyOf": [ + { + "maxLength": 500, + "minLength": 5, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "AbstractText" + }, + "Access": { + "additionalProperties": false, + "properties": { + "accessRights": { + "anyOf": [ + { + "$ref": "#/$defs/LongDescription" + }, + { + "type": "null" + } + ], + "title": "Access Rights" + }, + "accessService": { + "anyOf": [ + { + "$ref": "#/$defs/LongDescription" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Please provide a brief description of the data access services that are available including: environment that is currently available to researchers;additional consultancy and services;any indication of costs associated. If no environment is currently available, please indicate the current plans and timelines when and how data will be made available to researchers Note: This value will be used as default access environment for all datasets submitted by the organisation. However, there will be the opportunity to overwrite this value for each dataset.", + "examples": [ + "https://cnfl.extge.co.uk/display/GERE/Research+Environment+User+Guide" + ], + "title": "Access Service" + }, + "accessRequestCost": { + "anyOf": [ + { + "$ref": "#/$defs/LongDescription" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/$defs/Url" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Please provide link(s) to a webpage detailing the commercial model for processing data access requests for the organisation (if available) Definition: Indication of commercial model or cost (in GBP) for processing each data access request by the data custodian.", + "title": "Organisation Access Request Cost" + }, + "deliveryLeadTime": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryLeadTime" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Please provide an indication of the typical processing times based on the types of requests typically received.", + "title": "Access Request Duration" + }, + "jurisdiction": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "items": { + "$ref": "#/$defs/Isocountrycode" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "Please use country code from ISO 3166-1 country codes and the associated ISO 3166-2 for regions, cities, states etc. for the country/state under whose laws the data subjects' data is collected, processed and stored.", + "title": "Jurisdiction" + }, + "dataController": { + "anyOf": [ + { + "$ref": "#/$defs/LongDescription" + }, + { + "type": "null" + } + ], + "description": "Data Controller means a person/entity who (either alone or jointly or in common with other persons/entities) determines the purposes for which and the way any Data Subject data, specifically personal data or are to be processed.", + "title": "Data Controller" + }, + "dataProcessor": { + "anyOf": [ + { + "$ref": "#/$defs/LongDescription" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A Data Processor, in relation to any Data Subject data, specifically personal data, means any person/entity (other than an employee of the data controller) who processes the data on behalf of the data controller.", + "title": "Data Processor" + } + }, + "required": [ + "accessRights", + "jurisdiction", + "dataController" + ], + "title": "Access", + "type": "object" + }, + "Accessibility": { + "additionalProperties": false, + "properties": { + "usage": { + "anyOf": [ + { + "$ref": "#/$defs/Usage" + }, + { + "type": "null" + } + ], + "default": null, + "description": "This section includes information about how the data can be used and how it is currently being used", + "title": "Usage" + }, + "access": { + "allOf": [ + { + "$ref": "#/$defs/Access" + } + ], + "description": "This section includes information about data access" + }, + "formatAndStandards": { + "anyOf": [ + { + "$ref": "#/$defs/FormatAndStandards" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Section includes technical attributes for language vocabularies, sizes etc. and gives researchers facts about and processing the underlying data in the dataset.", + "title": "Format and Standards" + } + }, + "required": [ + "access" + ], + "title": "Accessibility", + "type": "object" + }, + "AgeRange": { + "anyOf": [ + { + "pattern": "Not Known|(150|1[0-4][0-9]|[0-9]|[1-8][0-9]|9[0-9])-(150|1[0-4][0-9]|[0-9]|[1-8][0-9]|9[0-9])", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "AgeRange" + }, + "CommaSeparatedValues": { + "anyOf": [ + { + "pattern": "([^,]+)", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "CommaSeparatedValues" + }, + "ControlledVocabulary": { + "anyOf": [ + { + "$ref": "#/$defs/ControlledVocabularyEnum" + }, + { + "type": "null" + } + ], + "default": null, + "title": "ControlledVocabulary" + }, + "ControlledVocabularyEnum": { + "enum": [ + "LOCAL", + "OPCS4", + "READ", + "SNOMED CT", + "SNOMED RT", + "DM PLUS D", + "DM+D", + "NHS NATIONAL CODES", + "NHS SCOTLAND NATIONAL CODES", + "NHS WALES NATIONAL CODES", + "ODS", + "LOINC", + "ICD10", + "ICD10CM", + "ICD10PCS", + "ICD9CM", + "ICD9", + "ICDO3", + "AMT", + "APC", + "ATC", + "CIEL", + "HPO", + "CPT4", + "DPD", + "DRG", + "HEMONC", + "JMDC", + "KCD7", + "MULTUM", + "NAACCR", + "NDC", + "NDFRT", + "OXMIS", + "RXNORM", + "RXNORM EXTENSION", + "SPL", + "OTHER" + ], + "title": "ControlledVocabularyEnum", + "type": "string" + }, + "Coverage": { + "additionalProperties": false, + "properties": { + "spatial": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/$defs/Url" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The geographical area covered by the dataset. It is recommended that links are to entries in a well-maintained gazetteer such as https://www.geonames.org/ or https://what3words.com/daring.lion.race.", + "examples": [ + "https://www.geonames.org/2635167/united-kingdom-of-great-britain-and-northern-ireland.html" + ], + "title": "Geographic Coverage" + }, + "typicalAgeRange": { + "anyOf": [ + { + "$ref": "#/$defs/AgeRange" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Please indicate the age range in whole years of participants in the dataset. Please provide range in the following format '[min age] \u2013 [max age]' where both the minimum and maximum are whole numbers (integers).", + "title": "Age Range" + }, + "physicalSampleAvailability": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "items": {}, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Availability of physical samples associated with the dataset. If samples are available, please indicate the types of samples that are available. More than one type may be provided. If sample are not yet available, please provide \u201cAVAILABILITY TO BE CONFIRMED\u201d. If samples are not available, then please provide \u201cNOT AVAILABLE\u201d.", + "examples": [ + "BONE MARROW" + ], + "title": "Physical Sample Availability" + }, + "followup": { + "anyOf": [ + { + "$ref": "#/$defs/Followup" + }, + { + "type": "null" + } + ], + "default": "UNKNOWN", + "description": "If known, what is the typical time span that a patient appears in the dataset (follow up period)", + "title": "Followup" + }, + "pathway": { + "anyOf": [ + { + "$ref": "#/$defs/Description" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Please indicate if the dataset is representative of the patient pathway and any limitations the dataset may have with respect to pathway coverage. This could include if the dataset is from a single speciality or area, a single tier of care, linked across two tiers (e.g. primary and secondary care), or an integrated care record covering the whole patient pathway.", + "title": "Pathway" + } + }, + "title": "Coverage", + "type": "object" + }, + "DataClass": { + "additionalProperties": false, + "properties": { + "name": { + "anyOf": [ + { + "maxLength": 500, + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The name of a table in a dataset.", + "title": "Table Name" + }, + "description": { + "anyOf": [ + { + "maxLength": 20000, + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A description of a table in a dataset.", + "title": "Table Description" + }, + "elements": { + "description": "A list of data elements contained within a table in a dataset.", + "items": { + "$ref": "#/$defs/DataElement" + }, + "title": "Data Elements", + "type": "array" + } + }, + "required": [ + "name", + "elements" + ], + "title": "DataClass", + "type": "object" + }, + "DataElement": { + "additionalProperties": true, + "properties": { + "name": { + "allOf": [ + { + "$ref": "#/$defs/Name" + } + ], + "description": "The name of a column in a table.", + "title": "Column Name" + }, + "dataType": { + "description": "The data type of values in the column", + "title": "Data Type", + "type": "string" + }, + "description": { + "anyOf": [ + { + "maxLength": 20000, + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A description of a column in a table.", + "title": "Column Description" + }, + "sensitive": { + "description": "A True or False value, indicating if the field is sensitive or not", + "title": "Sensitive", + "type": "boolean" + } + }, + "required": [ + "name", + "dataType", + "sensitive" + ], + "title": "DataElement", + "type": "object" + }, + "DataUseLimitation": { + "enum": [ + "GENERAL RESEARCH USE", + "COMMERCIAL RESEARCH USE", + "GENETIC STUDIES ONLY", + "NO GENERAL METHODS RESEARCH", + "NO RESTRICTION", + "GEOGRAPHICAL RESTRICTIONS", + "INSTITUTION SPECIFIC RESTRICTIONS", + "NOT FOR PROFIT USE", + "PROJECT SPECIFIC RESTRICTIONS", + "RESEARCH SPECIFIC RESTRICTIONS", + "USER SPECIFIC RESTRICTION", + "RESEARCH USE ONLY", + "NO LINKAGE" + ], + "title": "DataUseLimitation", + "type": "string" + }, + "DataUseRequirements": { + "enum": [ + "COLLABORATION REQUIRED", + "PROJECT SPECIFIC RESTRICTIONS", + "ETHICS APPROVAL REQUIRED", + "INSTITUTION SPECIFIC RESTRICTIONS", + "GEOGRAPHICAL RESTRICTIONS", + "PUBLICATION MORATORIUM", + "PUBLICATION REQUIRED", + "RETURN TO DATABASE OR RESOURCE", + "TIME LIMIT ON USE", + "DISCLOSURE CONTROL", + "NOT FOR PROFIT USE", + "USER SPECIFIC RESTRICTION", + null + ], + "title": "DataUseRequirements" + }, + "DeliveryLeadTime": { + "enum": [ + "LESS 1 WEEK", + "1-2 WEEKS", + "2-4 WEEKS", + "1-2 MONTHS", + "2-6 MONTHS", + "MORE 6 MONTHS", + "VARIABLE", + "NOT APPLICABLE", + "OTHER", + null + ], + "title": "DeliveryLeadTime" + }, + "Description": { + "anyOf": [ + { + "maxLength": 10000, + "minLength": 2, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "Documentation": { + "additionalProperties": false, + "properties": { + "description": { + "anyOf": [ + { + "$ref": "#/$defs/Description" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A free-text description of the record.", + "title": "Description" + }, + "associatedMedia": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/$defs/Url" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Please provide any media associated with the Gateway Organisation using a valid URI for the content. This is an opportunity to provide additional context that could be useful for researchers wanting to understand more about the dataset and its relevance to their research question. The following formats will be accepted .jpg, .png or .svg, .pdf, .xslx or .docx. Note: media asset can be hosted by the organisation or uploaded using the onboarding portal.", + "examples": [ + "PDF Document that describes study protocol" + ], + "title": "Associated Media" + }, + "isPartOf": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/$defs/Url" + }, + { + "$ref": "#/$defs/OneHundredFiftyCharacters" + }, + { + "$ref": "#/$defs/IsPartOfEnum" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": "NOT APPLICABLE", + "description": "Please complete only if the dataset is part of a group or family", + "examples": [ + "Hospital Episodes Statistics datasets (A&E, APC, OP, AC MSDS)." + ], + "title": "Group" + } + }, + "title": "Documentation", + "type": "object" + }, + "Doi": { + "anyOf": [ + { + "pattern": "^10.\\d{4,9}/[-._;()/:a-zA-Z0-9]+$", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Doi" + }, + "EmailAddress": { + "anyOf": [ + { + "format": "email", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "EmailAddress" + }, + "EndDateEnum": { + "enum": [ + "CONTINUOUS", + null + ], + "title": "EndDateEnum" + }, + "EnrichmentAndLinkage": { + "additionalProperties": false, + "properties": { + "qualifiedRelation": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/$defs/Url" + }, + { + "$ref": "#/$defs/OneHundredFiftyCharacters" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "If applicable, please provide the DOI of other datasets that have previously been linked to this dataset and their availability. If no DOI is available, please provide the title of the datasets that can be linked, where possible using the same title of a dataset previously onboarded to the HOP. Note: If all the datasets from Gateway organisation can be linked please indicate \u201cALL\u201d and the onboarding portal will automate linkage across the datasets submitted.", + "title": "Linked Datasets" + }, + "derivation": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/$defs/AbstractText" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Indicate if derived datasets or predefined extracts are available and the type of derivation available. Notes. Single or multiple dimensions can be provided as a derived extract alongside the dataset.", + "title": "Derivations" + }, + "tools": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/$defs/Url" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Please provide the URL of any analysis tools or models that have been created for this dataset and are available for further use. Multiple tools may be provided. Note: We encourage users to adopt a model along the lines of https://www.ga4gh.org/news/tool-registry-service-api-enabling-an-interoperable-library-of-genomics-analysis-tools/", + "title": "Tools" + } + }, + "title": "EnrichmentAndLinkage", + "type": "object" + }, + "Followup": { + "enum": [ + "0 - 6 MONTHS", + "6 - 12 MONTHS", + "1 - 10 YEARS", + "> 10 YEARS", + "UNKNOWN", + "CONTINUOUS", + "OTHER", + null + ], + "title": "Followup" + }, + "Format": { + "minLength": 1, + "title": "Format", + "type": "string" + }, + "FormatAndStandards": { + "additionalProperties": false, + "properties": { + "vocabularyEncodingScheme": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "items": { + "$ref": "#/$defs/ControlledVocabulary" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "List any relevant terminologies / ontologies / controlled vocabularies, such as ICD 10 Codes, NHS Data Dictionary National Codes or SNOMED CT International, that are being used by the dataset. If the controlled vocabularies are local standards, please make that explicit. If you are using a standard that has not been included in the list, please use \u201cother\u201d and contact support desk to ask for an addition. Notes: More than one vocabulary may be provided.", + "title": "Controlled Vocabulary" + }, + "conformsTo": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "items": { + "$ref": "#/$defs/StandardisedDataModels" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "List standardised data models that the dataset has been stored in or transformed to, such as OMOP or FHIR. If the data is only available in a local format, please make that explicit. If you are using a standard that has not been included in the list, please use \u201cother\u201d and contact support desk to ask for an addition.", + "title": "Conforms To" + }, + "language": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "items": { + "$ref": "#/$defs/Language" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "This should list all the languages in which the dataset metadata and underlying data is made available.", + "title": "Language" + }, + "format": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "items": { + "$ref": "#/$defs/Format" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "If multiple formats are available please specify. See application, audio, image, message, model, multipart, text, video, https://www.iana.org/assignments/media-types/media-types.xhtml Note: If your file format is not included in the current list of formats, please indicate other. If you are using the HOP you will be directed to a service desk page where you can request your additional format. If not please go to: https://metadata.atlassian.net/servicedesk/customer/portal/4 to request your format.", + "title": "Format" + } + }, + "required": [ + "vocabularyEncodingScheme", + "conformsTo", + "language", + "format" + ], + "title": "FormatAndStandards", + "type": "object" + }, + "IsPartOfEnum": { + "const": "NOT APPLICABLE", + "title": "IsPartOfEnum" + }, + "Isocountrycode": { + "pattern": "^[A-Z]{2}(-[A-Z]{2,3})?$", + "title": "Isocountrycode", + "type": "string" + }, + "Language": { + "anyOf": [ + { + "$ref": "#/$defs/LanguageEnum" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Language" + }, + "LanguageEnum": { + "enum": [ + "aa", + "ab", + "ae", + "af", + "ak", + "am", + "an", + "ar", + "as", + "av", + "ay", + "az", + "ba", + "be", + "bg", + "bh", + "bi", + "bm", + "bn", + "bo", + "br", + "bs", + "ca", + "ce", + "ch", + "co", + "cr", + "cs", + "cu", + "cv", + "cy", + "da", + "de", + "dv", + "dz", + "ee", + "el", + "en", + "eo", + "es", + "et", + "eu", + "fa", + "ff", + "fi", + "fj", + "fo", + "fr", + "fy", + "ga", + "gd", + "gl", + "gn", + "gu", + "gv", + "ha", + "he", + "hi", + "ho", + "hr", + "ht", + "hu", + "hy", + "hz", + "ia", + "id", + "ie", + "ig", + "ii", + "ik", + "io", + "is", + "it", + "iu", + "ja", + "jv", + "ka", + "kg", + "ki", + "kj", + "kk", + "kl", + "km", + "kn", + "ko", + "kr", + "ks", + "ku", + "kv", + "kw", + "ky", + "la", + "lb", + "lg", + "li", + "ln", + "lo", + "lt", + "lu", + "lv", + "mg", + "mh", + "mi", + "mk", + "ml", + "mn", + "mr", + "ms", + "mt", + "my", + "na", + "nb", + "nd", + "ne", + "ng", + "nl", + "nn", + "no", + "nr", + "nv", + "ny", + "oc", + "oj", + "om", + "or", + "os", + "pa", + "pi", + "pl", + "ps", + "pt", + "qu", + "rm", + "rn", + "ro", + "ru", + "rw", + "sa", + "sc", + "sd", + "se", + "sg", + "si", + "sk", + "sl", + "sm", + "sn", + "so", + "sq", + "sr", + "ss", + "st", + "su", + "sv", + "sw", + "ta", + "te", + "tg", + "th", + "ti", + "tk", + "tl", + "tn", + "to", + "tr", + "ts", + "tt", + "tw", + "ty", + "ug", + "uk", + "ur", + "uz", + "ve", + "vi", + "vo", + "wa", + "wo", + "xh", + "yi", + "yo", + "za", + "zh", + "zu" + ], + "title": "LanguageEnum", + "type": "string" + }, + "LongDescription": { + "anyOf": [ + { + "maxLength": 50000, + "minLength": 2, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "LongDescription" + }, + "MeasuredProperty": { + "title": "MeasuredProperty" + }, + "MemberOf": { + "enum": [ + "HUB", + "ALLIANCE", + "OTHER", + "NCS" + ], + "title": "MemberOf", + "type": "string" + }, + "Name": { + "title": "Name" + }, + "Observation": { + "additionalProperties": false, + "properties": { + "observedNode": { + "allOf": [ + { + "$ref": "#/$defs/StatisticalPopulationConstrained" + } + ], + "description": "Please select one of the following statistical populations for you observation", + "examples": [ + "PERSONS" + ], + "title": "Statistical Population" + }, + "measuredValue": { + "description": "Please provide the population size associated with the population type the dataset i.e. 1000 people in a study, or 87 images (MRI) of Knee Usage Note: Used with Statistical Population, which specifies the type of the population in the dataset.", + "title": "Measured Value", + "type": "integer" + }, + "disambiguatingDescription": { + "anyOf": [ + { + "$ref": "#/$defs/AbstractText" + }, + { + "type": "null" + } + ], + "default": null, + "description": "If SNOMED CT term does not provide sufficient detail, please provide a description that disambiguates the population type.", + "title": "Disambiguating Description" + }, + "observationDate": { + "anyOf": [ + { + "format": "date", + "type": "string" + }, + { + "format": "date-time", + "type": "string" + } + ], + "description": "Please provide the date that the observation was made. Some datasets may be continuously updated and the number of records will change regularly, so the observation date provides users with the date that the analysis or query was run to generate the particular observation. Multiple observations can be made i.e. an observation of cumulative COVID positive cases by specimen on the 1/1/2021 could be 2M. On the 8/1/2021 a new observation could be 2.1M. Users can add multiple observations.", + "title": "Observation Date" + }, + "measuredProperty": { + "allOf": [ + { + "$ref": "#/$defs/MeasuredProperty" + } + ], + "description": "Initially this will be defaulted to \"COUNT\"", + "title": "Measured Property" + } + }, + "required": [ + "observedNode", + "measuredValue", + "observationDate", + "measuredProperty" + ], + "title": "Observation", + "type": "object" + }, + "OneHundredFiftyCharacters": { + "maxLength": 150, + "minLength": 2, + "title": "OneHundredFiftyCharacters", + "type": "string" + }, + "Organisation": { + "properties": { + "identifier": { + "anyOf": [ + { + "$ref": "#/$defs/Url" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Please provide a Grid.ac identifier (see https://www.grid.ac/institutes) for your organisation. If your organisation does not have a Grid.ac identifier please use the \u201csuggest and institute\u201d function here: https://www.grid.ac/institutes#", + "title": "Organisation Identifier" + }, + "name": { + "allOf": [ + { + "$ref": "#/$defs/OneHundredFiftyCharacters" + } + ], + "description": "Name of the organisation", + "title": "Organisation Name" + }, + "logo": { + "anyOf": [ + { + "$ref": "#/$defs/Url" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Please provide a logo associated with the Gateway Organisation using a valid URL. The following formats will be accepted .jpg, .png or .svg.", + "title": "Organisation Logo" + }, + "description": { + "anyOf": [ + { + "$ref": "#/$defs/Description" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Please provide a URL that describes the organisation.", + "title": "Organisation Description" + }, + "contactPoint": { + "anyOf": [ + { + "$ref": "#/$defs/EmailAddress" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/$defs/EmailAddress" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "Organisation contact point(s)", + "title": "Organisation Contact Point" + }, + "memberOf": { + "anyOf": [ + { + "$ref": "#/$defs/MemberOf" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Please indicate if the organisation is an Alliance Member or a Hub.", + "title": "Organisation Membership" + }, + "accessRights": { + "anyOf": [ + { + "$ref": "#/$defs/Url" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/$defs/Url" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The URL of a webpage where the data access request process and/or guidance is provided. If there is more than one access process i.e. industry vs academic please provide both.", + "title": "Organisation Default Access Rights" + }, + "deliveryLeadTime": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryLeadTime" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Please provide an indication of the typical processing times based on the types of requests typically received. Note: This value will be used as default access request duration for all datasets submitted by the organisation. However, there will be the opportunity to overwrite this value for each dataset.", + "title": "Access Request Duration" + }, + "accessService": { + "anyOf": [ + { + "$ref": "#/$defs/LongDescription" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Please provide a brief description of the data access services that are available including: environment that is currently available to researchers;additional consultancy and services;any indication of costs associated. If no environment is currently available, please indicate the current plans and timelines when and how data will be made available to researchers Note: This value will be used as default access environment for all datasets submitted by the organisation. However, there will be the opportunity to overwrite this value for each dataset.", + "examples": [ + "https://cnfl.extge.co.uk/display/GERE/Research+Environment+User+Guide" + ], + "title": "Organisation Access Service" + }, + "accessRequestCost": { + "anyOf": [ + { + "$ref": "#/$defs/ShortDescription" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/$defs/Url" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Please provide link(s) to a webpage or a short description detailing the commercial model for processing data access requests for the organisation (if available) Definition: Indication of commercial model or cost (in GBP) for processing each data access request by the data custodian.", + "title": "Organisation Access Request Cost" + }, + "dataUseLimitation": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "items": { + "$ref": "#/$defs/DataUseLimitation" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Please provide an indication of consent permissions for datasets and/or materials, and relates to the purposes for which datasets and/or material might be removed, stored or used. Notes: where there are existing data-sharing arrangements such as the HDR UK HUB data sharing agreement or the NIHR HIC data sharing agreement this should be indicated within access rights. This value will be used as terms for all datasets submitted by the organisation. However, there will be the opportunity to overwrite this value for each dataset.", + "title": "Data Use Limitation" + }, + "dataUseRequirements": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "items": { + "$ref": "#/$defs/DataUseRequirements" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Please indicate fit here are any additional conditions set for use if any, multiple requirements may be provided. Please ensure that these restrictions are documented in access rights information.", + "title": "Data Use Requirements" + } + }, + "required": [ + "name", + "contactPoint" + ], + "title": "Organisation", + "type": "object" + }, + "Origin": { + "additionalProperties": false, + "properties": { + "purpose": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "items": { + "$ref": "#/$defs/Purpose" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Pleases indicate the purpose(s) that the dataset was collected.", + "title": "Purpose" + }, + "source": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "items": { + "$ref": "#/$defs/Source" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Pleases indicate the source of the data extraction", + "title": "Source" + }, + "collectionSituation": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "items": { + "$ref": "#/$defs/Setting" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Pleases indicate the setting(s) where data was collected. Multiple settings may be provided", + "title": "Setting" + } + }, + "title": "Origin", + "type": "object" + }, + "Periodicity": { + "enum": [ + "STATIC", + "IRREGULAR", + "CONTINUOUS", + "BIENNIAL", + "ANNUAL", + "BIANNUAL", + "QUARTERLY", + "BIMONTHLY", + "MONTHLY", + "BIWEEKLY", + "WEEKLY", + "SEMIWEEKLY", + "DAILY", + "OTHER", + null + ], + "title": "Periodicity" + }, + "Provenance": { + "additionalProperties": false, + "properties": { + "origin": { + "anyOf": [ + { + "$ref": "#/$defs/Origin" + }, + { + "type": "null" + } + ], + "default": null + }, + "temporal": { + "$ref": "#/$defs/Temporal" + } + }, + "required": [ + "temporal" + ], + "title": "Provenance", + "type": "object" + }, + "Purpose": { + "enum": [ + "STUDY", + "DISEASE REGISTRY", + "TRIAL", + "CARE", + "AUDIT", + "ADMINISTRATIVE", + "FINANCIAL", + "STATUTORY", + "OTHER", + null + ], + "title": "Purpose" + }, + "Revision": { + "additionalProperties": false, + "properties": { + "version": { + "allOf": [ + { + "$ref": "#/$defs/Semver" + } + ], + "description": "Semantic Version" + }, + "url": { + "anyOf": [ + { + "$ref": "#/$defs/Url" + }, + { + "type": "null" + } + ], + "description": "URL endpoint to obtain the version" + } + }, + "required": [ + "version", + "url" + ], + "title": "Revision", + "type": "object" + }, + "Semver": { + "pattern": "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$", + "title": "Semver", + "type": "string" + }, + "Setting": { + "enum": [ + "CLINIC", + "PRIMARY CARE", + "ACCIDENT AND EMERGENCY", + "OUTPATIENTS", + "IN-PATIENTS", + "SERVICES", + "COMMUNITY", + "HOME", + "PRIVATE", + "PHARMACY", + "SOCIAL CARE", + "LOCAL AUTHORITY", + "NATIONAL GOVERNMENT", + "OTHER" + ], + "title": "Setting", + "type": "string" + }, + "ShortDescription": { + "anyOf": [ + { + "maxLength": 1000, + "minLength": 2, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "ShortDescription" + }, + "Source": { + "enum": [ + "EPR", + "ELECTRONIC SURVEY", + "LIMS", + "OTHER INFORMATION SYSTEM", + "PAPER BASED", + "FREETEXT NLP", + "MACHINE GENERATED", + "OTHER" + ], + "title": "Source", + "type": "string" + }, + "StandardisedDataModels": { + "anyOf": [ + { + "$ref": "#/$defs/StandardisedDataModelsEnum" + }, + { + "type": "null" + } + ], + "default": null, + "title": "StandardisedDataModels" + }, + "StandardisedDataModelsEnum": { + "enum": [ + "HL7 FHIR", + "HL7 V2", + "HL7 CDA", + "HL7 CCOW", + "LOINC", + "DICOM", + "I2B2", + "IHE", + "OMOP", + "OPENEHR", + "SENTINEL", + "PCORNET", + "CDISC", + "NHS DATA DICTIONARY", + "NHS SCOTLAND DATA DICTIONARY", + "NHS WALES DATA DICTIONARY", + "LOCAL", + "OTHER" + ], + "title": "StandardisedDataModelsEnum", + "type": "string" + }, + "StatisticalPopulationConstrained": { + "enum": [ + "PERSONS", + "EVENTS", + "FINDINGS" + ], + "title": "StatisticalPopulationConstrained", + "type": "string" + }, + "Summary": { + "additionalProperties": false, + "properties": { + "title": { + "allOf": [ + { + "$ref": "#/$defs/OneHundredFiftyCharacters" + } + ], + "description": "Title of the dataset limited to 150 characters. It should provide a short description of the dataset and be unique across the gateway. If your title is not unique, please add a prefix with your organisation name or identifier to differentiate it from other datasets within the Gateway. Please avoid acronyms wherever possible. Good titles should summarise the content of the dataset and if relevant, the region the dataset covers.", + "examples": [ + [ + "North West London COVID-19 Patient Level Situation Report" + ] + ], + "title": "Title" + }, + "abstract": { + "anyOf": [ + { + "$ref": "#/$defs/AbstractText" + }, + { + "type": "null" + } + ], + "description": "Provide a clear and brief descriptive signpost for researchers who are searching for data that may be relevant to their research. The abstract should allow the reader to determine the scope of the data collection and accurately summarise its content. The optimal length is one paragraph (limited to 255 characters) and effective abstracts should avoid long sentences and abbreviations where possible", + "examples": [ + "CPRD Aurum contains primary care data contributed by General Practitioner (GP) practices using EMIS Web\u00ae including patient registration information and all care events that GPs have chosen to record as part of their usual medical practice." + ], + "title": "Dataset Abstract" + }, + "publisher": { + "allOf": [ + { + "$ref": "#/$defs/Organisation" + } + ], + "description": "This is the organisation responsible for running or supporting the data access request process, as well as publishing and maintaining the metadata. In most this will be the same as the HDR UK Organisation (Hub or Alliance Member). However, in some cases this will be different i.e. Tissue Directory are an HDR UK Gateway organisation but coordinate activities across a number of data publishers i.e. Cambridge Blood and Stem Cell Biobank.", + "title": "Dataset publisher" + }, + "contactPoint": { + "anyOf": [ + { + "$ref": "#/$defs/EmailAddress" + }, + { + "type": "null" + } + ], + "description": "Please provide a valid email address that can be used to coordinate data access requests with the publisher. Organisations are expected to provide a dedicated email address associated with the data access request process. Notes- An employee's email address can only be provided on a temporary basis and if one is provided an explicit consent must be obtained for this purpose.", + "examples": [ + "SAILDatabank@swansea.ac.uk" + ], + "title": "Contact Point" + }, + "keywords": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "items": { + "$ref": "#/$defs/OneHundredFiftyCharacters" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "Please provide relevant and specific keywords that can improve the SEO of your dataset as a comma separated list. Notes: Onboarding portal will suggest keywords based on title, abstract and description. We are compiling a standardised list of keywords and synonyms across datasets to make filtering easier for users.", + "title": "Keywords" + }, + "alternateIdentifiers": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/$defs/ShortDescription" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Alternate dataset identifiers or local identifiers", + "title": "Alternate dataset identifiers" + }, + "doiName": { + "anyOf": [ + { + "$ref": "#/$defs/Doi" + }, + { + "type": "null" + } + ], + "default": null, + "description": "All HDR UK registered datasets should either have a Digital Object Identifier (DOI) or be working towards obtaining one. If a DOI is available, please provide the DOI.", + "examples": [ + "10.3399/bjgp17X692645" + ], + "title": "Digital Object Identifier" + } + }, + "required": [ + "title", + "abstract", + "publisher", + "contactPoint", + "keywords" + ], + "title": "Summary", + "type": "object" + }, + "Temporal": { + "additionalProperties": false, + "properties": { + "accrualPeriodicity": { + "allOf": [ + { + "$ref": "#/$defs/Periodicity" + } + ], + "description": "Please indicate the frequency of distribution release. If a dataset is distributed regularly please choose a distribution release periodicity from the constrained list and indicate the next release date. When the release date becomes historical, a new release date will be calculated based on the publishing periodicity. If a dataset has been published and will remain static please indicate that it is static and indicated when it was released. If a dataset is released on an irregular basis or \u201con-demand\u201d please indicate that it is Irregular and leave release date as null. If a dataset can be published in real-time or near-real-time please indicate that it is continuous and leave release date as null. Notes: see https://www.dublincore.org/specifications/dublin-core/collection-description/frequency/" + }, + "distributionReleaseDate": { + "anyOf": [ + { + "format": "date", + "type": "string" + }, + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Date of the latest release of the dataset. If this is a regular release i.e. quarterly, or this is a static dataset please complete this alongside Periodicity. If this is Irregular or Continuously released please leave this blank. Notes: Periodicity and release date will be used to determine when the next release is expected. E.g. if the release date is documented as 01/01/2020 and it is now 20/04/2020 and there is a quarterly release schedule, the latest release will be calculated as 01/04/2020.", + "title": "Release Date" + }, + "startDate": { + "anyOf": [ + { + "format": "date", + "type": "string" + }, + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The start of the time period that the dataset provides coverage for. If there are multiple cohorts in the dataset with varying start dates, please provide the earliest date and use the description or the media attribute to provide more information.", + "title": "Start Date" + }, + "endDate": { + "anyOf": [ + { + "format": "date", + "type": "string" + }, + { + "format": "date-time", + "type": "string" + }, + { + "$ref": "#/$defs/EndDateEnum" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The end of the time period that the dataset provides coverage for. If the dataset is \u201cContinuous\u201d and has no known end date, please state continuous. If there are multiple cohorts in the dataset with varying end dates, please provide the latest date and use the description or the media attribute to provide more information.", + "title": "End Date" + }, + "timeLag": { + "allOf": [ + { + "$ref": "#/$defs/TimeLag" + } + ], + "description": "Please indicate the typical time-lag between an event and the data for that event appearing in the dataset", + "title": "Time Lag" + } + }, + "required": [ + "accrualPeriodicity", + "startDate", + "timeLag" + ], + "title": "Temporal", + "type": "object" + }, + "TimeLag": { + "enum": [ + "LESS 1 WEEK", + "1-2 WEEKS", + "2-4 WEEKS", + "1-2 MONTHS", + "2-6 MONTHS", + "MORE 6 MONTHS", + "VARIABLE", + "NO TIMELAG", + "NOT APPLICABLE", + "OTHER", + null + ], + "title": "TimeLag" + }, + "Url": { + "anyOf": [ + { + "format": "uri", + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Url" + }, + "Usage": { + "additionalProperties": false, + "properties": { + "dataUseLimitation": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "items": { + "$ref": "#/$defs/DataUseLimitation" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Please provide an indication of consent permissions for datasets and/or materials, and relates to the purposes for which datasets and/or material might be removed, stored or used. NOTE: we have extended the DUO to include a value for NO LINKAGE", + "title": "Data Use Limitation" + }, + "dataUseRequirements": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "items": { + "$ref": "#/$defs/DataUseRequirements" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Please indicate fit here are any additional conditions set for use if any, multiple requirements may be provided. Please ensure that these restrictions are documented in access rights information.", + "title": "Data Use Requirements" + }, + "resourceCreator": { + "anyOf": [ + { + "$ref": "#/$defs/ShortDescription" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/$defs/ShortDescription" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Please provide the text that you would like included as part of any citation that credits this dataset. This is typically just the name of the publisher. No employee details should be provided.", + "title": "Citation Requirements" + }, + "investigations": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/$defs/Url" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Investigations" + }, + "isReferencedBy": { + "anyOf": [ + { + "$ref": "#/$defs/Doi" + }, + { + "type": "string" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/$defs/Doi" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Please provide the keystone paper associated with the dataset. Also include a list of known citations, if available and should be links to existing resources where the dataset has been used or referenced. Please provide multiple entries, or if you are using a csv upload please provide them as a tab separated list.", + "title": "Citations" + } + }, + "title": "Usage", + "type": "object" + }, + "Uuidv4": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$", + "title": "Uuidv4", + "type": "string" + } + }, + "additionalProperties": false, + "properties": { + "identifier": { + "anyOf": [ + { + "$ref": "#/$defs/Uuidv4" + }, + { + "$ref": "#/$defs/Url" + }, + { + "type": "null" + } + ], + "description": "System dataset identifier", + "examples": [ + [ + "226fb3f1-4471-400a-8c39-2b66d46a39b6", + "https://web.www.healthdatagateway.org/dataset/226fb3f1-4471-400a-8c39-2b66d46a39b6" + ] + ], + "title": "Dataset identifier" + }, + "version": { + "allOf": [ + { + "$ref": "#/$defs/Semver" + } + ], + "description": "Dataset metadata version", + "examples": [ + "1.1.0" + ], + "title": "Dataset Version" + }, + "revisions": { + "description": "Revisions of Dataset metadata", + "items": { + "$ref": "#/$defs/Revision" + }, + "title": "Dataset Revisions", + "type": "array" + }, + "issued": { + "description": "Dataset Metadata Creation Date", + "format": "date-time", + "title": "Creation Date", + "type": "string" + }, + "modified": { + "description": "Dataset Metadata Creation Date", + "format": "date-time", + "title": "Modification Date", + "type": "string" + }, + "summary": { + "allOf": [ + { + "$ref": "#/$defs/Summary" + } + ], + "description": "Summary metadata must be completed by Data Custodians onboarding metadata into the Innovation Gateway MVP." + }, + "documentation": { + "anyOf": [ + { + "$ref": "#/$defs/Documentation" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Documentation can include a rich text description of the dataset or links to media such as documents, images, presentations, videos or links to data dictionaries, profiles or dashboards. Organisations are required to confirm that they have permission to distribute any additional media.", + "title": "Documentation" + }, + "coverage": { + "anyOf": [ + { + "$ref": "#/$defs/Coverage" + }, + { + "type": "null" + } + ], + "default": null, + "description": "This information includes attributes for geographical and temporal coverage, cohort details etc. to enable a deeper understanding of the dataset content so that researchers can make decisions about the relevance of the underlying data.", + "title": "Coverage" + }, + "provenance": { + "anyOf": [ + { + "$ref": "#/$defs/Provenance" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Provenance information allows researchers to understand data within the context of its origins and can be an indicator of quality, authenticity and timeliness.", + "title": "Provenance" + }, + "accessibility": { + "allOf": [ + { + "$ref": "#/$defs/Accessibility" + } + ], + "description": "Accessibility information allows researchers to understand access, usage, limitations, formats, standards and linkage or interoperability with toolsets." + }, + "enrichmentAndLinkage": { + "anyOf": [ + { + "$ref": "#/$defs/EnrichmentAndLinkage" + }, + { + "type": "null" + } + ], + "default": null, + "description": "This section includes information about related datasets that may have previously been linked, as well as indicating if there is the opportunity to link to other datasets in the future. If a dataset has been enriched and/or derivations, scores and existing tools are available this section allows providers to indicate this to researchers.", + "title": "Enrichment and Linkage" + }, + "observations": { + "description": "Multiple observations about the dataset may be provided and users are expected to provide at least one observation (1..*). We will be supporting the schema.org observation model (https://schema.org/Observation) with default values. Users will be encouraged to provide their own statistical populations as the project progresses. Example: <b> Statistical Population 1 </b> type: StatisticalPopulation populationType: Persons numConstraints: 0 <b> Statistical Population 2 </b> type: StatisticalPopulation populationType: Events numConstraints: 0 <b> Statistical Population 3 </b> type: StatisticalPopulation populationType: Findings numConstraints: 0 typeOf: Observation observedNode: <b> Statistical Population 1 </b> measuredProperty: count measuredValue: 32937 observationDate: \u201c2017\u201d", + "items": { + "$ref": "#/$defs/Observation" + }, + "title": "Observations", + "type": "array" + }, + "structuralMetadata": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/DataClass" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Descriptions of all tables and data elements that can be included in the dataset", + "title": "Structural Metadata" + } + }, + "required": [ + "identifier", + "version", + "revisions", + "issued", + "modified", + "summary", + "accessibility", + "observations" + ], + "title": "Hdruk213", + "type": "object" +} \ No newline at end of file diff --git a/hdr_schemata/models/HDRUK/__init__.py b/hdr_schemata/models/HDRUK/__init__.py index 043ec4e..aa7f085 100644 --- a/hdr_schemata/models/HDRUK/__init__.py +++ b/hdr_schemata/models/HDRUK/__init__.py @@ -1 +1,2 @@ from .v2_1_2 import Hdruk212 +from .v2_1_3 import Hdruk213 diff --git a/hdr_schemata/models/HDRUK/test.py b/hdr_schemata/models/HDRUK/test.py index 1244055..d4c81b1 100644 --- a/hdr_schemata/models/HDRUK/test.py +++ b/hdr_schemata/models/HDRUK/test.py @@ -1,5 +1,7 @@ from pydantic import ValidationError import v2_1_2 +import v2_1_3 import json v2_1_2.Hdruk212.save_schema() +v2_1_3.Hdruk213.save_schema() diff --git a/hdr_schemata/models/HDRUK/v2_1_3/Provenance.py b/hdr_schemata/models/HDRUK/v2_1_3/Provenance.py new file mode 100644 index 0000000..d2b2705 --- /dev/null +++ b/hdr_schemata/models/HDRUK/v2_1_3/Provenance.py @@ -0,0 +1,6 @@ +from hdr_schemata.models.HDRUK.base import Provenance as BaseProvenance +from .Temporal import Temporal + + +class Provenance(BaseProvenance): + temporal: Temporal diff --git a/hdr_schemata/models/HDRUK/v2_1_3/Temporal.py b/hdr_schemata/models/HDRUK/v2_1_3/Temporal.py new file mode 100644 index 0000000..1d36499 --- /dev/null +++ b/hdr_schemata/models/HDRUK/v2_1_3/Temporal.py @@ -0,0 +1,11 @@ +from pydantic import Field +from hdr_schemata.definitions.HDRUK import Periodicity +from hdr_schemata.models.HDRUK.base import Temporal as TemporalBase + + +class Temporal(TemporalBase): + publishingFrequency: Periodicity = Field( + ..., + description="Please indicate the frequency of distribution release. If a dataset is distributed regularly please choose a distribution release periodicity from the constrained list and indicate the next release date. When the release date becomes historical, a new release date will be calculated based on the publishing periodicity. If a dataset has been published and will remain static please indicate that it is static and indicated when it was released. If a dataset is released on an irregular basis or “on-demand” please indicate that it is Irregular and leave release date as null. If a dataset can be published in real-time or near-real-time please indicate that it is continuous and leave release date as null. Notes: see https://www.dublincore.org/specifications/dublin-core/collection-description/frequency/", + title="Publishing Frequency", + ) diff --git a/hdr_schemata/models/HDRUK/v2_1_3/__init__.py b/hdr_schemata/models/HDRUK/v2_1_3/__init__.py new file mode 100644 index 0000000..920ce39 --- /dev/null +++ b/hdr_schemata/models/HDRUK/v2_1_3/__init__.py @@ -0,0 +1,9 @@ +from hdr_schemata.models.HDRUK.v2_1_2 import Hdruk212 +import json + + +class Hdruk213(Hdruk212): + @classmethod + def save_schema(cls, location="./2.1.3/schema.json"): + with open(location, "w") as f: + json.dump(cls.model_json_schema(), f, indent=6) From aaa02fad808408e0a5ee4588972110076320806b Mon Sep 17 00:00:00 2001 From: Calum Macdonald Date: Mon, 8 Jan 2024 15:06:13 +0000 Subject: [PATCH 08/21] update --- available.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/available.json b/available.json index ce09ac5..069da23 100644 --- a/available.json +++ b/available.json @@ -1,11 +1,13 @@ { "HDRUK": [ "2.1.2", + "2.1.3", "2.1.0", "2.0.2" ], "GWDM": [ "1.0", + "1.1", "latest" ], "SchemaOrg": [ From f1dca22cd8494780d0339955cf0c1a5d22cdf32d Mon Sep 17 00:00:00 2001 From: Calum Macdonald Date: Tue, 30 Jan 2024 11:21:18 +0000 Subject: [PATCH 09/21] add additions for 1.1 for tissue samples --- hdr_schemata/models/GWDM/1.1/schema.json | 314 ++++++++++++++++++ hdr_schemata/models/GWDM/v1_1/Organisation.py | 13 +- hdr_schemata/models/GWDM/v1_1/SampleDonor.py | 24 ++ .../models/GWDM/v1_1/TissueSampleMetadata.py | 61 ++++ .../GWDM/v1_1/TissuesSampleCollection.py | 119 +++++++ hdr_schemata/models/GWDM/v1_1/__init__.py | 35 +- 6 files changed, 543 insertions(+), 23 deletions(-) create mode 100644 hdr_schemata/models/GWDM/v1_1/SampleDonor.py create mode 100644 hdr_schemata/models/GWDM/v1_1/TissueSampleMetadata.py create mode 100644 hdr_schemata/models/GWDM/v1_1/TissuesSampleCollection.py diff --git a/hdr_schemata/models/GWDM/1.1/schema.json b/hdr_schemata/models/GWDM/1.1/schema.json index 7b7e390..eae6ad7 100644 --- a/hdr_schemata/models/GWDM/1.1/schema.json +++ b/hdr_schemata/models/GWDM/1.1/schema.json @@ -1454,6 +1454,307 @@ ], "title": "TimeLag" }, + "TissueSampleDonor": { + "properties": { + "id": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "ID of the sample donor", + "title": "Donor ID" + }, + "sex": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Sex of the sample donor", + "title": "Donor Sex" + }, + "dataCategories": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Data categories related to the sample donor", + "title": "Donor Data Categories" + } + }, + "title": "TissueSampleDonor", + "type": "object" + }, + "TissueSampleMetadata": { + "properties": { + "id": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "ID of the tissue sample metadata", + "title": "Metadata ID" + }, + "sampleDonor": { + "allOf": [ + { + "$ref": "#/$defs/TissueSampleDonor" + } + ], + "default": null, + "description": "Information about the sample donor", + "title": "Sample Donor" + }, + "sampleType": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Type of the tissue sample", + "title": "Sample Type" + }, + "storageTemperature": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Storage temperature of the tissue sample", + "title": "Storage Temperature" + }, + "creationDate": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Date when the tissue sample metadata was created", + "title": "Creation Date" + }, + "AnatomicalSiteOntologyCode": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Ontology code for the anatomical site", + "title": "Anatomical Site Ontology Code" + }, + "AnatomicalSiteOntologyDescription": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Ontology description for the anatomical site", + "title": "Anatomical Site Ontology Description" + }, + "AnatomicalSiteFreeText": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Free text describing the anatomical site", + "title": "Anatomical Site Free Text" + }, + "sampleContentDiagnosis": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Diagnosis related to the sample content", + "title": "Sample Content Diagnosis" + }, + "useReCommaSeparatedValuesictions": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Restrictions on the use of the tissue sample", + "title": "Use Restrictions" + } + }, + "title": "TissueSampleMetadata", + "type": "object" + }, + "TissuesSampleCollection": { + "properties": { + "id": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "ID of the tissue sample collection", + "title": "ID" + }, + "dataCategories": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Data categories related to the tissue sample collection", + "title": "Data Categories" + }, + "materialType": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Material type of the tissue sample collection", + "title": "Material Type" + }, + "accessConditions": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Access conditions for the tissue sample collection", + "title": "Access Conditions" + }, + "collectionType": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Type of the tissue sample collection", + "title": "Collection Type" + }, + "disease": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Disease associated with the tissue sample collection", + "title": "Disease" + }, + "storageTemperature": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Storage temperature of the tissue sample collection", + "title": "Storage Temperature" + }, + "sampleAgeRange": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Age range of the tissue sample collection", + "title": "Sample Age Range" + }, + "tissueSampleMetadata": { + "anyOf": [ + { + "$ref": "#/$defs/TissueSampleMetadata" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Metadata related to the tissue sample", + "title": "Tissue Sample Metadata" + } + }, + "title": "TissuesSampleCollection", + "type": "object" + }, "TwoHundredFiftyFiveCharacters": { "maxLength": 255, "minLength": 2, @@ -1622,6 +1923,19 @@ "default": null, "description": "Descriptions of all tables and data elements that can be included in the dataset", "title": "Structural Metadata" + }, + "tissuesSampleCollection": { + "anyOf": [ + { + "$ref": "#/$defs/TissuesSampleCollection" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Metadata collection for Tissue Samples datasets", + "title": "Tissues Sample Collection" } }, "required": [ diff --git a/hdr_schemata/models/GWDM/v1_1/Organisation.py b/hdr_schemata/models/GWDM/v1_1/Organisation.py index f99f150..74452e0 100644 --- a/hdr_schemata/models/GWDM/v1_1/Organisation.py +++ b/hdr_schemata/models/GWDM/v1_1/Organisation.py @@ -4,24 +4,23 @@ class Organisation(BaseModel): - name: Optional[Name] = Field( ..., description="The organisation responsible for running or supporting the data access request process, as well as publishing and maintaining the metadata. In most this will be the same as the HDR UK Organisation (Hub or Alliance Member)/", example="SAIL", - title='Name' + title="Name", ) - #note: will need to do something about this in the future + # note: will need to do something about this in the future # should match a pattern? sha256? integer? - gatewayId: Optional[constr(min_length=2,max_length=50)] = Field( + gatewayId: Optional[constr(min_length=2, max_length=50)] = Field( None, description="The link to an ID somewhere in the gateway where more information on the publisher can be retrieved.", - title='Publisher gateway id' + title="Publisher gateway id", ) - rorId: Optional[constr(min_length=9,max_length=9)] = Field( + rorId: Optional[constr(min_length=9, max_length=9)] = Field( None, description="The Research Organization Registry (ROR) for the organisation, if applicable", - title="Research Organization Registry Identifier" + title="Research Organization Registry Identifier", ) diff --git a/hdr_schemata/models/GWDM/v1_1/SampleDonor.py b/hdr_schemata/models/GWDM/v1_1/SampleDonor.py new file mode 100644 index 0000000..1859cde --- /dev/null +++ b/hdr_schemata/models/GWDM/v1_1/SampleDonor.py @@ -0,0 +1,24 @@ +from typing import Optional, Union +from datetime import date, datetime +from pydantic import BaseModel, Field, constr +from hdr_schemata.definitions.HDRUK import CommaSeparatedValues + + +class SampleDonor(BaseModel): + id: Optional[constr(min_length=2, max_length=50)] = Field( + None, title="Donor ID", description="ID of the sample donor" + ) + + sex: Optional[str] = Field( + None, title="Donor Sex", description="Sex of the sample donor" + ) + + birthDate: Optional[Union[date, datetime]] = Field( + None, title="Donor birth date", description="Date of birth of the sample donor" + ) + + dataCategories: Optional[CommaSeparatedValues] = Field( + None, + title="Donor Data Categories", + description="Data categories related to the sample donor", + ) diff --git a/hdr_schemata/models/GWDM/v1_1/TissueSampleMetadata.py b/hdr_schemata/models/GWDM/v1_1/TissueSampleMetadata.py new file mode 100644 index 0000000..269c49b --- /dev/null +++ b/hdr_schemata/models/GWDM/v1_1/TissueSampleMetadata.py @@ -0,0 +1,61 @@ +from typing import Optional, Union, List +from pydantic import BaseModel, Field, constr +from datetime import date, datetime +from .SampleDonor import SampleDonor + +from hdr_schemata.definitions.HDRUK import CommaSeparatedValues + + +class TissueSampleMetadata(BaseModel): + id: Optional[constr(min_length=2, max_length=50)] = Field( + None, title="Metadata ID", description="ID of the tissue sample metadata" + ) + + sampleDonor: Optional[SampleDonor] = Field( + None, title="Sample Donor", description="Information about the sample donor" + ) + + sampleType: Optional[CommaSeparatedValues] = Field( + None, title="Sample Type", description="Type of the tissue sample" + ) + + storageTemperature: Optional[str] = Field( + None, + title="Storage Temperature", + description="Storage temperature of the tissue sample", + ) + + creationDate: Optional[Union[date, datetime]] = Field( + None, + title="Creation Date", + description="Date when the tissue sample metadata was created", + ) + + AnatomicalSiteOntologyCode: Optional[CommaSeparatedValues] = Field( + None, + title="Anatomical Site Ontology Code", + description="Ontology code for the anatomical site", + ) + AnatomicalSiteOntologyDescription: Optional[CommaSeparatedValues] = Field( + None, + title="Anatomical Site Ontology Description", + description="Ontology description for the anatomical site", + ) + + AnatomicalSiteFreeText: Optional[CommaSeparatedValues] = Field( + None, + title="Anatomical Site Free Text", + description="Free text describing the anatomical site", + ) + + sampleContentDiagnosis: Optional[CommaSeparatedValues] = Field( + None, + title="Sample Content Diagnosis", + description="Diagnosis related to the sample content", + ) + + useReCommaSeparatedValuesictions: Optional[CommaSeparatedValues] = Field( + None, + title="Use Restrictions", + description="Restrictions on the use of the tissue sample", + ) diff --git a/hdr_schemata/models/GWDM/v1_1/TissuesSampleCollection.py b/hdr_schemata/models/GWDM/v1_1/TissuesSampleCollection.py new file mode 100644 index 0000000..f61f15a --- /dev/null +++ b/hdr_schemata/models/GWDM/v1_1/TissuesSampleCollection.py @@ -0,0 +1,119 @@ +from typing import Optional +from pydantic import BaseModel, Field +from .TissueSampleMetadata import TissueSampleMetadata +from hdr_schemata.definitions.HDRUK import CommaSeparatedValues + + +class TissueSampleDonor(BaseModel): + id: Optional[CommaSeparatedValues] = Field( + None, title="Donor ID", description="ID of the sample donor" + ) + sex: Optional[CommaSeparatedValues] = Field( + None, title="Donor Sex", description="Sex of the sample donor" + ) + dataCategories: Optional[CommaSeparatedValues] = Field( + None, + title="Donor Data Categories", + description="Data categories related to the sample donor", + ) + + +class TissueSampleMetadata(BaseModel): + id: Optional[CommaSeparatedValues] = Field( + None, title="Metadata ID", description="ID of the tissue sample metadata" + ) + sampleDonor: TissueSampleDonor = Field( + None, title="Sample Donor", description="Information about the sample donor" + ) + sampleType: Optional[CommaSeparatedValues] = Field( + None, title="Sample Type", description="Type of the tissue sample" + ) + storageTemperature: Optional[CommaSeparatedValues] = Field( + None, + title="Storage Temperature", + description="Storage temperature of the tissue sample", + ) + creationDate: Optional[CommaSeparatedValues] = Field( + None, + title="Creation Date", + description="Date when the tissue sample metadata was created", + ) + AnatomicalSiteOntologyCode: Optional[CommaSeparatedValues] = Field( + None, + title="Anatomical Site Ontology Code", + description="Ontology code for the anatomical site", + ) + AnatomicalSiteOntologyDescription: Optional[CommaSeparatedValues] = Field( + None, + title="Anatomical Site Ontology Description", + description="Ontology description for the anatomical site", + ) + AnatomicalSiteFreeText: Optional[CommaSeparatedValues] = Field( + None, + title="Anatomical Site Free Text", + description="Free text describing the anatomical site", + ) + sampleContentDiagnosis: Optional[CommaSeparatedValues] = Field( + None, + title="Sample Content Diagnosis", + description="Diagnosis related to the sample content", + ) + useReCommaSeparatedValuesictions: Optional[CommaSeparatedValues] = Field( + None, + title="Use Restrictions", + description="Restrictions on the use of the tissue sample", + ) + + +class TissuesSampleCollection(BaseModel): + id: Optional[CommaSeparatedValues] = Field( + None, title="ID", description="ID of the tissue sample collection" + ) + + dataCategories: Optional[CommaSeparatedValues] = Field( + None, + title="Data Categories", + description="Data categories related to the tissue sample collection", + ) + + materialType: Optional[CommaSeparatedValues] = Field( + None, + title="Material Type", + description="Material type of the tissue sample collection", + ) + + accessConditions: Optional[CommaSeparatedValues] = Field( + None, + title="Access Conditions", + description="Access conditions for the tissue sample collection", + ) + + collectionType: Optional[CommaSeparatedValues] = Field( + None, + title="Collection Type", + description="Type of the tissue sample collection", + ) + + disease: Optional[CommaSeparatedValues] = Field( + None, + title="Disease", + description="Disease associated with the tissue sample collection", + ) + + storageTemperature: Optional[CommaSeparatedValues] = Field( + None, + title="Storage Temperature", + description="Storage temperature of the tissue sample collection", + ) + + sampleAgeRange: Optional[CommaSeparatedValues] = Field( + None, + title="Sample Age Range", + description="Age range of the tissue sample collection", + ) + + tissueSampleMetadata: Optional[TissueSampleMetadata] = Field( + None, + title="Tissue Sample Metadata", + description="Metadata related to the tissue sample", + ) diff --git a/hdr_schemata/models/GWDM/v1_1/__init__.py b/hdr_schemata/models/GWDM/v1_1/__init__.py index bfaf404..dbca75c 100644 --- a/hdr_schemata/models/GWDM/v1_1/__init__.py +++ b/hdr_schemata/models/GWDM/v1_1/__init__.py @@ -1,38 +1,41 @@ from hdr_schemata.models.GWDM import Gwdm10 -from .Coverage import Coverage +from .Coverage import Coverage from .Accessibility import Accessibility from .Required import Required from .Summary import Summary +from .TissuesSampleCollection import TissuesSampleCollection from typing import Optional from pydantic import Field, BaseModel, constr class Gwdm11(Gwdm10): - summary: Summary = Field( ..., - description='Summary of metadata describing key pieces of information.', - title='Summary', + description="Summary of metadata describing key pieces of information.", + title="Summary", ) - required: Required = Field( - ..., - description='required metadata needed for the GWDM', - title='Required' + ..., description="required metadata needed for the GWDM", title="Required" ) - - #overload Coverage with an updated version of it.. + + # overload Coverage with an updated version of it.. coverage: Optional[Coverage] = Field( None, - description='Observational, Spatial and Temporal coverage', - title='Coverage', + description="Observational, Spatial and Temporal coverage", + title="Coverage", ) - #modifying Accessibility --> modifying Usage + # modifying Accessibility --> modifying Usage accessibility: Accessibility = Field( None, - description='Accessibility information.', - title='Accessibility', + description="Accessibility information.", + title="Accessibility", + ) + + # add a new entry for tissue sample collections + tissuesSampleCollection: Optional[TissuesSampleCollection] = Field( + None, + description="Metadata collection for Tissue Samples datasets", + title="Tissues Sample Collection", ) - From 1056386a50f2c1ecae7ffc6c1a3ba2beba0c88ce Mon Sep 17 00:00:00 2001 From: Calum Macdonald Date: Tue, 30 Jan 2024 11:25:41 +0000 Subject: [PATCH 10/21] fix scripts --- available.json | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/available.json b/available.json index 07b979f..59ef841 100644 --- a/available.json +++ b/available.json @@ -1,5 +1,19 @@ { - "HDRUK": ["2.1.2", "2.1.3", "2.1.0", "2.0.2"], - "GWDM": ["1.0", "1.1"], - "SchemaOrg": ["default", "BioSchema", "GoogleRecommended"] -} + "HDRUK": [ + "2.1.2", + "2.1.3", + "latest", + "2.1.0", + "2.0.2" + ], + "GWDM": [ + "1.0", + "1.1", + "latest" + ], + "SchemaOrg": [ + "default", + "BioSchema", + "GoogleRecommended" + ] +} \ No newline at end of file From 14277cbf341811b09d3d5f984538db728cdb19c5 Mon Sep 17 00:00:00 2001 From: Calum Macdonald Date: Tue, 30 Jan 2024 11:26:02 +0000 Subject: [PATCH 11/21] remove a latest file --- hdr_schemata/models/GWDM/latest/schema.json | 1633 ------------------- 1 file changed, 1633 deletions(-) delete mode 100644 hdr_schemata/models/GWDM/latest/schema.json diff --git a/hdr_schemata/models/GWDM/latest/schema.json b/hdr_schemata/models/GWDM/latest/schema.json deleted file mode 100644 index 7b7e390..0000000 --- a/hdr_schemata/models/GWDM/latest/schema.json +++ /dev/null @@ -1,1633 +0,0 @@ -{ - "$defs": { - "AbstractText": { - "anyOf": [ - { - "maxLength": 500, - "minLength": 5, - "type": "string" - }, - { - "type": "null" - } - ], - "title": "AbstractText" - }, - "Access": { - "additionalProperties": false, - "properties": { - "accessRights": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "description": "Optional link(s) or a description of where the license associated to accessing this dataset", - "example": "https://raw.githubusercontent.com/HDRUK/papers/master/LICENSE", - "title": "Access Rights" - }, - "accessService": { - "anyOf": [ - { - "$ref": "#/$defs/LongDescription" - }, - { - "type": "null" - } - ], - "default": null, - "description": "", - "example": "The SAIL Databank is powered by the UK Secure e-Research Platform (UKSeRP). Following approval through safeguard processes, access to project-specific data within the secure environment is permitted using two-factor authentication.", - "title": "Access Service" - }, - "accessRequestCost": { - "anyOf": [ - { - "$ref": "#/$defs/LongDescription" - }, - { - "type": "null" - } - ], - "default": null, - "description": "", - "example": "Data provision is free from SAIL. Overall project costing depends on the number of people that require access to the SAIL Gateway, the activities that SAIL needs to complete (e.g. loading non-standard datasets), data refreshes, analytical work required, disclosure control process, and special case technological requirements.", - "title": "Organisation Access Request Cost" - }, - "deliveryLeadTime": { - "anyOf": [ - { - "$ref": "#/$defs/DeliveryLeadTime" - }, - { - "type": "null" - } - ], - "default": null, - "description": "An arbitrary guess at the time to gain access to the dataset...", - "example": "2-6 MONTHS", - "title": "Access Request Duration" - }, - "jurisdiction": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "description": "Comma separated country codes of where the data jurisdiction is.", - "example": "GB-WLS,GB-GBN,GB-SCT", - "title": "Jurisdiction" - }, - "dataController": { - "anyOf": [ - { - "$ref": "#/$defs/LongDescription" - }, - { - "type": "null" - } - ], - "description": "Name of the data controller", - "example": "SAIL Databank", - "title": "Data Controller" - }, - "dataProcessor": { - "anyOf": [ - { - "$ref": "#/$defs/LongDescription" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Name of the data processors", - "example": "SAIL Databank", - "title": "Data Processor" - } - }, - "required": [ - "accessRights", - "jurisdiction", - "dataController" - ], - "title": "Access", - "type": "object" - }, - "Accessibility": { - "additionalProperties": false, - "properties": { - "usage": { - "anyOf": [ - { - "$ref": "#/$defs/Usage" - }, - { - "type": "null" - } - ], - "default": null, - "description": "This section includes information about how the data can be used and how it is currently being used", - "title": "Usage" - }, - "access": { - "allOf": [ - { - "$ref": "#/$defs/Access" - } - ], - "description": "This section includes information about data access" - }, - "formatAndStandards": { - "anyOf": [ - { - "$ref": "#/$defs/FormatAndStandards" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Section includes technical attributes for language vocabularies, sizes etc. and gives researchers facts about and processing the underlying data in the dataset.", - "title": "Format and Standards" - } - }, - "required": [ - "access" - ], - "title": "Accessibility", - "type": "object" - }, - "AgeRange": { - "anyOf": [ - { - "pattern": "Not Known|(150|1[0-4][0-9]|[0-9]|[1-8][0-9]|9[0-9])-(150|1[0-4][0-9]|[0-9]|[1-8][0-9]|9[0-9])", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "AgeRange" - }, - "Anthropometric": { - "anyOf": [ - { - "pattern": "\\b(?:Blood Pressure|Hip Circumference|Height|Waist Circumference|Weight)(?:,(?:Blood Pressure|Hip Circumference|Height|Waist Circumference|Weight))*\\b", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Anthropometric" - }, - "BiologicalSamples": { - "anyOf": [ - { - "pattern": "\\b(?:Blood|Other|Urine|Saliva)(?:,(?:Blood|Other|Urine|Saliva))*\\b", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "BiologicalSamples" - }, - "CommaSeparatedValues": { - "anyOf": [ - { - "pattern": "([^,]+)", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "CommaSeparatedValues" - }, - "Coverage": { - "additionalProperties": false, - "properties": { - "spatial": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "default": null, - "description": "List of countries where the data was taken from", - "example": "United Kingdom,Wales,England", - "title": "Spatial" - }, - "pathway": { - "anyOf": [ - { - "$ref": "#/$defs/LongDescription" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Long description of the clinical/diagnostic/treatment pathway if applicable. This could include if the dataset is from a single speciality or area, a single tier of care, linked across two tier (e.g. primary and secondary care), or an integrated care record covering the whole patient pathway.", - "example": "The lookup contains references to link data held elsewhere on:\n\u2022 individuals appearing as defendants in criminal cases dealt with by the magistrates' or Crown Court in England and Wales (including Youth Courts). \n\u2022 individuals supervised by the probation service in England and Wales\n\u2022 individuals serving custodial sentences in England & Wales who appear within records from the prison data source, p-NOMIS. Young Offenders are included if resident at prisons or Young Offender Institutes (YOIs) that use p-NOMIS, however, this excludes the majority of Secure Schools and Secure Training Centres. \"\n\n\"The linking dataset includes a person ID and link to record in other data first datasets for: \n\u2022 Disposals in the magistrates\u2019 court from 1 January 2011 to 31 December 2020\n\u2022 Disposals in the Crown Court from 1 January 2013 to 31 December 2020\n\u2022 Custodial sentences of offenders in custody from January 2011 to September 2021 (including sentences begun before 2011) \n\u2022 Offender probation records from January 2014 to December 2020.", - "title": "Pathway" - }, - "followup": { - "anyOf": [ - { - "$ref": "#/$defs/Followup" - }, - { - "type": "null" - } - ], - "default": null, - "description": "What is the typical time span that a patient appears in the dataset (follow up period)", - "example": "CONTINUOUS", - "title": "Followup" - }, - "typicalAgeRange": { - "anyOf": [ - { - "$ref": "#/$defs/AgeRange" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Age range in whole years of participants in the dataset. Please provide range in the following format '[min age] \u2013 [max age]' where both the minimum and maximum are whole numbers (integers).", - "example": "1-150", - "title": "Typical Age Range" - }, - "gender": { - "anyOf": [ - { - "$ref": "#/$defs/Gender" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Male, Female, Other", - "title": "Gender" - }, - "biologicalsamples": { - "anyOf": [ - { - "$ref": "#/$defs/BiologicalSamples" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Blood, Saliva, Urine, Other", - "title": "Biological Samples" - }, - "psychological": { - "anyOf": [ - { - "$ref": "#/$defs/Psychological" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Mental health, Cognitive function", - "title": "Psychological" - }, - "physical": { - "anyOf": [ - { - "$ref": "#/$defs/Physical" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Cardiovascular, Respiratory, Musculoskeletal, Hearing and Vision, Reproductive", - "title": "Physical" - }, - "anthropometric": { - "anyOf": [ - { - "$ref": "#/$defs/Anthropometric" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Height, Weight, Waist circumference, Hip circumference, Blood pressure", - "title": "Anthropometric" - }, - "lifestyle": { - "anyOf": [ - { - "$ref": "#/$defs/Lifestyles" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Cohort lifestyle habits: Smoking, Physical activity, Dietary habits, Alcohol", - "title": "Lifestyle" - }, - "socioeconomic": { - "anyOf": [ - { - "$ref": "#/$defs/SocioEconomic" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Occupation, Family circumstances, Housing, Education, Ethnic group, Martial status, Social support", - "title": "Socio-economic" - } - }, - "title": "Coverage", - "type": "object" - }, - "DataColumn": { - "properties": { - "name": { - "allOf": [ - { - "$ref": "#/$defs/Name" - } - ], - "description": "The name of a column in a table.", - "title": "Column Name" - }, - "dataType": { - "description": "The data type of values in the column", - "title": "Data Type", - "type": "string" - }, - "description": { - "anyOf": [ - { - "maxLength": 20000, - "minLength": 1, - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "A description of a column in a table.", - "title": "Column Description" - }, - "sensitive": { - "description": "A True or False value, indicating if the field is sensitive or not", - "title": "Sensitive", - "type": "boolean" - }, - "values": { - "anyOf": [ - { - "items": { - "$ref": "#/$defs/DataValue" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Data values contained within the column", - "title": "Values" - } - }, - "required": [ - "name", - "dataType", - "sensitive" - ], - "title": "DataColumn", - "type": "object" - }, - "DataTable": { - "additionalProperties": false, - "properties": { - "name": { - "anyOf": [ - { - "maxLength": 500, - "minLength": 1, - "type": "string" - }, - { - "type": "null" - } - ], - "description": "The name of a table in a dataset.", - "title": "Table Name" - }, - "description": { - "anyOf": [ - { - "maxLength": 20000, - "minLength": 1, - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "A description of a table in a dataset.", - "title": "Table Description" - }, - "columns": { - "description": "A list of columns contained within a table in a dataset.", - "items": { - "$ref": "#/$defs/DataColumn" - }, - "title": "Data Columns", - "type": "array" - } - }, - "required": [ - "name", - "columns" - ], - "title": "DataTable", - "type": "object" - }, - "DataValue": { - "properties": { - "name": { - "allOf": [ - { - "$ref": "#/$defs/Name" - } - ], - "description": "Unique value in a column .", - "title": "Value Name" - }, - "description": { - "anyOf": [ - { - "maxLength": 20000, - "minLength": 1, - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "A description of a unique value in a column.", - "title": "Value Description" - }, - "frequency": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "default": null, - "description": "The frequency of occurrance of a value in a column", - "title": "Value Frequency" - } - }, - "required": [ - "name" - ], - "title": "DataValue", - "type": "object" - }, - "DatasetLinkage": { - "additionalProperties": false, - "properties": { - "isDerivedFrom": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Indicate if derived datasets or predefined extracts are available and the type of derivation available. Notes. Single or multiple dimensions can be provided as a derived extract alongside the dataset", - "example": "Data will be minimised as appropriate relative to the data access application", - "title": "Derivations" - }, - "isPartOf": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "default": null, - "description": "If the dataset is part of a group or family", - "example": "UKCRC Tissue Directory and Coordination Centre", - "title": "Is PartOf" - }, - "isMemberOf": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Dataset is a member of XXX(?)", - "title": "Is MemberOf" - }, - "linkedDatasets": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Links to other datasets.", - "example": "Yes. To any SAIL dataset & reference data.,ALL", - "title": "Linked Datasets" - } - }, - "title": "DatasetLinkage", - "type": "object" - }, - "DatasetType": { - "anyOf": [ - { - "maxLength": 100, - "minLength": 2, - "type": "string" - }, - { - "type": "null" - } - ], - "title": "DatasetType" - }, - "DeliveryLeadTime": { - "enum": [ - "LESS 1 WEEK", - "1-2 WEEKS", - "2-4 WEEKS", - "1-2 MONTHS", - "2-6 MONTHS", - "MORE 6 MONTHS", - "VARIABLE", - "NOT APPLICABLE", - "OTHER", - null - ], - "title": "DeliveryLeadTime" - }, - "Doi": { - "anyOf": [ - { - "pattern": "^10.\\d{4,9}/[-._;()/:a-zA-Z0-9]+$", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Doi" - }, - "Followup": { - "enum": [ - "0 - 6 MONTHS", - "6 - 12 MONTHS", - "1 - 10 YEARS", - "> 10 YEARS", - "UNKNOWN", - "CONTINUOUS", - "OTHER", - null - ], - "title": "Followup" - }, - "FormatAndStandards": { - "additionalProperties": false, - "properties": { - "vocabularyEncodingSchemes": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "description": "Code value of the ontology vocabulary encoding", - "example": "OPCS4,NHS NATIONAL CODES,ICD10,OTHER", - "title": "Controlled Vocabulary" - }, - "conformsTo": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "description": "What the vocabulary conforms to.", - "example": "LOCAL,NHS DATA DICTIONARY", - "title": "Conforms To" - }, - "languages": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "description": "Language code(s) of the language of the dataset metadata and underlying data is made available.", - "example": "en", - "title": "Language Code(s)" - }, - "formats": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "description": "Format(s) the dataset can be made available in", - "example": "CSV,JSON,SQL database table", - "title": "Dataset Format" - } - }, - "required": [ - "vocabularyEncodingSchemes", - "conformsTo", - "languages", - "formats" - ], - "title": "FormatAndStandards", - "type": "object" - }, - "Gender": { - "anyOf": [ - { - "pattern": "\\b(?:Male|Female|Other)(?:,(?:Male|Female|Other))*\\b", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Gender" - }, - "Lifestyles": { - "anyOf": [ - { - "pattern": "\\b(?:Smoking|Dietary Habits|Physical Activity|Alcohol)(?:,(?:Smoking|Dietary Habits|Physical Activity|Alcohol))*\\b", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Lifestyles" - }, - "Linkage": { - "additionalProperties": false, - "properties": { - "isGeneratedUsing": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "default": null, - "description": "??", - "title": "Is Generated Using" - }, - "associatedMedia": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Any media associated with the Gateway Organisation using a valid URI for the content. This is an opportunity to provide additional context that could be useful for researchers wanting to understand more about the dataset and its relevance to their research question", - "example": "https://popdatasci.swan.ac.uk/centres-of-excellence/sail/,https://www.youtube.com/watch?v=ZK9-Jw3uVkw,https://saildatabank.com/,https://saildatabank.com/about-us/", - "title": "Associated Media" - }, - "dataUses": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "default": null, - "description": "??", - "title": "Data Uses" - }, - "isReferenceIn": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Rhe keystone paper associated with the dataset. Also include a list of known citations, if available and should be links to existing resources where the dataset has been used or referenced.", - "title": "Is Reference in" - }, - "tools": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "default": null, - "description": "URL of any analysis tools or models that have been created for this dataset and are available for further use", - "example": "https://conceptlibrary.saildatabank.com/", - "title": "Tools" - }, - "datasetLinkage": { - "anyOf": [ - { - "$ref": "#/$defs/DatasetLinkage" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Dataset Linkage copied over from", - "title": "Dataset Linkage" - }, - "investigations": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Please provide the keystone paper associated with the dataset.", - "example": "https://digital.nhs.uk/services/data-access-request-service-dars/register-of-approved-data-releases", - "title": "Investigations" - } - }, - "title": "Linkage", - "type": "object" - }, - "LongAbstractText": { - "anyOf": [ - { - "maxLength": 5000, - "minLength": 5, - "type": "string" - }, - { - "type": "null" - } - ], - "title": "LongAbstractText" - }, - "LongDescription": { - "anyOf": [ - { - "maxLength": 50000, - "minLength": 2, - "type": "string" - }, - { - "type": "null" - } - ], - "title": "LongDescription" - }, - "MeasuredProperty": { - "title": "MeasuredProperty" - }, - "Name": { - "title": "Name" - }, - "Observation": { - "additionalProperties": false, - "properties": { - "observedNode": { - "allOf": [ - { - "$ref": "#/$defs/StatisticalPopulationConstrained" - } - ], - "description": "Please select one of the following statistical populations for you observation", - "examples": [ - "PERSONS" - ], - "title": "Statistical Population" - }, - "measuredValue": { - "description": "Please provide the population size associated with the population type the dataset i.e. 1000 people in a study, or 87 images (MRI) of Knee Usage Note: Used with Statistical Population, which specifies the type of the population in the dataset.", - "title": "Measured Value", - "type": "integer" - }, - "disambiguatingDescription": { - "anyOf": [ - { - "$ref": "#/$defs/AbstractText" - }, - { - "type": "null" - } - ], - "default": null, - "description": "If SNOMED CT term does not provide sufficient detail, please provide a description that disambiguates the population type.", - "title": "Disambiguating Description" - }, - "observationDate": { - "anyOf": [ - { - "format": "date", - "type": "string" - }, - { - "format": "date-time", - "type": "string" - } - ], - "description": "Please provide the date that the observation was made. Some datasets may be continuously updated and the number of records will change regularly, so the observation date provides users with the date that the analysis or query was run to generate the particular observation. Multiple observations can be made i.e. an observation of cumulative COVID positive cases by specimen on the 1/1/2021 could be 2M. On the 8/1/2021 a new observation could be 2.1M. Users can add multiple observations.", - "title": "Observation Date" - }, - "measuredProperty": { - "allOf": [ - { - "$ref": "#/$defs/MeasuredProperty" - } - ], - "description": "Initially this will be defaulted to \"COUNT\"", - "title": "Measured Property" - } - }, - "required": [ - "observedNode", - "measuredValue", - "observationDate", - "measuredProperty" - ], - "title": "Observation", - "type": "object" - }, - "Organisation": { - "properties": { - "name": { - "anyOf": [ - { - "$ref": "#/$defs/Name" - }, - { - "type": "null" - } - ], - "description": "The organisation responsible for running or supporting the data access request process, as well as publishing and maintaining the metadata. In most this will be the same as the HDR UK Organisation (Hub or Alliance Member)/", - "example": "SAIL", - "title": "Name" - }, - "gatewayId": { - "anyOf": [ - { - "maxLength": 50, - "minLength": 2, - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "The link to an ID somewhere in the gateway where more information on the publisher can be retrieved.", - "title": "Publisher gateway id" - }, - "rorId": { - "anyOf": [ - { - "maxLength": 9, - "minLength": 9, - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "The Research Organization Registry (ROR) for the organisation, if applicable", - "title": "Research Organization Registry Identifier" - } - }, - "required": [ - "name" - ], - "title": "Organisation", - "type": "object" - }, - "Origin": { - "additionalProperties": false, - "properties": { - "purpose": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Indicates the purpose(s) that the dataset was collected.", - "example": "ADMINISTRATIVE,STATUTORY", - "title": "Purpose" - }, - "source": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Indicates the source of the data extraction", - "example": "PAPER BASED,ELECTRONIC SURVEY", - "title": "Source" - }, - "collectionSituation": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Indicate the setting(s) where data was collected. Multiple settings may be provided", - "example": "IN-PATIENTS,PRIMARY CARE", - "title": "Setting" - } - }, - "title": "Origin", - "type": "object" - }, - "Periodicity": { - "enum": [ - "STATIC", - "IRREGULAR", - "CONTINUOUS", - "BIENNIAL", - "ANNUAL", - "BIANNUAL", - "QUARTERLY", - "BIMONTHLY", - "MONTHLY", - "BIWEEKLY", - "WEEKLY", - "SEMIWEEKLY", - "DAILY", - "OTHER", - null - ], - "title": "Periodicity" - }, - "Physical": { - "anyOf": [ - { - "pattern": "\\b(?:Respiratory|Vision|Hearing|Musculoskeletal|Cardiovascular|Reproductive)(?:,(?:Respiratory|Vision|Hearing|Musculoskeletal|Cardiovascular|Reproductive))*\\b", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Physical" - }, - "Provenance": { - "additionalProperties": false, - "properties": { - "origin": { - "anyOf": [ - { - "$ref": "#/$defs/Origin" - }, - { - "type": "null" - } - ], - "default": null - }, - "temporal": { - "$ref": "#/$defs/Temporal" - } - }, - "required": [ - "temporal" - ], - "title": "Provenance", - "type": "object" - }, - "Psychological": { - "anyOf": [ - { - "pattern": "\\b(?:Cognitive Function|Mental Health)(?:,(?:Cognitive Function|Mental Health))*\\b", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Psychological" - }, - "Required": { - "properties": { - "gatewayId": { - "description": "Need a field in Mauro that captures the datasetID to link to gateway database - or can we just use the one created in Mauro?", - "maxLength": 50, - "minLength": 2, - "title": "Gatewayid", - "type": "string" - }, - "gatewayPid": { - "description": "Need a field in Mauro that captures the dataset pid to link to gateway database", - "maxLength": 50, - "minLength": 2, - "title": "Gatewaypid", - "type": "string" - }, - "issued": { - "description": "Aren't issued and modified always the same because of versioning? Is that fine to duplicate because datasets in dcat might look different?", - "format": "date-time", - "title": "Issued", - "type": "string" - }, - "modified": { - "description": "Aren't issued and modified always the same because of versioning? Is that fine to duplicate because datasets in dcat might look different?", - "format": "date-time", - "title": "Modified", - "type": "string" - }, - "revisions": { - "items": { - "$ref": "#/$defs/Revision" - }, - "title": "Revisions", - "type": "array" - }, - "version": { - "description": "Dataset metadata version", - "examples": [ - "1.1.0" - ], - "maxLength": 100, - "minLength": 2, - "title": "Dataset Version", - "type": "string" - } - }, - "required": [ - "gatewayId", - "gatewayPid", - "issued", - "modified", - "revisions", - "version" - ], - "title": "Required", - "type": "object" - }, - "Revision": { - "properties": { - "version": { - "description": "Version number used for previous version of this dataset", - "example": "6.0.0", - "maxLength": 100, - "minLength": 2, - "title": "revision version", - "type": "string" - }, - "url": { - "allOf": [ - { - "$ref": "#/$defs/Url" - } - ], - "description": "Some url with a reference to the record of a previous version of this dataset", - "example": "https://api.service.nhs.uk/health-research-data-catalogue/datasetrevisions/841f7da2-b018-41f6-b4ae-2e0aadab6561", - "title": "revision url" - } - }, - "required": [ - "version", - "url" - ], - "title": "Revision", - "type": "object" - }, - "ShortTitle": { - "anyOf": [ - { - "maxLength": 100, - "minLength": 2, - "type": "string" - }, - { - "type": "null" - } - ], - "title": "ShortTitle" - }, - "SocioEconomic": { - "anyOf": [ - { - "pattern": "\\b(?:Finances|Family Circumstances|Housing|Education|Marital Status|Occupation|Ethnic Group|Social Support)(?:,(?:Finances|Family Circumstances|Housing|Education|Marital Status|Occupation|Ethnic Group|Social Support))*\\b", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "SocioEconomic" - }, - "StatisticalPopulationConstrained": { - "enum": [ - "PERSONS", - "EVENTS", - "FINDINGS" - ], - "title": "StatisticalPopulationConstrained", - "type": "string" - }, - "Summary": { - "properties": { - "title": { - "allOf": [ - { - "$ref": "#/$defs/TwoHundredFiftyFiveCharacters" - } - ], - "description": "The main title of the dataset", - "example": "Publications that mention HDR-UK (or any variant thereof) in Acknowledgements or Author Affiliations", - "title": "Title" - }, - "shortTitle": { - "anyOf": [ - { - "$ref": "#/$defs/ShortTitle" - }, - { - "type": "null" - } - ], - "description": "A shorter descriptive title of the dataset", - "example": "ONS 2011 Census Wales (CENW)", - "title": "Shorttitle" - }, - "doiName": { - "anyOf": [ - { - "$ref": "#/$defs/Doi" - }, - { - "type": "null" - } - ], - "description": "DOI associated to this dataset", - "example": "10.1093/ije/dyx196", - "title": "Doiname" - }, - "abstract": { - "allOf": [ - { - "$ref": "#/$defs/LongAbstractText" - } - ], - "description": "Longer abstract detailing the dataset.", - "example": "COVID-19 Key Worker Testing Results data is required by NHS Digital to support COVID-19 requests for linkage, analysis and dissemination to other organisations who require the data in a timely manner.", - "title": "Abstract" - }, - "keywords": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "description": "Comma separated key words associated to this dataset.", - "example": "Preprints,Papers,HDR UK", - "title": "Keywords" - }, - "controlledKeywords": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "description": "Keywords that have been filtered and limited", - "title": "Controlled Keywords" - }, - "contactPoint": { - "anyOf": [ - { - "format": "email", - "type": "string" - }, - { - "type": "null" - } - ], - "description": "email of a person who can be the main contact point of this dataset", - "example": "susheel.varma@hdruk.ac.uk", - "title": "Contact Point" - }, - "datasetType": { - "anyOf": [ - { - "$ref": "#/$defs/DatasetType" - }, - { - "type": "null" - } - ], - "description": "What type of dataset is this?", - "title": "Dataset type" - }, - "description": { - "anyOf": [ - { - "$ref": "#/$defs/LongDescription" - }, - { - "type": "null" - } - ], - "description": "Longer description of the dataset in detail", - "example": "Publications that mention HDR-UK (or any variant thereof) in Acknowledgements or Author Affiliations\n\nThis will include:\n- Papers\n- COVID-19 Papers\n- COVID-19 Preprint", - "title": "Description" - }, - "publisher": { - "anyOf": [ - { - "$ref": "#/$defs/Organisation" - }, - { - "type": "null" - } - ], - "description": "Link to details about the publisher of this dataset", - "title": "Publisher" - } - }, - "required": [ - "title", - "shortTitle", - "doiName", - "abstract", - "keywords", - "controlledKeywords", - "contactPoint", - "datasetType", - "description", - "publisher" - ], - "title": "Summary", - "type": "object" - }, - "Temporal": { - "additionalProperties": false, - "properties": { - "startDate": { - "anyOf": [ - { - "format": "date", - "type": "string" - }, - { - "format": "date-time", - "type": "string" - }, - { - "type": "null" - } - ], - "description": "The start of the time period that the dataset provides coverage for", - "example": "12/03/2020", - "title": "Start Date" - }, - "endDate": { - "anyOf": [ - { - "format": "date", - "type": "string" - }, - { - "format": "date-time", - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "The end of the time period that the dataset provides coverage for", - "example": "12/03/2020", - "title": "End Date" - }, - "timeLag": { - "allOf": [ - { - "$ref": "#/$defs/TimeLag" - } - ], - "description": "Rypical time-lag between an event and the data for that event appearing in the dataset", - "example": "LESS 1 WEEK", - "title": "Time Lag" - }, - "accrualPeriodicity": { - "allOf": [ - { - "$ref": "#/$defs/Periodicity" - } - ], - "description": "frequency of distribution release. If a dataset is distributed regularly please choose a distribution release periodicity from the constrained list and indicate the next release date. When the release date becomes historical, a new release date will be calculated based on the publishing periodicity.", - "example": "MONTHLY" - }, - "distributionReleaseDate": { - "anyOf": [ - { - "format": "date", - "type": "string" - }, - { - "format": "date-time", - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Date of the latest release of the dataset. If this is a regular release i.e. quarterly, or this is a static dataset please complete this alongside Periodicity.", - "title": "Release Date" - } - }, - "required": [ - "startDate", - "timeLag", - "accrualPeriodicity" - ], - "title": "Temporal", - "type": "object" - }, - "TimeLag": { - "enum": [ - "LESS 1 WEEK", - "1-2 WEEKS", - "2-4 WEEKS", - "1-2 MONTHS", - "2-6 MONTHS", - "MORE 6 MONTHS", - "VARIABLE", - "NO TIMELAG", - "NOT APPLICABLE", - "OTHER", - null - ], - "title": "TimeLag" - }, - "TwoHundredFiftyFiveCharacters": { - "maxLength": 255, - "minLength": 2, - "title": "TwoHundredFiftyFiveCharacters", - "type": "string" - }, - "Url": { - "anyOf": [ - { - "format": "uri", - "minLength": 1, - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Url" - }, - "Usage": { - "additionalProperties": false, - "properties": { - "dataUseLimitation": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "description": "Any restrictions to its usage", - "example": "GENERAL RESEARCH USE,PROJECT SPECIFIC RESTRICTIONS", - "title": "Data Use Limitation" - }, - "dataUseRequirement": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "description": "Any requirements needed for data usage", - "example": "PROJECT SPECIFIC RESTRICTIONS,TIME LIMIT ON USE,USER SPECIFIC RESTRICTION", - "title": "Data Use Requirements" - }, - "resourceCreator": { - "anyOf": [ - { - "$ref": "#/$defs/Organisation" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Who has created this resource", - "title": "Resource Creator" - } - }, - "required": [ - "dataUseLimitation", - "dataUseRequirement" - ], - "title": "Usage", - "type": "object" - } - }, - "additionalProperties": false, - "properties": { - "required": { - "allOf": [ - { - "$ref": "#/$defs/Required" - } - ], - "description": "required metadata needed for the GWDM" - }, - "summary": { - "allOf": [ - { - "$ref": "#/$defs/Summary" - } - ], - "description": "Summary of metadata describing key pieces of information." - }, - "coverage": { - "anyOf": [ - { - "$ref": "#/$defs/Coverage" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Observational, Spatial and Temporal coverage", - "title": "Coverage" - }, - "provenance": { - "anyOf": [ - { - "$ref": "#/$defs/Provenance" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Provenance information", - "title": "Provenance" - }, - "accessibility": { - "allOf": [ - { - "$ref": "#/$defs/Accessibility" - } - ], - "default": null, - "description": "Accessibility information.", - "title": "Accessibility" - }, - "linkage": { - "anyOf": [ - { - "$ref": "#/$defs/Linkage" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Linkage and enrichment.", - "title": "Linkage" - }, - "observations": { - "anyOf": [ - { - "items": { - "$ref": "#/$defs/Observation" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Obsservations", - "title": "Observations" - }, - "structuralMetadata": { - "anyOf": [ - { - "items": { - "$ref": "#/$defs/DataTable" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Descriptions of all tables and data elements that can be included in the dataset", - "title": "Structural Metadata" - } - }, - "required": [ - "required", - "summary" - ], - "title": "Gwdm11", - "type": "object" -} \ No newline at end of file From ef2d5b4987ebddca7f15eb2a4bf01c8695c4106e Mon Sep 17 00:00:00 2001 From: Calum Macdonald Date: Tue, 30 Jan 2024 11:26:39 +0000 Subject: [PATCH 12/21] revert a file --- hdr_schemata/models/GWDM/v1_0/Summary.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/hdr_schemata/models/GWDM/v1_0/Summary.py b/hdr_schemata/models/GWDM/v1_0/Summary.py index 0bf81f8..047de76 100644 --- a/hdr_schemata/models/GWDM/v1_0/Summary.py +++ b/hdr_schemata/models/GWDM/v1_0/Summary.py @@ -1,14 +1,10 @@ -from typing import List, Optional -from pydantic import AnyUrl, BaseModel, EmailStr, Field -from hdr_schemata.definitions.HDRUK import ( - TwoHundredFiftyFiveCharacters, - ShortTitle, - Doi, - LongAbstractText, - CommaSeparatedValues, - DatasetType, - LongDescription -) +from datetime import date, datetime +from enum import Enum +from typing import List, Optional, Union + +from pydantic import AnyUrl, BaseModel, EmailStr, Field, constr + +from hdr_schemata.definitions.HDRUK import * from .Publisher import Publisher From 2bd10d6a5f25f976de7a7442fbda1975f3714c61 Mon Sep 17 00:00:00 2001 From: Calum Macdonald Date: Tue, 30 Jan 2024 11:41:36 +0000 Subject: [PATCH 13/21] remove these latest folders --- available.json | 4 +- .../models/HDRUK/latest/dev/schema.json | 2014 ----------------- 2 files changed, 1 insertion(+), 2017 deletions(-) delete mode 100644 hdr_schemata/models/HDRUK/latest/dev/schema.json diff --git a/available.json b/available.json index 59ef841..574f710 100644 --- a/available.json +++ b/available.json @@ -2,14 +2,12 @@ "HDRUK": [ "2.1.2", "2.1.3", - "latest", "2.1.0", "2.0.2" ], "GWDM": [ "1.0", - "1.1", - "latest" + "1.1" ], "SchemaOrg": [ "default", diff --git a/hdr_schemata/models/HDRUK/latest/dev/schema.json b/hdr_schemata/models/HDRUK/latest/dev/schema.json deleted file mode 100644 index 798be21..0000000 --- a/hdr_schemata/models/HDRUK/latest/dev/schema.json +++ /dev/null @@ -1,2014 +0,0 @@ -{ - "$defs": { - "AbstractText": { - "anyOf": [ - { - "maxLength": 500, - "minLength": 5, - "type": "string" - }, - { - "type": "null" - } - ], - "title": "AbstractText" - }, - "Access": { - "additionalProperties": false, - "properties": { - "accessRights": { - "anyOf": [ - { - "$ref": "#/$defs/LongDescription" - }, - { - "type": "null" - } - ], - "title": "Access Rights" - }, - "accessService": { - "anyOf": [ - { - "$ref": "#/$defs/LongDescription" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Please provide a brief description of the data access services that are available including: environment that is currently available to researchers;additional consultancy and services;any indication of costs associated. If no environment is currently available, please indicate the current plans and timelines when and how data will be made available to researchers Note: This value will be used as default access environment for all datasets submitted by the organisation. However, there will be the opportunity to overwrite this value for each dataset.", - "examples": [ - "https://cnfl.extge.co.uk/display/GERE/Research+Environment+User+Guide" - ], - "title": "Access Service" - }, - "accessRequestCost": { - "anyOf": [ - { - "$ref": "#/$defs/LongDescription" - }, - { - "items": { - "anyOf": [ - { - "$ref": "#/$defs/Url" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Please provide link(s) to a webpage detailing the commercial model for processing data access requests for the organisation (if available) Definition: Indication of commercial model or cost (in GBP) for processing each data access request by the data custodian.", - "title": "Organisation Access Request Cost" - }, - "deliveryLeadTime": { - "anyOf": [ - { - "$ref": "#/$defs/DeliveryLeadTime" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Please provide an indication of the typical processing times based on the types of requests typically received.", - "title": "Access Request Duration" - }, - "jurisdiction": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "items": { - "$ref": "#/$defs/Isocountrycode" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "description": "Please use country code from ISO 3166-1 country codes and the associated ISO 3166-2 for regions, cities, states etc. for the country/state under whose laws the data subjects' data is collected, processed and stored.", - "title": "Jurisdiction" - }, - "dataController": { - "anyOf": [ - { - "$ref": "#/$defs/LongDescription" - }, - { - "type": "null" - } - ], - "description": "Data Controller means a person/entity who (either alone or jointly or in common with other persons/entities) determines the purposes for which and the way any Data Subject data, specifically personal data or are to be processed.", - "title": "Data Controller" - }, - "dataProcessor": { - "anyOf": [ - { - "$ref": "#/$defs/LongDescription" - }, - { - "type": "null" - } - ], - "default": null, - "description": "A Data Processor, in relation to any Data Subject data, specifically personal data, means any person/entity (other than an employee of the data controller) who processes the data on behalf of the data controller.", - "title": "Data Processor" - } - }, - "required": [ - "accessRights", - "jurisdiction", - "dataController" - ], - "title": "Access", - "type": "object" - }, - "Accessibility": { - "additionalProperties": false, - "properties": { - "usage": { - "anyOf": [ - { - "$ref": "#/$defs/Usage" - }, - { - "type": "null" - } - ], - "default": null, - "description": "This section includes information about how the data can be used and how it is currently being used", - "title": "Usage" - }, - "access": { - "allOf": [ - { - "$ref": "#/$defs/Access" - } - ], - "description": "This section includes information about data access" - }, - "formatAndStandards": { - "anyOf": [ - { - "$ref": "#/$defs/FormatAndStandards" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Section includes technical attributes for language vocabularies, sizes etc. and gives researchers facts about and processing the underlying data in the dataset.", - "title": "Format and Standards" - } - }, - "required": [ - "access" - ], - "title": "Accessibility", - "type": "object" - }, - "AgeRange": { - "anyOf": [ - { - "pattern": "Not Known|(150|1[0-4][0-9]|[0-9]|[1-8][0-9]|9[0-9])-(150|1[0-4][0-9]|[0-9]|[1-8][0-9]|9[0-9])", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "AgeRange" - }, - "CommaSeparatedValues": { - "anyOf": [ - { - "pattern": "([^,]+)", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "CommaSeparatedValues" - }, - "ControlledVocabulary": { - "anyOf": [ - { - "$ref": "#/$defs/ControlledVocabularyEnum" - }, - { - "type": "null" - } - ], - "default": null, - "title": "ControlledVocabulary" - }, - "ControlledVocabularyEnum": { - "enum": [ - "LOCAL", - "OPCS4", - "READ", - "SNOMED CT", - "SNOMED RT", - "DM PLUS D", - "DM+D", - "NHS NATIONAL CODES", - "NHS SCOTLAND NATIONAL CODES", - "NHS WALES NATIONAL CODES", - "ODS", - "LOINC", - "ICD10", - "ICD10CM", - "ICD10PCS", - "ICD9CM", - "ICD9", - "ICDO3", - "AMT", - "APC", - "ATC", - "CIEL", - "HPO", - "CPT4", - "DPD", - "DRG", - "HEMONC", - "JMDC", - "KCD7", - "MULTUM", - "NAACCR", - "NDC", - "NDFRT", - "OXMIS", - "RXNORM", - "RXNORM EXTENSION", - "SPL", - "OTHER" - ], - "title": "ControlledVocabularyEnum", - "type": "string" - }, - "Coverage": { - "additionalProperties": false, - "properties": { - "spatial": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "items": { - "anyOf": [ - { - "$ref": "#/$defs/Url" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "description": "The geographical area covered by the dataset. It is recommended that links are to entries in a well-maintained gazetteer such as https://www.geonames.org/ or https://what3words.com/daring.lion.race.", - "examples": [ - "https://www.geonames.org/2635167/united-kingdom-of-great-britain-and-northern-ireland.html" - ], - "title": "Geographic Coverage" - }, - "typicalAgeRange": { - "anyOf": [ - { - "$ref": "#/$defs/AgeRange" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Please indicate the age range in whole years of participants in the dataset. Please provide range in the following format '[min age] \u2013 [max age]' where both the minimum and maximum are whole numbers (integers).", - "title": "Age Range" - }, - "physicalSampleAvailability": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "items": {}, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Availability of physical samples associated with the dataset. If samples are available, please indicate the types of samples that are available. More than one type may be provided. If sample are not yet available, please provide \u201cAVAILABILITY TO BE CONFIRMED\u201d. If samples are not available, then please provide \u201cNOT AVAILABLE\u201d.", - "examples": [ - "BONE MARROW" - ], - "title": "Physical Sample Availability" - }, - "followup": { - "anyOf": [ - { - "$ref": "#/$defs/Followup" - }, - { - "type": "null" - } - ], - "default": "UNKNOWN", - "description": "If known, what is the typical time span that a patient appears in the dataset (follow up period)", - "title": "Followup" - }, - "pathway": { - "anyOf": [ - { - "$ref": "#/$defs/Description" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Please indicate if the dataset is representative of the patient pathway and any limitations the dataset may have with respect to pathway coverage. This could include if the dataset is from a single speciality or area, a single tier of care, linked across two tiers (e.g. primary and secondary care), or an integrated care record covering the whole patient pathway.", - "title": "Pathway" - } - }, - "title": "Coverage", - "type": "object" - }, - "DataClass": { - "additionalProperties": false, - "properties": { - "name": { - "anyOf": [ - { - "maxLength": 500, - "minLength": 1, - "type": "string" - }, - { - "type": "null" - } - ], - "description": "The name of a table in a dataset.", - "title": "Table Name" - }, - "description": { - "anyOf": [ - { - "maxLength": 20000, - "minLength": 1, - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "A description of a table in a dataset.", - "title": "Table Description" - }, - "elements": { - "description": "A list of data elements contained within a table in a dataset.", - "items": { - "$ref": "#/$defs/DataElement" - }, - "title": "Data Elements", - "type": "array" - } - }, - "required": [ - "name", - "elements" - ], - "title": "DataClass", - "type": "object" - }, - "DataElement": { - "additionalProperties": true, - "properties": { - "name": { - "allOf": [ - { - "$ref": "#/$defs/Name" - } - ], - "description": "The name of a column in a table.", - "title": "Column Name" - }, - "dataType": { - "description": "The data type of values in the column", - "title": "Data Type", - "type": "string" - }, - "description": { - "anyOf": [ - { - "maxLength": 20000, - "minLength": 1, - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "A description of a column in a table.", - "title": "Column Description" - }, - "sensitive": { - "description": "A True or False value, indicating if the field is sensitive or not", - "title": "Sensitive", - "type": "boolean" - } - }, - "required": [ - "name", - "dataType", - "sensitive" - ], - "title": "DataElement", - "type": "object" - }, - "DataUseLimitation": { - "enum": [ - "GENERAL RESEARCH USE", - "COMMERCIAL RESEARCH USE", - "GENETIC STUDIES ONLY", - "NO GENERAL METHODS RESEARCH", - "NO RESTRICTION", - "GEOGRAPHICAL RESTRICTIONS", - "INSTITUTION SPECIFIC RESTRICTIONS", - "NOT FOR PROFIT USE", - "PROJECT SPECIFIC RESTRICTIONS", - "RESEARCH SPECIFIC RESTRICTIONS", - "USER SPECIFIC RESTRICTION", - "RESEARCH USE ONLY", - "NO LINKAGE" - ], - "title": "DataUseLimitation", - "type": "string" - }, - "DataUseRequirements": { - "enum": [ - "COLLABORATION REQUIRED", - "PROJECT SPECIFIC RESTRICTIONS", - "ETHICS APPROVAL REQUIRED", - "INSTITUTION SPECIFIC RESTRICTIONS", - "GEOGRAPHICAL RESTRICTIONS", - "PUBLICATION MORATORIUM", - "PUBLICATION REQUIRED", - "RETURN TO DATABASE OR RESOURCE", - "TIME LIMIT ON USE", - "DISCLOSURE CONTROL", - "NOT FOR PROFIT USE", - "USER SPECIFIC RESTRICTION", - null - ], - "title": "DataUseRequirements" - }, - "DeliveryLeadTime": { - "enum": [ - "LESS 1 WEEK", - "1-2 WEEKS", - "2-4 WEEKS", - "1-2 MONTHS", - "2-6 MONTHS", - "MORE 6 MONTHS", - "VARIABLE", - "NOT APPLICABLE", - "OTHER", - null - ], - "title": "DeliveryLeadTime" - }, - "Description": { - "anyOf": [ - { - "maxLength": 10000, - "minLength": 2, - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description" - }, - "Documentation": { - "additionalProperties": false, - "properties": { - "description": { - "anyOf": [ - { - "$ref": "#/$defs/Description" - }, - { - "type": "null" - } - ], - "default": null, - "description": "A free-text description of the record.", - "title": "Description" - }, - "associatedMedia": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "items": { - "anyOf": [ - { - "$ref": "#/$defs/Url" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Please provide any media associated with the Gateway Organisation using a valid URI for the content. This is an opportunity to provide additional context that could be useful for researchers wanting to understand more about the dataset and its relevance to their research question. The following formats will be accepted .jpg, .png or .svg, .pdf, .xslx or .docx. Note: media asset can be hosted by the organisation or uploaded using the onboarding portal.", - "examples": [ - "PDF Document that describes study protocol" - ], - "title": "Associated Media" - }, - "isPartOf": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "items": { - "anyOf": [ - { - "$ref": "#/$defs/Url" - }, - { - "$ref": "#/$defs/OneHundredFiftyCharacters" - }, - { - "$ref": "#/$defs/IsPartOfEnum" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": "NOT APPLICABLE", - "description": "Please complete only if the dataset is part of a group or family", - "examples": [ - "Hospital Episodes Statistics datasets (A&E, APC, OP, AC MSDS)." - ], - "title": "Group" - } - }, - "title": "Documentation", - "type": "object" - }, - "Doi": { - "anyOf": [ - { - "pattern": "^10.\\d{4,9}/[-._;()/:a-zA-Z0-9]+$", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Doi" - }, - "EmailAddress": { - "anyOf": [ - { - "format": "email", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "EmailAddress" - }, - "EndDateEnum": { - "enum": [ - "CONTINUOUS", - null - ], - "title": "EndDateEnum" - }, - "EnrichmentAndLinkage": { - "additionalProperties": false, - "properties": { - "qualifiedRelation": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "items": { - "anyOf": [ - { - "$ref": "#/$defs/Url" - }, - { - "$ref": "#/$defs/OneHundredFiftyCharacters" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "description": "If applicable, please provide the DOI of other datasets that have previously been linked to this dataset and their availability. If no DOI is available, please provide the title of the datasets that can be linked, where possible using the same title of a dataset previously onboarded to the HOP. Note: If all the datasets from Gateway organisation can be linked please indicate \u201cALL\u201d and the onboarding portal will automate linkage across the datasets submitted.", - "title": "Linked Datasets" - }, - "derivation": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "items": { - "anyOf": [ - { - "$ref": "#/$defs/AbstractText" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Indicate if derived datasets or predefined extracts are available and the type of derivation available. Notes. Single or multiple dimensions can be provided as a derived extract alongside the dataset.", - "title": "Derivations" - }, - "tools": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "items": { - "anyOf": [ - { - "$ref": "#/$defs/Url" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Please provide the URL of any analysis tools or models that have been created for this dataset and are available for further use. Multiple tools may be provided. Note: We encourage users to adopt a model along the lines of https://www.ga4gh.org/news/tool-registry-service-api-enabling-an-interoperable-library-of-genomics-analysis-tools/", - "title": "Tools" - } - }, - "title": "EnrichmentAndLinkage", - "type": "object" - }, - "Followup": { - "enum": [ - "0 - 6 MONTHS", - "6 - 12 MONTHS", - "1 - 10 YEARS", - "> 10 YEARS", - "UNKNOWN", - "CONTINUOUS", - "OTHER", - null - ], - "title": "Followup" - }, - "Format": { - "minLength": 1, - "title": "Format", - "type": "string" - }, - "FormatAndStandards": { - "additionalProperties": false, - "properties": { - "vocabularyEncodingScheme": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "items": { - "$ref": "#/$defs/ControlledVocabulary" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "description": "List any relevant terminologies / ontologies / controlled vocabularies, such as ICD 10 Codes, NHS Data Dictionary National Codes or SNOMED CT International, that are being used by the dataset. If the controlled vocabularies are local standards, please make that explicit. If you are using a standard that has not been included in the list, please use \u201cother\u201d and contact support desk to ask for an addition. Notes: More than one vocabulary may be provided.", - "title": "Controlled Vocabulary" - }, - "conformsTo": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "items": { - "$ref": "#/$defs/StandardisedDataModels" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "description": "List standardised data models that the dataset has been stored in or transformed to, such as OMOP or FHIR. If the data is only available in a local format, please make that explicit. If you are using a standard that has not been included in the list, please use \u201cother\u201d and contact support desk to ask for an addition.", - "title": "Conforms To" - }, - "language": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "items": { - "$ref": "#/$defs/Language" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "description": "This should list all the languages in which the dataset metadata and underlying data is made available.", - "title": "Language" - }, - "format": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "items": { - "$ref": "#/$defs/Format" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "description": "If multiple formats are available please specify. See application, audio, image, message, model, multipart, text, video, https://www.iana.org/assignments/media-types/media-types.xhtml Note: If your file format is not included in the current list of formats, please indicate other. If you are using the HOP you will be directed to a service desk page where you can request your additional format. If not please go to: https://metadata.atlassian.net/servicedesk/customer/portal/4 to request your format.", - "title": "Format" - } - }, - "required": [ - "vocabularyEncodingScheme", - "conformsTo", - "language", - "format" - ], - "title": "FormatAndStandards", - "type": "object" - }, - "IsPartOfEnum": { - "const": "NOT APPLICABLE", - "title": "IsPartOfEnum" - }, - "Isocountrycode": { - "pattern": "^[A-Z]{2}(-[A-Z]{2,3})?$", - "title": "Isocountrycode", - "type": "string" - }, - "Language": { - "anyOf": [ - { - "$ref": "#/$defs/LanguageEnum" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Language" - }, - "LanguageEnum": { - "enum": [ - "aa", - "ab", - "ae", - "af", - "ak", - "am", - "an", - "ar", - "as", - "av", - "ay", - "az", - "ba", - "be", - "bg", - "bh", - "bi", - "bm", - "bn", - "bo", - "br", - "bs", - "ca", - "ce", - "ch", - "co", - "cr", - "cs", - "cu", - "cv", - "cy", - "da", - "de", - "dv", - "dz", - "ee", - "el", - "en", - "eo", - "es", - "et", - "eu", - "fa", - "ff", - "fi", - "fj", - "fo", - "fr", - "fy", - "ga", - "gd", - "gl", - "gn", - "gu", - "gv", - "ha", - "he", - "hi", - "ho", - "hr", - "ht", - "hu", - "hy", - "hz", - "ia", - "id", - "ie", - "ig", - "ii", - "ik", - "io", - "is", - "it", - "iu", - "ja", - "jv", - "ka", - "kg", - "ki", - "kj", - "kk", - "kl", - "km", - "kn", - "ko", - "kr", - "ks", - "ku", - "kv", - "kw", - "ky", - "la", - "lb", - "lg", - "li", - "ln", - "lo", - "lt", - "lu", - "lv", - "mg", - "mh", - "mi", - "mk", - "ml", - "mn", - "mr", - "ms", - "mt", - "my", - "na", - "nb", - "nd", - "ne", - "ng", - "nl", - "nn", - "no", - "nr", - "nv", - "ny", - "oc", - "oj", - "om", - "or", - "os", - "pa", - "pi", - "pl", - "ps", - "pt", - "qu", - "rm", - "rn", - "ro", - "ru", - "rw", - "sa", - "sc", - "sd", - "se", - "sg", - "si", - "sk", - "sl", - "sm", - "sn", - "so", - "sq", - "sr", - "ss", - "st", - "su", - "sv", - "sw", - "ta", - "te", - "tg", - "th", - "ti", - "tk", - "tl", - "tn", - "to", - "tr", - "ts", - "tt", - "tw", - "ty", - "ug", - "uk", - "ur", - "uz", - "ve", - "vi", - "vo", - "wa", - "wo", - "xh", - "yi", - "yo", - "za", - "zh", - "zu" - ], - "title": "LanguageEnum", - "type": "string" - }, - "LongDescription": { - "anyOf": [ - { - "maxLength": 50000, - "minLength": 2, - "type": "string" - }, - { - "type": "null" - } - ], - "title": "LongDescription" - }, - "MeasuredProperty": { - "title": "MeasuredProperty" - }, - "MemberOf": { - "enum": [ - "HUB", - "ALLIANCE", - "OTHER", - "NCS" - ], - "title": "MemberOf", - "type": "string" - }, - "Name": { - "title": "Name" - }, - "Observation": { - "additionalProperties": false, - "properties": { - "observedNode": { - "allOf": [ - { - "$ref": "#/$defs/StatisticalPopulationConstrained" - } - ], - "description": "Please select one of the following statistical populations for you observation", - "examples": [ - "PERSONS" - ], - "title": "Statistical Population" - }, - "measuredValue": { - "description": "Please provide the population size associated with the population type the dataset i.e. 1000 people in a study, or 87 images (MRI) of Knee Usage Note: Used with Statistical Population, which specifies the type of the population in the dataset.", - "title": "Measured Value", - "type": "integer" - }, - "disambiguatingDescription": { - "anyOf": [ - { - "$ref": "#/$defs/AbstractText" - }, - { - "type": "null" - } - ], - "default": null, - "description": "If SNOMED CT term does not provide sufficient detail, please provide a description that disambiguates the population type.", - "title": "Disambiguating Description" - }, - "observationDate": { - "anyOf": [ - { - "format": "date", - "type": "string" - }, - { - "format": "date-time", - "type": "string" - } - ], - "description": "Please provide the date that the observation was made. Some datasets may be continuously updated and the number of records will change regularly, so the observation date provides users with the date that the analysis or query was run to generate the particular observation. Multiple observations can be made i.e. an observation of cumulative COVID positive cases by specimen on the 1/1/2021 could be 2M. On the 8/1/2021 a new observation could be 2.1M. Users can add multiple observations.", - "title": "Observation Date" - }, - "measuredProperty": { - "allOf": [ - { - "$ref": "#/$defs/MeasuredProperty" - } - ], - "description": "Initially this will be defaulted to \"COUNT\"", - "title": "Measured Property" - } - }, - "required": [ - "observedNode", - "measuredValue", - "observationDate", - "measuredProperty" - ], - "title": "Observation", - "type": "object" - }, - "OneHundredFiftyCharacters": { - "maxLength": 150, - "minLength": 2, - "title": "OneHundredFiftyCharacters", - "type": "string" - }, - "Organisation": { - "additionalProperties": false, - "properties": { - "identifier": { - "anyOf": [ - { - "$ref": "#/$defs/Url" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Please provide a Grid.ac identifier (see https://www.grid.ac/institutes) for your organisation. If your organisation does not have a Grid.ac identifier please use the \u201csuggest and institute\u201d function here: https://www.grid.ac/institutes#", - "title": "Organisation Identifier" - }, - "name": { - "allOf": [ - { - "$ref": "#/$defs/OneHundredFiftyCharacters" - } - ], - "description": "Name of the organisation", - "title": "Organisation Name" - }, - "logo": { - "anyOf": [ - { - "$ref": "#/$defs/Url" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Please provide a logo associated with the Gateway Organisation using a valid URL. The following formats will be accepted .jpg, .png or .svg.", - "title": "Organisation Logo" - }, - "description": { - "anyOf": [ - { - "$ref": "#/$defs/Description" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Please provide a URL that describes the organisation.", - "title": "Organisation Description" - }, - "contactPoint": { - "anyOf": [ - { - "$ref": "#/$defs/EmailAddress" - }, - { - "items": { - "anyOf": [ - { - "$ref": "#/$defs/EmailAddress" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "null" - } - ], - "description": "Organisation contact point(s)", - "title": "Organisation Contact Point" - }, - "memberOf": { - "anyOf": [ - { - "$ref": "#/$defs/MemberOf" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Please indicate if the organisation is an Alliance Member or a Hub.", - "title": "Organisation Membership" - } - }, - "required": [ - "name", - "contactPoint" - ], - "title": "Organisation", - "type": "object" - }, - "Origin": { - "additionalProperties": false, - "properties": { - "purpose": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "items": { - "$ref": "#/$defs/Purpose" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Pleases indicate the purpose(s) that the dataset was collected.", - "title": "Purpose" - }, - "source": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "items": { - "$ref": "#/$defs/Source" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Pleases indicate the source of the data extraction", - "title": "Source" - }, - "collectionSituation": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "items": { - "$ref": "#/$defs/Setting" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Pleases indicate the setting(s) where data was collected. Multiple settings may be provided", - "title": "Setting" - } - }, - "title": "Origin", - "type": "object" - }, - "Periodicity": { - "enum": [ - "STATIC", - "IRREGULAR", - "CONTINUOUS", - "BIENNIAL", - "ANNUAL", - "BIANNUAL", - "QUARTERLY", - "BIMONTHLY", - "MONTHLY", - "BIWEEKLY", - "WEEKLY", - "SEMIWEEKLY", - "DAILY", - "OTHER", - null - ], - "title": "Periodicity" - }, - "Provenance": { - "additionalProperties": false, - "properties": { - "origin": { - "anyOf": [ - { - "$ref": "#/$defs/Origin" - }, - { - "type": "null" - } - ], - "default": null - }, - "temporal": { - "$ref": "#/$defs/Temporal" - } - }, - "required": [ - "temporal" - ], - "title": "Provenance", - "type": "object" - }, - "Purpose": { - "enum": [ - "STUDY", - "DISEASE REGISTRY", - "TRIAL", - "CARE", - "AUDIT", - "ADMINISTRATIVE", - "FINANCIAL", - "STATUTORY", - "OTHER", - null - ], - "title": "Purpose" - }, - "Revision": { - "additionalProperties": false, - "properties": { - "version": { - "allOf": [ - { - "$ref": "#/$defs/Semver" - } - ], - "description": "Semantic Version" - }, - "url": { - "anyOf": [ - { - "$ref": "#/$defs/Url" - }, - { - "type": "null" - } - ], - "description": "URL endpoint to obtain the version" - } - }, - "required": [ - "version", - "url" - ], - "title": "Revision", - "type": "object" - }, - "Semver": { - "pattern": "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$", - "title": "Semver", - "type": "string" - }, - "Setting": { - "enum": [ - "CLINIC", - "PRIMARY CARE", - "ACCIDENT AND EMERGENCY", - "OUTPATIENTS", - "IN-PATIENTS", - "SERVICES", - "COMMUNITY", - "HOME", - "PRIVATE", - "PHARMACY", - "SOCIAL CARE", - "LOCAL AUTHORITY", - "NATIONAL GOVERNMENT", - "OTHER" - ], - "title": "Setting", - "type": "string" - }, - "ShortDescription": { - "anyOf": [ - { - "maxLength": 1000, - "minLength": 2, - "type": "string" - }, - { - "type": "null" - } - ], - "title": "ShortDescription" - }, - "Source": { - "enum": [ - "EPR", - "ELECTRONIC SURVEY", - "LIMS", - "OTHER INFORMATION SYSTEM", - "PAPER BASED", - "FREETEXT NLP", - "MACHINE GENERATED", - "OTHER" - ], - "title": "Source", - "type": "string" - }, - "StandardisedDataModels": { - "anyOf": [ - { - "$ref": "#/$defs/StandardisedDataModelsEnum" - }, - { - "type": "null" - } - ], - "default": null, - "title": "StandardisedDataModels" - }, - "StandardisedDataModelsEnum": { - "enum": [ - "HL7 FHIR", - "HL7 V2", - "HL7 CDA", - "HL7 CCOW", - "LOINC", - "DICOM", - "I2B2", - "IHE", - "OMOP", - "OPENEHR", - "SENTINEL", - "PCORNET", - "CDISC", - "NHS DATA DICTIONARY", - "NHS SCOTLAND DATA DICTIONARY", - "NHS WALES DATA DICTIONARY", - "LOCAL", - "OTHER" - ], - "title": "StandardisedDataModelsEnum", - "type": "string" - }, - "StatisticalPopulationConstrained": { - "enum": [ - "PERSONS", - "EVENTS", - "FINDINGS" - ], - "title": "StatisticalPopulationConstrained", - "type": "string" - }, - "Summary": { - "additionalProperties": false, - "properties": { - "title": { - "allOf": [ - { - "$ref": "#/$defs/OneHundredFiftyCharacters" - } - ], - "description": "Title of the dataset limited to 150 characters. It should provide a short description of the dataset and be unique across the gateway. If your title is not unique, please add a prefix with your organisation name or identifier to differentiate it from other datasets within the Gateway. Please avoid acronyms wherever possible. Good titles should summarise the content of the dataset and if relevant, the region the dataset covers.", - "examples": [ - [ - "North West London COVID-19 Patient Level Situation Report" - ] - ], - "title": "Title" - }, - "abstract": { - "anyOf": [ - { - "$ref": "#/$defs/AbstractText" - }, - { - "type": "null" - } - ], - "description": "Provide a clear and brief descriptive signpost for researchers who are searching for data that may be relevant to their research. The abstract should allow the reader to determine the scope of the data collection and accurately summarise its content. The optimal length is one paragraph (limited to 255 characters) and effective abstracts should avoid long sentences and abbreviations where possible", - "examples": [ - "CPRD Aurum contains primary care data contributed by General Practitioner (GP) practices using EMIS Web\u00ae including patient registration information and all care events that GPs have chosen to record as part of their usual medical practice." - ], - "title": "Dataset Abstract" - }, - "publisher": { - "allOf": [ - { - "$ref": "#/$defs/Organisation" - } - ], - "description": "This is the organisation responsible for running or supporting the data access request process, as well as publishing and maintaining the metadata. In most this will be the same as the HDR UK Organisation (Hub or Alliance Member). However, in some cases this will be different i.e. Tissue Directory are an HDR UK Gateway organisation but coordinate activities across a number of data publishers i.e. Cambridge Blood and Stem Cell Biobank.", - "title": "Dataset publisher" - }, - "contactPoint": { - "anyOf": [ - { - "$ref": "#/$defs/EmailAddress" - }, - { - "type": "null" - } - ], - "description": "Please provide a valid email address that can be used to coordinate data access requests with the publisher. Organisations are expected to provide a dedicated email address associated with the data access request process. Notes- An employee's email address can only be provided on a temporary basis and if one is provided an explicit consent must be obtained for this purpose.", - "examples": [ - "SAILDatabank@swansea.ac.uk" - ], - "title": "Contact Point" - }, - "keywords": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "items": { - "$ref": "#/$defs/OneHundredFiftyCharacters" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "description": "Please provide relevant and specific keywords that can improve the SEO of your dataset as a comma separated list. Notes: Onboarding portal will suggest keywords based on title, abstract and description. We are compiling a standardised list of keywords and synonyms across datasets to make filtering easier for users.", - "title": "Keywords" - }, - "alternateIdentifiers": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "items": { - "anyOf": [ - { - "$ref": "#/$defs/ShortDescription" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Alternate dataset identifiers or local identifiers", - "title": "Alternate dataset identifiers" - }, - "doiName": { - "anyOf": [ - { - "$ref": "#/$defs/Doi" - }, - { - "type": "null" - } - ], - "default": null, - "description": "All HDR UK registered datasets should either have a Digital Object Identifier (DOI) or be working towards obtaining one. If a DOI is available, please provide the DOI.", - "examples": [ - "10.3399/bjgp17X692645" - ], - "title": "Digital Object Identifier" - } - }, - "required": [ - "title", - "abstract", - "publisher", - "contactPoint", - "keywords" - ], - "title": "Summary", - "type": "object" - }, - "Temporal": { - "additionalProperties": false, - "properties": { - "accrualPeriodicity": { - "allOf": [ - { - "$ref": "#/$defs/Periodicity" - } - ], - "description": "Please indicate the frequency of distribution release. If a dataset is distributed regularly please choose a distribution release periodicity from the constrained list and indicate the next release date. When the release date becomes historical, a new release date will be calculated based on the publishing periodicity. If a dataset has been published and will remain static please indicate that it is static and indicated when it was released. If a dataset is released on an irregular basis or \u201con-demand\u201d please indicate that it is Irregular and leave release date as null. If a dataset can be published in real-time or near-real-time please indicate that it is continuous and leave release date as null. Notes: see https://www.dublincore.org/specifications/dublin-core/collection-description/frequency/" - }, - "distributionReleaseDate": { - "anyOf": [ - { - "format": "date", - "type": "string" - }, - { - "format": "date-time", - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Date of the latest release of the dataset. If this is a regular release i.e. quarterly, or this is a static dataset please complete this alongside Periodicity. If this is Irregular or Continuously released please leave this blank. Notes: Periodicity and release date will be used to determine when the next release is expected. E.g. if the release date is documented as 01/01/2020 and it is now 20/04/2020 and there is a quarterly release schedule, the latest release will be calculated as 01/04/2020.", - "title": "Release Date" - }, - "startDate": { - "anyOf": [ - { - "format": "date", - "type": "string" - }, - { - "format": "date-time", - "type": "string" - }, - { - "type": "null" - } - ], - "description": "The start of the time period that the dataset provides coverage for. If there are multiple cohorts in the dataset with varying start dates, please provide the earliest date and use the description or the media attribute to provide more information.", - "title": "Start Date" - }, - "endDate": { - "anyOf": [ - { - "format": "date", - "type": "string" - }, - { - "format": "date-time", - "type": "string" - }, - { - "$ref": "#/$defs/EndDateEnum" - }, - { - "type": "null" - } - ], - "default": null, - "description": "The end of the time period that the dataset provides coverage for. If the dataset is \u201cContinuous\u201d and has no known end date, please state continuous. If there are multiple cohorts in the dataset with varying end dates, please provide the latest date and use the description or the media attribute to provide more information.", - "title": "End Date" - }, - "timeLag": { - "allOf": [ - { - "$ref": "#/$defs/TimeLag" - } - ], - "description": "Please indicate the typical time-lag between an event and the data for that event appearing in the dataset", - "title": "Time Lag" - } - }, - "required": [ - "accrualPeriodicity", - "startDate", - "timeLag" - ], - "title": "Temporal", - "type": "object" - }, - "TimeLag": { - "enum": [ - "LESS 1 WEEK", - "1-2 WEEKS", - "2-4 WEEKS", - "1-2 MONTHS", - "2-6 MONTHS", - "MORE 6 MONTHS", - "VARIABLE", - "NO TIMELAG", - "NOT APPLICABLE", - "OTHER", - null - ], - "title": "TimeLag" - }, - "Url": { - "anyOf": [ - { - "format": "uri", - "minLength": 1, - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Url" - }, - "Usage": { - "additionalProperties": false, - "properties": { - "dataUseLimitation": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "items": { - "$ref": "#/$defs/DataUseLimitation" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Please provide an indication of consent permissions for datasets and/or materials, and relates to the purposes for which datasets and/or material might be removed, stored or used. NOTE: we have extended the DUO to include a value for NO LINKAGE", - "title": "Data Use Limitation" - }, - "dataUseRequirements": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "items": { - "$ref": "#/$defs/DataUseRequirements" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Please indicate fit here are any additional conditions set for use if any, multiple requirements may be provided. Please ensure that these restrictions are documented in access rights information.", - "title": "Data Use Requirements" - }, - "resourceCreator": { - "anyOf": [ - { - "$ref": "#/$defs/ShortDescription" - }, - { - "items": { - "anyOf": [ - { - "$ref": "#/$defs/ShortDescription" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Please provide the text that you would like included as part of any citation that credits this dataset. This is typically just the name of the publisher. No employee details should be provided.", - "title": "Citation Requirements" - }, - "investigations": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "items": { - "anyOf": [ - { - "$ref": "#/$defs/Url" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Investigations" - }, - "isReferencedBy": { - "anyOf": [ - { - "$ref": "#/$defs/Doi" - }, - { - "type": "string" - }, - { - "items": { - "anyOf": [ - { - "$ref": "#/$defs/Doi" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Please provide the keystone paper associated with the dataset. Also include a list of known citations, if available and should be links to existing resources where the dataset has been used or referenced. Please provide multiple entries, or if you are using a csv upload please provide them as a tab separated list.", - "title": "Citations" - } - }, - "title": "Usage", - "type": "object" - }, - "Uuidv4": { - "maxLength": 36, - "minLength": 36, - "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$", - "title": "Uuidv4", - "type": "string" - } - }, - "additionalProperties": false, - "properties": { - "identifier": { - "anyOf": [ - { - "$ref": "#/$defs/Uuidv4" - }, - { - "$ref": "#/$defs/Url" - }, - { - "type": "null" - } - ], - "description": "System dataset identifier", - "examples": [ - [ - "226fb3f1-4471-400a-8c39-2b66d46a39b6", - "https://web.www.healthdatagateway.org/dataset/226fb3f1-4471-400a-8c39-2b66d46a39b6" - ] - ], - "title": "Dataset identifier" - }, - "version": { - "allOf": [ - { - "$ref": "#/$defs/Semver" - } - ], - "description": "Dataset metadata version", - "examples": [ - "1.1.0" - ], - "title": "Dataset Version" - }, - "revisions": { - "description": "Revisions of Dataset metadata", - "items": { - "$ref": "#/$defs/Revision" - }, - "title": "Dataset Revisions", - "type": "array" - }, - "issued": { - "description": "Dataset Metadata Creation Date", - "format": "date-time", - "title": "Creation Date", - "type": "string" - }, - "modified": { - "description": "Dataset Metadata Creation Date", - "format": "date-time", - "title": "Modification Date", - "type": "string" - }, - "summary": { - "allOf": [ - { - "$ref": "#/$defs/Summary" - } - ], - "description": "Summary metadata must be completed by Data Custodians onboarding metadata into the Innovation Gateway MVP." - }, - "documentation": { - "anyOf": [ - { - "$ref": "#/$defs/Documentation" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Documentation can include a rich text description of the dataset or links to media such as documents, images, presentations, videos or links to data dictionaries, profiles or dashboards. Organisations are required to confirm that they have permission to distribute any additional media.", - "title": "Documentation" - }, - "coverage": { - "anyOf": [ - { - "$ref": "#/$defs/Coverage" - }, - { - "type": "null" - } - ], - "default": null, - "description": "This information includes attributes for geographical and temporal coverage, cohort details etc. to enable a deeper understanding of the dataset content so that researchers can make decisions about the relevance of the underlying data.", - "title": "Coverage" - }, - "provenance": { - "anyOf": [ - { - "$ref": "#/$defs/Provenance" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Provenance information allows researchers to understand data within the context of its origins and can be an indicator of quality, authenticity and timeliness.", - "title": "Provenance" - }, - "accessibility": { - "allOf": [ - { - "$ref": "#/$defs/Accessibility" - } - ], - "description": "Accessibility information allows researchers to understand access, usage, limitations, formats, standards and linkage or interoperability with toolsets." - }, - "enrichmentAndLinkage": { - "anyOf": [ - { - "$ref": "#/$defs/EnrichmentAndLinkage" - }, - { - "type": "null" - } - ], - "default": null, - "description": "This section includes information about related datasets that may have previously been linked, as well as indicating if there is the opportunity to link to other datasets in the future. If a dataset has been enriched and/or derivations, scores and existing tools are available this section allows providers to indicate this to researchers.", - "title": "Enrichment and Linkage" - }, - "observations": { - "description": "Multiple observations about the dataset may be provided and users are expected to provide at least one observation (1..*). We will be supporting the schema.org observation model (https://schema.org/Observation) with default values. Users will be encouraged to provide their own statistical populations as the project progresses. Example: <b> Statistical Population 1 </b> type: StatisticalPopulation populationType: Persons numConstraints: 0 <b> Statistical Population 2 </b> type: StatisticalPopulation populationType: Events numConstraints: 0 <b> Statistical Population 3 </b> type: StatisticalPopulation populationType: Findings numConstraints: 0 typeOf: Observation observedNode: <b> Statistical Population 1 </b> measuredProperty: count measuredValue: 32937 observationDate: \u201c2017\u201d", - "items": { - "$ref": "#/$defs/Observation" - }, - "title": "Observations", - "type": "array" - }, - "structuralMetadata": { - "anyOf": [ - { - "items": { - "$ref": "#/$defs/DataClass" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Descriptions of all tables and data elements that can be included in the dataset", - "title": "Structural Metadata" - } - }, - "required": [ - "identifier", - "version", - "revisions", - "issued", - "modified", - "summary", - "accessibility", - "observations" - ], - "title": "Hdruk212", - "type": "object" -} \ No newline at end of file From 9fba122e27c2af1f0b48e4285fe5c764499d8031 Mon Sep 17 00:00:00 2001 From: Calum Macdonald Date: Tue, 30 Jan 2024 11:51:41 +0000 Subject: [PATCH 14/21] adding in population size --- hdr_schemata/models/GWDM/v1_1/Summary.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/hdr_schemata/models/GWDM/v1_1/Summary.py b/hdr_schemata/models/GWDM/v1_1/Summary.py index 02265f0..6e686a4 100644 --- a/hdr_schemata/models/GWDM/v1_1/Summary.py +++ b/hdr_schemata/models/GWDM/v1_1/Summary.py @@ -1,14 +1,20 @@ from hdr_schemata.models.GWDM.v1_0 import Summary as BaseSummary -from pydantic import Field +from pydantic import Field from typing import Optional from .Organisation import Organisation -class Summary(BaseSummary): - #switch publisher to be an Organisation +class Summary(BaseSummary): + # switch publisher to be an Organisation publisher: Optional[Organisation] = Field( ..., description="Link to details about the publisher of this dataset", - title='Publisher', + title="Publisher", ) + # new field for a summary of the population size + populationSize: Optional[int] = Field( + ..., + description="Summary population size of the cohort", + title="Population size", + ) From 707e830abbbe2d6adb552dc81885176b3f592146 Mon Sep 17 00:00:00 2001 From: Calum Macdonald Date: Tue, 30 Jan 2024 14:03:39 +0000 Subject: [PATCH 15/21] fix lengths for version control --- hdr_schemata/models/GWDM/1.1/schema.json | 19 ++++++++++++++++--- hdr_schemata/models/GWDM/v1_1/Required.py | 11 +++++------ 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/hdr_schemata/models/GWDM/1.1/schema.json b/hdr_schemata/models/GWDM/1.1/schema.json index eae6ad7..9a2a5d1 100644 --- a/hdr_schemata/models/GWDM/1.1/schema.json +++ b/hdr_schemata/models/GWDM/1.1/schema.json @@ -1133,8 +1133,8 @@ "examples": [ "1.1.0" ], - "maxLength": 100, - "minLength": 2, + "maxLength": 4, + "minLength": 3, "title": "Dataset Version", "type": "string" } @@ -1335,6 +1335,18 @@ ], "description": "Link to details about the publisher of this dataset", "title": "Publisher" + }, + "populationSize": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Summary population size of the cohort", + "title": "Population size" } }, "required": [ @@ -1347,7 +1359,8 @@ "contactPoint", "datasetType", "description", - "publisher" + "publisher", + "populationSize" ], "title": "Summary", "type": "object" diff --git a/hdr_schemata/models/GWDM/v1_1/Required.py b/hdr_schemata/models/GWDM/v1_1/Required.py index 0db3986..a9b5f35 100644 --- a/hdr_schemata/models/GWDM/v1_1/Required.py +++ b/hdr_schemata/models/GWDM/v1_1/Required.py @@ -2,12 +2,11 @@ from typing import Optional from pydantic import Field, constr + class Required(BaseRequired): - - version: constr(min_length=2,max_length=100) = Field( + version: constr(min_length=3, max_length=4) = Field( ..., - description='Dataset metadata version', - examples=['1.1.0'], - title='Dataset Version', + description="Dataset metadata version", + examples=["1.1.0"], + title="Dataset Version", ) - From e6142b43deb98b1a43935b4c4e197f9e802a5ed5 Mon Sep 17 00:00:00 2001 From: Calum Macdonald Date: Tue, 30 Jan 2024 15:02:34 +0000 Subject: [PATCH 16/21] more fixes --- hdr_schemata/models/GWDM/1.1/schema.json | 3 +-- hdr_schemata/models/GWDM/v1_1/Required.py | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hdr_schemata/models/GWDM/1.1/schema.json b/hdr_schemata/models/GWDM/1.1/schema.json index 9a2a5d1..ed5f3de 100644 --- a/hdr_schemata/models/GWDM/1.1/schema.json +++ b/hdr_schemata/models/GWDM/1.1/schema.json @@ -1133,8 +1133,7 @@ "examples": [ "1.1.0" ], - "maxLength": 4, - "minLength": 3, + "pattern": "^\\d+\\.\\d+\\.\\d+$", "title": "Dataset Version", "type": "string" } diff --git a/hdr_schemata/models/GWDM/v1_1/Required.py b/hdr_schemata/models/GWDM/v1_1/Required.py index a9b5f35..7d7dab8 100644 --- a/hdr_schemata/models/GWDM/v1_1/Required.py +++ b/hdr_schemata/models/GWDM/v1_1/Required.py @@ -4,7 +4,9 @@ class Required(BaseRequired): - version: constr(min_length=3, max_length=4) = Field( + version: constr( + pattern=r"^\d+\.\d+\.\d+$", + ) = Field( ..., description="Dataset metadata version", examples=["1.1.0"], From aab12b292be923152c476c506aa777e34cf3ca1b Mon Sep 17 00:00:00 2001 From: Calum Macdonald Date: Tue, 30 Jan 2024 17:36:56 +0000 Subject: [PATCH 17/21] make some changes to populationSize --- hdr_schemata/models/GWDM/1.1/schema.json | 4 ++-- hdr_schemata/models/GWDM/v1_1/Summary.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hdr_schemata/models/GWDM/1.1/schema.json b/hdr_schemata/models/GWDM/1.1/schema.json index ed5f3de..823bf56 100644 --- a/hdr_schemata/models/GWDM/1.1/schema.json +++ b/hdr_schemata/models/GWDM/1.1/schema.json @@ -1344,6 +1344,7 @@ "type": "null" } ], + "default": null, "description": "Summary population size of the cohort", "title": "Population size" } @@ -1358,8 +1359,7 @@ "contactPoint", "datasetType", "description", - "publisher", - "populationSize" + "publisher" ], "title": "Summary", "type": "object" diff --git a/hdr_schemata/models/GWDM/v1_1/Summary.py b/hdr_schemata/models/GWDM/v1_1/Summary.py index 6e686a4..f617155 100644 --- a/hdr_schemata/models/GWDM/v1_1/Summary.py +++ b/hdr_schemata/models/GWDM/v1_1/Summary.py @@ -14,7 +14,7 @@ class Summary(BaseSummary): # new field for a summary of the population size populationSize: Optional[int] = Field( - ..., + None, description="Summary population size of the cohort", title="Population size", ) From 269e4928a521886c53138e8c1bd14fea21186b86 Mon Sep 17 00:00:00 2001 From: Calum Macdonald Date: Wed, 31 Jan 2024 14:34:46 +0000 Subject: [PATCH 18/21] update GWDM 1.1 --- hdr_schemata/models/GWDM/1.1/schema.json | 130 +++++++++++------- .../GWDM/v1_1/TissuesSampleCollection.py | 61 -------- 2 files changed, 80 insertions(+), 111 deletions(-) diff --git a/hdr_schemata/models/GWDM/1.1/schema.json b/hdr_schemata/models/GWDM/1.1/schema.json index 823bf56..e88d039 100644 --- a/hdr_schemata/models/GWDM/1.1/schema.json +++ b/hdr_schemata/models/GWDM/1.1/schema.json @@ -1177,6 +1177,71 @@ "title": "Revision", "type": "object" }, + "SampleDonor": { + "properties": { + "id": { + "anyOf": [ + { + "maxLength": 50, + "minLength": 2, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "ID of the sample donor", + "title": "Donor ID" + }, + "sex": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Sex of the sample donor", + "title": "Donor Sex" + }, + "birthDate": { + "anyOf": [ + { + "format": "date", + "type": "string" + }, + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Date of birth of the sample donor", + "title": "Donor birth date" + }, + "dataCategories": { + "anyOf": [ + { + "$ref": "#/$defs/CommaSeparatedValues" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Data categories related to the sample donor", + "title": "Donor Data Categories" + } + }, + "title": "SampleDonor", + "type": "object" + }, "ShortTitle": { "anyOf": [ { @@ -1466,57 +1531,14 @@ ], "title": "TimeLag" }, - "TissueSampleDonor": { - "properties": { - "id": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "default": null, - "description": "ID of the sample donor", - "title": "Donor ID" - }, - "sex": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Sex of the sample donor", - "title": "Donor Sex" - }, - "dataCategories": { - "anyOf": [ - { - "$ref": "#/$defs/CommaSeparatedValues" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Data categories related to the sample donor", - "title": "Donor Data Categories" - } - }, - "title": "TissueSampleDonor", - "type": "object" - }, "TissueSampleMetadata": { "properties": { "id": { "anyOf": [ { - "$ref": "#/$defs/CommaSeparatedValues" + "maxLength": 50, + "minLength": 2, + "type": "string" }, { "type": "null" @@ -1527,9 +1549,12 @@ "title": "Metadata ID" }, "sampleDonor": { - "allOf": [ + "anyOf": [ + { + "$ref": "#/$defs/SampleDonor" + }, { - "$ref": "#/$defs/TissueSampleDonor" + "type": "null" } ], "default": null, @@ -1552,7 +1577,7 @@ "storageTemperature": { "anyOf": [ { - "$ref": "#/$defs/CommaSeparatedValues" + "type": "string" }, { "type": "null" @@ -1565,7 +1590,12 @@ "creationDate": { "anyOf": [ { - "$ref": "#/$defs/CommaSeparatedValues" + "format": "date", + "type": "string" + }, + { + "format": "date-time", + "type": "string" }, { "type": "null" diff --git a/hdr_schemata/models/GWDM/v1_1/TissuesSampleCollection.py b/hdr_schemata/models/GWDM/v1_1/TissuesSampleCollection.py index f61f15a..87145a2 100644 --- a/hdr_schemata/models/GWDM/v1_1/TissuesSampleCollection.py +++ b/hdr_schemata/models/GWDM/v1_1/TissuesSampleCollection.py @@ -4,67 +4,6 @@ from hdr_schemata.definitions.HDRUK import CommaSeparatedValues -class TissueSampleDonor(BaseModel): - id: Optional[CommaSeparatedValues] = Field( - None, title="Donor ID", description="ID of the sample donor" - ) - sex: Optional[CommaSeparatedValues] = Field( - None, title="Donor Sex", description="Sex of the sample donor" - ) - dataCategories: Optional[CommaSeparatedValues] = Field( - None, - title="Donor Data Categories", - description="Data categories related to the sample donor", - ) - - -class TissueSampleMetadata(BaseModel): - id: Optional[CommaSeparatedValues] = Field( - None, title="Metadata ID", description="ID of the tissue sample metadata" - ) - sampleDonor: TissueSampleDonor = Field( - None, title="Sample Donor", description="Information about the sample donor" - ) - sampleType: Optional[CommaSeparatedValues] = Field( - None, title="Sample Type", description="Type of the tissue sample" - ) - storageTemperature: Optional[CommaSeparatedValues] = Field( - None, - title="Storage Temperature", - description="Storage temperature of the tissue sample", - ) - creationDate: Optional[CommaSeparatedValues] = Field( - None, - title="Creation Date", - description="Date when the tissue sample metadata was created", - ) - AnatomicalSiteOntologyCode: Optional[CommaSeparatedValues] = Field( - None, - title="Anatomical Site Ontology Code", - description="Ontology code for the anatomical site", - ) - AnatomicalSiteOntologyDescription: Optional[CommaSeparatedValues] = Field( - None, - title="Anatomical Site Ontology Description", - description="Ontology description for the anatomical site", - ) - AnatomicalSiteFreeText: Optional[CommaSeparatedValues] = Field( - None, - title="Anatomical Site Free Text", - description="Free text describing the anatomical site", - ) - sampleContentDiagnosis: Optional[CommaSeparatedValues] = Field( - None, - title="Sample Content Diagnosis", - description="Diagnosis related to the sample content", - ) - useReCommaSeparatedValuesictions: Optional[CommaSeparatedValues] = Field( - None, - title="Use Restrictions", - description="Restrictions on the use of the tissue sample", - ) - - class TissuesSampleCollection(BaseModel): id: Optional[CommaSeparatedValues] = Field( None, title="ID", description="ID of the tissue sample collection" From 941c8c5a36f1dfc1c8d151e2d31e2ed9bc737c64 Mon Sep 17 00:00:00 2001 From: Calum Macdonald Date: Wed, 31 Jan 2024 14:41:55 +0000 Subject: [PATCH 19/21] 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", From 9a4f037a0e7eaccdf7a85b45cf542303ff53b36a Mon Sep 17 00:00:00 2001 From: Calum Macdonald Date: Fri, 2 Feb 2024 09:24:34 +0000 Subject: [PATCH 20/21] fix for timeLag --- hdr_schemata/models/GWDM/v1_0/Temporal.py | 33 +++++++++++------------ 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/hdr_schemata/models/GWDM/v1_0/Temporal.py b/hdr_schemata/models/GWDM/v1_0/Temporal.py index d5f9b77..d593b4e 100644 --- a/hdr_schemata/models/GWDM/v1_0/Temporal.py +++ b/hdr_schemata/models/GWDM/v1_0/Temporal.py @@ -1,4 +1,4 @@ -from datetime import date,datetime +from datetime import date, datetime from typing import Optional, List, Union from pydantic import BaseModel, Field from hdr_schemata.definitions.HDRUK import * @@ -6,37 +6,36 @@ class Temporal(BaseModel): class Config: - extra = 'forbid' + extra = "forbid" - startDate: Optional[Union[date, datetime]] = Field( ..., - description='The start of the time period that the dataset provides coverage for', - example='12/03/2020', - title='Start Date', + description="The start of the time period that the dataset provides coverage for", + example="12/03/2020", + title="Start Date", ) endDate: Optional[Union[date, datetime]] = Field( None, - description='The end of the time period that the dataset provides coverage for', - example='12/03/2020', - title='End Date', + description="The end of the time period that the dataset provides coverage for", + example="12/03/2020", + title="End Date", ) timeLag: TimeLag = Field( ..., - description='Rypical time-lag between an event and the data for that event appearing in the dataset', + description="Typical time-lag between an event and the data for that event appearing in the dataset", example="LESS 1 WEEK", - title='Time Lag', + title="Time Lag", ) - + accrualPeriodicity: Periodicity = Field( ..., - description='frequency of distribution release. If a dataset is distributed regularly please choose a distribution release periodicity from the constrained list and indicate the next release date. When the release date becomes historical, a new release date will be calculated based on the publishing periodicity.', + description="frequency of distribution release. If a dataset is distributed regularly please choose a distribution release periodicity from the constrained list and indicate the next release date. When the release date becomes historical, a new release date will be calculated based on the publishing periodicity.", example="MONTHLY", - title='Periodicity', + title="Periodicity", ) - + distributionReleaseDate: Optional[Union[date, datetime]] = Field( None, - description='Date of the latest release of the dataset. If this is a regular release i.e. quarterly, or this is a static dataset please complete this alongside Periodicity.', - title='Release Date', + description="Date of the latest release of the dataset. If this is a regular release i.e. quarterly, or this is a static dataset please complete this alongside Periodicity.", + title="Release Date", ) From 9c4e38676e9a6bad3246516d903d1c7eefc551d5 Mon Sep 17 00:00:00 2001 From: Calum Macdonald Date: Fri, 2 Feb 2024 09:27:23 +0000 Subject: [PATCH 21/21] fix markdown --- docs/GWDM/1.1.md | 934 +++++++++++++----- docs/GWDM/1.1.structure.json | 223 ++++- hdr_schemata/models/GWDM/1.0/schema.json | 2 +- hdr_schemata/models/GWDM/1.1/schema.json | 2 +- .../models/HDRUK/create_json_schema.py | 1 - hdr_schemata/utils/create_markdown.py | 3 +- 6 files changed, 892 insertions(+), 273 deletions(-) diff --git a/docs/GWDM/1.1.md b/docs/GWDM/1.1.md index 22d48f0..e95b4e9 100644 --- a/docs/GWDM/1.1.md +++ b/docs/GWDM/1.1.md @@ -5,37 +5,52 @@ required metadata needed for the GWDM + + + ### gatewayId Need a field in Mauro that captures the datasetID to link to gateway database - or can we just use the one created in Mauro? -| title | examples | required | type | -|:----------|:-----------|:-----------|:-------| -| Gatewayid | | True | str | +| title | required | type | +|:----------|:-----------|:-------| +| Gatewayid | True | str | + + + ### gatewayPid Need a field in Mauro that captures the dataset pid to link to gateway database -| title | examples | required | type | -|:-----------|:-----------|:-----------|:-------| -| Gatewaypid | | True | str | +| title | required | type | +|:-----------|:-----------|:-------| +| Gatewaypid | True | str | + + + ### issued Aren't issued and modified always the same because of versioning? Is that fine to duplicate because datasets in dcat might look different? -| title | examples | required | type | -|:--------|:-----------|:-----------|:---------| -| Issued | | True | datetime | +| title | required | type | +|:--------|:-----------|:---------| +| Issued | True | datetime | + + + ### modified Aren't issued and modified always the same because of versioning? Is that fine to duplicate because datasets in dcat might look different? -| title | examples | required | type | -|:---------|:-----------|:-----------|:---------| -| Modified | | True | datetime | +| title | required | type | +|:---------|:-----------|:---------| +| Modified | True | datetime | + + + ### revisions @@ -43,29 +58,42 @@ None + + + #### version Version number used for previous version of this dataset -| title | examples | required | type | -|:-----------------|:-----------|:-----------|:-------| -| revision version | | True | str | +| title | required | type | +|:-----------------|:-----------|:-------| +| revision version | True | str | + + + #### url Some url with a reference to the record of a previous version of this dataset -| title | examples | required | type | -|:-------------|:-----------|:-----------|:-------| -| revision url | | True | Url | +| title | required | type | +|:-------------|:-----------|:-------| +| revision url | True | Url | + + + ### version Dataset metadata version -| title | examples | required | type | -|:----------------|:-----------|:-----------|:-------| -| Dataset Version | ['1.1.0'] | True | str | +| title | required | type | +|:----------------|:-----------|:-------| +| Dataset Version | True | str | + +Examples: + * 1.1.0 + ## summary @@ -73,77 +101,107 @@ Summary of metadata describing key pieces of information. + + + ### title The main title of the dataset -| title | examples | required | type | -|:--------|:-----------|:-----------|:------------------------------| -| Title | | True | TwoHundredFiftyFiveCharacters | +| title | required | type | +|:--------|:-----------|:------------------------------| +| Title | True | TwoHundredFiftyFiveCharacters | + + + ### shortTitle A shorter descriptive title of the dataset -| title | examples | required | type | -|:-----------|:-----------|:-----------|:-----------| -| Shorttitle | | True | ShortTitle | +| title | required | type | +|:-----------|:-----------|:-----------| +| Shorttitle | True | ShortTitle | + + + ### doiName DOI associated to this dataset -| title | examples | required | type | -|:--------|:-----------|:-----------|:-------| -| Doiname | | True | Doi | +| title | required | type | +|:--------|:-----------|:-------| +| Doiname | True | Doi | + + + ### abstract Longer abstract detailing the dataset. -| title | examples | required | type | -|:---------|:-----------|:-----------|:-----------------| -| Abstract | | True | LongAbstractText | +| title | required | type | +|:---------|:-----------|:-----------------| +| Abstract | True | LongAbstractText | + + + ### keywords Comma separated key words associated to this dataset. -| title | examples | required | type | -|:---------|:-----------|:-----------|:---------------------| -| Keywords | | True | CommaSeparatedValues | +| title | required | type | +|:---------|:-----------|:---------------------| +| Keywords | True | CommaSeparatedValues | + + + ### controlledKeywords Keywords that have been filtered and limited -| title | examples | required | type | -|:--------------------|:-----------|:-----------|:---------------------| -| Controlled Keywords | | True | CommaSeparatedValues | +| title | required | type | +|:--------------------|:-----------|:---------------------| +| Controlled Keywords | True | CommaSeparatedValues | + + + ### contactPoint email of a person who can be the main contact point of this dataset -| title | examples | required | type | -|:--------------|:-----------|:-----------|:---------| -| Contact Point | | True | EmailStr | +| title | required | type | +|:--------------|:-----------|:---------| +| Contact Point | True | EmailStr | + + + ### datasetType What type of dataset is this? -| title | examples | required | type | -|:-------------|:-----------|:-----------|:------------| -| Dataset type | | True | DatasetType | +| title | required | type | +|:-------------|:-----------|:------------| +| Dataset type | True | DatasetType | + + + ### description Longer description of the dataset in detail -| title | examples | required | type | -|:------------|:-----------|:-----------|:----------------| -| Description | | True | LongDescription | +| title | required | type | +|:------------|:-----------|:----------------| +| Description | True | LongDescription | + + + ### publisher @@ -151,29 +209,63 @@ Link to details about the publisher of this dataset + + + #### name The organisation responsible for running or supporting the data access request process, as well as publishing and maintaining the metadata. In most this will be the same as the HDR UK Organisation (Hub or Alliance Member)/ -| title | examples | required | type | -|:--------|:-----------|:-----------|:-------| -| Name | | True | Name | +| title | required | type | +|:--------|:-----------|:-------| +| Name | True | Name | + + + #### gatewayId The link to an ID somewhere in the gateway where more information on the publisher can be retrieved. -| title | examples | required | type | -|:---------------------|:-----------|:-----------|:-------| -| Publisher gateway id | | False | str | +| title | required | type | +|:---------------------|:-----------|:-------| +| Publisher gateway id | False | str | + + + #### rorId The Research Organization Registry (ROR) for the organisation, if applicable -| title | examples | required | type | -|:------------------------------------------|:-----------|:-----------|:-------| -| Research Organization Registry Identifier | | False | str | +| title | required | type | +|:------------------------------------------|:-----------|:-------| +| Research Organization Registry Identifier | False | str | + + + + +### populationSize + +Summary population size of the cohort + +| title | required | type | +|:----------------|:-----------|:-------| +| Population size | False | int | + + + + +### datasetSubType + +What us the subtype for this dataset? + +| title | required | type | +|:-----------------|:-----------|:------------| +| Dataset sub type | False | DatasetType | + + + ## coverage @@ -181,93 +273,129 @@ Observational, Spatial and Temporal coverage + + + ### spatial List of countries where the data was taken from -| title | examples | required | type | -|:--------|:-----------|:-----------|:---------------------| -| Spatial | | False | CommaSeparatedValues | +| title | required | type | +|:--------|:-----------|:---------------------| +| Spatial | False | CommaSeparatedValues | + + + ### pathway Long description of the clinical/diagnostic/treatment pathway if applicable. This could include if the dataset is from a single speciality or area, a single tier of care, linked across two tier (e.g. primary and secondary care), or an integrated care record covering the whole patient pathway. -| title | examples | required | type | -|:--------|:-----------|:-----------|:----------------| -| Pathway | | False | LongDescription | +| title | required | type | +|:--------|:-----------|:----------------| +| Pathway | False | LongDescription | + + + ### followup What is the typical time span that a patient appears in the dataset (follow up period) -| title | examples | required | type | -|:---------|:-----------|:-----------|:---------| -| Followup | | False | Followup | +| title | required | type | +|:---------|:-----------|:---------| +| Followup | False | Followup | + + + ### typicalAgeRange Age range in whole years of participants in the dataset. Please provide range in the following format '[min age] – [max age]' where both the minimum and maximum are whole numbers (integers). -| title | examples | required | type | -|:------------------|:-----------|:-----------|:---------| -| Typical Age Range | | False | AgeRange | +| title | required | type | +|:------------------|:-----------|:---------| +| Typical Age Range | False | AgeRange | + + + ### gender Male, Female, Other -| title | examples | required | type | -|:--------|:-----------|:-----------|:-------| -| Gender | | False | Gender | +| title | required | type | +|:--------|:-----------|:-------| +| Gender | False | Gender | + + + ### biologicalsamples Blood, Saliva, Urine, Other -| title | examples | required | type | -|:-------------------|:-----------|:-----------|:------------------| -| Biological Samples | | False | BiologicalSamples | +| title | required | type | +|:-------------------|:-----------|:------------------| +| Biological Samples | False | BiologicalSamples | + + + ### psychological Mental health, Cognitive function -| title | examples | required | type | -|:--------------|:-----------|:-----------|:--------------| -| Psychological | | False | Psychological | +| title | required | type | +|:--------------|:-----------|:--------------| +| Psychological | False | Psychological | + + + ### physical Cardiovascular, Respiratory, Musculoskeletal, Hearing and Vision, Reproductive -| title | examples | required | type | -|:---------|:-----------|:-----------|:---------| -| Physical | | False | Physical | +| title | required | type | +|:---------|:-----------|:---------| +| Physical | False | Physical | + + + ### anthropometric Height, Weight, Waist circumference, Hip circumference, Blood pressure -| title | examples | required | type | -|:---------------|:-----------|:-----------|:---------------| -| Anthropometric | | False | Anthropometric | +| title | required | type | +|:---------------|:-----------|:---------------| +| Anthropometric | False | Anthropometric | + + + ### lifestyle Cohort lifestyle habits: Smoking, Physical activity, Dietary habits, Alcohol -| title | examples | required | type | -|:----------|:-----------|:-----------|:-----------| -| Lifestyle | | False | Lifestyles | +| title | required | type | +|:----------|:-----------|:-----------| +| Lifestyle | False | Lifestyles | + + + ### socioeconomic Occupation, Family circumstances, Housing, Education, Ethnic group, Martial status, Social support -| title | examples | required | type | -|:---------------|:-----------|:-----------|:--------------| -| Socio-economic | | False | SocioEconomic | +| title | required | type | +|:---------------|:-----------|:--------------| +| Socio-economic | False | SocioEconomic | + + + ## provenance @@ -275,35 +403,50 @@ Provenance information + + + ### origin None + + + #### purpose Indicates the purpose(s) that the dataset was collected. -| title | examples | required | type | -|:--------|:-----------|:-----------|:---------------------| -| Purpose | | False | CommaSeparatedValues | +| title | required | type | +|:--------|:-----------|:---------------------| +| Purpose | False | CommaSeparatedValues | + + + #### source Indicates the source of the data extraction -| title | examples | required | type | -|:--------|:-----------|:-----------|:---------------------| -| Source | | False | CommaSeparatedValues | +| title | required | type | +|:--------|:-----------|:---------------------| +| Source | False | CommaSeparatedValues | + + + #### collectionSituation Indicate the setting(s) where data was collected. Multiple settings may be provided -| title | examples | required | type | -|:--------|:-----------|:-----------|:---------------------| -| Setting | | False | CommaSeparatedValues | +| title | required | type | +|:--------|:-----------|:---------------------| +| Setting | False | CommaSeparatedValues | + + + ### temporal @@ -311,45 +454,63 @@ None + + + #### startDate The start of the time period that the dataset provides coverage for -| title | examples | required | type | -|:-----------|:-----------|:-----------|:-------| -| Start Date | | True | date | +| title | required | type | +|:-----------|:-----------|:-------| +| Start Date | True | date | + + + #### endDate The end of the time period that the dataset provides coverage for -| title | examples | required | type | -|:---------|:-----------|:-----------|:-------| -| End Date | | False | date | +| title | required | type | +|:---------|:-----------|:-------| +| End Date | False | date | + + + #### timeLag -Rypical time-lag between an event and the data for that event appearing in the dataset +Typical time-lag between an event and the data for that event appearing in the dataset -| title | examples | required | type | -|:---------|:-----------|:-----------|:--------| -| Time Lag | | True | TimeLag | +| title | required | type | +|:---------|:-----------|:--------| +| Time Lag | True | TimeLag | + + + #### accrualPeriodicity frequency of distribution release. If a dataset is distributed regularly please choose a distribution release periodicity from the constrained list and indicate the next release date. When the release date becomes historical, a new release date will be calculated based on the publishing periodicity. -| title | examples | required | type | -|:------------|:-----------|:-----------|:------------| -| Periodicity | | True | Periodicity | +| title | required | type | +|:------------|:-----------|:------------| +| Periodicity | True | Periodicity | + + + #### distributionReleaseDate Date of the latest release of the dataset. If this is a regular release i.e. quarterly, or this is a static dataset please complete this alongside Periodicity. -| title | examples | required | type | -|:-------------|:-----------|:-----------|:-------| -| Release Date | | False | date | +| title | required | type | +|:-------------|:-----------|:-------| +| Release Date | False | date | + + + ## accessibility @@ -357,27 +518,39 @@ Accessibility information. + + + ### usage This section includes information about how the data can be used and how it is currently being used + + + #### dataUseLimitation Any restrictions to its usage -| title | examples | required | type | -|:--------------------|:-----------|:-----------|:---------------------| -| Data Use Limitation | | True | CommaSeparatedValues | +| title | required | type | +|:--------------------|:-----------|:---------------------| +| Data Use Limitation | True | CommaSeparatedValues | + + + #### dataUseRequirement Any requirements needed for data usage -| title | examples | required | type | -|:----------------------|:-----------|:-----------|:---------------------| -| Data Use Requirements | | True | CommaSeparatedValues | +| title | required | type | +|:----------------------|:-----------|:---------------------| +| Data Use Requirements | True | CommaSeparatedValues | + + + #### resourceCreator @@ -385,29 +558,41 @@ Who has created this resource + + + ##### name The organisation responsible for running or supporting the data access request process, as well as publishing and maintaining the metadata. In most this will be the same as the HDR UK Organisation (Hub or Alliance Member)/ -| title | examples | required | type | -|:--------|:-----------|:-----------|:-------| -| Name | | True | Name | +| title | required | type | +|:--------|:-----------|:-------| +| Name | True | Name | + + + ##### gatewayId The link to an ID somewhere in the gateway where more information on the publisher can be retrieved. -| title | examples | required | type | -|:---------------------|:-----------|:-----------|:-------| -| Publisher gateway id | | False | str | +| title | required | type | +|:---------------------|:-----------|:-------| +| Publisher gateway id | False | str | + + + ##### rorId The Research Organization Registry (ROR) for the organisation, if applicable -| title | examples | required | type | -|:------------------------------------------|:-----------|:-----------|:-------| -| Research Organization Registry Identifier | | False | str | +| title | required | type | +|:------------------------------------------|:-----------|:-------| +| Research Organization Registry Identifier | False | str | + + + ### access @@ -415,61 +600,85 @@ This section includes information about data access + + + #### accessRights Optional link(s) or a description of where the license associated to accessing this dataset -| title | examples | required | type | -|:--------------|:-----------|:-----------|:---------------------| -| Access Rights | | True | CommaSeparatedValues | +| title | required | type | +|:--------------|:-----------|:---------------------| +| Access Rights | True | CommaSeparatedValues | + + + #### accessService -| title | examples | required | type | -|:---------------|:-----------|:-----------|:----------------| -| Access Service | | False | LongDescription | +| title | required | type | +|:---------------|:-----------|:----------------| +| Access Service | False | LongDescription | + + + #### accessRequestCost -| title | examples | required | type | -|:---------------------------------|:-----------|:-----------|:----------------| -| Organisation Access Request Cost | | False | LongDescription | +| title | required | type | +|:---------------------------------|:-----------|:----------------| +| Organisation Access Request Cost | False | LongDescription | + + + #### deliveryLeadTime An arbitrary guess at the time to gain access to the dataset... -| title | examples | required | type | -|:------------------------|:-----------|:-----------|:-----------------| -| Access Request Duration | | False | DeliveryLeadTime | +| title | required | type | +|:------------------------|:-----------|:-----------------| +| Access Request Duration | False | DeliveryLeadTime | + + + #### jurisdiction Comma separated country codes of where the data jurisdiction is. -| title | examples | required | type | -|:-------------|:-----------|:-----------|:---------------------| -| Jurisdiction | | True | CommaSeparatedValues | +| title | required | type | +|:-------------|:-----------|:---------------------| +| Jurisdiction | True | CommaSeparatedValues | + + + #### dataController Name of the data controller -| title | examples | required | type | -|:----------------|:-----------|:-----------|:----------------| -| Data Controller | | True | LongDescription | +| title | required | type | +|:----------------|:-----------|:----------------| +| Data Controller | True | LongDescription | + + + #### dataProcessor Name of the data processors -| title | examples | required | type | -|:---------------|:-----------|:-----------|:----------------| -| Data Processor | | False | LongDescription | +| title | required | type | +|:---------------|:-----------|:----------------| +| Data Processor | False | LongDescription | + + + ### formatAndStandards @@ -477,37 +686,52 @@ Section includes technical attributes for language vocabularies, sizes etc. and + + + #### vocabularyEncodingSchemes Code value of the ontology vocabulary encoding -| title | examples | required | type | -|:----------------------|:-----------|:-----------|:---------------------| -| Controlled Vocabulary | | True | CommaSeparatedValues | +| title | required | type | +|:----------------------|:-----------|:---------------------| +| Controlled Vocabulary | True | CommaSeparatedValues | + + + #### conformsTo What the vocabulary conforms to. -| title | examples | required | type | -|:------------|:-----------|:-----------|:---------------------| -| Conforms To | | True | CommaSeparatedValues | +| title | required | type | +|:------------|:-----------|:---------------------| +| Conforms To | True | CommaSeparatedValues | + + + #### languages Language code(s) of the language of the dataset metadata and underlying data is made available. -| title | examples | required | type | -|:-----------------|:-----------|:-----------|:---------------------| -| Language Code(s) | | True | CommaSeparatedValues | +| title | required | type | +|:-----------------|:-----------|:---------------------| +| Language Code(s) | True | CommaSeparatedValues | + + + #### formats Format(s) the dataset can be made available in -| title | examples | required | type | -|:---------------|:-----------|:-----------|:---------------------| -| Dataset Format | | True | CommaSeparatedValues | +| title | required | type | +|:---------------|:-----------|:---------------------| +| Dataset Format | True | CommaSeparatedValues | + + + ## linkage @@ -515,45 +739,63 @@ Linkage and enrichment. + + + ### isGeneratedUsing ?? -| title | examples | required | type | -|:-------------------|:-----------|:-----------|:---------------------| -| Is Generated Using | | False | CommaSeparatedValues | +| title | required | type | +|:-------------------|:-----------|:---------------------| +| Is Generated Using | False | CommaSeparatedValues | + + + ### associatedMedia Any media associated with the Gateway Organisation using a valid URI for the content. This is an opportunity to provide additional context that could be useful for researchers wanting to understand more about the dataset and its relevance to their research question -| title | examples | required | type | -|:-----------------|:-----------|:-----------|:---------------------| -| Associated Media | | False | CommaSeparatedValues | +| title | required | type | +|:-----------------|:-----------|:---------------------| +| Associated Media | False | CommaSeparatedValues | + + + ### dataUses ?? -| title | examples | required | type | -|:----------|:-----------|:-----------|:---------------------| -| Data Uses | | False | CommaSeparatedValues | +| title | required | type | +|:----------|:-----------|:---------------------| +| Data Uses | False | CommaSeparatedValues | + + + ### isReferenceIn Rhe keystone paper associated with the dataset. Also include a list of known citations, if available and should be links to existing resources where the dataset has been used or referenced. -| title | examples | required | type | -|:----------------|:-----------|:-----------|:---------------------| -| Is Reference in | | False | CommaSeparatedValues | +| title | required | type | +|:----------------|:-----------|:---------------------| +| Is Reference in | False | CommaSeparatedValues | + + + ### tools URL of any analysis tools or models that have been created for this dataset and are available for further use -| title | examples | required | type | -|:--------|:-----------|:-----------|:---------------------| -| Tools | | False | CommaSeparatedValues | +| title | required | type | +|:--------|:-----------|:---------------------| +| Tools | False | CommaSeparatedValues | + + + ### datasetLinkage @@ -561,120 +803,340 @@ Dataset Linkage copied over from + + + #### isDerivedFrom Indicate if derived datasets or predefined extracts are available and the type of derivation available. Notes. Single or multiple dimensions can be provided as a derived extract alongside the dataset -| title | examples | required | type | -|:------------|:-----------|:-----------|:---------------------| -| Derivations | | False | CommaSeparatedValues | +| title | required | type | +|:------------|:-----------|:---------------------| +| Derivations | False | CommaSeparatedValues | + + + #### isPartOf If the dataset is part of a group or family -| title | examples | required | type | -|:----------|:-----------|:-----------|:---------------------| -| Is PartOf | | False | CommaSeparatedValues | +| title | required | type | +|:----------|:-----------|:---------------------| +| Is PartOf | False | CommaSeparatedValues | + + + #### isMemberOf Dataset is a member of XXX(?) -| title | examples | required | type | -|:------------|:-----------|:-----------|:---------------------| -| Is MemberOf | | False | CommaSeparatedValues | +| title | required | type | +|:------------|:-----------|:---------------------| +| Is MemberOf | False | CommaSeparatedValues | + + + #### linkedDatasets Links to other datasets. -| title | examples | required | type | -|:----------------|:-----------|:-----------|:---------------------| -| Linked Datasets | | False | CommaSeparatedValues | +| title | required | type | +|:----------------|:-----------|:---------------------| +| Linked Datasets | False | CommaSeparatedValues | + + + ### investigations Please provide the keystone paper associated with the dataset. -| title | examples | required | type | -|:---------------|:-----------|:-----------|:---------------------| -| Investigations | | False | CommaSeparatedValues | +| title | required | type | +|:---------------|:-----------|:---------------------| +| Investigations | False | CommaSeparatedValues | + + + ## observations Obsservations -| title | examples | required | type | -|:-------------|:-----------|:-----------|:------------| -| Observations | | False | Observation | +| title | required | type | +|:-------------|:-----------|:------------| +| Observations | False | Observation | + + + ## structuralMetadata Descriptions of all tables and data elements that can be included in the dataset -| title | examples | required | type | -|:--------------------|:-----------|:-----------|:----------| -| Structural Metadata | | False | DataTable | +| title | required | type | +|:--------------------|:-----------|:----------| +| Structural Metadata | False | DataTable | + + + + +## tissuesSampleCollection + +Metadata collection for Tissue Samples datasets + + + + + + +### id + +ID of the tissue sample collection + +| title | required | type | +|:--------|:-----------|:---------------------| +| ID | False | CommaSeparatedValues | + + + + +### dataCategories + +Data categories related to the tissue sample collection + +| title | required | type | +|:----------------|:-----------|:---------------------| +| Data Categories | False | CommaSeparatedValues | + + + + +### materialType + +Material type of the tissue sample collection + +| title | required | type | +|:--------------|:-----------|:---------------------| +| Material Type | False | CommaSeparatedValues | + + + + +### accessConditions + +Access conditions for the tissue sample collection + +| title | required | type | +|:------------------|:-----------|:---------------------| +| Access Conditions | False | CommaSeparatedValues | -## omopIDs -Collection of OMOP IDs that are contained within the dataset. + + +### collectionType + +Type of the tissue sample collection + +| title | required | type | +|:----------------|:-----------|:---------------------| +| Collection Type | False | CommaSeparatedValues | + + + + +### disease + +Disease associated with the tissue sample collection + +| title | required | type | +|:--------|:-----------|:---------------------| +| Disease | False | CommaSeparatedValues | + + + + +### storageTemperature + +Storage temperature of the tissue sample collection + +| title | required | type | +|:--------------------|:-----------|:---------------------| +| Storage Temperature | False | CommaSeparatedValues | + + + + +### sampleAgeRange + +Age range of the tissue sample collection + +| title | required | type | +|:-----------------|:-----------|:---------------------| +| Sample Age Range | False | CommaSeparatedValues | + + + + +### tissueSampleMetadata + +Metadata related to the tissue sample + + + + + + +#### id + +ID of the tissue sample metadata + +| title | required | type | +|:------------|:-----------|:-------| +| Metadata ID | False | str | + + + + +#### sampleDonor + +Information about the sample donor + + + + + + +##### id + +ID of the sample donor +| title | required | type | +|:---------|:-----------|:-------| +| Donor ID | False | str | -### measurements -OMOP Concept IDs for measured quantities. E.g. 44810410 - https://athena.ohdsi.org/search-terms/terms/44810410 + +##### sex + +Sex of the sample donor -| title | examples | required | type | -|:------------------|:-----------|:-----------|:-----------------------| -| OMOP Measurements | | False | CommaSeparatedIntegers | +| title | required | type | +|:----------|:-----------|:-------| +| Donor Sex | False | str | + -### drug -OMOP Concept IDs for drug exposures. E.g. 602396 - https://athena.ohdsi.org/search-terms/terms/602396 + +##### birthDate + +Date of birth of the sample donor -| title | examples | required | type | -|:-----------|:-----------|:-----------|:-----------------------| -| OMOP Drugs | | False | CommaSeparatedIntegers | +| title | required | type | +|:-----------------|:-----------|:-------| +| Donor birth date | False | date | + -### observations -OMOP Concept IDs for observations. + +##### dataCategories + +Data categories related to the sample donor -| title | examples | required | type | -|:------------------|:-----------|:-----------|:-----------------------| -| OMOP Observations | | False | CommaSeparatedIntegers | +| title | required | type | +|:----------------------|:-----------|:---------------------| +| Donor Data Categories | False | CommaSeparatedValues | + -### specimens -OMOP Concept IDs for specimens. + +#### sampleType + +Type of the tissue sample -| title | examples | required | type | -|:---------------|:-----------|:-----------|:-----------------------| -| OMOP Specimens | | False | CommaSeparatedIntegers | +| title | required | type | +|:------------|:-----------|:---------------------| +| Sample Type | False | CommaSeparatedValues | + -### conditions -OMOP Concept IDs for condition occurrences. + +#### storageTemperature + +Storage temperature of the tissue sample -| title | examples | required | type | -|:---------------------------|:-----------|:-----------|:-----------------------| -| OMOP Condition Occurrences | | False | CommaSeparatedIntegers | +| title | required | type | +|:--------------------|:-----------|:-------| +| Storage Temperature | False | str | + -### procedures -OMOP Concept IDs for procedure occurrences. + +#### creationDate + +Date when the tissue sample metadata was created -| title | examples | required | type | -|:---------------------------|:-----------|:-----------|:-----------------------| -| OMOP Procedure Occurrences | | False | CommaSeparatedIntegers | +| title | required | type | +|:--------------|:-----------|:-------| +| Creation Date | False | date | + -### device_exposures -OMOP Concept IDs for device exposures. + +#### anatomicalSiteOntologyCode + +Ontology code for the anatomical site -| title | examples | required | type | -|:--------|:-----------|:-----------|:-----------------------| -| OMOP | | False | CommaSeparatedIntegers | +| title | required | type | +|:------------------------------|:-----------|:---------------------| +| Anatomical Site Ontology Code | False | CommaSeparatedValues | + + + + +#### anatomicalSiteOntologyDescription + +Ontology description for the anatomical site + +| title | required | type | +|:-------------------------------------|:-----------|:---------------------| +| Anatomical Site Ontology Description | False | CommaSeparatedValues | + + + + +#### anatomicalSiteFreeText + +Free text describing the anatomical site + +| title | required | type | +|:--------------------------|:-----------|:---------------------| +| Anatomical Site Free Text | False | CommaSeparatedValues | + + + + +#### sampleContentDiagnosis + +Diagnosis related to the sample content + +| title | required | type | +|:-------------------------|:-----------|:---------------------| +| Sample Content Diagnosis | False | CommaSeparatedValues | + + + + +#### useRestrictions + +Restrictions on the use of the tissue sample + +| title | required | type | +|:-----------------|:-----------|:---------------------| +| Use Restrictions | False | CommaSeparatedValues | + + + diff --git a/docs/GWDM/1.1.structure.json b/docs/GWDM/1.1.structure.json index 961e4de..f2b45c0 100644 --- a/docs/GWDM/1.1.structure.json +++ b/docs/GWDM/1.1.structure.json @@ -200,6 +200,23 @@ "type": "str" } ] + }, + { + "name": "populationSize", + "required": false, + "title": "Population size", + "description": "Summary population size of the cohort", + "examples": null, + "type": "int" + }, + { + "name": "datasetSubType", + "required": false, + "title": "Dataset sub type", + "description": "What us the subtype for this dataset?", + "examples": null, + "type": "DatasetType", + "subItems": [] } ] }, @@ -384,7 +401,7 @@ "name": "timeLag", "required": true, "title": "Time Lag", - "description": "Rypical time-lag between an event and the data for that event appearing in the dataset", + "description": "Typical time-lag between an event and the data for that event appearing in the dataset", "examples": null, "type": "TimeLag" }, @@ -726,75 +743,215 @@ "type": "DataTable" }, { - "name": "omopIDs", + "name": "tissuesSampleCollection", "required": false, - "title": "OMOP IDs", - "description": "Collection of OMOP IDs that are contained within the dataset.", + "title": "Tissues Sample Collection", + "description": "Metadata collection for Tissue Samples datasets", "examples": null, - "type": "OmopIDs", + "type": "TissuesSampleCollection", "subItems": [ { - "name": "measurements", + "name": "id", "required": false, - "title": "OMOP Measurements", - "description": "OMOP Concept IDs for measured quantities. E.g. 44810410 - https://athena.ohdsi.org/search-terms/terms/44810410", + "title": "ID", + "description": "ID of the tissue sample collection", "examples": null, - "type": "CommaSeparatedIntegers", + "type": "CommaSeparatedValues", "subItems": [] }, { - "name": "drug", + "name": "dataCategories", "required": false, - "title": "OMOP Drugs", - "description": "OMOP Concept IDs for drug exposures. E.g. 602396 - https://athena.ohdsi.org/search-terms/terms/602396", + "title": "Data Categories", + "description": "Data categories related to the tissue sample collection", "examples": null, - "type": "CommaSeparatedIntegers", + "type": "CommaSeparatedValues", "subItems": [] }, { - "name": "observations", + "name": "materialType", "required": false, - "title": "OMOP Observations", - "description": "OMOP Concept IDs for observations.", + "title": "Material Type", + "description": "Material type of the tissue sample collection", "examples": null, - "type": "CommaSeparatedIntegers", + "type": "CommaSeparatedValues", "subItems": [] }, { - "name": "specimens", + "name": "accessConditions", "required": false, - "title": "OMOP Specimens", - "description": "OMOP Concept IDs for specimens.", + "title": "Access Conditions", + "description": "Access conditions for the tissue sample collection", "examples": null, - "type": "CommaSeparatedIntegers", + "type": "CommaSeparatedValues", "subItems": [] }, { - "name": "conditions", + "name": "collectionType", "required": false, - "title": "OMOP Condition Occurrences", - "description": "OMOP Concept IDs for condition occurrences.", + "title": "Collection Type", + "description": "Type of the tissue sample collection", "examples": null, - "type": "CommaSeparatedIntegers", + "type": "CommaSeparatedValues", "subItems": [] }, { - "name": "procedures", + "name": "disease", "required": false, - "title": "OMOP Procedure Occurrences", - "description": "OMOP Concept IDs for procedure occurrences.", + "title": "Disease", + "description": "Disease associated with the tissue sample collection", "examples": null, - "type": "CommaSeparatedIntegers", + "type": "CommaSeparatedValues", "subItems": [] }, { - "name": "device_exposures", + "name": "storageTemperature", "required": false, - "title": "OMOP ", - "description": "OMOP Concept IDs for device exposures.", + "title": "Storage Temperature", + "description": "Storage temperature of the tissue sample collection", "examples": null, - "type": "CommaSeparatedIntegers", + "type": "CommaSeparatedValues", "subItems": [] + }, + { + "name": "sampleAgeRange", + "required": false, + "title": "Sample Age Range", + "description": "Age range of the tissue sample collection", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + }, + { + "name": "tissueSampleMetadata", + "required": false, + "title": "Tissue Sample Metadata", + "description": "Metadata related to the tissue sample", + "examples": null, + "type": "TissueSampleMetadata", + "subItems": [ + { + "name": "id", + "required": false, + "title": "Metadata ID", + "description": "ID of the tissue sample metadata", + "examples": null, + "type": "str" + }, + { + "name": "sampleDonor", + "required": false, + "title": "Sample Donor", + "description": "Information about the sample donor", + "examples": null, + "type": "SampleDonor", + "subItems": [ + { + "name": "id", + "required": false, + "title": "Donor ID", + "description": "ID of the sample donor", + "examples": null, + "type": "str" + }, + { + "name": "sex", + "required": false, + "title": "Donor Sex", + "description": "Sex of the sample donor", + "examples": null, + "type": "str" + }, + { + "name": "birthDate", + "required": false, + "title": "Donor birth date", + "description": "Date of birth of the sample donor", + "examples": null, + "type": "date" + }, + { + "name": "dataCategories", + "required": false, + "title": "Donor Data Categories", + "description": "Data categories related to the sample donor", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + } + ] + }, + { + "name": "sampleType", + "required": false, + "title": "Sample Type", + "description": "Type of the tissue sample", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + }, + { + "name": "storageTemperature", + "required": false, + "title": "Storage Temperature", + "description": "Storage temperature of the tissue sample", + "examples": null, + "type": "str" + }, + { + "name": "creationDate", + "required": false, + "title": "Creation Date", + "description": "Date when the tissue sample metadata was created", + "examples": null, + "type": "date" + }, + { + "name": "anatomicalSiteOntologyCode", + "required": false, + "title": "Anatomical Site Ontology Code", + "description": "Ontology code for the anatomical site", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + }, + { + "name": "anatomicalSiteOntologyDescription", + "required": false, + "title": "Anatomical Site Ontology Description", + "description": "Ontology description for the anatomical site", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + }, + { + "name": "anatomicalSiteFreeText", + "required": false, + "title": "Anatomical Site Free Text", + "description": "Free text describing the anatomical site", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + }, + { + "name": "sampleContentDiagnosis", + "required": false, + "title": "Sample Content Diagnosis", + "description": "Diagnosis related to the sample content", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + }, + { + "name": "useRestrictions", + "required": false, + "title": "Use Restrictions", + "description": "Restrictions on the use of the tissue sample", + "examples": null, + "type": "CommaSeparatedValues", + "subItems": [] + } + ] } ] } diff --git a/hdr_schemata/models/GWDM/1.0/schema.json b/hdr_schemata/models/GWDM/1.0/schema.json index 4c08331..8e9f90b 100644 --- a/hdr_schemata/models/GWDM/1.0/schema.json +++ b/hdr_schemata/models/GWDM/1.0/schema.json @@ -1223,7 +1223,7 @@ "$ref": "#/$defs/TimeLag" } ], - "description": "Rypical time-lag between an event and the data for that event appearing in the dataset", + "description": "Typical time-lag between an event and the data for that event appearing in the dataset", "example": "LESS 1 WEEK", "title": "Time Lag" }, diff --git a/hdr_schemata/models/GWDM/1.1/schema.json b/hdr_schemata/models/GWDM/1.1/schema.json index fda9abb..17fe4f7 100644 --- a/hdr_schemata/models/GWDM/1.1/schema.json +++ b/hdr_schemata/models/GWDM/1.1/schema.json @@ -1488,7 +1488,7 @@ "$ref": "#/$defs/TimeLag" } ], - "description": "Rypical time-lag between an event and the data for that event appearing in the dataset", + "description": "Typical time-lag between an event and the data for that event appearing in the dataset", "example": "LESS 1 WEEK", "title": "Time Lag" }, diff --git a/hdr_schemata/models/HDRUK/create_json_schema.py b/hdr_schemata/models/HDRUK/create_json_schema.py index 67d69b0..d4c81b1 100644 --- a/hdr_schemata/models/HDRUK/create_json_schema.py +++ b/hdr_schemata/models/HDRUK/create_json_schema.py @@ -5,4 +5,3 @@ v2_1_2.Hdruk212.save_schema() v2_1_3.Hdruk213.save_schema() -v2_1_3.Hdruk213.save_schema("latest/dev/schema.json") diff --git a/hdr_schemata/utils/create_markdown.py b/hdr_schemata/utils/create_markdown.py index 2f43abf..a784408 100644 --- a/hdr_schemata/utils/create_markdown.py +++ b/hdr_schemata/utils/create_markdown.py @@ -1,5 +1,6 @@ +from hdr_schemata.models.GWDM.v1_1 import Gwdm11 as Model #from hdr_schemata.models.GWDM.v1_0 import Gwdm10 as Model -from hdr_schemata.models.HDRUK import Hdruk212 as Model +#from hdr_schemata.models.HDRUK import Hdruk212 as Model #from hdr_schemata.models.HDRUK.base import Observation as Model from pydantic import BaseModel import pandas as pd