def do_search(coding_system, term=None, code=None):
assert bool(code) != bool(term)
if term is not None:
matching_codes = coding_system.search_by_term(term)
else:
matching_codes = coding_system.search_by_code(code)
It's not clear what to do as a result of this exception. I think the code and term may be provided by users, in which case we should return a message to them. If not, we should probably raise a more informative error or find a way to stop it from happening.
We have received the following Sentry alert https://ebm-datalab.sentry.io/issues/5558668558/?alert_rule_id=1877862&alert_type=issue¬ification_uuid=088429c9-a418-4ad0-9892-9b56431d5f9d&project=5248013&referrer=slack
It's not clear what to do as a result of this exception. I think the
code
andterm
may be provided by users, in which case we should return a message to them. If not, we should probably raise a more informative error or find a way to stop it from happening.