View raw Markdown
type: fhir-fhirpath-functionsource: source/fhirpath.html

FHIR FHIRPath Function: %factory.withExtension

This page is part of FHIR FHIRPath (FHIR-specific extensions). Base spec lives at FHIRPath.

%factory.withExtension(instance : T, url : string, value) : T

Add an extension, and return the new type: %factory.withExtension(%factory.create(Money), 'http:/acme.com/extension/example', %factory.code('test'))

Parameters:

Return Value: A copy of the instance of the type with the extension added. Extensions that already exist with the same url are not removed.


Back to FHIR FHIRPath