Fix register_package not registering dependency packages & add finer public API control over package processing#327
Merged
Conversation
…s from dependencies. Fixes #326
… methods to handle invalid StructureDefinitions gracefully
…nd register_package methods to exclude/include package dependencies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes a bug introduced in v0.7.0 where calling
register_package(or the underlyingdownload_package) correctly downloaded the requested FHIR npm package but silently discarded allStructureDefinitionresources from its declared dependencies (e.g.hl7.fhir.us.corewhen registeringhl7.fhir.us.mcode). Two additional opt-in arguments are also introduced to give callers finer control over package loading behaviour.Added
skip_invalidparameter toStructureDefinitionRegistry.download_packageandFHIRModelFactory.register_packageto gracefully skipStructureDefinitionresources that fail validation, issuing a warning instead of raising an error.include_dependenciesparameter toStructureDefinitionRegistry.download_packageandFHIRModelFactory.register_packageto control whether package dependencies are automatically downloaded and registered alongside the requested packageFixed
FHIRModelFactory.register_packagenot registeringStructureDefinitionresources from package dependencies. When loading a FHIR npm package (e.g.hl7.fhir.us.mcode), only the top-level package's definitions were registered; dependencies (e.g.hl7.fhir.us.core) were silently dropped. Fixesregister_packagedoes not register dependency packages since v0.7.0 #326(