Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
ExRx/pre_participation.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
17 lines (14 sloc)
505 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def has_symptoms(p): | |
return (p.symptom_1 or p.symptom_2 or p.symptom_3 or p.symptom_4 or p.symptom_5 or p.symptom_6) | |
# @Param: Patient object | |
# @Output: Boolean | |
def clearence(p): | |
"""Determine if the patient needs medical clearance before proceeding""" | |
p.asymptomatic = not has_symptoms(p) | |
if has_symptoms(p): | |
return True | |
existing = p.existing_cvd or p.existing_metabolic or p.existing_renal | |
if p.regular_exercise: | |
return False | |
else: | |
return existing |