Easily perform arithmetic for gestational and fetal ages used in OBGYN.
There are no required prerequisites! It only uses built-in Python methods.
Installation is recommended through the pip command.
pip install pyparous
The PyParous project relies on the "age" object. The age object takes in a single float value representing the weeks and days the patient is currently pregnant. For example, a patient who is 39 weeks and 4 days age will be declared as follows:
from pyparous import age
>>>myAge = age(39.4)
>>>print(myAge)
>>>age('39.4')
The age object only takes positive float values. Furthermore, the decimal portion my be a value of 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, or 0.6 to properly represent the number of days.
After declaring an object, you are able to perform arithmetic operations of addition and subtraction.
from pyparous import age
>>>A = age(39.4)
>>>B = age(1.1)
>>>print(A + B)
>>>age('40.5')
>>>print(A - B)
>>>age('38.3')
- Complete age definition and basic arithmetic
- Perform age calculations based on a certain day or due date.
Please read the Code of Conduct
Distributed under the MIT License. See LICENSE.txt for more information.
Duncan Salmon - drsalmon@tamu.edu
Project Link: https://github.com/thesalmonification/pyparous
Use this section to mention useful resources and libraries that you have used in your projects.