Skip to content

Commit

Permalink
More doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
xispa committed Jan 26, 2024
1 parent 1ceefe3 commit 3bfc696
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/senaite/patient/tests/doctests/DynamicResultRanges.rst
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,13 @@ cause the age is within `[5y, 10y)`:
>>> get_range(ht)
('42', '66')

Same with 5y, cause `MinAge` is inclusive:

>>> dob = get_birth_date("5y", on_date=sampled)
>>> edit(sample, DateOfBirth=dob)
>>> get_range(ht)
('42', '66')

If we change to male, we have same results as before, except when age is within
`[5y, 10y)` or within `[5y, 40y)`, cause we have an specific entry for male:

Expand All @@ -287,6 +294,11 @@ If we change to male, we have same results as before, except when age is within
>>> get_range(ht)
('39', '63')

>>> dob = get_birth_date("5y", on_date=sampled)
>>> edit(sample, DateOfBirth=dob)
>>> get_range(ht)
('39', '63')

>>> dob = get_birth_date("7y", on_date=sampled)
>>> edit(sample, DateOfBirth=dob)
>>> get_range(ht)
Expand All @@ -299,7 +311,7 @@ And if the age is 40y or above 40y, fallback to `[45, 67]`:
>>> get_range(ht)
('48', '70')

>>> dob = get_birth_date("50y1d", on_date=sampled)
>>> dob = get_birth_date("40y1d", on_date=sampled)
>>> edit(sample, DateOfBirth=dob)
>>> get_range(ht)
('48', '70')
Expand Down

0 comments on commit 3bfc696

Please sign in to comment.