Skip to content

Breaking changes in 5.0

Marco Visser edited this page Dec 12, 2022 · 35 revisions

Behavior

  • 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.

Changes in classes

  • The protected constructor of abstract class BaseFhirClient requires a ModelInspector and fhirVersion. The nullable parameter IStructureDefinitionSummaryProvider has been removed.
  • The static methods BundleToEntryRequest.ToEntryRequest and BundleToEntryRequest.ToEntryRequestAsync require a ModelInspector and fhirVersion
  • The static method TypedEntryResponseToBundle.ToBundleEntry requires a ModelInspector.
  • The class FhirClient is not a partial class anymore.
  • The default parameter IStructureDefinitionSummaryProvider provider of all the constructors of FhirClient have been removed.
  • Obsolete members of FhirClient have been removed (use the FhirClient.Settings property or the settings argument in the constructor instead):
    • VerifyFhirVersion
    • PreferredFormat
    • UseFormatParam
    • Timeout
    • ReturnFullResource
    • PreferredReturn
    • PreferredParameterHandling
    • PreferCompressedResponses
    • CompressRequestBody
    • ParserSettings
    • OnBeforeRequest: add a HttpClientEventHandler or another HttpMessageHandler to the constructor to use this functionality
    • OnAfterResponseRequest: add a HttpClientEventHandler or another HttpMessageHandler to the constructor to use this functionality
  • Obsolete class LegacyFhirClient has been removed.
  • The constructor of classes BaseFhirParser and BaseFhirSerializer requires a ModelInspector.
  • The protected methods BaseFhirParser.MakeElementStack are not static anymore.
  • ModelInfo.ConformanceResources and ModelInfo.ConformanceResourceTypes have been removed.
  • ModelInfo.FhirCoreProfileBaseUri has been removed. Use now Canonical.FHIR_CORE_PROFILE_BASE_URI.
  • Obsolete members ModelInfo.IsProfiledQuantity and ModelInfoExtensions.GetCollectionName have been removed.
  • Partial class `ModelInfo' is not static anymore.
  • ValidationSettings.XsdSchemaCollection is now of type XmlSchemaSet instead of SchemaCollection.
  • SchemaCollection(IArtifactSource) is marked as obsolete, and the constructor will now get the schema from the embedded resource, disregarding the IArtifactSource argument completely.
  • Interface IConformanceSource is now derived from ICommonConformanceSource. And IConformanceSource.FindCodeSystemByValueSet(string) has been moved to this new interface ICommonConformanceSource.
  • Obsolete extension methods of ResourceResolverExtensions has been removed: FindExtensionDefinition, FindStructureDefinition, FindStructureDefinitionForCoreType and FindValueSet.
  • The constructor of ProfileAssertion and ProfilePreprocessor require now a ModelInspector as a parameter.
  • The public method of ProfileAssertion.SetDeclaredType has been removed.
  • The overloaded methods Validate of the class Validator with the parameter ITypedElement requires now a ModelInspector as a parameter.
  • The public method of Validator.IsBindeableFhirType has been removed.
  • The type of property TranslateParameters.ConceptMap has been changed from ConceptMap to Resource.
  • The type of the parameter conceptMap in TranslateParameters has been changed from ConceptMap to Resource.
  • The public method ElementDefinitionExtensions.PrimaryTypeCode has been changed to GetTypeCode() and the return type is now string?.
  • The FindConceptMaps() and FindConceptMapsAsync() methods in FhirPackageSource and CommonFhirPackageSource 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 a SymbolTable arguments to Accept and the Visit methods.

Removed obsolete members

  • Hl7.Fhir.Model.ElementDefinitionExtensions.GetDeclaredProfiles(TypeRefComponent). Use ElementDefinition.TypeRefComponent.GetTypeProfile() instead.
  • Hl7.Fhir.ElementModel.ElementNode.Clone(). Use Hl7.Fhir.ElementModel.ElementNode.ShallowCopy() instead.
  • Hl7.Fhir.ElementModel.Types.DateTime.FromDateTime(DateTimeOffset). Use Hl7.Fhir.ElementModel.Types.DateTime.FromDateTimeOffset(DateTimeOffset) instead.
  • Hl7.Fhir.Serialization.FhirXmlSerializationSettings.SkipUnknownElements. Use Hl7.Fhir.Serialization.FhirXmlSerializationSettings.IgnoreUnknownElements instead.
  • Hl7.Fhir.Support.DateExtensions.ToFhirDateTime(DateTime). Use Hl7.Fhir.Support.DateExtensions.ToFhirDateTime(DateTimeOffset) instead.
  • Hl7.Fhir.Support.DateExtensions.ToFhirDateTime(DateTime?). Use Hl7.Fhir.Support.DateExtensions.ToFhirDateTime(DateTimeOffset?) instead.
  • Hl7.Fhir.Specification.Source.OriginInformation. Use Hl7.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). Use Hl7.Fhir.Specification.Source.ConformanceSummaryProperties.GetPublicationStatus(IArtifactSummaryPropertyBag) instead.
  • Hl7.Fhir.Specification.Source.DirectorySource(bool). Use Hl7.Fhir.Specification.Source.DirectorySource(DirectorySourceSettings) instead.
  • Hl7.Fhir.Specification.Source.DirectorySource(string, bool). Use Hl7.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). Use Hl7.Fhir.Introspection.ClassMapping.TryCreate(Type, ClassMapping, FhirRelease) instead.
  • Hl7.Fhir.Introspection.ClassMapping.IsMappableType(Type). Use Hl7.Fhir.Introspection.ClassMapping.TryCreate(Type, ClassMapping, FhirRelease) instead.
  • Hl7.Fhir.Introspection.FhirVersionDependentExtensions.AppliesToVersion(IFhirVersionDependent, FhirRelease). Use Hl7.Fhir.Introspection.FhirVersionDependentExtensions.AppliesToRelease(Attribute, FhirRelease) instead.
  • Hl7.Fhir.Introspection.PropertyMapping.ElementType. Use Hl7.Fhir.Introspection.PropertyMapping.ImplementingType instead.
  • Hl7.Fhir.Introspection.PropertyMapping.IsResourceChoice.
  • Hl7.Fhir.Introspection.PropertyMapping.Create(PropertyInfo, ClassMapping, FhirRelease). Use Hl7.Fhir.Introspection.PropertyMapping.TryCreate(PropertyInfo, out PropertyMapping?, ClassMapping, FhirRelease) instead.

Model (for R4 and higher)

  • The type of CapabilityStatement.Type has been changed to string? (was ResourceType?)
  • The type of CapabilityStatement.TypeElement has been changed to Code (was Code<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 to Template-Bindings.cs.
  • Description of Money values has been corrected (diacritics)

Model (Only R4B)

  • Enum EvidenceVariable.CharacteristicCombination has been renamed to EvidenceVariable.CharacteristicCombinationCode.
  • EvidenceVariable.CharacteristicCombination_ has been renamed to EvidenceVariable.CharacteristicCombination.

Classes moved to Common assembly

The following classes/interfaces have been moved to the common assembly Hl7.Fhir.Support.Poco:

Clone this wiki locally