T0038d — Public API: typed output
Part of the roadmap. Phase 1 · wave 7 · size M.
- Depends on: T0018, T0025
- Area:
area:core - Tier hint:
risk:high: overloads of the public functions and new public value types, so the core tier with a second reviewer from the other vendor. - Parallel with: T0038a, T0038b, T0038c
- Parent: T0038, split on 2026-11-12.
Goal
Results without loss: the output: 'typed' mode of the T0038 output modes, and plain output completed against ADR-0012.
Scope
- The
outputevaluation option,'plain'(the default) or'typed', with overloads onevaluate()andCompiledExpression.evaluate()that returnFhirPathValue[]for'typed'. - Public typed values: Boolean, String and Integer as primitives,
Decimal, the Date, DateTime and Time values,Quantity, and a public node type for input and model values that gives the underlying JSON and its model type, without the internal navigation state ofModelNode. - Plain output checked against every rule of the parent's output modes, with tests for each.
- Tests, type tests for the overloads, packed consumers, a guide section on output modes, and a
minorchangeset.
Design notes
- Decide whether
decimalOutputwithoutput: 'typed'is an invalid combination or ignored, and document it; today the internal API ignores it. - Expose classes only where callers need
instanceofor methods (Decimalalready is public); prefer types for the rest, so later tasks can change the implementation. - Typed output from
evaluateAsync()depends on T0038b; whichever of the two lands second adds the overloads for the other's functions.
Acceptance criteria
From the parent:
- No future option is accepted as a silent no-op.
- publint, attw, the zero-dependency check and the size budget all pass.
- The guide examples for output modes are executed in CI.
And for this child:
-
output: 'typed'returns exact Decimal, date/time and Quantity values and typed nodes, and the type tests show the overloads' return types. - Plain output follows ADR-0012 in every case the parent lists, and no internal class leaks through it.