Dosage Optimization
Decision Flow for dose optimization based on the selected drug, kidney function (eGFR), weight, and age of the patient
David Škarka
Template author
This Decision Flow automates the dose optimization process for specific medications. It evaluates a patient's kidney function (eGFR), weight, and age to recommend standard doses, adjusted doses, and specific warnings.
Solution Components
The solution utilizes four distinct Decision Tables to evaluate logic based on specific medical criteria:
- Amoxicillin: This Decision Table determines the Standard Dose and Recommended Dose for Amoxicillin. It evaluates the patient's eGFR (estimated Glomerular Filtration Rate) against various thresholds to adjust the dosing frequency.
- Metformin: This Decision Table evaluates the safety of Metformin based on kidney function. It outlines standard dosing for healthy kidneys but switches to "Avoid" or "Contraindicated" statuses when eGFR drops below specific levels due to risks such as lactic acidosis.
- Vancomycin: This Decision Table calculates complex dosing for Vancomycin. Unlike the others, this table utilizes the patient's Weight to calculate a specific dosage range. It performs a calculation to determine the lower and upper bounds of the dose. It creates a composite output string while also adjusting the frequency interval based on eGFR.
- Age Dose Adjustment per Drug: This Decision Table restricts or adjusts recommendations based on the patient's age. Specifically, it triggers caution flags for patients aged 65 or older when selecting the drugs.
- Dosage Optimization flow orchestrates the inputs and rules to produce a final clinical recommendation:
- Input Collection: The flow accepts four key input parameters: drugName, eGFR, age, and weight.
- Drug Routing: A "Rule Selector" node (RuleSelectorOnName) evaluates the drugName to route the data to the correct processing path.
- If the drug is Amoxicillin, the flow executes the AmoxicillinRule.
- If the drug is Metformin, the flow executes the MetforminRule.
- If the drug is Vancomycin, the flow executes the VancomycinRule.
- Error Handling: If the drug name does not match a defined case, the flow routes to a default path that outputs an "Invalid Drug Name" error.
- Data Processing: After the specific drug rule is executed, the flow maps the rule's output to the final output object.
- Age Adjustment Layer: Regardless of the drug selected, the flow subsequently runs the AgeRestrictions rule. This ensures that age-related adjustments are appended to the final output as an adjustmentReason.
More Templates
See Other Templates
A/B Testing
Discover a simple way to assign a test group for performing A/B Testing on your decisions.
Risk Based Pricing
Discover a simple way to apply a suitable Risk Based Pricing matrix based on a type of client.
Eligibility and Policy Rules
Discover a simple way to define and execute various sets of rules and get the final decision outcome.