Skip to content

v0.7.4 - IG Loading APIs and Better Error Handling

Latest
Compare
Choose a tag to compare
@nickgeorge nickgeorge released this 24 Aug 18:37
· 334 commits to master since this release

This release adds several improvements to the FhirPackage class in both Python and C++. Initialization of the class is much faster, as it now lazy-loads all resources in its given package. To access its resources, the class supplies methods for looking up specific resources by their URLs. To maintain backwards compatibility, iterators which lazily load and parse all resources in the package one-by-one are provided.

A new FhirPackageManger class has also been added, which provides the same semantics for looking up a resource by URL over a given set of FhirPackages. This makes it easier to work with multiple FHIR IGs and sets of resources defined over different packages.

Additionally, this release simplifies C++ error handling by splitting the previous ErrorReporter into two different classes with more clearly defined roles. ScopedErrorReporter is used internally by implementers to manage the context in which errors are reported. ErrorHandler provides a listener-like interface that callers can pass into functions and use to introspect issues encountered by the function. An increasing number of APIs support ErrorHandler arguments, such as JsonFormat for converting between FhirProto and JSON. This allows processes to continue to run even when they encounter serious data issues by aggregating errors in OperationOutcomes rather than immediately returning or raising an exception. Legacy behavior of failing on any data issue can be maintained by passing the FailFastErrorReporter::FailOnErrorOrFatal() error handler.

Finally, this release modifies the Proto file generator to generate message definitions in alphabetical order to ensure order stability. If you’re currently using your own generated protos, you will need to regenerate them to pick up the new ordering.