Skip to main content

FhirPathContext Usage

The fhirPathContext object contains all the FHIRPath variables and their evaluated values. On top of that, it also contains %resource as the resource containing the original code in the context.

Refer to the FHIRPath spec for more information on FHIRPath.

Live Editor
function App() {
  const fhirPathContext = useQuestionnaireStore.use.fhirPathContext();

  return (
    <>
      <YourBaseRendererWrapper questionnaire={qCalculatedExpressionBMICalculator} />
      <JsonViewer hookName="fhirPathContext" data={fhirPathContext} />
    </>
  );
}
Result
Loading...