core.formatquantity
Home > @medplum/core > formatQuantity
formatQuantity() function
Returns a human-readable string for a FHIR Quantity datatype, taking into account units and comparators
Signature:
export declare function formatQuantity(quantity: Quantity | undefined, precision?: number): string;
Parameters
Parameter | Type | Description |
---|---|---|
quantity | Quantity | undefined | A FHIR Quantity element |
precision | number | (Optional) Number of decimal places to display in the rendered quantity values |
Returns:
string
A human-readable string representation of the Quantity