Skip to content

Breaking changes in 3.0

Ewout Kramer edited this page Feb 25, 2021 · 10 revisions

Removed methods from classes

  • In class FhirEvaluationContext the constructor FhirEvaluationContext(Resource resource) has been removed. You can still use the other constructor public FhirEvaluationContext(ITypedElement resource) by first converting the resource to a TypedElement (resource.ToTypedElement()) and then call the constructor of FhirEvaluationContext.
  • The obsolete member Default of class FhirEvaluationContext has been removed. Use the CreateDefault() instead.
  • In class ResourceIdentity the static function ResourceIdentity Core(FHIRAllTypes type) has been removed. You can replace this call using the existing Core(string) overload; to get the name of the type from the enum, just use GetLiteral(), e.g. FHIRAllTypes.HumanName.GetLiteral().

Moved methods to a new class

  • The following extension methods coming from the static class Hl7.Fhir.FhirPath.ElementNavFhirExtensions has been moved to another static class Hl7.Fhir.FhirPath.FhirPathExtensions. The impact is quite low, because these are extension methods which normally don't need the class where they reside in mentioned explicitly:
    • Func<string, ITypedElement> ToFhirPathResolver(this Func<string, Resource> resolver)
    • IEnumerable<Base> Select(this Base input, string expression, FhirEvaluationContext ctx = null)
    • object Scalar(this Base input, string expression, FhirEvaluationContext ctx = null)
    • bool Predicate(this Base input, string expression, FhirEvaluationContext ctx = null)
    • bool IsBoolean(this Base input, string expression, bool value, FhirEvaluationContext ctx = null)
  • The following extension methods coming from the static class Hl7.Fhir.ElementModel.PoocBuilderExtensions has been moved to another static class Hl7.Fhir.ElementModel.TypedElementParseExtensions. The impact is quite low, because these are extension methods which normally don't need the class where they reside in:
    • public static Element ParseBindable(this ITypedElement instance)
    • public static Model.Quantity ParseQuantity(this ITypedElement instance)
    • public static T ParsePrimitive<T>(this ITypedElement instance) where T : PrimitiveType, new()
    • public static Coding ParseCoding(this ITypedElement instance)
    • public static ResourceReference ParseResourceReference(this ITypedElement instance)
    • public static CodeableConcept ParseCodeableConcept(this ITypedElement instance)
    • public static string GetString(this IEnumerable<ITypedElement> instance)

Classes moved to Common assembly

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

  • ContactDetail
  • ContactPoint
  • OperationOutcome
  • Parameters
  • Quantity
  • Range
  • UsageContext
  • ResourceIdentity
  • Issues
  • FhirEvaluationContext
  • ValidationOutcomeExtensions
  • ScopedNodeExtensions
  • ElementNavFhirExtensions (partly)
  • PocoBuilderExtensions (partly)
Clone this wiki locally