-
Notifications
You must be signed in to change notification settings - Fork 345
Breaking changes in 5.0
Marco Visser edited this page Dec 13, 2022
·
35 revisions
- When you serialize a FHIR resource with the option
summary != SummaryType.False
then we add now 2 Meta tags in the resource: one for the context STU3 and one for the context R4 and higher.
This version of the SDK no longer supports .NET Framework 4.5.2. The following framework are supported:
- .NET 6.0
- NetStandard 2.0
- The protected constructor of abstract class
BaseFhirClient
requires aModelInspector
andfhirVersion
. The nullable parameterIStructureDefinitionSummaryProvider
has been removed. - The static methods
BundleToEntryRequest.ToEntryRequest
andBundleToEntryRequest.ToEntryRequestAsync
require aModelInspector
andfhirVersion
- The static method
TypedEntryResponseToBundle.ToBundleEntry
requires aModelInspector
. - The class
FhirClient
is not a partial class anymore. - The default parameter
IStructureDefinitionSummaryProvider provider
of all the constructors ofFhirClient
have been removed. - Obsolete members of
FhirClient
have been removed (use theFhirClient.Settings
property or the settings argument in the constructor instead):VerifyFhirVersion
PreferredFormat
UseFormatParam
Timeout
ReturnFullResource
PreferredReturn
PreferredParameterHandling
PreferCompressedResponses
CompressRequestBody
ParserSettings
-
OnBeforeRequest
: add aHttpClientEventHandler
or anotherHttpMessageHandler
to the constructor to use this functionality -
OnAfterResponseRequest
: add aHttpClientEventHandler
or anotherHttpMessageHandler
to the constructor to use this functionality
- Obsolete class
LegacyFhirClient
has been removed. - The constructor of classes
BaseFhirParser
andBaseFhirSerializer
requires aModelInspector
. - The protected methods
BaseFhirParser.MakeElementStack
are not static anymore. -
ModelInfo.ConformanceResources
andModelInfo.ConformanceResourceTypes
have been removed. -
ModelInfo.FhirCoreProfileBaseUri
has been removed. Use nowCanonical.FHIR_CORE_PROFILE_BASE_URI
. - Obsolete members
ModelInfo.IsProfiledQuantity
andModelInfoExtensions.GetCollectionName
have been removed. - Partial class `ModelInfo' is not static anymore.
-
ValidationSettings.XsdSchemaCollection
is now of typeXmlSchemaSet
instead ofSchemaCollection
. -
SchemaCollection(IArtifactSource)
is marked as obsolete, and the constructor will now get the schema from the embedded resource, disregarding theIArtifactSource
argument completely. - Interface
IConformanceSource
is now derived fromICommonConformanceSource
. AndIConformanceSource.FindCodeSystemByValueSet(string)
has been moved to this new interfaceICommonConformanceSource
. - Obsolete extension methods of
ResourceResolverExtensions
has been removed:FindExtensionDefinition
,FindStructureDefinition
,FindStructureDefinitionForCoreType
andFindValueSet
. - The constructor of
ProfileAssertion
andProfilePreprocessor
require now aModelInspector
as a parameter. - The public method of
ProfileAssertion.SetDeclaredType
has been removed. - The overloaded methods
Validate
of the classValidator
with the parameterITypedElement
requires now aModelInspector
as a parameter. - The public method of
Validator.IsBindeableFhirType
has been removed. - The type of property
TranslateParameters.ConceptMap
has been changed fromConceptMap
toResource
. - The type of the parameter
conceptMap
inTranslateParameters
has been changed fromConceptMap
toResource
. - The public method
ElementDefinitionExtensions.PrimaryTypeCode
has been changed toGetTypeCode()
and the return type is nowstring?
. - The
FindConceptMaps()
andFindConceptMapsAsync()
methods inFhirPackageSource
andCommonFhirPackageSource
will now return an empty list, not null when no items are found (this was the original intention of the interface, but was implemented incorrrectly). - FhirPath's
ExpressionVisitor
has been simplified, it no longer requires aSymbolTable
arguments toAccept
and theVisit
methods.
-
Hl7.Fhir.Model.ElementDefinitionExtensions.GetDeclaredProfiles(TypeRefComponent)
. UseElementDefinition.TypeRefComponent.GetTypeProfile()
instead. -
Hl7.Fhir.ElementModel.ElementNode.Clone()
. UseHl7.Fhir.ElementModel.ElementNode.ShallowCopy()
instead. -
Hl7.Fhir.ElementModel.Types.DateTime.FromDateTime(DateTimeOffset)
. UseHl7.Fhir.ElementModel.Types.DateTime.FromDateTimeOffset(DateTimeOffset)
instead. -
Hl7.Fhir.Serialization.FhirXmlSerializationSettings.SkipUnknownElements
. UseHl7.Fhir.Serialization.FhirXmlSerializationSettings.IgnoreUnknownElements
instead. -
Hl7.Fhir.Support.DateExtensions.ToFhirDateTime(DateTime)
. UseHl7.Fhir.Support.DateExtensions.ToFhirDateTime(DateTimeOffset)
instead. -
Hl7.Fhir.Support.DateExtensions.ToFhirDateTime(DateTime?)
. UseHl7.Fhir.Support.DateExtensions.ToFhirDateTime(DateTimeOffset?)
instead. -
Hl7.Fhir.Specification.Source.OriginInformation
. UseHl7.Fhir.Specification.Source.OriginAnnotation
instead. -
Hl7.Fhir.Specification.Snapshot.SnapshotGeneratorSettings.Default
. Use ``Hl7.Fhir.Specification.Snapshot.SnapshotGeneratorSettings.CreateDefault()` instead. -
Hl7.Fhir.Specification.Source.ConformanceSummaryProperties.GetConformanceStatus(IArtifactSummaryPropertyBag)
. UseHl7.Fhir.Specification.Source.ConformanceSummaryProperties.GetPublicationStatus(IArtifactSummaryPropertyBag)
instead. -
Hl7.Fhir.Specification.Source.DirectorySource(bool)
. UseHl7.Fhir.Specification.Source.DirectorySource(DirectorySourceSettings)
instead. -
Hl7.Fhir.Specification.Source.DirectorySource(string, bool)
. UseHl7.Fhir.Specification.Source.DirectorySource(DirectorySourceSettings)
instead. -
Hl7.Fhir.Introspection.ClassMapping.AddMappingForType(Type. FhirRelease, ClassMapping)
. -
Hl7.Fhir.Introspection.ClassMapping.DeclaredType
. -
Hl7.Fhir.Introspection.ClassMapping.Create(Type)
. UseHl7.Fhir.Introspection.ClassMapping.TryCreate(Type, ClassMapping, FhirRelease)
instead. -
Hl7.Fhir.Introspection.ClassMapping.IsMappableType(Type)
. UseHl7.Fhir.Introspection.ClassMapping.TryCreate(Type, ClassMapping, FhirRelease)
instead. -
Hl7.Fhir.Introspection.FhirVersionDependentExtensions.AppliesToVersion(IFhirVersionDependent, FhirRelease)
. UseHl7.Fhir.Introspection.FhirVersionDependentExtensions.AppliesToRelease(Attribute, FhirRelease)
instead. -
Hl7.Fhir.Introspection.PropertyMapping.ElementType
. UseHl7.Fhir.Introspection.PropertyMapping.ImplementingType
instead. -
Hl7.Fhir.Introspection.PropertyMapping.IsResourceChoice
. -
Hl7.Fhir.Introspection.PropertyMapping.Create(PropertyInfo, ClassMapping, FhirRelease)
. UseHl7.Fhir.Introspection.PropertyMapping.TryCreate(PropertyInfo, out PropertyMapping?, ClassMapping, FhirRelease)
instead. -
Hl7.Fhir.Model.Date.ToDateTime()
. UseHl7.Fhir.Model.Date.ToDateTimeOffset()
instead. -
Hl7.Fhir.Model.FhirDateTime.FhirDateTime(DateTime)
. UseHl7.Fhir.Model.FhirDateTime.FhirDateTime(DateTimeOffset)
instead. -
Hl7.Fhir.Model.FhirDateTime.FhirDateTime(int, int, int, int, int, int)
. UseHl7.Fhir.Model.FhirDateTime.FhirDateTime(int, int, int, int, int, int, TimeSpan)
instead. -
Hl7.Fhir.Model.FhirDateTime.ToDateTimeOffset(TimeSpan?)
. UseHl7.Fhir.Model.FhirDateTime.ToDateTimeOffset(TimeSpan)
instead. -
Hl7.Fhir.Model.FhirDateTime.ToDateTime()
. UseHl7.Fhir.Model.FhirDateTime.ToDateTimeOffset(TimeSpan)
instead. -
Hl7.Fhir.Model.XHtml.IsValidValue(string)
. UseHl7.Fhir.Model.XHtml.IsValidNarrativeXhtml(string)
instead (or IsValidXml if that is more appropriate). -
Hl7.Fhir.Rest.EntryToHttpExtensions.ToHttpWebRequest(EntryRequest, Uri, FhirClientSettings)
. UseHl7.Fhir.Rest.EntryToHttpExtensions.ToHttpRequestMessage(EntryRequest, Uri, FhirClientSettings)
instead. -
Hl7.Fhir.Rest.SearchParams.FromParameters(object)
. UseParameters.ToSearchParameters()
method instead. -
Hl7.Fhir.Specification.Terminology.ValueSetExpanderSettings.Default
. UseHl7.Fhir.Specification.Terminology.ValueSetExpanderSettings.CreateDefault()
instead. -
Hl7.Fhir.Support.Issue.PROFILE_INCOMPLETE_BINDING
. This issue will not be raised by the validator anymore. Use 'PROFILE_ELEMENTDEF_INCORRECT' instead. -
Hl7.Fhir.Utility.FhirReleaseParser.TryFhirReleaseFromMimeVersion(string, out FhirRelease?)
. UseHl7.Fhir.Utility.FhirReleaseParser.TryGetFhirReleaseFromMimeVersion(string, out FhirRelease?)
instead. -
Hl7.Fhir.Utility.FhirReleaseParser.TryFhirReleaseFromCorePackageName(string, out FhirRelease?)
. UseHl7.Fhir.Utility.FhirReleaseParser.TryGetFhirReleaseFromCorePackageName(string, out FhirRelease?)
instead. -
Hl7.Fhir.Utility.ObjectListExtensions
. This class has been removed. -
Hl7.FhirPath.EvaluationContext.Default
. UseHl7.FhirPath.EvaluationContext.CreateDefault() instead.
- The type of
CapabilityStatement.Type
has been changed tostring?
(wasResourceType?
) - The type of
CapabilityStatement.TypeElement
has been changed toCode
(wasCode<Hl7.Fhir.Model.ResourceType>
) - The
AllowedTypes
attribute has been removed from the following properties:ElementDefinition.Value
ElementDefinition.DefaultValue
ElementDefinition.Pattern
ElementDefinition.Fixed
- Enum
ElementDefinition.ConstraintSeverity
has been moved toTemplate-Bindings.cs
. - Description of
Money
values has been corrected (diacritics)
Over the last year we have discovered that we have generated enum
names that were not capitalized. This has been corrected. This means the following enums have had their names capitalized:
- (R3) Sequence.qualityType, Sequence.repositoryType
- (R4 and higher) MolecularSequence.orientationType, qualityType, repositoryType, sequenceType, strandType,
- (R4 and higher) medicationRequestIntent, medicationRequestStatus
- (R4 and higher) v3-ConfidentialityClassification has been renamed to ConfidentialityClassification
- (R4 and higher) VerificationResult.status
- (R4 and higher) messageheader_response_request has been renamed to MessageHeaderResponseRequest
The names of the following valuesets clashed with properties within the classes, which meant we had properties which names ended with an underscore. This has been corrected for the following valuesets:
- ["http://hl7.org/fhir/ValueSet/characteristic-combination"] = "CharacteristicCombinationCode",
- ["http://hl7.org/fhir/ValueSet/claim-use"] = "ClaimUseCode",
- ["http://hl7.org/fhir/ValueSet/content-type"] = "ContentTypeCode",
- ["http://hl7.org/fhir/ValueSet/exposure-state"] = "ExposureStateCode",
- ["http://hl7.org/fhir/ValueSet/verificationresult-status"] = "StatusCode",
- ["http://terminology.hl7.org/ValueSet/v3-Confidentiality"] = "ConfidentialityCode",
- ["http://hl7.org/fhir/ValueSet/variable-type"] = "VariableTypeCode",
- ["http://hl7.org/fhir/ValueSet/group-measure"] = "GroupMeasureCode"
The following classes/interfaces have been moved to the common assembly Hl7.Fhir.Support.Poco
: