informedica / informedica/GenPRES

fix(mcp): create_order_context refuses a patient below the minimum

Open
#720 0 comments 0 reactions 2 assignees View on GitHub

@7sharp9 is already working on this.

Since Sep 17, 2026.

business-logic enhancement
Dominant language
F#
Stars
47
Forks
12
Avg merge
4h 51m
Merged PRs (30d)
285

Description

Is your feature request related to a problem? Please describe.

create_order_context in McpTools.GenOrder.fs takes every patient parameter as optional and builds the GenFORM patient from what was given, defaulting the department to ICK. A call without an age and without a weight and height gets a context with no rules and no scenarios, silently, where the web client is refused at the ingress since #646.

Describe the solution you'd like

The same rule at the MCP host: an age, or a measured weight and a height, else a refusal naming the minimum; and, until the server estimates (see the server-side estimation issue), a weight and a height, measured or estimated, else a refusal naming them. The same for get_order_scenarios and get_order_context_filter_options.

Additional context

Follow-up of plan 646 (docs/implementation-plans/646-patient-minimum.md, step 7); the web client's check is ServerApi.Ingress.fs.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.