diff --git a/docs/HDRUK/2.2.1.form.json b/docs/HDRUK/2.2.1.form.json index c16ed17..4a385f6 100644 --- a/docs/HDRUK/2.2.1.form.json +++ b/docs/HDRUK/2.2.1.form.json @@ -68,16 +68,6 @@ }, "location": "revisions.url" }, - { - "required": true, - "title": "Metadata Version Revisions", - "description": "A list of persistent identifiers and version numbers for previous versions of metadata for this dataset", - "examples": null, - "is_list": true, - "is_optional": false, - "types": "Revision", - "location": "revisions" - }, { "required": true, "title": "Metadata Issued Datetime',", @@ -224,16 +214,6 @@ }, "location": "summary.publisher.memberOf" }, - { - "required": true, - "title": "Dataset publisher", - "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.", - "examples": null, - "is_list": false, - "is_optional": false, - "types": "Organisation", - "location": "summary.publisher" - }, { "required": true, "title": "Contact Point", @@ -403,7 +383,9 @@ "required": false, "title": "Age Range", "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).", - "examples": null, + "examples": [ + "18-90" + ], "is_list": false, "is_optional": true, "types": { @@ -962,7 +944,9 @@ "required": true, "title": "Conforms To", "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.", - "examples": null, + "examples": [ + "LOCAL,NHS DATA DICTIONARY" + ], "is_list": true, "is_optional": true, "types": { @@ -999,16 +983,6 @@ }, "location": "accessibility.formatAndStandards.format" }, - { - "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, - "is_list": false, - "is_optional": true, - "types": "FormatAndStandards", - "location": "accessibility.formatAndStandards" - }, { "required": false, "title": "Linked Datasets", @@ -1066,16 +1040,6 @@ }, "location": "enrichmentAndLinkage.syntheticDataWebLink" }, - { - "required": false, - "title": "Enrichment and Linkage", - "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.", - "examples": null, - "is_list": false, - "is_optional": true, - "types": "EnrichmentAndLinkage", - "location": "enrichmentAndLinkage" - }, { "required": true, "title": "Statistical Population'", @@ -1138,102 +1102,13 @@ "is_list": false, "is_optional": false, "types": { - "title": "MeasuredProperty" + "maxLength": 100, + "minLength": 1, + "title": "MeasuredProperty", + "type": "string" }, "location": "observations.measuredProperty" }, - { - "required": true, - "title": "Observations", - "description": "Multiple observations about the dataset may be provided and users are expected to provide at least one observation \n(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. \nExample: \n <b> Statistical Population 1 \n </b> type: StatisticalPopulation populationType: Persons numConstraints: 0 \n <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\"\n", - "examples": null, - "is_list": true, - "is_optional": false, - "types": "Observation", - "location": "observations" - }, - { - "required": true, - "title": "Table Name", - "description": "The name of a table in a dataset.", - "examples": null, - "is_list": false, - "is_optional": true, - "types": "str", - "location": "structuralMetadata.name" - }, - { - "required": false, - "title": "Table Name", - "description": "The name of a table in a dataset.", - "examples": null, - "is_list": false, - "is_optional": true, - "types": "str", - "location": "structuralMetadata.description" - }, - { - "required": true, - "title": "Column Name", - "description": "The name of a column in a table.", - "examples": null, - "is_list": false, - "is_optional": false, - "types": { - "title": "Name" - }, - "location": "structuralMetadata.elements.name" - }, - { - "required": true, - "title": "Data Type", - "description": "The data type of values in the column", - "examples": null, - "is_list": false, - "is_optional": false, - "types": "str", - "location": "structuralMetadata.elements.dataType" - }, - { - "required": false, - "title": "Column Description", - "description": "A description of a column in a table.", - "examples": null, - "is_list": false, - "is_optional": true, - "types": "str", - "location": "structuralMetadata.elements.description" - }, - { - "required": true, - "title": "Sensitive", - "description": "A True or False value, indicating if the field is sensitive or not", - "examples": null, - "is_list": false, - "is_optional": false, - "types": "bool", - "location": "structuralMetadata.elements.sensitive" - }, - { - "required": true, - "title": "Table Name", - "description": "The name of a table in a dataset.", - "examples": null, - "is_list": true, - "is_optional": false, - "types": "DataElement", - "location": "structuralMetadata.elements" - }, - { - "required": false, - "title": "Structural Metadata", - "description": "Structural metadata about tables, columns and values", - "examples": null, - "is_list": true, - "is_optional": true, - "types": "DataClass", - "location": "structuralMetadata" - }, { "required": false, "title": "Data Categories", @@ -1307,16 +1182,6 @@ }, "location": "tissuesSampleCollection.tissueSampleMetadata.AnatomicalSiteOntologyCode" }, - { - "required": false, - "title": "Tissue Sample Metadata", - "description": "Metadata related to the tissue sample", - "examples": null, - "is_list": false, - "is_optional": true, - "types": "TissueSampleMetadata", - "location": "tissuesSampleCollection.tissueSampleMetadata" - }, { "required": false, "title": "Collection Type", @@ -1340,16 +1205,6 @@ ] }, "location": "tissuesSampleCollection.collectionType" - }, - { - "required": false, - "title": "Tissues Sample Collection", - "description": "Metadata collection for Tissue Samples datasets", - "examples": null, - "is_list": true, - "is_optional": true, - "types": "TissuesSampleCollection", - "location": "tissuesSampleCollection" } ] } \ No newline at end of file diff --git a/docs/HDRUK/2.2.1.md b/docs/HDRUK/2.2.1.md index 1972506..78a55a5 100644 --- a/docs/HDRUK/2.2.1.md +++ b/docs/HDRUK/2.2.1.md @@ -175,9 +175,9 @@ Please provide a URL that describes the organisation. Organisation contact point(s) -| title | is_list | is_optional | required | type | -|:---------------------------|:----------|:--------------|:-----------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Organisation Contact Point | False | True | True | ["EmailAddress[{'anyOf': [{'format': 'email', 'type': 'string'}, {'type': 'null'}]}]", 'typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.EmailAddress.EmailAddress]]', 'null'] | +| title | is_list | is_optional | required | type | +|:---------------------------|:----------|:--------------|:-----------|:-------------------------------------------------------------------------------------------------------| +| Organisation Contact Point | False | True | True | ["EmailAddress[{'anyOf': [{'format': 'email', 'type': 'string'}, {'type': 'null'}]}]", 'List', 'null'] | @@ -210,9 +210,9 @@ Examples: Please provide a list of 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 | is_list | is_optional | required | type | -|:---------|:----------|:--------------|:-----------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Keywords | False | True | True | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'typing.List[hdr_schemata.definitions.HDRUK.OneHundredFiftyCharacters.OneHundredFiftyCharacters]', 'null'] | +| title | is_list | is_optional | required | type | +|:---------|:----------|:--------------|:-----------|:------------------------------------------------------------------------------------------------------------------| +| Keywords | False | True | True | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'List', 'null'] | Examples: @@ -223,9 +223,9 @@ Examples: Alternate dataset identifiers or local identifiers -| title | is_list | is_optional | required | type | -|:------------------------------|:----------|:--------------|:-----------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Alternate dataset identifiers | False | True | False | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.ShortDescription.ShortDescription]]', 'null'] | +| title | is_list | is_optional | required | type | +|:------------------------------|:----------|:--------------|:-----------|:------------------------------------------------------------------------------------------------------------------| +| Alternate dataset identifiers | False | True | False | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'List', 'null'] | @@ -300,9 +300,9 @@ A free-text description of the dataset. Gateway Feature: Keywords and text may b 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. -| title | is_list | is_optional | required | type | -|:-----------------|:----------|:--------------|:-----------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Associated Media | False | True | False | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.Url.Url]]', 'null'] | +| title | is_list | is_optional | required | type | +|:-----------------|:----------|:--------------|:-----------|:------------------------------------------------------------------------------------------------------------------| +| Associated Media | False | True | False | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'List', 'null'] | Examples: @@ -313,9 +313,9 @@ Examples: Please complete only if the dataset is part of a group or family -| title | is_list | is_optional | required | type | -|:--------|:----------|:--------------|:-----------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Group | False | True | False | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'typing.List[typing.Union[hdr_schemata.definitions.HDRUK.Url.Url, NoneType, hdr_schemata.definitions.HDRUK.OneHundredFiftyCharacters.OneHundredFiftyCharacters, hdr_schemata.definitions.HDRUK.IsPartOfEnum.IsPartOfEnum]]', 'null'] | +| title | is_list | is_optional | required | type | +|:--------|:----------|:--------------|:-----------|:------------------------------------------------------------------------------------------------------------------| +| Group | False | True | False | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'List', 'null'] | Examples: @@ -335,9 +335,9 @@ Observational, Spatial and Temporal coverage 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. -| title | is_list | is_optional | required | type | -|:--------------------|:----------|:--------------|:-----------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Geographic Coverage | False | True | False | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.Url.Url]]', 'null'] | +| title | is_list | is_optional | required | type | +|:--------------------|:----------|:--------------|:-----------|:------------------------------------------------------------------------------------------------------------------| +| Geographic Coverage | False | True | False | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'List', 'null'] | Examples: @@ -352,7 +352,9 @@ Please indicate the age range in whole years of participants in the dataset. Ple |:----------|:----------|:--------------|:-----------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Age Range | False | True | False | ["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'}]}]", 'null'] | +Examples: + * 18-90 ### followup @@ -591,9 +593,9 @@ This section includes information about how the data can be used and how it is c 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 | is_list | is_optional | required | type | -|:--------------------|:----------|:--------------|:-----------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Data Use Limitation | False | True | False | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'typing.List[hdr_schemata.definitions.HDRUK.DataUseLimitation.DataUseLimitation]', 'null'] | +| title | is_list | is_optional | required | type | +|:--------------------|:----------|:--------------|:-----------|:------------------------------------------------------------------------------------------------------------------| +| Data Use Limitation | False | True | False | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'List', 'null'] | @@ -602,9 +604,9 @@ Please provide an indication of consent permissions for datasets and/or material 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 | is_list | is_optional | required | type | -|:----------------------|:----------|:--------------|:-----------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Data Use Requirements | False | True | False | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'typing.List[hdr_schemata.definitions.HDRUK.DataUseRequirements.DataUseRequirements]', 'null'] | +| title | is_list | is_optional | required | type | +|:----------------------|:----------|:--------------|:-----------|:------------------------------------------------------------------------------------------------------------------| +| Data Use Requirements | False | True | False | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'List', 'null'] | @@ -613,9 +615,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 | is_list | is_optional | required | type | -|:-----------------------|:----------|:--------------|:-----------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Citation Requirements' | False | True | False | ["ShortDescription[{'anyOf': [{'maxLength': 1000, 'minLength': 2, 'type': 'string'}, {'type': 'null'}]}]", 'typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.ShortDescription.ShortDescription]]', 'null'] | +| title | is_list | is_optional | required | type | +|:-----------------------|:----------|:--------------|:-----------|:---------------------------------------------------------------------------------------------------------------------------| +| Citation Requirements' | False | True | False | ["ShortDescription[{'anyOf': [{'maxLength': 1000, 'minLength': 2, 'type': 'string'}, {'type': 'null'}]}]", 'List', 'null'] | @@ -624,9 +626,9 @@ Please provide the text that you would like included as part of any citation tha None -| title | is_list | is_optional | required | type | -|:---------------|:----------|:--------------|:-----------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Investigations | False | True | False | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.Url.Url]]', 'null'] | +| title | is_list | is_optional | required | type | +|:---------------|:----------|:--------------|:-----------|:------------------------------------------------------------------------------------------------------------------| +| Investigations | False | True | False | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'List', 'null'] | @@ -635,9 +637,9 @@ None 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 | is_list | is_optional | required | type | -|:----------|:----------|:--------------|:-----------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Citations | False | True | False | ["Doi[{'anyOf': [{'pattern': '^10.\\\\d{4,9}/[-._;()/:a-zA-Z0-9]+$', 'type': 'string'}, {'type': 'null'}]}]", 'str', 'typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.Doi.Doi]]', 'null'] | +| title | is_list | is_optional | required | type | +|:----------|:----------|:--------------|:-----------|:-------------------------------------------------------------------------------------------------------------------------------------| +| Citations | False | True | False | ["Doi[{'anyOf': [{'pattern': '^10.\\\\d{4,9}/[-._;()/:a-zA-Z0-9]+$', 'type': 'string'}, {'type': 'null'}]}]", 'str', 'List', 'null'] | @@ -679,9 +681,9 @@ Examples: 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 | is_list | is_optional | required | type | -|:---------------------------------|:----------|:--------------|:-----------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Organisation Access Request Cost | False | True | False | ["LongDescription[{'anyOf': [{'maxLength': 50000, 'minLength': 2, 'type': 'string'}, {'type': 'null'}]}]", 'typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.Url.Url]]', 'null'] | +| title | is_list | is_optional | required | type | +|:---------------------------------|:----------|:--------------|:-----------|:---------------------------------------------------------------------------------------------------------------------------| +| Organisation Access Request Cost | False | True | False | ["LongDescription[{'anyOf': [{'maxLength': 50000, 'minLength': 2, 'type': 'string'}, {'type': 'null'}]}]", 'List', 'null'] | @@ -701,9 +703,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 | is_list | is_optional | required | type | -|:-------------|:----------|:--------------|:-----------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Jurisdiction | False | True | True | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'typing.List[hdr_schemata.definitions.HDRUK.Isocountrycode.Isocountrycode]', 'null'] | +| title | is_list | is_optional | required | type | +|:-------------|:----------|:--------------|:-----------|:------------------------------------------------------------------------------------------------------------------| +| Jurisdiction | False | True | True | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'List', 'null'] | @@ -756,9 +758,9 @@ Section includes technical attributes for language vocabularies, sizes etc. and 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 “other” and contact support desk to ask for an addition. Notes: More than one vocabulary may be provided. -| title | is_list | is_optional | required | type | -|:----------------------|:----------|:--------------|:-----------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Controlled Vocabulary | False | True | True | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'typing.List[hdr_schemata.definitions.HDRUK.ControlledVocabulary.ControlledVocabulary]', 'null'] | +| title | is_list | is_optional | required | type | +|:----------------------|:----------|:--------------|:-----------|:------------------------------------------------------------------------------------------------------------------| +| Controlled Vocabulary | False | True | True | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'List', 'null'] | @@ -771,16 +773,18 @@ List standardised data models that the dataset has been stored in or transformed |:------------|:----------|:--------------|:-----------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Conforms To | True | True | True | ["StandardisedDataModels[{'$defs': {'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'}}, 'anyOf': [{'$ref': '#/$defs/StandardisedDataModelsEnum'}, {'type': 'null'}], 'default': null}]"] | +Examples: + * LOCAL,NHS DATA DICTIONARY #### language This should list all the languages in which the dataset metadata and underlying data is made available. -| title | is_list | is_optional | required | type | -|:---------|:----------|:--------------|:-----------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Language | False | True | True | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'typing.List[hdr_schemata.definitions.HDRUK.Language.Language]', 'null'] | +| title | is_list | is_optional | required | type | +|:---------|:----------|:--------------|:-----------|:------------------------------------------------------------------------------------------------------------------| +| Language | False | True | True | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'List', 'null'] | @@ -789,9 +793,9 @@ This should list all the languages in which the dataset metadata and underlying 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 | is_list | is_optional | required | type | -|:--------|:----------|:--------------|:-----------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Format | False | True | True | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'typing.List[hdr_schemata.definitions.HDRUK.Format.Format]', 'null'] | +| title | is_list | is_optional | required | type | +|:--------|:----------|:--------------|:-----------|:------------------------------------------------------------------------------------------------------------------| +| Format | False | True | True | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'List', 'null'] | @@ -809,9 +813,9 @@ This section includes information about related datasets that may have previousl 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 “ALL” and the onboarding portal will automate linkage across the datasets submitted. -| title | is_list | is_optional | required | type | -|:----------------|:----------|:--------------|:-----------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Linked Datasets | False | True | False | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'typing.List[typing.Union[hdr_schemata.definitions.HDRUK.Url.Url, NoneType, hdr_schemata.definitions.HDRUK.OneHundredFiftyCharacters.OneHundredFiftyCharacters]]', 'null'] | +| title | is_list | is_optional | required | type | +|:----------------|:----------|:--------------|:-----------|:------------------------------------------------------------------------------------------------------------------| +| Linked Datasets | False | True | False | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'List', 'null'] | @@ -820,9 +824,9 @@ If applicable, please provide the DOI of other datasets that have previously bee 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 | is_list | is_optional | required | type | -|:------------|:----------|:--------------|:-----------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Derivations | False | True | False | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.AbstractText.AbstractText]]', 'null'] | +| title | is_list | is_optional | required | type | +|:------------|:----------|:--------------|:-----------|:------------------------------------------------------------------------------------------------------------------| +| Derivations | False | True | False | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'List', 'null'] | @@ -831,9 +835,9 @@ Indicate if derived datasets or predefined extracts are available and the type o 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 | is_list | is_optional | required | type | -|:--------|:----------|:--------------|:-----------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Tools | False | True | False | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.Url.Url]]', 'null'] | +| title | is_list | is_optional | required | type | +|:--------|:----------|:--------------|:-----------|:------------------------------------------------------------------------------------------------------------------| +| Tools | False | True | False | ["CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", 'List', 'null'] | @@ -914,9 +918,9 @@ Please provide the date that the observation was made. Some datasets may be cont Initially this will be defaulted to "COUNT" -| title | is_list | is_optional | required | type | -|:------------------|:----------|:--------------|:-----------|:-------------------------| -| Measured Property | False | False | True | ['MeasuredProperty[{}]'] | +| title | is_list | is_optional | required | type | +|:------------------|:----------|:--------------|:-----------|:---------------------------------------------------------------------------| +| Measured Property | False | False | True | ["MeasuredProperty[{'maxLength': 100, 'minLength': 1, 'type': 'string'}]"] | diff --git a/docs/HDRUK/2.2.1.structure.json b/docs/HDRUK/2.2.1.structure.json index 2f3447f..1dae9b4 100644 --- a/docs/HDRUK/2.2.1.structure.json +++ b/docs/HDRUK/2.2.1.structure.json @@ -219,7 +219,7 @@ "examples": null, "type": [ "EmailAddress[{'anyOf': [{'format': 'email', 'type': 'string'}, {'type': 'null'}]}]", - "typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.EmailAddress.EmailAddress]]", + "List", "null" ], "is_list": false, @@ -267,7 +267,7 @@ ], "type": [ "CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", - "typing.List[hdr_schemata.definitions.HDRUK.OneHundredFiftyCharacters.OneHundredFiftyCharacters]", + "List", "null" ], "is_list": false, @@ -282,7 +282,7 @@ "examples": null, "type": [ "CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", - "typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.ShortDescription.ShortDescription]]", + "List", "null" ], "is_list": false, @@ -385,7 +385,7 @@ ], "type": [ "CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", - "typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.Url.Url]]", + "List", "null" ], "is_list": false, @@ -402,7 +402,7 @@ ], "type": [ "CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", - "typing.List[typing.Union[hdr_schemata.definitions.HDRUK.Url.Url, NoneType, hdr_schemata.definitions.HDRUK.OneHundredFiftyCharacters.OneHundredFiftyCharacters, hdr_schemata.definitions.HDRUK.IsPartOfEnum.IsPartOfEnum]]", + "List", "null" ], "is_list": false, @@ -434,7 +434,7 @@ ], "type": [ "CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", - "typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.Url.Url]]", + "List", "null" ], "is_list": false, @@ -446,7 +446,9 @@ "required": false, "title": "Age Range", "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).", - "examples": null, + "examples": [ + "18-90" + ], "type": [ "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'}]}]", "null" @@ -749,7 +751,7 @@ "examples": null, "type": [ "CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", - "typing.List[hdr_schemata.definitions.HDRUK.DataUseLimitation.DataUseLimitation]", + "List", "null" ], "is_list": false, @@ -764,7 +766,7 @@ "examples": null, "type": [ "CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", - "typing.List[hdr_schemata.definitions.HDRUK.DataUseRequirements.DataUseRequirements]", + "List", "null" ], "is_list": false, @@ -779,7 +781,7 @@ "examples": null, "type": [ "ShortDescription[{'anyOf': [{'maxLength': 1000, 'minLength': 2, 'type': 'string'}, {'type': 'null'}]}]", - "typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.ShortDescription.ShortDescription]]", + "List", "null" ], "is_list": false, @@ -794,7 +796,7 @@ "examples": null, "type": [ "CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", - "typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.Url.Url]]", + "List", "null" ], "is_list": false, @@ -810,7 +812,7 @@ "type": [ "Doi[{'anyOf': [{'pattern': '^10.\\\\d{4,9}/[-._;()/:a-zA-Z0-9]+$', 'type': 'string'}, {'type': 'null'}]}]", "str", - "typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.Doi.Doi]]", + "List", "null" ], "is_list": false, @@ -869,7 +871,7 @@ "examples": null, "type": [ "LongDescription[{'anyOf': [{'maxLength': 50000, 'minLength': 2, 'type': 'string'}, {'type': 'null'}]}]", - "typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.Url.Url]]", + "List", "null" ], "is_list": false, @@ -897,7 +899,7 @@ "examples": null, "type": [ "CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", - "typing.List[hdr_schemata.definitions.HDRUK.Isocountrycode.Isocountrycode]", + "List", "null" ], "is_list": false, @@ -969,7 +971,7 @@ "examples": null, "type": [ "CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", - "typing.List[hdr_schemata.definitions.HDRUK.ControlledVocabulary.ControlledVocabulary]", + "List", "null" ], "is_list": false, @@ -981,7 +983,9 @@ "required": true, "title": "Conforms To", "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.", - "examples": null, + "examples": [ + "LOCAL,NHS DATA DICTIONARY" + ], "type": [ "StandardisedDataModels[{'$defs': {'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'}}, 'anyOf': [{'$ref': '#/$defs/StandardisedDataModelsEnum'}, {'type': 'null'}], 'default': null}]" ], @@ -997,7 +1001,7 @@ "examples": null, "type": [ "CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", - "typing.List[hdr_schemata.definitions.HDRUK.Language.Language]", + "List", "null" ], "is_list": false, @@ -1012,7 +1016,7 @@ "examples": null, "type": [ "CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", - "typing.List[hdr_schemata.definitions.HDRUK.Format.Format]", + "List", "null" ], "is_list": false, @@ -1044,7 +1048,7 @@ "examples": null, "type": [ "CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", - "typing.List[typing.Union[hdr_schemata.definitions.HDRUK.Url.Url, NoneType, hdr_schemata.definitions.HDRUK.OneHundredFiftyCharacters.OneHundredFiftyCharacters]]", + "List", "null" ], "is_list": false, @@ -1059,7 +1063,7 @@ "examples": null, "type": [ "CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", - "typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.AbstractText.AbstractText]]", + "List", "null" ], "is_list": false, @@ -1074,7 +1078,7 @@ "examples": null, "type": [ "CommaSeparatedValues[{'anyOf': [{'pattern': '([^,]+)', 'type': 'string'}, {'type': 'null'}]}]", - "typing.List[typing.Optional[hdr_schemata.definitions.HDRUK.Url.Url]]", + "List", "null" ], "is_list": false, @@ -1168,7 +1172,7 @@ "description": "Initially this will be defaulted to \"COUNT\"", "examples": null, "type": [ - "MeasuredProperty[{}]" + "MeasuredProperty[{'maxLength': 100, 'minLength': 1, 'type': 'string'}]" ], "is_list": false, "is_optional": false, diff --git a/hdr_schemata/definitions/HDRUK/MeasuredProperty.py b/hdr_schemata/definitions/HDRUK/MeasuredProperty.py index 999bee9..c530cc2 100644 --- a/hdr_schemata/definitions/HDRUK/MeasuredProperty.py +++ b/hdr_schemata/definitions/HDRUK/MeasuredProperty.py @@ -3,4 +3,3 @@ class MeasuredProperty(RootModel): pass - diff --git a/hdr_schemata/models/HDRUK/2.1.2/schema.json b/hdr_schemata/models/HDRUK/2.1.2/schema.json index 0d58128..1d8f44c 100644 --- a/hdr_schemata/models/HDRUK/2.1.2/schema.json +++ b/hdr_schemata/models/HDRUK/2.1.2/schema.json @@ -302,6 +302,9 @@ ], "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).", + "examples": [ + "18-90" + ], "title": "Age Range" }, "physicalSampleAvailability": { @@ -771,6 +774,9 @@ } ], "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.", + "examples": [ + "LOCAL,NHS DATA DICTIONARY" + ], "title": "Conforms To" }, "language": { diff --git a/hdr_schemata/models/HDRUK/2.1.3/schema.json b/hdr_schemata/models/HDRUK/2.1.3/schema.json index 9160778..2100a4f 100644 --- a/hdr_schemata/models/HDRUK/2.1.3/schema.json +++ b/hdr_schemata/models/HDRUK/2.1.3/schema.json @@ -302,6 +302,9 @@ ], "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).", + "examples": [ + "18-90" + ], "title": "Age Range" }, "physicalSampleAvailability": { @@ -771,6 +774,9 @@ } ], "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.", + "examples": [ + "LOCAL,NHS DATA DICTIONARY" + ], "title": "Conforms To" }, "language": { diff --git a/hdr_schemata/models/HDRUK/2.2.0/schema.json b/hdr_schemata/models/HDRUK/2.2.0/schema.json index 6ed3bba..25ca632 100644 --- a/hdr_schemata/models/HDRUK/2.2.0/schema.json +++ b/hdr_schemata/models/HDRUK/2.2.0/schema.json @@ -323,6 +323,9 @@ ], "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).", + "examples": [ + "18-90" + ], "title": "Age Range" }, "followup": { @@ -897,6 +900,9 @@ } ], "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.", + "examples": [ + "LOCAL,NHS DATA DICTIONARY" + ], "title": "Conforms To" }, "language": { diff --git a/hdr_schemata/models/HDRUK/2.2.1/schema.json b/hdr_schemata/models/HDRUK/2.2.1/schema.json index be4ba6f..0e59d07 100644 --- a/hdr_schemata/models/HDRUK/2.2.1/schema.json +++ b/hdr_schemata/models/HDRUK/2.2.1/schema.json @@ -353,6 +353,9 @@ ], "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).", + "examples": [ + "18-90" + ], "title": "Age Range" }, "followup": { @@ -940,6 +943,9 @@ } ], "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.", + "examples": [ + "LOCAL,NHS DATA DICTIONARY" + ], "title": "Conforms To" }, "language": { @@ -1263,7 +1269,10 @@ "type": "string" }, "MeasuredProperty": { - "title": "MeasuredProperty" + "maxLength": 100, + "minLength": 1, + "title": "MeasuredProperty", + "type": "string" }, "MemberOf": { "enum": [ diff --git a/hdr_schemata/models/HDRUK/v2_1_2/annotations/config.yaml b/hdr_schemata/models/HDRUK/v2_1_2/annotations/config.yaml index 5933212..8e274d1 100644 --- a/hdr_schemata/models/HDRUK/v2_1_2/annotations/config.yaml +++ b/hdr_schemata/models/HDRUK/v2_1_2/annotations/config.yaml @@ -73,3 +73,21 @@ enrichmentAndLinkage: tools: 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 + +coverage: + title: Coverage + typicalAgeRange: + examples: + - 18-90 + +accessibility: + formatAndStandards: + conformsTo: + 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 “other” and contact support desk to ask for an addition. + examples: + - "LOCAL,NHS DATA DICTIONARY" + title: Conforms To + +structuralMetadata: + title: Structural Metadata + description: Structural metadata about tables, columns and values diff --git a/hdr_schemata/models/HDRUK/v2_2_1/MeasuredProperty.py b/hdr_schemata/models/HDRUK/v2_2_1/MeasuredProperty.py new file mode 100644 index 0000000..425d794 --- /dev/null +++ b/hdr_schemata/models/HDRUK/v2_2_1/MeasuredProperty.py @@ -0,0 +1,5 @@ +from pydantic import RootModel, constr + +class MeasuredProperty(RootModel): + root: constr(min_length=1, max_length=100) + diff --git a/hdr_schemata/models/HDRUK/v2_2_1/Observations.py b/hdr_schemata/models/HDRUK/v2_2_1/Observations.py new file mode 100644 index 0000000..87a9e2d --- /dev/null +++ b/hdr_schemata/models/HDRUK/v2_2_1/Observations.py @@ -0,0 +1,10 @@ +from hdr_schemata.models.HDRUK.v2_2_0 import Observation as BaseObservation +from pydantic import Field +from .MeasuredProperty import MeasuredProperty + +from .annotations import annotations + +an = annotations.observations + +class Observation(BaseObservation): + measuredProperty: MeasuredProperty = Field(..., **an.measuredProperty.__dict__) diff --git a/hdr_schemata/models/HDRUK/v2_2_1/__init__.py b/hdr_schemata/models/HDRUK/v2_2_1/__init__.py index c0425bb..0cd38c4 100644 --- a/hdr_schemata/models/HDRUK/v2_2_1/__init__.py +++ b/hdr_schemata/models/HDRUK/v2_2_1/__init__.py @@ -6,6 +6,8 @@ from .EnrichmentAndLinkage import EnrichmentAndLinkage from .Accessibility import Accessibility from .Provenance import Provenance +from .Observations import Observation +from .MeasuredProperty import MeasuredProperty from .annotations import annotations as an @@ -28,6 +30,10 @@ class Hdruk221(Hdruk220): None, description=an.provenance.description, title=an.provenance.title ) + observations: List[Observation] = Field( + ..., description=an.observations.description, title=an.observations.title + ) + @classmethod def save_schema(cls, location="./2.2.1/schema.json"): with open(location, "w") as f: diff --git a/hdr_schemata/utils/create_markdown.py b/hdr_schemata/utils/create_markdown.py index 68fe80e..a0c9ebe 100644 --- a/hdr_schemata/utils/create_markdown.py +++ b/hdr_schemata/utils/create_markdown.py @@ -142,6 +142,9 @@ def form_structure(data, form, parent=None): if subItems: form_structure(subItems, form, parent=k) + if "structuralMetadata" in k: + continue + types = item.pop("types") infos = [] for t in types: @@ -157,6 +160,8 @@ def form_structure(data, form, parent=None): info = {**title, **t_sch["anyOf"][0]} else: info = t_sch + elif issubclass(t, BaseModel): + continue else: info = t.__name__ except: @@ -172,7 +177,7 @@ def form_structure(data, form, parent=None): if isinstance(infos, list): # Skip fields where the type is a pydantic type we have defined e.g. "Organisation" # because we drill down into the subtypes instead - if isinstance(infos[0], str) and infos[0].lower() == k.split(".")[-1]: + if len(infos) == 0: continue else: item["types"] = infos[0]