From c886a9a5df17e58d59f7f93d8ba57b084860bb8e Mon Sep 17 00:00:00 2001 From: Tristan Millington Date: Wed, 10 Dec 2025 14:02:23 +0000 Subject: [PATCH] Juristiction now is from a fixed list --- README.md | 2 + docs/HDRUK/4.0.0.example.json | 339 ++++++++-------- docs/HDRUK/4.0.0.form.json | 404 ++++++++++++-------- docs/HDRUK/4.0.0.md | 42 +- docs/HDRUK/4.0.0.structure.json | 17 +- docs/HDRUK/4.0.0.template.json | 70 +++- hdr_schemata/definitions/HDRUK/__init__.py | 1 + hdr_schemata/models/GWDM/2.0/schema.json | 257 ++++++++++++- hdr_schemata/models/GWDM/v2_0/Access.py | 2 +- hdr_schemata/models/HDRUK/3.0.0/schema.json | 262 ++++++++++++- hdr_schemata/models/HDRUK/4.0.0/schema.json | 262 ++++++++++++- hdr_schemata/models/HDRUK/v3_0_0/Access.py | 2 +- 12 files changed, 1277 insertions(+), 383 deletions(-) diff --git a/README.md b/README.md index 6d142c04..2497b199 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,8 @@ Run `python create_json_schema.py`. This will modify the contents of `hdr_schema pip install -e . ``` +You will also have to update the json templates. From the repo folder run `python create_example.py` + ### Update docs Finally, update the Markdown docs with: diff --git a/docs/HDRUK/4.0.0.example.json b/docs/HDRUK/4.0.0.example.json index 01ea33c0..e45f3fe2 100644 --- a/docs/HDRUK/4.0.0.example.json +++ b/docs/HDRUK/4.0.0.example.json @@ -1,180 +1,177 @@ { - "identifier": null, - "version": "1.1.0", - "revisions": [ - { - "version": "6.0.0", - "url": null - } - ], - "issued": "2024-10-24T00:00:00.000Z", - "modified": "2024-10-24T00:00:00.000Z", - "summary": { - "title": "North West London COVID-19 Patient Level Situation Report", - "abstract": "CPRD Aurum contains primary care data contributed by General Practitioner (GP) practices using EMIS Web® including patient registration information and all care events that GPs have chosen to record as part of their usual medical practice.", - "dataCustodian": { - "identifier": "30f16703-28bc-4f45-9ce5-625d2d3db27d", - "name": "Health Data Research UK", - "logo": null, - "description": null, - "contactPoint": "test@test.co.uk", - "memberOf": null - }, - "populationSize": 1000, - "keywords": [ - "Outpatient Care", - "Socioeconomic Deprivation", - "Infant Morbidity", - "Learning disability", - "Primary Care Prescription", - "Accident and Emergency Admissions" - ], - "doiName": null, - "contactPoint": "gateway@hdruk.ac.uk", - "datasetAliases": null - }, - "documentation": { - "description": "CPRD Aurum contains primary care data contributed by General Practitioner (GP) practices using EMIS Web® including patient registration information and all care events that GPs have chosen to record as part of their usual medical practice.", - "associatedMedia": null, - "inPipeline": null - }, - "coverage": { - "spatial": "United Kingdom", - "typicalAgeRangeMin": 0, - "typicalAgeRangeMax": 0, - "datasetCompleteness": null, - "materialType": null, - "followUp": null, - "pathway": null - }, - "provenance": { - "origin": { - "purpose": null, - "datasetType": [ - { - "name": "Health and disease", - "subTypes": [] - } + "identifier": null, + "version": "1.1.0", + "revisions": [ + { + "version": "6.0.0", + "url": null + } + ], + "issued": "2024-10-24T00:00:00.000Z", + "modified": "2024-10-24T00:00:00.000Z", + "summary": { + "title": "North West London COVID-19 Patient Level Situation Report", + "abstract": "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.", + "dataCustodian": { + "identifier": "30f16703-28bc-4f45-9ce5-625d2d3db27d", + "name": "Health Data Research UK", + "logo": null, + "description": null, + "contactPoint": "test@test.co.uk", + "memberOf": null + }, + "populationSize": 1000, + "keywords": [ + "Outpatient Care", + "Socioeconomic Deprivation", + "Infant Morbidity", + "Learning disability", + "Primary Care Prescription", + "Accident and Emergency Admissions" + ], + "doiName": null, + "contactPoint": "gateway@hdruk.ac.uk", + "datasetAliases": null + }, + "documentation": { + "description": "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.", + "associatedMedia": null, + "inPipeline": null + }, + "coverage": { + "spatial": "United Kingdom", + "typicalAgeRangeMin": null, + "typicalAgeRangeMax": null, + "datasetCompleteness": null, + "materialType": null, + "followUp": null, + "pathway": null + }, + "provenance": { + "origin": { + "purpose": null, + "datasetType": [ + "Health and disease" + ], + "source": null, + "collectionSource": null, + "imageContrast": null + }, + "temporal": { + "publishingFrequency": "Continuous", + "distributionReleaseDate": null, + "startDate": "2024-10-24T00:00:00.000Z", + "endDate": null, + "timeLag": "Not applicable" + } + }, + "accessibility": { + "usage": { + "dataUseLimitation": null, + "dataUseRequirements": null, + "resourceCreator": null + }, + "access": { + "accessRights": "In Progress", + "accessServiceCategory": null, + "accessService": null, + "accessRequestCost": null, + "deliveryLeadTime": null, + "jurisdiction": null, + "dataController": null, + "dataProcessor": null + }, + "formatAndStandards": { + "vocabularyEncodingScheme": [ + "LOCAL", + "ICD10" + ], + "conformsTo": [ + "LOCAL", + "NHS DATA DICTIONARY" + ], + "language": [ + "en" + ], + "format": [ + "text/tab-separated-values", + "application/sql", + "text/csv", + "image/diacom-rle" + ] + } + }, + "enrichmentAndLinkage": { + "derivedFrom": [ + { + "pid": null, + "title": null, + "url": null + } + ], + "isPartOf": [ + { + "pid": null, + "title": null, + "url": null + } ], - "source": null, - "collectionSource": null, - "imageContrast": null - }, - "temporal": { - "publishingFrequency": "Continuous", - "distributionReleaseDate": null, - "startDate": "2024-10-24T00:00:00.000Z", - "endDate": null, - "timeLag": "Not applicable" - } - }, - "accessibility": { - "usage": { - "dataUseLimitation": null, - "dataUseRequirements": null, - "resourceCreator": null - }, - "access": { - "accessRights": "In Progress", - "accessServiceCategory": null, - "accessService": null, - "accessRequestCost": null, - "deliveryLeadTime": null, - "jurisdiction": null, - "dataController": null, - "dataProcessor": null - }, - "formatAndStandards": { - "vocabularyEncodingScheme": [ - "LOCAL", - "ICD10" + "linkableDatasets": [ + { + "pid": null, + "title": null, + "url": null + } ], - "conformsTo": [ - "LOCAL", - "NHS DATA DICTIONARY" + "similarToDatasets": [ + { + "pid": null, + "title": null, + "url": null + } ], - "language": [ - "en" + "investigations": null, + "tools": null, + "publicationAboutDataset": [ + "10.1093/ije/dyab028" ], - "format": [ - "text/tab-separated-values", - "application/sql", - "text/csv", - "image/diacom-rle" + "publicationUsingDataset": [ + "10.1001/jamapediatrics.2016.3633" ] - } - }, - "enrichmentAndLinkage": { - "derivedFrom": [ + }, + "observations": [ { - "pid": null, - "title": null, - "url": null + "observedNode": "Persons", + "measuredValue": 1000, + "disambiguatingDescription": null, + "observationDate": "2024-10-24", + "measuredProperty": "Count" } - ], - "isPartOf": [ - { - "pid": null, - "title": null, - "url": null - } - ], - "linkableDatasets": [ - { - "pid": null, - "title": null, - "url": null - } - ], - "similarToDatasets": [ - { - "pid": null, - "title": null, - "url": null - } - ], - "investigations": null, - "tools": null, - "publicationAboutDataset": [ - "10.1093/ije/dyab028" - ], - "publicationUsingDataset": [ - "10.1001/jamapediatrics.2016.3633" - ] - }, - "observations": [ - { - "observedNode": "Persons", - "measuredValue": 1000, - "disambiguatingDescription": null, - "observationDate": "2024-10-24", - "measuredProperty": "Count" - } - ], - "structuralMetadata": null, - "demographicFrequency": { - "age": [ - { - "bin": "30-34 years", - "count": 1000 - } - ], - "ethnicity": [ - { - "bin": "Black or Black British - Any other Black background", - "count": 1000 - } - ], - "disease": [ - { - "diseaseCode": "J45", - "diseaseCodeVocabulary": "ICD10", - "count": 1000 - } - ] - }, - "omics": { - "assay": null, - "platform": null - } + ], + "structuralMetadata": null, + "demographicFrequency": { + "age": [ + { + "bin": "30-34 years", + "count": 1000 + } + ], + "ethnicity": [ + { + "bin": "Black or Black British - Any other Black background", + "count": 1000 + } + ], + "disease": [ + { + "diseaseCode": "J45", + "diseaseCodeVocabulary": "ICD10", + "count": 1000 + } + ] + }, + "omics": { + "assay": null, + "platform": null + } } \ No newline at end of file diff --git a/docs/HDRUK/4.0.0.form.json b/docs/HDRUK/4.0.0.form.json index 6fd6a5bd..2718e320 100644 --- a/docs/HDRUK/4.0.0.form.json +++ b/docs/HDRUK/4.0.0.form.json @@ -537,155 +537,6 @@ }, "location": "provenance.origin.purpose" }, - { - "required": true, - "title": "Dataset type", - "description": "The topic areas to which the dataset content relates.", - "guidance": "Types include those listed below. Datasets can have more than one type associated.\\n- **Health and disease**: Includes any data related to mental health, cardiovascular, cancer, rare diseases, metabolic and endocrine, neurological, reproductive, maternity and neonatology, respiratory, immunity, musculoskeletal, vision, renal and urogenital, oral and gastrointestinal, cognitive function or hearing.\\n- **Treatments/Interventions**: Includes any data related to treatment or interventions related to vaccines or which are preventative or therapeutic in nature.\\n- **Measurements/Tests**: Includes any data related to laboratory or other diagnostics.\\n- **Imaging types**: Includes any data related to CT, MRI, PET, x-ray, ultrasound or pathology imaging.\\n- **Imaging area of the body**: Indicates whether the dataset relates to head, chest, arm abdomen or leg imaging.\\n- **Omics**: Includes any data related to proteomics, transcriptomics, epigenomics, metabolomics, multiomics, metagenomics or genomics.\\n- **Socioeconomic**: Includes any data related to education, crime and justice, ethnicity, housing, labour, ageing, economics, marital status, social support, deprivation, religion, occupation, finances or family circumstances.\\n- **Lifestyle**: Includes any data related to smoking, physical activity, dietary habits or alcohol.\\n- **Registry**: Includes any data related to disease registries for research, national disease registries, audits, or birth and deaths records.\\n- **Environment and energy**: Includes any data related to the monitoring or study of environmental or energy factors or events.\\n- **Information and communication**: Includes any data related to the study or application of information and communication.\\n- **Politics**: Includes any data related to political views, activities, voting, etc.", - "examples": [ - "Health and disease" - ], - "is_list": true, - "is_optional": false, - "types": { - "title": "Union", - "type": "nested", - "options": [ - { - "title": "Health and disease", - "options": [ - "Mental health", - "Cardiovascular", - "Cancer", - "Rare diseases", - "Metabolic and endocrine", - "Neurological", - "Reproductive", - "Maternity and neonatology", - "Respiratory", - "Immunity", - "Musculoskeletal", - "Vision", - "Renal and urogenital", - "Oral and gastrointestinal", - "Cognitive function", - "Hearing", - "Others" - ] - }, - { - "title": "Treatments/Interventions", - "options": [ - "Vaccines", - "Preventive", - "Therapeutic", - "Others" - ] - }, - { - "title": "Measurements/Tests", - "options": [ - "Laboratory", - "Other diagnostics" - ] - }, - { - "title": "Imaging types", - "options": [ - "CT", - "MRI", - "PET", - "X-ray", - "Ultrasound", - "Pathology", - "Others" - ] - }, - { - "title": "Imaging Area Of The Body", - "options": [ - "Head", - "Chest", - "Arm", - "Abdomen", - "Leg", - "Others" - ] - }, - { - "title": "Omics", - "options": [ - "Proteomics", - "Transcriptomics", - "Epigenomics", - "Metabolomics", - "Metagenomics", - "Genomics", - "Lipidomics", - "Others" - ] - }, - { - "title": "Socioeconomic", - "options": [ - "Education", - "Crime and justice", - "Ethnicity", - "Housing", - "Labour", - "Ageing", - "Economics", - "Marital status", - "Social support", - "Deprivation", - "Religion", - "Occupation", - "Finances", - "Family circumstance", - "Others" - ] - }, - { - "title": "Lifestyle", - "options": [ - "Smoking", - "Physical activity", - "Dietary habits", - "Alcohol", - "Others" - ] - }, - { - "title": "Registry", - "options": [ - "Disease registry (research)", - "National disease registries and audits", - "Births and deaths", - "Others" - ] - }, - { - "title": "Environment and energy", - "options": [ - "Not applicable" - ] - }, - { - "title": "Information and communication", - "options": [ - "Not applicable" - ] - }, - { - "title": "Politics", - "options": [ - "Not applicable" - ] - } - ] - }, - "location": "provenance.origin.datasetType" - }, { "required": false, "title": "Source of data extraction", @@ -1043,9 +894,258 @@ "is_list": true, "is_optional": true, "types": { - "pattern": "^[A-Z]{2}(-[A-Z]{2,3})?$", - "title": "Isocountrycode", - "type": "string" + "type": "string", + "options": [ + "AF", + "AL", + "DZ", + "AS", + "AD", + "AO", + "AI", + "AQ", + "AG", + "AR", + "AM", + "AW", + "AU", + "AT", + "AZ", + "BS", + "BH", + "BD", + "BB", + "BY", + "BE", + "BZ", + "BJ", + "BM", + "BT", + "BO", + "BQ", + "BA", + "BW", + "BV", + "BR", + "IO", + "BN", + "BG", + "BF", + "BI", + "CV", + "KH", + "CM", + "CA", + "KY", + "CF", + "TD", + "CL", + "CN", + "CX", + "CC", + "CO", + "KM", + "CD", + "CG", + "CK", + "CR", + "HR", + "CU", + "CW", + "CY", + "CZ", + "CI", + "DK", + "DJ", + "DM", + "DO", + "EC", + "EG", + "SV", + "GQ", + "ER", + "EE", + "SZ", + "ET", + "FK", + "FO", + "FJ", + "FI", + "FR", + "GF", + "PF", + "TF", + "GA", + "GM", + "GE", + "DE", + "GH", + "GI", + "GR", + "GL", + "GD", + "GP", + "GU", + "GT", + "GG", + "GN", + "GW", + "GY", + "HT", + "HM", + "VA", + "HN", + "HK", + "HU", + "IS", + "IN", + "ID", + "IR", + "IQ", + "IE", + "IM", + "IL", + "IT", + "JM", + "JP", + "JE", + "JO", + "KZ", + "KE", + "KI", + "KP", + "KR", + "KW", + "KG", + "LA", + "LV", + "LB", + "LS", + "LR", + "LY", + "LI", + "LT", + "LU", + "MO", + "MG", + "MW", + "MY", + "MV", + "ML", + "MT", + "MH", + "MQ", + "MR", + "MU", + "YT", + "MX", + "FM", + "MD", + "MC", + "MN", + "ME", + "MS", + "MA", + "MZ", + "MM", + "NA", + "NR", + "NP", + "NL", + "NC", + "NZ", + "NI", + "NE", + "NG", + "NU", + "NF", + "MK", + "MP", + "NO", + "OM", + "PK", + "PW", + "PS", + "PA", + "PG", + "PY", + "PE", + "PH", + "PN", + "PL", + "PT", + "PR", + "QA", + "RO", + "RU", + "RW", + "RE", + "BL", + "SH", + "KN", + "LC", + "MF", + "PM", + "VC", + "WS", + "SM", + "ST", + "SA", + "SN", + "RS", + "SC", + "SL", + "SG", + "SX", + "SK", + "SI", + "SB", + "SO", + "ZA", + "GS", + "SS", + "ES", + "LK", + "SD", + "SR", + "SJ", + "SE", + "CH", + "SY", + "TW", + "TJ", + "TZ", + "TH", + "TL", + "TG", + "TK", + "TO", + "TT", + "TN", + "TM", + "TC", + "TV", + "TR", + "UG", + "UA", + "AE", + "GB", + "UM", + "US", + "UY", + "UZ", + "VU", + "VE", + "VN", + "VG", + "VI", + "WF", + "EH", + "YE", + "ZM", + "ZW", + "AX" + ] }, "location": "accessibility.access.jurisdiction" }, diff --git a/docs/HDRUK/4.0.0.md b/docs/HDRUK/4.0.0.md index 67f015e9..37c6dc4e 100644 --- a/docs/HDRUK/4.0.0.md +++ b/docs/HDRUK/4.0.0.md @@ -184,9 +184,9 @@ Please provide a URL that describes the organisation. If a description is not p Organisation contact point(s) which will be used for receiving queries from HDR, and enquiries and data access requests from Researchers. If a contact point is not provided this will default to the contact point for the team submitting the metadata. -| title | guidance | is_list | required | type | -|:--------------|:-----------|:----------|:-----------|:-----------------------------------------------------------------------------------------------| -| contact point | | False | True | ["EmailAddress[{'anyOf': [{'format': 'email', 'type': 'string'}, {'type': 'null'}]}]", 'List'] | +| title | guidance | is_list | required | type | +|:--------------|:-----------|:----------|:-----------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------| +| contact point | | False | True | ["EmailAddress[{'anyOf': [{'format': 'email', 'type': 'string'}, {'type': 'null'}]}]", 'typing.List[hdr_schemata.definitions.HDRUK.EmailAddress.EmailAddress]'] | Examples: @@ -265,9 +265,9 @@ Examples: Dataset & BioSample alias or alternate names. -| title | guidance | is_list | required | type | -|:--------------------------|:-------------------------------------------------------------------------------|:----------|:-----------|:------------------------------------------------------------------------------------------------------------------| -| Dataset & BioSample alias | Alternate name, acronym or other identifier for the Dataset and/or BioSamples. | False | False | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'List', 'null'] | +| title | guidance | is_list | required | type | +|:--------------------------|:-------------------------------------------------------------------------------|:----------|:-----------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Dataset & BioSample alias | Alternate name, acronym or other identifier for the Dataset and/or BioSamples. | False | False | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.ShortDescription.ShortDescription]]', 'null'] | @@ -298,9 +298,9 @@ Examples: Please provide any media associated with the Gateway Organisation using a valid URL 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. -| title | guidance | is_list | required | type | -|:-----------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------|:-----------|:------------------------------------------------------------------------------------------------------------------| -| Associated media | - Please provide any media associated with the Gateway Organisation **using a valid URL** 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.
- Note: media assets should be hosted by the organisation.
- **Example**: This could be a **link to a PDF Document** that describes methodology or further detail about the datasets, or a graph or chart that provides further context about the dataset.
- If you are providing multiple links for associated media, we recommend that you separate these with a comma. | False | False | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'List', 'null'] | +| title | guidance | is_list | required | type | +|:-----------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------|:-----------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Associated media | - Please provide any media associated with the Gateway Organisation **using a valid URL** 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.
- Note: media assets should be hosted by the organisation.
- **Example**: This could be a **link to a PDF Document** that describes methodology or further detail about the datasets, or a graph or chart that provides further context about the dataset.
- If you are providing multiple links for associated media, we recommend that you separate these with a comma. | False | False | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.Url.Url]]', 'null'] | Examples: @@ -331,9 +331,9 @@ This information includes attributes for geographical and temporal coverage, coh The geographical area covered by the dataset. It is recommended that links are to entries in one of the recommended standards:
- For locations in the UK: [ONS standards](https://geoportal.statistics.gov.uk/datasets/208d9884575647c29f0dd5a1184e711a/about)
- For locations in other countries: [ISO 3166-1 & ISO 3166-2](https://github.com/HDRUK/reference-codes) -| title | guidance | is_list | required | type | -|:--------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------|:-----------|:----------------------------------------------------------------------------------------------------------| -| Geographic coverage | - The geographical area covered by the dataset.
- Please provide a valid location.
- For locations in the UK, this location should conform to [ONS standards](https://geoportal.statistics.gov.uk/datasets/208d9884575647c29f0dd5a1184e711a/about).
- For locations in other countries we use [ISO 3166-1 & ISO 3166-2](https://github.com/HDRUK/reference-codes). | False | True | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'List'] | +| title | guidance | is_list | required | type | +|:--------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------|:-----------|:---------------------------------------------------------------------------------------------------------------------------------------------------------| +| Geographic coverage | - The geographical area covered by the dataset.
- Please provide a valid location.
- For locations in the UK, this location should conform to [ONS standards](https://geoportal.statistics.gov.uk/datasets/208d9884575647c29f0dd5a1184e711a/about).
- For locations in other countries we use [ISO 3166-1 & ISO 3166-2](https://github.com/HDRUK/reference-codes). | False | True | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'typing.List[hdr_schemata.definitions.HDRUK.Url.Url]'] | Examples: @@ -446,9 +446,9 @@ Please indicate the purpose(s) that the dataset was collected. The topic areas to which the dataset content relates. -| title | guidance | is_list | required | type | -|:-------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------|:-----------|:----------| -| Dataset type | Types include those listed below. Datasets can have more than one type associated.
- **Health and disease**: Includes any data related to mental health, cardiovascular, cancer, rare diseases, metabolic and endocrine, neurological, reproductive, maternity and neonatology, respiratory, immunity, musculoskeletal, vision, renal and urogenital, oral and gastrointestinal, cognitive function or hearing.
- **Treatments/Interventions**: Includes any data related to treatment or interventions related to vaccines or which are preventative or therapeutic in nature.
- **Measurements/Tests**: Includes any data related to laboratory or other diagnostics.
- **Imaging types**: Includes any data related to CT, MRI, PET, x-ray, ultrasound or pathology imaging.
- **Imaging area of the body**: Indicates whether the dataset relates to head, chest, arm abdomen or leg imaging.
- **Omics**: Includes any data related to proteomics, transcriptomics, epigenomics, metabolomics, multiomics, metagenomics or genomics.
- **Socioeconomic**: Includes any data related to education, crime and justice, ethnicity, housing, labour, ageing, economics, marital status, social support, deprivation, religion, occupation, finances or family circumstances.
- **Lifestyle**: Includes any data related to smoking, physical activity, dietary habits or alcohol.
- **Registry**: Includes any data related to disease registries for research, national disease registries, audits, or birth and deaths records.
- **Environment and energy**: Includes any data related to the monitoring or study of environmental or energy factors or events.
- **Information and communication**: Includes any data related to the study or application of information and communication.
- **Politics**: Includes any data related to political views, activities, voting, etc. | True | True | ['Union'] | +| title | guidance | is_list | required | type | +|:-------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------|:-----------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Dataset type | Types include those listed below. Datasets can have more than one type associated.
- **Health and disease**: Includes any data related to mental health, cardiovascular, cancer, rare diseases, metabolic and endocrine, neurological, reproductive, maternity and neonatology, respiratory, immunity, musculoskeletal, vision, renal and urogenital, oral and gastrointestinal, cognitive function or hearing.
- **Treatments/Interventions**: Includes any data related to treatment or interventions related to vaccines or which are preventative or therapeutic in nature.
- **Measurements/Tests**: Includes any data related to laboratory or other diagnostics.
- **Imaging types**: Includes any data related to CT, MRI, PET, x-ray, ultrasound or pathology imaging.
- **Imaging area of the body**: Indicates whether the dataset relates to head, chest, arm abdomen or leg imaging.
- **Omics**: Includes any data related to proteomics, transcriptomics, epigenomics, metabolomics, multiomics, metagenomics or genomics.
- **Socioeconomic**: Includes any data related to education, crime and justice, ethnicity, housing, labour, ageing, economics, marital status, social support, deprivation, religion, occupation, finances or family circumstances.
- **Lifestyle**: Includes any data related to smoking, physical activity, dietary habits or alcohol.
- **Registry**: Includes any data related to disease registries for research, national disease registries, audits, or birth and deaths records.
- **Environment and energy**: Includes any data related to the monitoring or study of environmental or energy factors or events.
- **Information and communication**: Includes any data related to the study or application of information and communication.
- **Politics**: Includes any data related to political views, activities, voting, etc. | True | True | ['typing.Union[hdr_schemata.definitions.HDRUK.DatasetType.HealthAndDisease, hdr_schemata.definitions.HDRUK.DatasetType.TreatmentsInterventions, hdr_schemata.definitions.HDRUK.DatasetType.MeasurementsTests, hdr_schemata.definitions.HDRUK.DatasetType.ImagingTypes, hdr_schemata.definitions.HDRUK.DatasetType.ImagingAreaOfTheBody, hdr_schemata.definitions.HDRUK.DatasetType.OmicsDataType, hdr_schemata.definitions.HDRUK.DatasetType.Socioeconomic, hdr_schemata.definitions.HDRUK.DatasetType.Lifestyle, hdr_schemata.definitions.HDRUK.DatasetType.Registry, hdr_schemata.definitions.HDRUK.DatasetType.EnvironmentAndEnergy, hdr_schemata.definitions.HDRUK.DatasetType.InformationAndCommunication, hdr_schemata.definitions.HDRUK.DatasetType.Politics]'] | Examples: @@ -606,9 +606,9 @@ Please indicate fit here are any additional conditions set for use if any, multi 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 | guidance | is_list | required | type | -|:----------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------|:-----------|:---------------------------------------------------------------------------------------------------------------------------| -| Citation requirements | - 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.
- To add multiple entries, please click on **'+' symbol** to enter each separate website.
- **Example**: National Services Scotland | False | False | ["ShortDescription[{'anyOf': [{'maxLength': 1000, 'minLength': 2, 'type': 'string'}, {'type': 'null'}]}]", 'List', 'null'] | +| title | guidance | is_list | required | type | +|:----------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------|:-----------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Citation requirements | - 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.
- To add multiple entries, please click on **'+' symbol** to enter each separate website.
- **Example**: National Services Scotland | False | False | ["ShortDescription[{'anyOf': [{'maxLength': 1000, 'minLength': 2, 'type': 'string'}, {'type': 'null'}]}]", 'typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.ShortDescription.ShortDescription]]', 'null'] | Examples: @@ -690,9 +690,9 @@ Please provide an indication of the typical processing times based on the types 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 | guidance | is_list | required | type | -|:-------------|:----------------------------------------------------------------------------------------------------------|:----------|:-----------|:------------------------------------------------------------------------------| -| Jurisdiction | A full list of country codes can be found here (alpha-2 column): https://www.iso.org/obp/ui/#search/code/ | True | False | ["Isocountrycode[{'pattern': '^[A-Z]{2}(-[A-Z]{2,3})?$', 'type': 'string'}]"] | +| title | guidance | is_list | required | type | +|:-------------|:----------------------------------------------------------------------------------------------------------|:----------|:-----------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Jurisdiction | A full list of country codes can be found here (alpha-2 column): https://www.iso.org/obp/ui/#search/code/ | True | False | ["CountryCodeEnum['AF','AL','DZ','AS','AD','AO','AI','AQ','AG','AR','AM','AW','AU','AT','AZ','BS','BH','BD','BB','BY','BE','BZ','BJ','BM','BT','BO','BQ','BA','BW','BV','BR','IO','BN','BG','BF','BI','CV','KH','CM','CA','KY','CF','TD','CL','CN','CX','CC','CO','KM','CD','CG','CK','CR','HR','CU','CW','CY','CZ','CI','DK','DJ','DM','DO','EC','EG','SV','GQ','ER','EE','SZ','ET','FK','FO','FJ','FI','FR','GF','PF','TF','GA','GM','GE','DE','GH','GI','GR','GL','GD','GP','GU','GT','GG','GN','GW','GY','HT','HM','VA','HN','HK','HU','IS','IN','ID','IR','IQ','IE','IM','IL','IT','JM','JP','JE','JO','KZ','KE','KI','KP','KR','KW','KG','LA','LV','LB','LS','LR','LY','LI','LT','LU','MO','MG','MW','MY','MV','ML','MT','MH','MQ','MR','MU','YT','MX','FM','MD','MC','MN','ME','MS','MA','MZ','MM','NA','NR','NP','NL','NC','NZ','NI','NE','NG','NU','NF','MK','MP','NO','OM','PK','PW','PS','PA','PG','PY','PE','PH','PN','PL','PT','PR','QA','RO','RU','RW','RE','BL','SH','KN','LC','MF','PM','VC','WS','SM','ST','SA','SN','RS','SC','SL','SG','SX','SK','SI','SB','SO','ZA','GS','SS','ES','LK','SD','SR','SJ','SE','CH','SY','TW','TJ','TZ','TH','TL','TG','TK','TO','TT','TN','TM','TC','TV','TR','UG','UA','AE','GB','UM','US','UY','UZ','VU','VE','VN','VG','VI','WF','EH','YE','ZM','ZW','AX']"] | diff --git a/docs/HDRUK/4.0.0.structure.json b/docs/HDRUK/4.0.0.structure.json index f546aae6..d93f470a 100644 --- a/docs/HDRUK/4.0.0.structure.json +++ b/docs/HDRUK/4.0.0.structure.json @@ -244,7 +244,7 @@ ], "type": [ "EmailAddress[{'anyOf': [{'format': 'email', 'type': 'string'}, {'type': 'null'}]}]", - "List" + "typing.List[hdr_schemata.definitions.HDRUK.EmailAddress.EmailAddress]" ], "is_list": false, "is_optional": false, @@ -344,7 +344,7 @@ "examples": null, "type": [ "CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", - "List", + "typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.ShortDescription.ShortDescription]]", "null" ], "is_list": false, @@ -394,7 +394,7 @@ ], "type": [ "CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", - "List", + "typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.Url.Url]]", "null" ], "is_list": false, @@ -443,7 +443,7 @@ ], "type": [ "CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", - "List" + "typing.List[hdr_schemata.definitions.HDRUK.Url.Url]" ], "is_list": false, "is_optional": false, @@ -593,7 +593,7 @@ "Health and disease" ], "type": [ - "Union" + "typing.Union[hdr_schemata.definitions.HDRUK.DatasetType.HealthAndDisease, hdr_schemata.definitions.HDRUK.DatasetType.TreatmentsInterventions, hdr_schemata.definitions.HDRUK.DatasetType.MeasurementsTests, hdr_schemata.definitions.HDRUK.DatasetType.ImagingTypes, hdr_schemata.definitions.HDRUK.DatasetType.ImagingAreaOfTheBody, hdr_schemata.definitions.HDRUK.DatasetType.OmicsDataType, hdr_schemata.definitions.HDRUK.DatasetType.Socioeconomic, hdr_schemata.definitions.HDRUK.DatasetType.Lifestyle, hdr_schemata.definitions.HDRUK.DatasetType.Registry, hdr_schemata.definitions.HDRUK.DatasetType.EnvironmentAndEnergy, hdr_schemata.definitions.HDRUK.DatasetType.InformationAndCommunication, hdr_schemata.definitions.HDRUK.DatasetType.Politics]" ], "is_list": true, "is_optional": false, @@ -803,7 +803,7 @@ ], "type": [ "ShortDescription[{'anyOf': [{'maxLength': 1000, 'minLength': 2, 'type': 'string'}, {'type': 'null'}]}]", - "List", + "typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.ShortDescription.ShortDescription]]", "null" ], "is_list": false, @@ -912,11 +912,10 @@ "guidance": "A full list of country codes can be found here (alpha-2 column): https://www.iso.org/obp/ui/#search/code/", "examples": null, "type": [ - "Isocountrycode[{'pattern': '^[A-Z]{2}(-[A-Z]{2,3})?$', 'type': 'string'}]" + "CountryCodeEnum['AF','AL','DZ','AS','AD','AO','AI','AQ','AG','AR','AM','AW','AU','AT','AZ','BS','BH','BD','BB','BY','BE','BZ','BJ','BM','BT','BO','BQ','BA','BW','BV','BR','IO','BN','BG','BF','BI','CV','KH','CM','CA','KY','CF','TD','CL','CN','CX','CC','CO','KM','CD','CG','CK','CR','HR','CU','CW','CY','CZ','CI','DK','DJ','DM','DO','EC','EG','SV','GQ','ER','EE','SZ','ET','FK','FO','FJ','FI','FR','GF','PF','TF','GA','GM','GE','DE','GH','GI','GR','GL','GD','GP','GU','GT','GG','GN','GW','GY','HT','HM','VA','HN','HK','HU','IS','IN','ID','IR','IQ','IE','IM','IL','IT','JM','JP','JE','JO','KZ','KE','KI','KP','KR','KW','KG','LA','LV','LB','LS','LR','LY','LI','LT','LU','MO','MG','MW','MY','MV','ML','MT','MH','MQ','MR','MU','YT','MX','FM','MD','MC','MN','ME','MS','MA','MZ','MM','NA','NR','NP','NL','NC','NZ','NI','NE','NG','NU','NF','MK','MP','NO','OM','PK','PW','PS','PA','PG','PY','PE','PH','PN','PL','PT','PR','QA','RO','RU','RW','RE','BL','SH','KN','LC','MF','PM','VC','WS','SM','ST','SA','SN','RS','SC','SL','SG','SX','SK','SI','SB','SO','ZA','GS','SS','ES','LK','SD','SR','SJ','SE','CH','SY','TW','TJ','TZ','TH','TL','TG','TK','TO','TT','TN','TM','TC','TV','TR','UG','UA','AE','GB','UM','US','UY','UZ','VU','VE','VN','VG','VI','WF','EH','YE','ZM','ZW','AX']" ], "is_list": true, - "is_optional": true, - "subItems": [] + "is_optional": true }, { "name": "dataController", diff --git a/docs/HDRUK/4.0.0.template.json b/docs/HDRUK/4.0.0.template.json index 9f8d7a74..55919fd3 100644 --- a/docs/HDRUK/4.0.0.template.json +++ b/docs/HDRUK/4.0.0.template.json @@ -15,22 +15,22 @@ "name": "OneHundredFiftyCharacters[{'maxLength': 150, 'minLength': 2, 'type': 'string'}]", "logo": "Url[{'anyOf': [{'format': 'uri', 'minLength': 1, 'type': 'string'}, {'type': 'null'}]}] | null", "description": "Description[{'anyOf': [{'maxLength': 10000, 'minLength': 2, 'type': 'string'}, {'type': 'null'}]}] | null", - "contactPoint": "EmailAddress[{'anyOf': [{'format': 'email', 'type': 'string'}, {'type': 'null'}]}] | List", + "contactPoint": "EmailAddress[{'anyOf': [{'format': 'email', 'type': 'string'}, {'type': 'null'}]}] | typing.List[hdr_schemata.definitions.HDRUK.EmailAddress.EmailAddress]", "memberOf": "MemberOfV2['Hub','Alliance','Other','NCS'] | null" }, "populationSize": "int", "keywords": "OneHundredFiftyCharacters[{'maxLength': 150, 'minLength': 2, 'type': 'string'}]", "doiName": "Doi[{'anyOf': [{'pattern': '^10.\\\\d{4,9}/[-._;()/:a-zA-Z0-9]+$', 'type': 'string'}, {'type': 'null'}]}] | null", "contactPoint": "EmailAddress[{'anyOf': [{'format': 'email', 'type': 'string'}, {'type': 'null'}]}]", - "datasetAliases": "CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}] | List | null" + "datasetAliases": "CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}] | typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.ShortDescription.ShortDescription]] | null" }, "documentation": { "description": "Description[{'anyOf': [{'maxLength': 10000, 'minLength': 2, 'type': 'string'}, {'type': 'null'}]}]", - "associatedMedia": "CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}] | List | null", + "associatedMedia": "CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}] | typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.Url.Url]] | null", "inPipeline": "Pipeline['Available','Not available'] | null" }, "coverage": { - "spatial": "CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}] | List", + "spatial": "CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}] | typing.List[hdr_schemata.definitions.HDRUK.Url.Url]", "typicalAgeRangeMin": "int | null", "typicalAgeRangeMax": "int | null", "datasetCompleteness": "Url[{'anyOf': [{'format': 'uri', 'minLength': 1, 'type': 'string'}, {'type': 'null'}]}] | null", @@ -41,7 +41,7 @@ "provenance": { "origin": { "purpose": "PurposeV2['Research cohort','Study','Disease registry','Trial','Care','Audit','Administrative','Financial','Statutory','Other',null]", - "datasetType": "Union", + "datasetType": "typing.Union[hdr_schemata.definitions.HDRUK.DatasetType.HealthAndDisease, hdr_schemata.definitions.HDRUK.DatasetType.TreatmentsInterventions, hdr_schemata.definitions.HDRUK.DatasetType.MeasurementsTests, hdr_schemata.definitions.HDRUK.DatasetType.ImagingTypes, hdr_schemata.definitions.HDRUK.DatasetType.ImagingAreaOfTheBody, hdr_schemata.definitions.HDRUK.DatasetType.OmicsDataType, hdr_schemata.definitions.HDRUK.DatasetType.Socioeconomic, hdr_schemata.definitions.HDRUK.DatasetType.Lifestyle, hdr_schemata.definitions.HDRUK.DatasetType.Registry, hdr_schemata.definitions.HDRUK.DatasetType.EnvironmentAndEnergy, hdr_schemata.definitions.HDRUK.DatasetType.InformationAndCommunication, hdr_schemata.definitions.HDRUK.DatasetType.Politics]", "source": "SourceV2['EPR','Electronic survey','LIMS','Paper-based','Free text NLP','Machine generated','Other']", "collectionSource": "SettingV2['Cohort, study, trial','Clinic','Primary care - Referrals','Primary care - Clinic','Primary care - Out of hours','Secondary care - Accident and Emergency','Secondary care - Outpatients','Secondary care - In-patients','Secondary care - Ambulance','Secondary care - ICU','Prescribing - Community pharmacy','Prescribing - Hospital','Patient report outcome','Wearables','Local authority','National government','Community','Services','Home','Private','Social care - Health care at home','Social care - Other social data','Census','Other',null]", "imageContrast": "Ternary['Yes','No','Not stated'] | null" @@ -58,7 +58,7 @@ "usage": { "dataUseLimitation": "DataUseLimitationV2['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 restrictions','Research use only','No linkage']", "dataUseRequirements": "DataUseRequirementsV2['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']", - "resourceCreator": "ShortDescription[{'anyOf': [{'maxLength': 1000, 'minLength': 2, 'type': 'string'}, {'type': 'null'}]}] | List | null" + "resourceCreator": "ShortDescription[{'anyOf': [{'maxLength': 1000, 'minLength': 2, 'type': 'string'}, {'type': 'null'}]}] | typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.ShortDescription.ShortDescription]] | null" }, "access": { "accessRights": "LongDescription[{'anyOf': [{'maxLength': 50000, 'minLength': 2, 'type': 'string'}, {'type': 'null'}]}]", @@ -66,7 +66,7 @@ "accessService": "LongDescription[{'anyOf': [{'maxLength': 50000, 'minLength': 2, 'type': 'string'}, {'type': 'null'}]}] | null", "accessRequestCost": "LongDescription[{'anyOf': [{'maxLength': 50000, 'minLength': 2, 'type': 'string'}, {'type': 'null'}]}] | null", "deliveryLeadTime": "DeliveryLeadTimeV2['Less than 1 week','1-2 weeks','2-4 weeks','1-2 months','2-6 months','More than 6 months','Variable','Not applicable','Other'] | null", - "jurisdiction": "Isocountrycode[{'pattern': '^[A-Z]{2}(-[A-Z]{2,3})?$', 'type': 'string'}]", + "jurisdiction": "CountryCodeEnum['AF','AL','DZ','AS','AD','AO','AI','AQ','AG','AR','AM','AW','AU','AT','AZ','BS','BH','BD','BB','BY','BE','BZ','BJ','BM','BT','BO','BQ','BA','BW','BV','BR','IO','BN','BG','BF','BI','CV','KH','CM','CA','KY','CF','TD','CL','CN','CX','CC','CO','KM','CD','CG','CK','CR','HR','CU','CW','CY','CZ','CI','DK','DJ','DM','DO','EC','EG','SV','GQ','ER','EE','SZ','ET','FK','FO','FJ','FI','FR','GF','PF','TF','GA','GM','GE','DE','GH','GI','GR','GL','GD','GP','GU','GT','GG','GN','GW','GY','HT','HM','VA','HN','HK','HU','IS','IN','ID','IR','IQ','IE','IM','IL','IT','JM','JP','JE','JO','KZ','KE','KI','KP','KR','KW','KG','LA','LV','LB','LS','LR','LY','LI','LT','LU','MO','MG','MW','MY','MV','ML','MT','MH','MQ','MR','MU','YT','MX','FM','MD','MC','MN','ME','MS','MA','MZ','MM','NA','NR','NP','NL','NC','NZ','NI','NE','NG','NU','NF','MK','MP','NO','OM','PK','PW','PS','PA','PG','PY','PE','PH','PN','PL','PT','PR','QA','RO','RU','RW','RE','BL','SH','KN','LC','MF','PM','VC','WS','SM','ST','SA','SN','RS','SC','SL','SG','SX','SK','SI','SB','SO','ZA','GS','SS','ES','LK','SD','SR','SJ','SE','CH','SY','TW','TJ','TZ','TH','TL','TG','TK','TO','TT','TN','TM','TC','TV','TR','UG','UA','AE','GB','UM','US','UY','UZ','VU','VE','VN','VG','VI','WF','EH','YE','ZM','ZW','AX']", "dataController": "LongDescription[{'anyOf': [{'maxLength': 50000, 'minLength': 2, 'type': 'string'}, {'type': 'null'}]}] | null", "dataProcessor": "LongDescription[{'anyOf': [{'maxLength': 50000, 'minLength': 2, 'type': 'string'}, {'type': 'null'}]}] | null" }, @@ -78,10 +78,26 @@ } }, "enrichmentAndLinkage": { - "derivedFrom": "DatasetDescriptor", - "isPartOf": "DatasetDescriptor", - "linkableDatasets": "DatasetDescriptor", - "similarToDatasets": "DatasetDescriptor", + "derivedFrom": { + "pid": "OneHundredFiftyCharacters[{'maxLength': 150, 'minLength': 2, 'type': 'string'}] | null", + "title": "OneHundredFiftyCharacters[{'maxLength': 150, 'minLength': 2, 'type': 'string'}] | null", + "url": "Url[{'anyOf': [{'format': 'uri', 'minLength': 1, 'type': 'string'}, {'type': 'null'}]}] | null" + }, + "isPartOf": { + "pid": "OneHundredFiftyCharacters[{'maxLength': 150, 'minLength': 2, 'type': 'string'}] | null", + "title": "OneHundredFiftyCharacters[{'maxLength': 150, 'minLength': 2, 'type': 'string'}] | null", + "url": "Url[{'anyOf': [{'format': 'uri', 'minLength': 1, 'type': 'string'}, {'type': 'null'}]}] | null" + }, + "linkableDatasets": { + "pid": "OneHundredFiftyCharacters[{'maxLength': 150, 'minLength': 2, 'type': 'string'}] | null", + "title": "OneHundredFiftyCharacters[{'maxLength': 150, 'minLength': 2, 'type': 'string'}] | null", + "url": "Url[{'anyOf': [{'format': 'uri', 'minLength': 1, 'type': 'string'}, {'type': 'null'}]}] | null" + }, + "similarToDatasets": { + "pid": "OneHundredFiftyCharacters[{'maxLength': 150, 'minLength': 2, 'type': 'string'}] | null", + "title": "OneHundredFiftyCharacters[{'maxLength': 150, 'minLength': 2, 'type': 'string'}] | null", + "url": "Url[{'anyOf': [{'format': 'uri', 'minLength': 1, 'type': 'string'}, {'type': 'null'}]}] | null" + }, "investigations": "Url[{'anyOf': [{'format': 'uri', 'minLength': 1, 'type': 'string'}, {'type': 'null'}]}]", "tools": "Url[{'anyOf': [{'format': 'uri', 'minLength': 1, 'type': 'string'}, {'type': 'null'}]}]", "publicationAboutDataset": "Doi[{'anyOf': [{'pattern': '^10.\\\\d{4,9}/[-._;()/:a-zA-Z0-9]+$', 'type': 'string'}, {'type': 'null'}]}]", @@ -95,13 +111,37 @@ "measuredProperty": "MeasuredProperty[{}]" }, "structuralMetadata": { - "tables": "DataTable", + "tables": { + "name": "str | null", + "description": "str | null", + "columns": { + "name": "Name[{}]", + "dataType": "str", + "description": "str | null", + "sensitive": "bool", + "values": { + "name": "Name[{}]", + "description": "str | null", + "frequency": "int | null" + } + } + }, "syntheticDataWebLink": "Url[{'anyOf': [{'format': 'uri', 'minLength': 1, 'type': 'string'}, {'type': 'null'}]}]" }, "demographicFrequency": { - "age": "Age", - "ethnicity": "Ethnicity", - "disease": "Disease" + "age": { + "bin": "AgeEnum['0-6 days','7-27 days','1-11 months','1-4 years','5-9 years','10-14 years','15-19 years','20-24 years','25-29 years','30-34 years','35-39 years','40-44 years','45-49 years','50-54 years','55-59 years','60-64 years','65-69 years','70-74 years','75-79 years','80-84 years','85-89 years','90-94 years','95-99 years','100+ years']", + "count": "int" + }, + "ethnicity": { + "bin": "EthnicityEnum['White - British','White - Irish','White - Any other White background','Mixed - White and Black Caribbean','Mixed - White and Black African','Mixed - White and Asian','Mixed - Any other mixed background','Asian or Asian British - Indian','Asian or Asian British - Pakistani','Asian or Asian British - Bangladeshi','Asian or Asian British - Any other Asian background','Black or Black British - Caribbean','Black or Black British - African','Black or Black British - Any other Black background','Other Ethnic Groups - Chinese','Other Ethnic Groups - Any other ethnic group','Not stated','Not known']", + "count": "int" + }, + "disease": { + "diseaseCode": "str | int", + "diseaseCodeVocabulary": "DiseaseCodeEnum['ICD10','SNOMED CT','MeSH']", + "count": "int" + } }, "omics": { "assay": "Assay['NMR spectroscopy','Mass-spectrometry','Whole genome sequencing','Exome sequencing','Genotyping by array','Transcriptome profiling by high-throughput sequencing','Transcriptome profiling by array','Amplicon sequencing','Methylation binding domain sequencing','Methylation profiling by high-throughput sequencing','Genomic variant calling','Chromatin accessibility profiling by high-throughput sequencing','Histone modification profiling by high-throughput sequencing','Chromatin immunoprecipitation sequencing','Whole genome shotgun sequencing','Whole transcriptome sequencing','Targeted mutation analysis'] | null", diff --git a/hdr_schemata/definitions/HDRUK/__init__.py b/hdr_schemata/definitions/HDRUK/__init__.py index 5f340343..11b5c1ea 100644 --- a/hdr_schemata/definitions/HDRUK/__init__.py +++ b/hdr_schemata/definitions/HDRUK/__init__.py @@ -6,6 +6,7 @@ from .Assay import Assay from .CommaSeparatedIntegers import CommaSeparatedIntegers from .CommaSeparatedValues import CommaSeparatedValues +from .CountryCodeEnum import CountryCodeEnum from .ControlledVocabulary import ControlledVocabulary from .ControlledVocabularyEnum import ControlledVocabularyEnum from .DataUseLimitation import DataUseLimitation, DataUseLimitationV2 diff --git a/hdr_schemata/models/GWDM/2.0/schema.json b/hdr_schemata/models/GWDM/2.0/schema.json index f26fc090..0bb1ce84 100644 --- a/hdr_schemata/models/GWDM/2.0/schema.json +++ b/hdr_schemata/models/GWDM/2.0/schema.json @@ -74,7 +74,7 @@ "jurisdiction": { "anyOf": [ { - "$ref": "#/$defs/CommaSeparatedValues" + "$ref": "#/$defs/CountryCodeEnum" }, { "type": "null" @@ -273,6 +273,261 @@ ], "title": "CommaSeparatedValues" }, + "CountryCodeEnum": { + "enum": [ + "AF", + "AL", + "DZ", + "AS", + "AD", + "AO", + "AI", + "AQ", + "AG", + "AR", + "AM", + "AW", + "AU", + "AT", + "AZ", + "BS", + "BH", + "BD", + "BB", + "BY", + "BE", + "BZ", + "BJ", + "BM", + "BT", + "BO", + "BQ", + "BA", + "BW", + "BV", + "BR", + "IO", + "BN", + "BG", + "BF", + "BI", + "CV", + "KH", + "CM", + "CA", + "KY", + "CF", + "TD", + "CL", + "CN", + "CX", + "CC", + "CO", + "KM", + "CD", + "CG", + "CK", + "CR", + "HR", + "CU", + "CW", + "CY", + "CZ", + "CI", + "DK", + "DJ", + "DM", + "DO", + "EC", + "EG", + "SV", + "GQ", + "ER", + "EE", + "SZ", + "ET", + "FK", + "FO", + "FJ", + "FI", + "FR", + "GF", + "PF", + "TF", + "GA", + "GM", + "GE", + "DE", + "GH", + "GI", + "GR", + "GL", + "GD", + "GP", + "GU", + "GT", + "GG", + "GN", + "GW", + "GY", + "HT", + "HM", + "VA", + "HN", + "HK", + "HU", + "IS", + "IN", + "ID", + "IR", + "IQ", + "IE", + "IM", + "IL", + "IT", + "JM", + "JP", + "JE", + "JO", + "KZ", + "KE", + "KI", + "KP", + "KR", + "KW", + "KG", + "LA", + "LV", + "LB", + "LS", + "LR", + "LY", + "LI", + "LT", + "LU", + "MO", + "MG", + "MW", + "MY", + "MV", + "ML", + "MT", + "MH", + "MQ", + "MR", + "MU", + "YT", + "MX", + "FM", + "MD", + "MC", + "MN", + "ME", + "MS", + "MA", + "MZ", + "MM", + "NA", + "NR", + "NP", + "NL", + "NC", + "NZ", + "NI", + "NE", + "NG", + "NU", + "NF", + "MK", + "MP", + "NO", + "OM", + "PK", + "PW", + "PS", + "PA", + "PG", + "PY", + "PE", + "PH", + "PN", + "PL", + "PT", + "PR", + "QA", + "RO", + "RU", + "RW", + "RE", + "BL", + "SH", + "KN", + "LC", + "MF", + "PM", + "VC", + "WS", + "SM", + "ST", + "SA", + "SN", + "RS", + "SC", + "SL", + "SG", + "SX", + "SK", + "SI", + "SB", + "SO", + "ZA", + "GS", + "SS", + "ES", + "LK", + "SD", + "SR", + "SJ", + "SE", + "CH", + "SY", + "TW", + "TJ", + "TZ", + "TH", + "TL", + "TG", + "TK", + "TO", + "TT", + "TN", + "TM", + "TC", + "TV", + "TR", + "UG", + "UA", + "AE", + "GB", + "UM", + "US", + "UY", + "UZ", + "VU", + "VE", + "VN", + "VG", + "VI", + "WF", + "EH", + "YE", + "ZM", + "ZW", + "AX" + ], + "title": "CountryCodeEnum", + "type": "string" + }, "Coverage": { "properties": { "spatial": { diff --git a/hdr_schemata/models/GWDM/v2_0/Access.py b/hdr_schemata/models/GWDM/v2_0/Access.py index 563f64f1..d2ea6b0a 100644 --- a/hdr_schemata/models/GWDM/v2_0/Access.py +++ b/hdr_schemata/models/GWDM/v2_0/Access.py @@ -25,7 +25,7 @@ class Config: None, **an.deliveryLeadTime.__dict__ ) - jurisdiction: Optional[CommaSeparatedValues] = Field( + jurisdiction: Optional[CountryCodeEnum] = Field( None, **an.jurisdiction.__dict__ ) diff --git a/hdr_schemata/models/HDRUK/3.0.0/schema.json b/hdr_schemata/models/HDRUK/3.0.0/schema.json index 97d32e20..14ac2495 100644 --- a/hdr_schemata/models/HDRUK/3.0.0/schema.json +++ b/hdr_schemata/models/HDRUK/3.0.0/schema.json @@ -96,7 +96,7 @@ "anyOf": [ { "items": { - "$ref": "#/$defs/Isocountrycode" + "$ref": "#/$defs/CountryCodeEnum" }, "type": "array" }, @@ -343,6 +343,261 @@ "title": "ControlledVocabularyEnum", "type": "string" }, + "CountryCodeEnum": { + "enum": [ + "AF", + "AL", + "DZ", + "AS", + "AD", + "AO", + "AI", + "AQ", + "AG", + "AR", + "AM", + "AW", + "AU", + "AT", + "AZ", + "BS", + "BH", + "BD", + "BB", + "BY", + "BE", + "BZ", + "BJ", + "BM", + "BT", + "BO", + "BQ", + "BA", + "BW", + "BV", + "BR", + "IO", + "BN", + "BG", + "BF", + "BI", + "CV", + "KH", + "CM", + "CA", + "KY", + "CF", + "TD", + "CL", + "CN", + "CX", + "CC", + "CO", + "KM", + "CD", + "CG", + "CK", + "CR", + "HR", + "CU", + "CW", + "CY", + "CZ", + "CI", + "DK", + "DJ", + "DM", + "DO", + "EC", + "EG", + "SV", + "GQ", + "ER", + "EE", + "SZ", + "ET", + "FK", + "FO", + "FJ", + "FI", + "FR", + "GF", + "PF", + "TF", + "GA", + "GM", + "GE", + "DE", + "GH", + "GI", + "GR", + "GL", + "GD", + "GP", + "GU", + "GT", + "GG", + "GN", + "GW", + "GY", + "HT", + "HM", + "VA", + "HN", + "HK", + "HU", + "IS", + "IN", + "ID", + "IR", + "IQ", + "IE", + "IM", + "IL", + "IT", + "JM", + "JP", + "JE", + "JO", + "KZ", + "KE", + "KI", + "KP", + "KR", + "KW", + "KG", + "LA", + "LV", + "LB", + "LS", + "LR", + "LY", + "LI", + "LT", + "LU", + "MO", + "MG", + "MW", + "MY", + "MV", + "ML", + "MT", + "MH", + "MQ", + "MR", + "MU", + "YT", + "MX", + "FM", + "MD", + "MC", + "MN", + "ME", + "MS", + "MA", + "MZ", + "MM", + "NA", + "NR", + "NP", + "NL", + "NC", + "NZ", + "NI", + "NE", + "NG", + "NU", + "NF", + "MK", + "MP", + "NO", + "OM", + "PK", + "PW", + "PS", + "PA", + "PG", + "PY", + "PE", + "PH", + "PN", + "PL", + "PT", + "PR", + "QA", + "RO", + "RU", + "RW", + "RE", + "BL", + "SH", + "KN", + "LC", + "MF", + "PM", + "VC", + "WS", + "SM", + "ST", + "SA", + "SN", + "RS", + "SC", + "SL", + "SG", + "SX", + "SK", + "SI", + "SB", + "SO", + "ZA", + "GS", + "SS", + "ES", + "LK", + "SD", + "SR", + "SJ", + "SE", + "CH", + "SY", + "TW", + "TJ", + "TZ", + "TH", + "TL", + "TG", + "TK", + "TO", + "TT", + "TN", + "TM", + "TC", + "TV", + "TR", + "UG", + "UA", + "AE", + "GB", + "UM", + "US", + "UY", + "UZ", + "VU", + "VE", + "VN", + "VG", + "VI", + "WF", + "EH", + "YE", + "ZM", + "ZW", + "AX" + ], + "title": "CountryCodeEnum", + "type": "string" + }, "Coverage": { "additionalProperties": false, "properties": { @@ -1307,11 +1562,6 @@ "title": "FormatAndStandards", "type": "object" }, - "Isocountrycode": { - "pattern": "^[A-Z]{2}(-[A-Z]{2,3})?$", - "title": "Isocountrycode", - "type": "string" - }, "LanguageEnum": { "enum": [ "aa", diff --git a/hdr_schemata/models/HDRUK/4.0.0/schema.json b/hdr_schemata/models/HDRUK/4.0.0/schema.json index c3b04c83..a1852700 100644 --- a/hdr_schemata/models/HDRUK/4.0.0/schema.json +++ b/hdr_schemata/models/HDRUK/4.0.0/schema.json @@ -96,7 +96,7 @@ "anyOf": [ { "items": { - "$ref": "#/$defs/Isocountrycode" + "$ref": "#/$defs/CountryCodeEnum" }, "type": "array" }, @@ -343,6 +343,261 @@ "title": "ControlledVocabularyEnum", "type": "string" }, + "CountryCodeEnum": { + "enum": [ + "AF", + "AL", + "DZ", + "AS", + "AD", + "AO", + "AI", + "AQ", + "AG", + "AR", + "AM", + "AW", + "AU", + "AT", + "AZ", + "BS", + "BH", + "BD", + "BB", + "BY", + "BE", + "BZ", + "BJ", + "BM", + "BT", + "BO", + "BQ", + "BA", + "BW", + "BV", + "BR", + "IO", + "BN", + "BG", + "BF", + "BI", + "CV", + "KH", + "CM", + "CA", + "KY", + "CF", + "TD", + "CL", + "CN", + "CX", + "CC", + "CO", + "KM", + "CD", + "CG", + "CK", + "CR", + "HR", + "CU", + "CW", + "CY", + "CZ", + "CI", + "DK", + "DJ", + "DM", + "DO", + "EC", + "EG", + "SV", + "GQ", + "ER", + "EE", + "SZ", + "ET", + "FK", + "FO", + "FJ", + "FI", + "FR", + "GF", + "PF", + "TF", + "GA", + "GM", + "GE", + "DE", + "GH", + "GI", + "GR", + "GL", + "GD", + "GP", + "GU", + "GT", + "GG", + "GN", + "GW", + "GY", + "HT", + "HM", + "VA", + "HN", + "HK", + "HU", + "IS", + "IN", + "ID", + "IR", + "IQ", + "IE", + "IM", + "IL", + "IT", + "JM", + "JP", + "JE", + "JO", + "KZ", + "KE", + "KI", + "KP", + "KR", + "KW", + "KG", + "LA", + "LV", + "LB", + "LS", + "LR", + "LY", + "LI", + "LT", + "LU", + "MO", + "MG", + "MW", + "MY", + "MV", + "ML", + "MT", + "MH", + "MQ", + "MR", + "MU", + "YT", + "MX", + "FM", + "MD", + "MC", + "MN", + "ME", + "MS", + "MA", + "MZ", + "MM", + "NA", + "NR", + "NP", + "NL", + "NC", + "NZ", + "NI", + "NE", + "NG", + "NU", + "NF", + "MK", + "MP", + "NO", + "OM", + "PK", + "PW", + "PS", + "PA", + "PG", + "PY", + "PE", + "PH", + "PN", + "PL", + "PT", + "PR", + "QA", + "RO", + "RU", + "RW", + "RE", + "BL", + "SH", + "KN", + "LC", + "MF", + "PM", + "VC", + "WS", + "SM", + "ST", + "SA", + "SN", + "RS", + "SC", + "SL", + "SG", + "SX", + "SK", + "SI", + "SB", + "SO", + "ZA", + "GS", + "SS", + "ES", + "LK", + "SD", + "SR", + "SJ", + "SE", + "CH", + "SY", + "TW", + "TJ", + "TZ", + "TH", + "TL", + "TG", + "TK", + "TO", + "TT", + "TN", + "TM", + "TC", + "TV", + "TR", + "UG", + "UA", + "AE", + "GB", + "UM", + "US", + "UY", + "UZ", + "VU", + "VE", + "VN", + "VG", + "VI", + "WF", + "EH", + "YE", + "ZM", + "ZW", + "AX" + ], + "title": "CountryCodeEnum", + "type": "string" + }, "Coverage": { "additionalProperties": false, "properties": { @@ -1414,11 +1669,6 @@ "title": "InformationAndCommunication", "type": "object" }, - "Isocountrycode": { - "pattern": "^[A-Z]{2}(-[A-Z]{2,3})?$", - "title": "Isocountrycode", - "type": "string" - }, "LanguageEnum": { "enum": [ "aa", diff --git a/hdr_schemata/models/HDRUK/v3_0_0/Access.py b/hdr_schemata/models/HDRUK/v3_0_0/Access.py index b72b98a7..21d7ee3c 100644 --- a/hdr_schemata/models/HDRUK/v3_0_0/Access.py +++ b/hdr_schemata/models/HDRUK/v3_0_0/Access.py @@ -33,7 +33,7 @@ class Config: None, **an.deliveryLeadTime.__dict__, json_schema_extra={"guidance": an.deliveryLeadTime.guidance} ) - jurisdiction: Optional[List[Isocountrycode]] = Field( + jurisdiction: Optional[List[CountryCodeEnum]] = Field( None, **an.jurisdiction.__dict__, json_schema_extra={"guidance": an.jurisdiction.guidance} )