core.formatrange | Medplum

formatRange() function

Returns a human-readable string for a FHIR Range datatype, taking into account one-sided ranges

Signature:

export declare function formatRange(range: Range | undefined, precision?: number, exclusive?: boolean): string;

Parameters [​](/content/docs/sdk/core.formatrange#parameters "Direct link to Parameters"/index.html)

Parameter Type Description
range Range | undefined A FHIR Range element
precision number (Optional) Number of decimal places to display in the rendered quantity values
exclusive boolean (Optional) If true, one-sided ranges will be rendered with the > or < bounds rather than >= or <=

Returns:

string

A human-readable string representation of the Range