From b041a153b0406774aa8bb434d72186c5e0d7df92 Mon Sep 17 00:00:00 2001 From: Arsenios Chatzigeorgiou <49944135+arschat@users.noreply.github.com> Date: Thu, 8 Aug 2024 11:20:43 +0100 Subject: [PATCH 1/7] Added 2 new smoking related fields, and renamed, and edit an existing one. --- docs/jsonBrowser/module.md | 4 ++- .../module/biomaterial/medical_history.json | 28 +++++++++++++++---- json_schema/property_migrations.json | 7 +++++ json_schema/update_log.csv | 2 ++ 4 files changed, 35 insertions(+), 6 deletions(-) diff --git a/docs/jsonBrowser/module.md b/docs/jsonBrowser/module.md index 14e14a97e..1b1eccc3d 100644 --- a/docs/jsonBrowser/module.md +++ b/docs/jsonBrowser/module.md @@ -473,7 +473,9 @@ Property name | Description | Type | Required? | Object reference? | User friend --- | --- | --- | --- | --- | --- | --- | --- alcohol_history | Estimated amount of alcohol consumed per day. | string | no | | Alcohol history | | 3-6 alcohol units/day; 1 drink per day medication | Medications the individual was taking at time of biomaterial collection. | string | no | | Medications | | Naproxen 500mg/day; Citalopram 20mg/day -smoking_history | Estimated number of cigarettes smoked per day. | string | no | | Smoking history | | 20 cigarettes/day for 25 years, stopped 2000 +smoking_status | Whether the individual is actively, was formerly or never consumed smoking tobacco products like cigarettes, cigars, pipe, betel nut chewing etc. | string | no | | Smoking status | active, former, never | Should be one of: active, former, never. +smoking_pack_years | Estimated number of packs (20 cigarettes) smoked per day multiplied by the number of years the individual was smoking. | number | no | | Smoking pack years | | 4.55 +years_since_smoking_cessation | If smoking status is 'former', specify the number of years since smoking cessation. | integer | no | | Years since smoking cessation | | 12 nutritional_state | Nutritional state of individual at time of biomaterial collection. | string | no | | Nutritional state | normal, fasting, feeding tube removed | Should be one of: normal, fasting, or feeding tube removed. test_results | Results from medical tests performed on the individual. | string | no | | Test results | | lipid panel shows normal level of LDL (124 mg/dL); HIV, HBV, HCV: Negative treatment | Treatments the individual has undergone prior to biomaterial collection. | string | no | | Treatments | | Patient treated with antibiotics for a urinary tract infection; Patient treated with chemotherapy (Epirubicin, cisplatin, capecitabine) to treat stomach cancer diff --git a/json_schema/module/biomaterial/medical_history.json b/json_schema/module/biomaterial/medical_history.json index 5382ca10a..3d99f6f54 100644 --- a/json_schema/module/biomaterial/medical_history.json +++ b/json_schema/module/biomaterial/medical_history.json @@ -31,12 +31,30 @@ "example": "Naproxen 500mg/day; Citalopram 20mg/day", "guidelines": "Enter the medication and dosage. Separate multiple medications with commas." }, - "smoking_history": { - "description": "Estimated number of cigarettes smoked per day.", + "smoking_status": { + "description": "Whether the individual is actively, was formerly or never consumed smoking tobacco products like cigarettes, cigars, pipe, betel nut chewing etc.", "type": "string", - "user_friendly": "Smoking history", - "example": "20 cigarettes/day for 25 years, stopped 2000", - "guidelines": "Enter an estimated number of cigarettes smoked per day and for how many years." + "enum": [ + "active", + "former", + "never" + ], + "user_friendly": "Smoking status", + "example": "Should be one of: active, former, never." + }, + "smoking_pack_years": { + "description": "Estimated number of packs (20 cigarettes) smoked per day multiplied by the number of years the individual was smoking.", + "type": "number", + "user_friendly": "Smoking pack years", + "minimum": 0, + "example": 4.55 + }, + "years_since_smoking_cessation": { + "description": "If smoking status is 'former', specify the number of years since smoking cessation.", + "type": "integer", + "user_friendly": "Years since smoking cessation", + "minimum": 0, + "example": 12 }, "nutritional_state": { "description": "Nutritional state of individual at time of biomaterial collection.", diff --git a/json_schema/property_migrations.json b/json_schema/property_migrations.json index fbdfbdd22..28c03b431 100644 --- a/json_schema/property_migrations.json +++ b/json_schema/property_migrations.json @@ -1,5 +1,12 @@ { "migrations": [ + { + "source_schema": "medical_history", + "property": "smoking_history", + "effective_from" : "6.0.0", + "reason": "Field standardization", + "type": "renamed property" + }, { "source_schema": "project", "property": "data_use_restriction", diff --git a/json_schema/update_log.csv b/json_schema/update_log.csv index 3231ff199..6240b6348 100644 --- a/json_schema/update_log.csv +++ b/json_schema/update_log.csv @@ -1 +1,3 @@ Schema,Change type,Change message,Version,Date +module/biomaterial/medical_history,minor,"Added smoking related fields in medical_history module. Fix #1565",, +module/biomaterial/medical_history,major,"Changed smoking_history name in medical_history module. Fix #1565",, \ No newline at end of file From 30d61d35fbdf980d56b795d372ff5c2f81604b36 Mon Sep 17 00:00:00 2001 From: Arsenios Chatzigeorgiou <49944135+arschat@users.noreply.github.com> Date: Wed, 14 Aug 2024 10:58:54 +0100 Subject: [PATCH 2/7] Change type of property migration to deprecated --- json_schema/property_migrations.json | 2 +- json_schema/update_log.csv | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/json_schema/property_migrations.json b/json_schema/property_migrations.json index 28c03b431..825903387 100644 --- a/json_schema/property_migrations.json +++ b/json_schema/property_migrations.json @@ -5,7 +5,7 @@ "property": "smoking_history", "effective_from" : "6.0.0", "reason": "Field standardization", - "type": "renamed property" + "type": "deprecated property" }, { "source_schema": "project", diff --git a/json_schema/update_log.csv b/json_schema/update_log.csv index 6240b6348..d81e6f28b 100644 --- a/json_schema/update_log.csv +++ b/json_schema/update_log.csv @@ -1,3 +1,3 @@ Schema,Change type,Change message,Version,Date -module/biomaterial/medical_history,minor,"Added smoking related fields in medical_history module. Fix #1565",, -module/biomaterial/medical_history,major,"Changed smoking_history name in medical_history module. Fix #1565",, \ No newline at end of file +module/biomaterial/medical_history,minor,"Added optional smoking related fields in medical_history module. Fix #1565",, +module/biomaterial/medical_history,major,"Removed smoking_history in medical_history module. Fix #1565",, \ No newline at end of file From 238e28f2f047d026edbec0cfd77c48e43029c140 Mon Sep 17 00:00:00 2001 From: Arsenios Chatzigeorgiou <49944135+arschat@users.noreply.github.com> Date: Fri, 30 Aug 2024 14:10:07 +0300 Subject: [PATCH 3/7] Update json_schema/module/biomaterial/medical_history.json Update smoking_status description Co-authored-by: Hannes Schmidt --- json_schema/module/biomaterial/medical_history.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json_schema/module/biomaterial/medical_history.json b/json_schema/module/biomaterial/medical_history.json index 3d99f6f54..0a76403cc 100644 --- a/json_schema/module/biomaterial/medical_history.json +++ b/json_schema/module/biomaterial/medical_history.json @@ -32,7 +32,7 @@ "guidelines": "Enter the medication and dosage. Separate multiple medications with commas." }, "smoking_status": { - "description": "Whether the individual is actively, was formerly or never consumed smoking tobacco products like cigarettes, cigars, pipe, betel nut chewing etc.", + "description": "Whether the individual is actively consuming, was formerly consuming, or never consumed smoking tobacco products like cigarettes, cigars, pipe, betel nut chewing etc.", "type": "string", "enum": [ "active", From 2d8682c5664ac65c4b7d9d18e93ab9d284ba9707 Mon Sep 17 00:00:00 2001 From: Arsenios Chatzigeorgiou <49944135+arschat@users.noreply.github.com> Date: Fri, 30 Aug 2024 14:13:31 +0300 Subject: [PATCH 4/7] Removed betel nut chewing from smoking_status description --- docs/jsonBrowser/module.md | 2 +- json_schema/module/biomaterial/medical_history.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/jsonBrowser/module.md b/docs/jsonBrowser/module.md index a1ed5b811..a08788825 100644 --- a/docs/jsonBrowser/module.md +++ b/docs/jsonBrowser/module.md @@ -507,7 +507,7 @@ Property name | Description | Type | Required? | Object reference? | User friend --- | --- | --- | --- | --- | --- | --- | --- alcohol_history | Estimated amount of alcohol consumed per day. | string | no | | Alcohol history | | 3-6 alcohol units/day; 1 drink per day medication | Medications the individual was taking at time of biomaterial collection. | string | no | | Medications | | Naproxen 500mg/day; Citalopram 20mg/day -smoking_status | Whether the individual is actively, was formerly or never consumed smoking tobacco products like cigarettes, cigars, pipe, betel nut chewing etc. | string | no | | Smoking status | active, former, never | Should be one of: active, former, never. +smoking_status | Whether the individual is actively, was formerly or never consumed smoking tobacco products like cigarettes, cigars, pipe etc. | string | no | | Smoking status | active, former, never | Should be one of: active, former, never. smoking_pack_years | Estimated number of packs (20 cigarettes) smoked per day multiplied by the number of years the individual was smoking. | number | no | | Smoking pack years | | 4.55 years_since_smoking_cessation | If smoking status is 'former', specify the number of years since smoking cessation. | integer | no | | Years since smoking cessation | | 12 nutritional_state | Nutritional state of individual at time of biomaterial collection. | string | no | | Nutritional state | normal, fasting, feeding tube removed | Should be one of: normal, fasting, or feeding tube removed. diff --git a/json_schema/module/biomaterial/medical_history.json b/json_schema/module/biomaterial/medical_history.json index 0a76403cc..ba63b3c5a 100644 --- a/json_schema/module/biomaterial/medical_history.json +++ b/json_schema/module/biomaterial/medical_history.json @@ -32,7 +32,7 @@ "guidelines": "Enter the medication and dosage. Separate multiple medications with commas." }, "smoking_status": { - "description": "Whether the individual is actively consuming, was formerly consuming, or never consumed smoking tobacco products like cigarettes, cigars, pipe, betel nut chewing etc.", + "description": "Whether the individual is actively, was formerly or never consumed smoking tobacco products like cigarettes, cigars, pipe etc.", "type": "string", "enum": [ "active", From 1735684ba36c64892b3c3930098e81bb7824f893 Mon Sep 17 00:00:00 2001 From: Arsenios Chatzigeorgiou <49944135+arschat@users.noreply.github.com> Date: Fri, 30 Aug 2024 14:43:17 +0300 Subject: [PATCH 5/7] Added constrains for non-sensical smoking fields combinations --- .../module/biomaterial/medical_history.json | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/json_schema/module/biomaterial/medical_history.json b/json_schema/module/biomaterial/medical_history.json index ba63b3c5a..867828fa5 100644 --- a/json_schema/module/biomaterial/medical_history.json +++ b/json_schema/module/biomaterial/medical_history.json @@ -79,5 +79,38 @@ "user_friendly": "Treatments", "example": "Patient treated with antibiotics for a urinary tract infection; Patient treated with chemotherapy (Epirubicin, cisplatin, capecitabine) to treat stomach cancer" } + }, + "if": { + "properties": { + "smoking_status": { + "const": "active" + } + } + }, + "then": { + "properties": { + "years_since_smoking_cessation": { + "maximum": 0 + } + } + }, + "else": { + "if": { + "properties": { + "smoking_status": { + "const": "never" + } + } + }, + "then": { + "properties": { + "years_since_smoking_cessation": { + "type": "null" + }, + "smoking_pack_years": { + "maximum": 0 + } + } + } } } From 2ce72eb15f045144d496e78ef855e247cdf297c2 Mon Sep 17 00:00:00 2001 From: Arsenios Chatzigeorgiou <49944135+arschat@users.noreply.github.com> Date: Thu, 5 Sep 2024 11:20:52 +0300 Subject: [PATCH 6/7] Refactor constrains for non-sensical smoking fields combinations --- .../module/biomaterial/medical_history.json | 65 ++++++++++--------- 1 file changed, 35 insertions(+), 30 deletions(-) diff --git a/json_schema/module/biomaterial/medical_history.json b/json_schema/module/biomaterial/medical_history.json index 867828fa5..224bc79e5 100644 --- a/json_schema/module/biomaterial/medical_history.json +++ b/json_schema/module/biomaterial/medical_history.json @@ -80,37 +80,42 @@ "example": "Patient treated with antibiotics for a urinary tract infection; Patient treated with chemotherapy (Epirubicin, cisplatin, capecitabine) to treat stomach cancer" } }, - "if": { - "properties": { - "smoking_status": { - "const": "active" - } - } - }, - "then": { - "properties": { - "years_since_smoking_cessation": { - "maximum": 0 - } - } - }, - "else": { - "if": { - "properties": { - "smoking_status": { - "const": "never" - } - } - }, - "then": { - "properties": { - "years_since_smoking_cessation": { - "type": "null" + "allOf": + [ + { + "if": { + "properties": { + "smoking_status": { + "const": "active" + } + } }, - "smoking_pack_years": { - "maximum": 0 + "then": { + "properties": { + "years_since_smoking_cessation": { + "maximum": 0 + } + } + } + }, + { + "if": { + "properties": { + "smoking_status": { + "const": "never" + } + } + }, + "then": { + "properties": { + "years_since_smoking_cessation": { + "type": "null" + }, + "smoking_pack_years": { + "maximum": 0 + } + } } } - } - } + ] } From 30633814e258eadc023576fb8923859e4aba20d7 Mon Sep 17 00:00:00 2001 From: Arsenios Chatzigeorgiou <49944135+arschat@users.noreply.github.com> Date: Mon, 16 Sep 2024 14:54:38 +0300 Subject: [PATCH 7/7] Ran release_prepare script --- changelog.md | 12 ++++++++++++ json_schema/property_migrations.json | 4 ++-- json_schema/update_log.csv | 2 -- json_schema/versions.json | 6 +++--- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/changelog.md b/changelog.md index 2e4f446ae..9adeb00e9 100644 --- a/changelog.md +++ b/changelog.md @@ -7,6 +7,18 @@ and (starting with v4.0.0) this project adheres to [Semantic Versioning](http:// ## [Unreleased](https://github.com/HumanCellAtlas/metadata-schema/tree/staging) +### [module/biomaterial/medical_history.json - v5.3.0] - 2024-09-16 +### Added +Added optional smoking related fields in medical_history module. Fix #1565 + +### [module/biomaterial/medical_history.json - v6.0.0] - 2024-09-16 +### Removed +Removed smoking_history in medical_history module. Fix #1565 + +### [type/biomaterial/donor_organism.json - v16.2.0] - 2024-09-16 +### Added +Added optional smoking related fields in medical_history module. Fix #1565 + ### [module/ontology/file_content_ontology.json - v2.0.0] - 2024-08-28 ### Fixed Fixed class from data:0006 to EDAM:0006. Fixes #1571 diff --git a/json_schema/property_migrations.json b/json_schema/property_migrations.json index 825903387..aab24f8b2 100644 --- a/json_schema/property_migrations.json +++ b/json_schema/property_migrations.json @@ -3,10 +3,10 @@ { "source_schema": "medical_history", "property": "smoking_history", - "effective_from" : "6.0.0", + "effective_from": "6.0.0", "reason": "Field standardization", "type": "deprecated property" - }, + }, { "source_schema": "project", "property": "data_use_restriction", diff --git a/json_schema/update_log.csv b/json_schema/update_log.csv index d81e6f28b..3231ff199 100644 --- a/json_schema/update_log.csv +++ b/json_schema/update_log.csv @@ -1,3 +1 @@ Schema,Change type,Change message,Version,Date -module/biomaterial/medical_history,minor,"Added optional smoking related fields in medical_history module. Fix #1565",, -module/biomaterial/medical_history,major,"Removed smoking_history in medical_history module. Fix #1565",, \ No newline at end of file diff --git a/json_schema/versions.json b/json_schema/versions.json index f48261aff..27bebe930 100644 --- a/json_schema/versions.json +++ b/json_schema/versions.json @@ -1,5 +1,5 @@ { - "last_update_date": "2024-08-28T14:24:32Z", + "last_update_date": "2024-09-16T14:52:03Z", "version_numbers": { "core": { "biomaterial": { @@ -25,7 +25,7 @@ "familial_relationship": "6.0.3", "growth_conditions": "6.4.2", "human_specific": "1.0.11", - "medical_history": "5.2.8", + "medical_history": "6.0.0", "medical_tests": "1.0.0", "mouse_specific": "1.0.8", "preservation_storage": "6.1.1", @@ -92,7 +92,7 @@ "biomaterial": { "cell_line": "16.0.0", "cell_suspension": "14.0.0", - "donor_organism": "16.1.0", + "donor_organism": "16.2.0", "imaged_specimen": "3.5.0", "organoid": "11.5.0", "specimen_from_organism": "10.9.0"