pub fn format_fhir_parameters(
result: &QueryResult,
) -> Result<Vec<u8>, SqlQueryError>Expand description
Render a QueryResult as a FHIR Parameters resource per the SoF v2 spec.
One top-level parameter per row (name row), with one part per
non-NULL column. NULL columns are omitted entirely.
Empty result sets emit a bare { "resourceType": "Parameters" } with
the parameter key omitted, matching FHIR’s JSON convention for empty
repeating elements (and the upstream sof-js reference test’s
expectation).