type: fhir-fhirpath-functionsource: source/fhirpath.html
FHIR FHIRPath Function: %factory.withProperty
This page is part of FHIR FHIRPath (FHIR-specific extensions). Base spec lives at FHIRPath.
%factory.withProperty(instance : T, name : string, value) : T
Set a property value, and return the new type: %factory.withProperty(%factory.create(Address), 'http:/acme.com/extension/example', %factory.create(Period))
Parameters:
- instance: The instance to set the property on
- name: a string value that identifies the property to set
- value: the value of the property
Return Value: A copy of the instance of the type with the named property set. Any existing value(s) for the named property will be deleted.