Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added smoking related fields in medical_history module. Fix#1565 #1567

Merged
merged 9 commits into from
Sep 16, 2024

Conversation

arschat
Copy link
Collaborator

@arschat arschat commented Aug 8, 2024

Release notes

For medical_history.json schema:

  • smoking_status
  • smoking_pack_years
  • years_since_smoking_cessation
  • remove smoking_history due to overlap with smoking_pack_years

Reviews requested

  • Need 5 Reviewers to approve because this is a major update

#1565

@arschat arschat changed the title Added smoking related fields in medical_history module Added smoking related fields in medical_history module. Fix#1565 Aug 8, 2024
@arschat arschat added the content Any PR that incorporates changes to the schema label Aug 27, 2024
Copy link
Contributor

@hannes-ucsc hannes-ucsc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some non-sensical attribute combinations that you may want to disallow. For example, smoking_pack_years must be 0 if smoking_status is never, or years_since_smoking_cessation should be absent unless smoking_status is former.

json_schema/module/biomaterial/medical_history.json Outdated Show resolved Hide resolved
@arschat
Copy link
Collaborator Author

arschat commented Aug 30, 2024

Thank you for you comments @hannes-ucsc . I updated the descriptions and added an if-else validation for the combinations.
Specifically:

if smoking_status == "active":
    years_since_smoking_cessation: max value = 0
else if smoking_status == "never":
    years_since_smoking_cessation: type = null
    smoking_pack_years: max value = 0

@arschat arschat requested a review from NoopDog September 4, 2024 10:48
Copy link
Collaborator

@ESapenaVentura ESapenaVentura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@arschat arschat merged commit c047ab0 into staging Sep 16, 2024
2 of 5 checks passed
@arschat arschat deleted the ac-smoking-history-Issue1565 branch September 16, 2024 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Any PR that incorporates changes to the schema
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants