Closed ewoutkramer closed 7 months ago
I think the ITypedElement implementation on SourceNode is correct, and the one on POCO should behave the same.
This will be a breaking change, however, so I'll flag it as such and take it off the current sprint.
We don't think this is a priority
Since SDK 5.0 the datatype of
Attachment.Size
isInteger64
, where it wasUnsignedInt
before. This is coded with the use of a[DeclaredType]
attribute, since this change happened in R5.The implementation of ITypedElement on POCO will show the correct type in the
InstanceType
member, but will always use the underlying .NET type (which is a long) for theValue
, regardless of whether we are dealing with R4 or R5.The implementation of ITypedElement on SourceNode has no underlying POCO model (it gets its metadata from StructureDefinition), and it will use int for R4 and long for R5.
Of course, ITypedElement should behave the same, regardless of the implementation.
It is not clear what the desired behaviour is however. Certainly, the ITypedElement on SourceNode is correct, but it is also means the user has to be aware of the version of FHIR that the ITypedelement is using to read the property. Which is not the case for the POCO-based implementation.