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

Support for dynamic analysis specs with MinAge, MaxAge and Sex columns #95

Merged
merged 25 commits into from
Jan 27, 2024

Conversation

xispa
Copy link
Member

@xispa xispa commented Nov 1, 2023

Description of the issue/feature this PR addresses

Caution

Requires senaite/senaite.core#2467

This Pull Request adds support for dynamic specs with additional columns MinAge, MaxAge and Sex.

Note that MinAge is inclusive, while MaxAge is exclusive: [MinAge, MaxAge). Therefore, is possible to define consecutive ranges like follows:

Keyword Sex MinAge MaxAge min max
Hb- 2y 6y 11.5 15.5
Hb- 6y 12y 15 16

Besides,

  • If the value for column Sex is empty, the range will apply for any individual, regardless of sex. Unless another match is found that is more specific than the current one.

  • If the value for column MinAge is empty (or any of the forms 0d, 0m, 0y - or combination of them -), the minimum age won't be considered, but MaxAge only.

  • If the value for column MaxAge is empty, the maximum age won't be considered, but MinAge` only.

  • Additional columns (e.g. like Method) are considered as well, as per default core behavior.

Current behavior before PR

Dynamic specifications with age and sex are not supported by default

Desired behavior after PR is merged

Dynamic specifications with age and sex are supported by default

--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.

@xispa xispa marked this pull request as ready for review January 25, 2024 13:53
@khanhudanurul
Copy link

Waiting eagerly for this one

Copy link
Contributor

@ramonski ramonski left a comment

Choose a reason for hiding this comment

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

👍

@ramonski ramonski merged commit b2d5b6e into master Jan 27, 2024
2 checks passed
@ramonski ramonski deleted the dynamic-ranges-age-sex branch January 27, 2024 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants