-
Notifications
You must be signed in to change notification settings - Fork 345
Breaking changes in 6.0
Ewout Kramer edited this page Dec 3, 2024
·
22 revisions
- Removed
IsResource
from theFhirTypeAttribute
. One can just check against theResource
subtype instead. - Renamed the
IsNestedType
parameter onFhirTypeAttribute
toIsBackboneType
to align with common FHIR jargon. - Removed the BackboneTypeAttribute class. One can use
IsBackboneType
(above), the type's name (that was in this attribute) is now the ClassMapping.Name. - Removed the
DefinitionPath
property ofClassMapping
, since it is the same as theClassMapping.Name
for backbone types. - POCO's no longer implement
IDictionary<string,object>
. Although this sounded like a good idea, it did break frameworks and made the debuggers display resoures as dictionaries. The interface is also not enough to base serializers or validators on, so it's use is limited. Therefore, we decided to remove it, and replace it with a specific interface (TODO: to be designed, insert reference here) that you can use to dynamically access and navigate POCO data. - Since we now have a standard way to dynamically navigate a POCO, we removed
Base.Children
andBase.NamedChildren
properties, since these have overlapping functionalities. Note that there is an extension methodChildren()
(obsolete) that you can use for backwards-compatibility. - The type of
ElementDefinition.Constraint.RequirementsElement
,ElementDefinition.Binding.DescriptionElement
,ElementDefinition.Mapping.CommentElement
andCapabilityStatement.Implementation.DescriptionElement
have changed fromMarkdown
toPrimitiveType
. Set this property toMarkdown
to get the original behaviour. This change allows you to use the correct type depending on the version of FHIR you are writing against (which matters in e.g. FhirPath expressions that match against type). - The type of
Attachment.SizeElement
has changed fromInteger64
toPrimitiveType
. Set this property toInteger64
to get the original behaviour, but you should now assign the correct type (i.e.UnsignedInteger
before R5) depending on the version of FHIR you are writing against. - The type of
Bundle.Link.RelationElement
has changed fromFhirString
toPrimitiveType
. Set this property toInteger64
to get the original behaviour, but you can now use the correct type depending on the version of FHIR you are writing against. - The type of
Meta.ProfileElement
has changed fromCanonical
toCode
. Set this property toInteger64
to get the original behaviour, but you can now use the correct type depending on the version of FHIR you are writing against. - Each of the above elements no have multiple helper properties (e.g. Attachment.Size and Attachment.SizeUnsignedInteger) to allow you to use "simple assignments" of primitives.
- We have archived the
Fhir.Metrics
library. This means thatTypes/Quantity
no longer supports UCUM unit conversion. Comparing units will now only succeed if the units are equivalent, at which point they are compared by value. -
Narrative.div
andNarrative.status
are no longer in-summary (to reflect corrections made to this effect in the FHIR spec). This will result in a different rendering of resources when generating summaries.
- Parameters.this[] has been removed in favor of a (future) use of this operator on the base, e.g. for dynamic access to elements. You can use the existing (and equivalent)
GetSingle()
instead. -
ReflectionHelper.IsTypedCollection(System.Type)
has been renamed toReflectionHelper.IsTypedList(System.Type)
since checking againstICollection<T>
is not sufficient anymore to determine whether an element's type is a List, so we check againstIList<T>
instead. - The type of
FhirEvaluationContext.TerminologyService
has been changed fromITerminologyService
toICodeValidationTerminologyService
. For most users, this should not be breaking. - The
WithResourceOverrides
static method introduced in 5.10 is now an extension method (and will need to be called on an instance). This allows subclasses to inherit it without implementing it themselves. - Moved
ScopedNodeExtensions
from theElementModel
namespace to theModel
namespace. ImportHl7.Fhir.Model
when using methods likeResolve()
- The type of
FhirEvaluationContext.ElementResolver
has been changed fromFunc<string, ITypedElement>
toFunc<string, IScopedNode>
. External resolvers should make sure to return a scoped node. - The
DefaultModelFactory
has been removed. It had not been in use for years, except by our own tests. With the cleanup of the PocoBuilder (ITypedElement->POCO) infrastructure, we decided to remove this class. -
CitedArtifactContributorshipSummaryComponent
has been renamed to the more correctContributorshipSummaryComponent
.