Repository navigation
Use the right default url for ValueSet and CodeSystem instances - #1648
Open
drlalithapranathi wants to merge 2 commits into
Open
drlalithapranathi wants to merge 2 commits into
drlalithapranathi wants to merge 2 commits into
Conversation
getUrlFromFshDefinition fell back to a StructureDefinition url for any
Instance, so the tank matched ValueSet and CodeSystem instances on the
wrong url. InstanceExporter gives them {canonical}/ValueSet/{id} and
{canonical}/CodeSystem/{id}, so the fallback uses that now.
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.
Description:
Fixes #1647.
getUrlFromFshDefinitionfell back to a StructureDefinition url for every Instance. That's wrong for Instances of ValueSet and CodeSystem, which InstanceExporter exports with{canonical}/ValueSet/{id}and{canonical}/CodeSystem/{id}. The fallback now usesinstanceOfas the type for those two.The callers are covered in my comment on the issue. Short version: the two ValueSet/CodeSystem instance matchers in
FSHTank.internalFishare the only place the wrong default was reachable.One open question from that comment: those matchers also accept
Usage: #inline, and InstanceExporter only assigns a default url for#definition. This PR doesn't change that. Happy to, if you'd rather inline instances not match on a default url at all.Testing Instructions:
npm run check. New tests are in test/import/FSHTank.test.ts. Four cover the ValueSet and CodeSystem instances, and one checks that StructureDefinition instances still match on their default url.Regression: no changes detected on the 8 repos in regression/repos-select.txt. None of those define a ValueSet or CodeSystem as an Instance though, so I also ran these six, which do, without a url rule: HL7/fhir-us-ndh, hl7-eu/unicom-ig, HL7/sdc, HL7/aitransparency-ig, openhie/case-reporting, EUVABECO/VCDS. No changes detected there either.
Related Issue:
#1647