FHIR Chat · Parameter Parts for Extended Operations · hapi

Stream: hapi

Topic: Parameter Parts for Extended Operations


view this post on Zulip John Grimes (Mar 24 2019 at 11:25):

Is it possible to accept "in" parameters that have "parts", within an annotated operation method in a HAPI resource provider?

How would I annotate a method to implement an operation like this one?

{
  "resourceType": "OperationDefinition",
  "parameter": [
    {
      "name": "someParameter",
      "use": "in",
      "part": [
        {
          "name": "partA",
          "use": "in",
          "type": "string"
        },
        {
          "name": "partB",
          "use": "in",
          "type": "integer"
        }
      ]
    }
  ]
}

view this post on Zulip John Grimes (Mar 24 2019 at 11:46):

I guess one way to do it would be:

@Operation(name = "$someOperation")
public Parameters someOperation(@ResourceParam Parameters inParams) {
  // Iterate through parameters and parameter parts
}

@OperationParam does not seem to support this use case.


Last updated: Apr 12 2022 at 19:14 UTC