Skip to content

Error when using chained parameters in conditional references #6316

@KeironO

Description

@KeironO

Describe the bug
We are attempting to use chained parameters in match URLs within a FHIR resource (e.g., PractitionerRole?practitioner.identifier=myValue), but HAPI FHIR is returning an error indicating that the query part of the conditional reference is not valid.

To Reproduce
Steps to reproduce the behavior:

  1. Create a FHIR resource, such as a Communication, that includes a reference with a chained parameter for conditional matching.
  2. Use a reference in the format PractitionerRole?practitioner.identifier=myValue.
  3. POST the resource to the HAPI FHIR server.
  4. Observe the error returned by the server.

Minimal Example

This is a minimal Communication resource that demonstrates the issue:

{
  "resourceType": "Communication",
  "status": "completed",
  "sender": { "reference": "PractitionerRole?practitioner.identifier=myValue" }
}

Expected behavior
We expected the server to correctly process the chained parameter in the match URL, resolving the reference as PractitionerRole where the associated practitioner.identifier matches the given value (myValue).

Error Response

The server returns the following error:

Error
Line: 4, Col: 78
The query part of the conditional reference is not a valid query string (PractitionerRole?practitioner.identifier=myValue)

Environment (please complete the following information):

  • HAPI FHIR Version 7.0.2
  • OS: Microsoft Windows 10
  • Browser: Not applicable

Additional context
We are trying to use chained parameters to reference resources based on identifiers, which should be valid according to FHIR chaining rules. The issue may be related to how the query part of the reference is parsed and validated.

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