Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support versioned canonical relatedArtifact references with _include #6763

Open
vstrateman opened this issue Feb 27, 2025 · 0 comments
Open

Comments

@vstrateman
Copy link

Describe the Issue
_include=Library:depends-on does not filter the ValueSets based on the version specified in the relatedArtifact entry when relatedArtifact resources are referenced in canonical|version format.

The HAPI docs state that versioned canonicals in _include references are not followed, but this is a very common way to represent references within RelatedArtifacts.

Environment (please complete the following information):

  • HAPI FHIR Version 8
  • OS: OSX
  • Browser: Chrome

Additional Context
Steps to reproduce the behavior:

  1. Create a Library with a relatedArtifact entry that points to a ValueSet with a specific version (Example data below)
  2. Create a second ValueSet with a different version
  3. Querying the following URL

GET {{fhirBaseUrl}}/Library?url=http://tes.aimsplatform.org/fhir/Library/version-repro-library&version=2.0.0&_include=Library:depends-on

{
    "resourceType": "Library",
    "id": "version-repro-library-1",
    "url": "http://tes.aimsplatform.org/fhir/Library/version-repro-library",
    "name": "VersionRelatedArtifactRepro",
    "version": "2.0.0",
    "type": {
        "coding": [
            {
                "system": "http://terminology.hl7.org/CodeSystem/library-type",
                "code": "asset-collection"
            }
        ]
    },
    "description": "Defines a Library with relatedArtifacts entries unable where _include=Library:depends-on does not pull the proper versions",
    "relatedArtifact": [
        {
            "extension": [
                {
                    "url": "http://hl7.org/fhir/StructureDefinition/artifact-isOwned",
                    "valueBoolean": true
                }
            ],
            "type": "depends-on",
            "resource": "https://tes.tools.aimsplatform.org/api/fhir/ValueSet/ceef5555-ce1a-42ff-a124-6508eec46658|2.0.1"
        }
    ]
}
{
    "resourceType": "ValueSet",
    "id": "test-vs-a",
    "url": "https://tes.tools.aimsplatform.org/api/fhir/ValueSet/ceef5555-ce1a-42ff-a124-6508eec46658",
    "version": "2.0.1",
    "name": "version201",    
    "description": "should be only value set returned with depends-on specified in library"
}
{
    "resourceType": "ValueSet",
    "id": "test-vs-b",
    "url": "https://tes.tools.aimsplatform.org/api/fhir/ValueSet/ceef5555-ce1a-42ff-a124-6508eec46658",
    "version": "2.0.0",
    "name": "version200",    
    "description": "should not be returned as part of the depends-on specified in library"
}

Expected behavior
Bundle is returned with Library and only the ValueSet version that is specified in the relatedArtifact entry.

Actual results are that all ValueSets with the same canonical URL are returned, regardless of version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant