Expand description
Shared SoF v2 $viewdefinition-run parameter extraction.
Both the REST handler in helios-rest and the standalone sof-server walk a
FHIR Parameters body for the same set of operation parameters
(_format, _limit, _since, patient, group, viewResource,
viewReference, resource, header, plus the Parquet options). This
module owns the field-name list and the accepted JSON shapes so a new
parameter name only needs to be added in one place.
The extractor is permissive: missing / wrong-typed value[X] fields
produce None/empty rather than an error. Strict callers (sof-server) run
an additional validation pass on the same JSON for bounds checks
(e.g. _limit upper bound, compression allowed values).
Structs§
- Extracted
RunParams - SoF v2
$viewdefinition-runparameters lifted out of a JSONParametersresource. Scalar fields hold the first occurrence;patient,group,inline_resourcescollect every entry (spec is0..*).
Functions§
- body_
has_ view_ definition - Returns
truewhenbodycarries a ViewDefinition the caller can run directly — either a bareViewDefinitionresource or aParametersbody with aviewResourceorviewReferenceparameter. - extract_
run_ params_ from_ json - Walks a JSON
Parametersbody (or any object with aparameterarray) and pulls every SoF v2 run-operation field intoExtractedRunParams. - split_
csv_ refs - Splits a comma-separated reference string into trimmed, non-empty
entries. Used by both sof-server and HFS REST to lower a single
?group=Group/a,Group/bquery value into the spec’s0..*shape. Returns an emptyVecwhen the input isNoneor yields no non-empty entries.