Did I find the right examples for you? yes no

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)
validate blood glucose

        def bg_validator(omhe_value):
    """validate blood glucose"""
    valdict={}

    if omhe_value.isdigit():
        if float(omhe_value)>=0 and float(omhe_value)<=400:
            valdict['bg_numeric']=omhe_value
            return valdict
        else:
            raise InvalidValueError("The Blood glucose number should be in range:0-400")

    raise InvalidValueError("You didn't supply a number for blood pressure")
        


src/p/y/python-omhe-0.6.1/omhe/core/parseomhe.py   python-omhe(Download)
from omhe.core.validators.validator_errors import *
 
from omhe.core.validators.bg_validator import bg_validator
from omhe.core.validators.bp_validator import bp_validator
from omhe.core.validators.sbp_validator import sbp_validator

src/p/y/python-omhe-HEAD/omhe/core/parseomhe.py   python-omhe(Download)
from omhe.core.validators.validator_errors import *
 
from omhe.core.validators.bg_validator import bg_validator
from omhe.core.validators.bp_validator import bp_validator
from omhe.core.validators.sbp_validator import sbp_validator