From 724e8606aab92496c37cf1ad42d58f46d4298e8f Mon Sep 17 00:00:00 2001 From: Calum Macdonald Date: Fri, 22 Mar 2024 09:32:28 +0000 Subject: [PATCH] fix cohort variables --- docs/HDRUK/2.2.0.md | 48 ++++++++++---------- docs/HDRUK/2.2.0.structure.json | 24 +++++----- docs/HDRUK/2.2.1.md | 48 ++++++++++---------- docs/HDRUK/2.2.1.structure.json | 24 +++++----- hdr_schemata/models/HDRUK/2.2.0/schema.json | 24 +++++----- hdr_schemata/models/HDRUK/2.2.1/schema.json | 24 +++++----- hdr_schemata/models/HDRUK/v2_2_0/Coverage.py | 14 +++--- 7 files changed, 104 insertions(+), 102 deletions(-) diff --git a/docs/HDRUK/2.2.0.md b/docs/HDRUK/2.2.0.md index 0131fb2..7420421 100644 --- a/docs/HDRUK/2.2.0.md +++ b/docs/HDRUK/2.2.0.md @@ -390,66 +390,66 @@ Male, Female, Other ### biologicalsamples -Male, Female, Other +Blood, Saliva, Urine, Other -| title | is_list | is_optional | required | type | -|:--------|:----------|:--------------|:-----------|:-----------------------------------------------------------| -| Gender | True | True | False | ["BiologicalSampleType['Blood','Other','Urine','Saliva']"] | +| title | is_list | is_optional | required | type | +|:-------------------|:----------|:--------------|:-----------|:-----------------------------------------------------------| +| Biological Samples | True | True | False | ["BiologicalSampleType['Blood','Other','Urine','Saliva']"] | ### psychological -Male, Female, Other +Mental health, Cognitive function -| title | is_list | is_optional | required | type | -|:--------|:----------|:--------------|:-----------|:------------------------------------------------------------| -| Gender | True | True | False | ["PsychologicalType['Cognitive Function','Mental Health']"] | +| title | is_list | is_optional | required | type | +|:--------------|:----------|:--------------|:-----------|:------------------------------------------------------------| +| Psychological | True | True | False | ["PsychologicalType['Cognitive Function','Mental Health']"] | ### physical -Male, Female, Other +Cardiovascular, Respiratory, Musculoskeletal, Hearing and Vision, Reproductive -| title | is_list | is_optional | required | type | -|:--------|:----------|:--------------|:-----------|:-----------------------------------------------------------------------------------------------------| -| Gender | True | True | False | ["PhysicalType['Respiratory','Vision','Hearing','Musculoskeletal','Cardiovascular','Reproductive']"] | +| title | is_list | is_optional | required | type | +|:---------|:----------|:--------------|:-----------|:-----------------------------------------------------------------------------------------------------| +| Physical | True | True | False | ["PhysicalType['Respiratory','Vision','Hearing','Musculoskeletal','Cardiovascular','Reproductive']"] | ### anthropometric -Male, Female, Other +Height, Weight, Waist circumference, Hip circumference, Blood pressure -| title | is_list | is_optional | required | type | -|:--------|:----------|:--------------|:-----------|:-----------------------------------------------------------------------------------------------------| -| Gender | True | True | False | ["AnthropometricType['Blood Pressure','Hip Circumference','Height','Waist Circumference','Weight']"] | +| title | is_list | is_optional | required | type | +|:---------------|:----------|:--------------|:-----------|:-----------------------------------------------------------------------------------------------------| +| Anthropometric | True | True | False | ["AnthropometricType['Blood Pressure','Hip Circumference','Height','Waist Circumference','Weight']"] | ### lifestyle -Male, Female, Other +Cohort lifestyle habits: Smoking, Physical activity, Dietary habits, Alcohol -| title | is_list | is_optional | required | type | -|:--------|:----------|:--------------|:-----------|:-----------------------------------------------------------------------------| -| Gender | True | True | False | ["LifestylesType['Smoking','Dietary Habits','Physical Activity','Alcohol']"] | +| title | is_list | is_optional | required | type | +|:----------|:----------|:--------------|:-----------|:-----------------------------------------------------------------------------| +| Lifestyle | True | True | False | ["LifestylesType['Smoking','Dietary Habits','Physical Activity','Alcohol']"] | ### socioeconomic -Male, Female, Other +Occupation, Family circumstances, Housing, Education, Ethnic group, Martial status, Social support -| title | is_list | is_optional | required | type | -|:--------|:----------|:--------------|:-----------|:---------------------------------------------------------------------------------------------------------------------------------------------| -| Gender | True | True | False | ["SocioEconomicType['Finances','Family Circumstances','Housing','Education','Marital Status','Occupation','Ethnic Group','Social Support']"] | +| title | is_list | is_optional | required | type | +|:---------------|:----------|:--------------|:-----------|:---------------------------------------------------------------------------------------------------------------------------------------------| +| Socio-economic | True | True | False | ["SocioEconomicType['Finances','Family Circumstances','Housing','Education','Marital Status','Occupation','Ethnic Group','Social Support']"] | diff --git a/docs/HDRUK/2.2.0.structure.json b/docs/HDRUK/2.2.0.structure.json index 885224d..f01ebc6 100644 --- a/docs/HDRUK/2.2.0.structure.json +++ b/docs/HDRUK/2.2.0.structure.json @@ -497,8 +497,8 @@ { "name": "biologicalsamples", "required": false, - "title": "Gender", - "description": "Male, Female, Other", + "title": "Biological Samples", + "description": "Blood, Saliva, Urine, Other", "examples": null, "type": [ "BiologicalSampleType['Blood','Other','Urine','Saliva']" @@ -509,8 +509,8 @@ { "name": "psychological", "required": false, - "title": "Gender", - "description": "Male, Female, Other", + "title": "Psychological", + "description": "Mental health, Cognitive function", "examples": null, "type": [ "PsychologicalType['Cognitive Function','Mental Health']" @@ -521,8 +521,8 @@ { "name": "physical", "required": false, - "title": "Gender", - "description": "Male, Female, Other", + "title": "Physical", + "description": "Cardiovascular, Respiratory, Musculoskeletal, Hearing and Vision, Reproductive", "examples": null, "type": [ "PhysicalType['Respiratory','Vision','Hearing','Musculoskeletal','Cardiovascular','Reproductive']" @@ -533,8 +533,8 @@ { "name": "anthropometric", "required": false, - "title": "Gender", - "description": "Male, Female, Other", + "title": "Anthropometric", + "description": "Height, Weight, Waist circumference, Hip circumference, Blood pressure", "examples": null, "type": [ "AnthropometricType['Blood Pressure','Hip Circumference','Height','Waist Circumference','Weight']" @@ -545,8 +545,8 @@ { "name": "lifestyle", "required": false, - "title": "Gender", - "description": "Male, Female, Other", + "title": "Lifestyle", + "description": "Cohort lifestyle habits: Smoking, Physical activity, Dietary habits, Alcohol", "examples": null, "type": [ "LifestylesType['Smoking','Dietary Habits','Physical Activity','Alcohol']" @@ -557,8 +557,8 @@ { "name": "socioeconomic", "required": false, - "title": "Gender", - "description": "Male, Female, Other", + "title": "Socio-economic", + "description": "Occupation, Family circumstances, Housing, Education, Ethnic group, Martial status, Social support", "examples": null, "type": [ "SocioEconomicType['Finances','Family Circumstances','Housing','Education','Marital Status','Occupation','Ethnic Group','Social Support']" diff --git a/docs/HDRUK/2.2.1.md b/docs/HDRUK/2.2.1.md index 05604cf..a3ab562 100644 --- a/docs/HDRUK/2.2.1.md +++ b/docs/HDRUK/2.2.1.md @@ -390,66 +390,66 @@ Male, Female, Other ### biologicalsamples -Male, Female, Other +Blood, Saliva, Urine, Other -| title | is_list | is_optional | required | type | -|:--------|:----------|:--------------|:-----------|:-----------------------------------------------------------| -| Gender | True | True | False | ["BiologicalSampleType['Blood','Other','Urine','Saliva']"] | +| title | is_list | is_optional | required | type | +|:-------------------|:----------|:--------------|:-----------|:-----------------------------------------------------------| +| Biological Samples | True | True | False | ["BiologicalSampleType['Blood','Other','Urine','Saliva']"] | ### psychological -Male, Female, Other +Mental health, Cognitive function -| title | is_list | is_optional | required | type | -|:--------|:----------|:--------------|:-----------|:------------------------------------------------------------| -| Gender | True | True | False | ["PsychologicalType['Cognitive Function','Mental Health']"] | +| title | is_list | is_optional | required | type | +|:--------------|:----------|:--------------|:-----------|:------------------------------------------------------------| +| Psychological | True | True | False | ["PsychologicalType['Cognitive Function','Mental Health']"] | ### physical -Male, Female, Other +Cardiovascular, Respiratory, Musculoskeletal, Hearing and Vision, Reproductive -| title | is_list | is_optional | required | type | -|:--------|:----------|:--------------|:-----------|:-----------------------------------------------------------------------------------------------------| -| Gender | True | True | False | ["PhysicalType['Respiratory','Vision','Hearing','Musculoskeletal','Cardiovascular','Reproductive']"] | +| title | is_list | is_optional | required | type | +|:---------|:----------|:--------------|:-----------|:-----------------------------------------------------------------------------------------------------| +| Physical | True | True | False | ["PhysicalType['Respiratory','Vision','Hearing','Musculoskeletal','Cardiovascular','Reproductive']"] | ### anthropometric -Male, Female, Other +Height, Weight, Waist circumference, Hip circumference, Blood pressure -| title | is_list | is_optional | required | type | -|:--------|:----------|:--------------|:-----------|:-----------------------------------------------------------------------------------------------------| -| Gender | True | True | False | ["AnthropometricType['Blood Pressure','Hip Circumference','Height','Waist Circumference','Weight']"] | +| title | is_list | is_optional | required | type | +|:---------------|:----------|:--------------|:-----------|:-----------------------------------------------------------------------------------------------------| +| Anthropometric | True | True | False | ["AnthropometricType['Blood Pressure','Hip Circumference','Height','Waist Circumference','Weight']"] | ### lifestyle -Male, Female, Other +Cohort lifestyle habits: Smoking, Physical activity, Dietary habits, Alcohol -| title | is_list | is_optional | required | type | -|:--------|:----------|:--------------|:-----------|:-----------------------------------------------------------------------------| -| Gender | True | True | False | ["LifestylesType['Smoking','Dietary Habits','Physical Activity','Alcohol']"] | +| title | is_list | is_optional | required | type | +|:----------|:----------|:--------------|:-----------|:-----------------------------------------------------------------------------| +| Lifestyle | True | True | False | ["LifestylesType['Smoking','Dietary Habits','Physical Activity','Alcohol']"] | ### socioeconomic -Male, Female, Other +Occupation, Family circumstances, Housing, Education, Ethnic group, Martial status, Social support -| title | is_list | is_optional | required | type | -|:--------|:----------|:--------------|:-----------|:---------------------------------------------------------------------------------------------------------------------------------------------| -| Gender | True | True | False | ["SocioEconomicType['Finances','Family Circumstances','Housing','Education','Marital Status','Occupation','Ethnic Group','Social Support']"] | +| title | is_list | is_optional | required | type | +|:---------------|:----------|:--------------|:-----------|:---------------------------------------------------------------------------------------------------------------------------------------------| +| Socio-economic | True | True | False | ["SocioEconomicType['Finances','Family Circumstances','Housing','Education','Marital Status','Occupation','Ethnic Group','Social Support']"] | diff --git a/docs/HDRUK/2.2.1.structure.json b/docs/HDRUK/2.2.1.structure.json index 87f2cbf..9de4829 100644 --- a/docs/HDRUK/2.2.1.structure.json +++ b/docs/HDRUK/2.2.1.structure.json @@ -497,8 +497,8 @@ { "name": "biologicalsamples", "required": false, - "title": "Gender", - "description": "Male, Female, Other", + "title": "Biological Samples", + "description": "Blood, Saliva, Urine, Other", "examples": null, "type": [ "BiologicalSampleType['Blood','Other','Urine','Saliva']" @@ -509,8 +509,8 @@ { "name": "psychological", "required": false, - "title": "Gender", - "description": "Male, Female, Other", + "title": "Psychological", + "description": "Mental health, Cognitive function", "examples": null, "type": [ "PsychologicalType['Cognitive Function','Mental Health']" @@ -521,8 +521,8 @@ { "name": "physical", "required": false, - "title": "Gender", - "description": "Male, Female, Other", + "title": "Physical", + "description": "Cardiovascular, Respiratory, Musculoskeletal, Hearing and Vision, Reproductive", "examples": null, "type": [ "PhysicalType['Respiratory','Vision','Hearing','Musculoskeletal','Cardiovascular','Reproductive']" @@ -533,8 +533,8 @@ { "name": "anthropometric", "required": false, - "title": "Gender", - "description": "Male, Female, Other", + "title": "Anthropometric", + "description": "Height, Weight, Waist circumference, Hip circumference, Blood pressure", "examples": null, "type": [ "AnthropometricType['Blood Pressure','Hip Circumference','Height','Waist Circumference','Weight']" @@ -545,8 +545,8 @@ { "name": "lifestyle", "required": false, - "title": "Gender", - "description": "Male, Female, Other", + "title": "Lifestyle", + "description": "Cohort lifestyle habits: Smoking, Physical activity, Dietary habits, Alcohol", "examples": null, "type": [ "LifestylesType['Smoking','Dietary Habits','Physical Activity','Alcohol']" @@ -557,8 +557,8 @@ { "name": "socioeconomic", "required": false, - "title": "Gender", - "description": "Male, Female, Other", + "title": "Socio-economic", + "description": "Occupation, Family circumstances, Housing, Education, Ethnic group, Martial status, Social support", "examples": null, "type": [ "SocioEconomicType['Finances','Family Circumstances','Housing','Education','Marital Status','Occupation','Ethnic Group','Social Support']" diff --git a/hdr_schemata/models/HDRUK/2.2.0/schema.json b/hdr_schemata/models/HDRUK/2.2.0/schema.json index 46e4a0c..8a5a08f 100644 --- a/hdr_schemata/models/HDRUK/2.2.0/schema.json +++ b/hdr_schemata/models/HDRUK/2.2.0/schema.json @@ -380,8 +380,8 @@ } ], "default": null, - "description": "Male, Female, Other", - "title": "Gender" + "description": "Blood, Saliva, Urine, Other", + "title": "Biological Samples" }, "psychological": { "anyOf": [ @@ -396,8 +396,8 @@ } ], "default": null, - "description": "Male, Female, Other", - "title": "Gender" + "description": "Mental health, Cognitive function", + "title": "Psychological" }, "physical": { "anyOf": [ @@ -412,8 +412,8 @@ } ], "default": null, - "description": "Male, Female, Other", - "title": "Gender" + "description": "Cardiovascular, Respiratory, Musculoskeletal, Hearing and Vision, Reproductive", + "title": "Physical" }, "anthropometric": { "anyOf": [ @@ -428,8 +428,8 @@ } ], "default": null, - "description": "Male, Female, Other", - "title": "Gender" + "description": "Height, Weight, Waist circumference, Hip circumference, Blood pressure", + "title": "Anthropometric" }, "lifestyle": { "anyOf": [ @@ -444,8 +444,8 @@ } ], "default": null, - "description": "Male, Female, Other", - "title": "Gender" + "description": "Cohort lifestyle habits: Smoking, Physical activity, Dietary habits, Alcohol", + "title": "Lifestyle" }, "socioeconomic": { "anyOf": [ @@ -460,8 +460,8 @@ } ], "default": null, - "description": "Male, Female, Other", - "title": "Gender" + "description": "Occupation, Family circumstances, Housing, Education, Ethnic group, Martial status, Social support", + "title": "Socio-economic" } }, "title": "Coverage", diff --git a/hdr_schemata/models/HDRUK/2.2.1/schema.json b/hdr_schemata/models/HDRUK/2.2.1/schema.json index 62b8b78..b68d10b 100644 --- a/hdr_schemata/models/HDRUK/2.2.1/schema.json +++ b/hdr_schemata/models/HDRUK/2.2.1/schema.json @@ -410,8 +410,8 @@ } ], "default": null, - "description": "Male, Female, Other", - "title": "Gender" + "description": "Blood, Saliva, Urine, Other", + "title": "Biological Samples" }, "psychological": { "anyOf": [ @@ -426,8 +426,8 @@ } ], "default": null, - "description": "Male, Female, Other", - "title": "Gender" + "description": "Mental health, Cognitive function", + "title": "Psychological" }, "physical": { "anyOf": [ @@ -442,8 +442,8 @@ } ], "default": null, - "description": "Male, Female, Other", - "title": "Gender" + "description": "Cardiovascular, Respiratory, Musculoskeletal, Hearing and Vision, Reproductive", + "title": "Physical" }, "anthropometric": { "anyOf": [ @@ -458,8 +458,8 @@ } ], "default": null, - "description": "Male, Female, Other", - "title": "Gender" + "description": "Height, Weight, Waist circumference, Hip circumference, Blood pressure", + "title": "Anthropometric" }, "lifestyle": { "anyOf": [ @@ -474,8 +474,8 @@ } ], "default": null, - "description": "Male, Female, Other", - "title": "Gender" + "description": "Cohort lifestyle habits: Smoking, Physical activity, Dietary habits, Alcohol", + "title": "Lifestyle" }, "socioeconomic": { "anyOf": [ @@ -490,8 +490,8 @@ } ], "default": null, - "description": "Male, Female, Other", - "title": "Gender" + "description": "Occupation, Family circumstances, Housing, Education, Ethnic group, Martial status, Social support", + "title": "Socio-economic" } }, "title": "Coverage", diff --git a/hdr_schemata/models/HDRUK/v2_2_0/Coverage.py b/hdr_schemata/models/HDRUK/v2_2_0/Coverage.py index 0967d6c..91bfa8d 100644 --- a/hdr_schemata/models/HDRUK/v2_2_0/Coverage.py +++ b/hdr_schemata/models/HDRUK/v2_2_0/Coverage.py @@ -18,26 +18,28 @@ class Config: biologicalsamples: Optional[List[BiologicalSampleType]] = Field( None, - **an.gender.__dict__, + **an.biologicalsamples.__dict__, ) psychological: Optional[List[PsychologicalType]] = Field( None, - **an.gender.__dict__, + **an.psychological.__dict__, ) physical: Optional[List[PhysicalType]] = Field( None, - **an.gender.__dict__, + **an.physical.__dict__, ) anthropometric: Optional[List[AnthropometricType]] = Field( - None, **an.gender.__dict__ + None, **an.anthropometric.__dict__ ) - lifestyle: Optional[List[LifestylesType]] = Field(None, **an.gender.__dict__) + lifestyle: Optional[List[LifestylesType]] = Field(None, **an.lifestyle.__dict__) - socioeconomic: Optional[List[SocioEconomicType]] = Field(None, **an.gender.__dict__) + socioeconomic: Optional[List[SocioEconomicType]] = Field( + None, **an.socioeconomic.__dict__ + ) # inherited physicalSampleAvailability but this has now been replaced by biologicalsamples