"""Hepatic adjustment rules.""" from __future__ import annotations _HEPATIC_SENSITIVE = {"benzodiazepine_like", "opioid_like"} def is_hepatic_unsafe(drug: str, ast: float | None, alt: float | None) -> bool: if ast is None or alt is None: return False return drug in _HEPATIC_SENSITIVE and (ast > 100 or alt > 100)