--- type: "fhir-fhirpath-function" title: "FHIR FHIRPath Function: %factory.Quantity" source: "source/fhirpath.html" --- # FHIR FHIRPath Function: %factory.Quantity This page is part of **FHIR FHIRPath** (FHIR-specific extensions). Base spec lives at [FHIRPath](/fhirpath). `%factory.Quantity(system, code, value, unit) : Quantity` Creates a Quantity: `%factory.Quantity('http://unitsofmeasure.org', 'mg/dL', '5.03', 'mg/dL')` Parameters: - **system**: a string value that goes in Quantity.system - **code**: a string value that goes in Quantity.code - **value**: a string or decimal value that goes in Quantity.value - **unit**: a string value that goes in Quantity.unit **Return Value:** a Quantity. * * * [Back to FHIR FHIRPath](/fhir-fhirpath)