Skip to content

Expansion in context of Packaging is passing incorrect arguments and failing for value sets with definition containing both codes and ValueSet references #856

@sliver007

Description

@sliver007

As part of the $package operation processing, the PackageVisitor.handleValueSets method calls the ExpandHelper.expandValueSet method. In the case that the ValueSet's definition contains both a ValueSet reference and explicit code includes (i.e., it has neither a "simple compose" nor a "grouping compose"), it invokes the $expand operation (ValueSetOperationProvider.expand) via HapiFhirRepository.invoke. Then, in BaseResourceReturningMethodBinding.doInvokeServer, the RequestDetails are mapped into method parameters. The problem is that the RequestDetails are those of the outer $package request, so 'theID' is the ID of the Library being packaged. The expansion parameters include the VS URL and Version. JpaResourceDaoValueSet.expand explicitly disallows having both the ID and URL.

Steps to reproduce:

  • Post a package that includes a Library (manifest) that references a ValueSet whose definition includes both explicit code includes and a ValueSet reference.
  • Invoke Library.$package on the Library
  • Expansion of the referenced ValueSet should fail for the reason described above

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions