Skip to main content

<FhirValue />

The purpose of the <FhirValue /> component is to display FHIR Data Types easily.

It uses the Core formatter and should provide most of the same options.
The default formatter options can be configured in the <FhirUIProvider />.

Example usage


const patientQuery = useFhirRead("Patient", "123");
const patient = patientQuery.data;

<FhirValue type="date" value={patient?.birthDate} options={{ dateStyle: "relative" }} />
<FhirValue type="HumanName" value={patient?.name} options={{ max: 1 }} />

Preview

<FhirValue type="HumanName" value={patient?.name} />