Stream: implementers
Topic: Operation Output
Joel Francis (Jun 06 2019 at 12:00):
Does FHIR mandate that only the OperationOutcome resource can be an output of an $operation execution or can a resource like a Bundle or other resources be an outcome as well?
Lloyd McKenzie (Jun 06 2019 at 12:41):
An operation can return any "output" parameters you like. On a failure, you'll only get an OperationOutcome. On a success, what you get depends on what output parameters you have. If there's a single 'out' parameter with the name 'return' that has a type of Resource, then the response will be that resource type (which could be a Bundle containing a bunch of resources). Otherwise, the response will be a Parameters instance (which might itself contain various resources, possibly including OperationOutcome). You can find more here: http://build.fhir.org/operations.html#response
Joel Francis (Jun 06 2019 at 12:44):
An operation can return any "output" parameters you like. On a failure, you'll only get an OperationOutcome. On a success, what you get depends on what output parameters you have. If there's a single 'out' parameter with the name 'return' that has a type of Resource, then the response will be that resource type (which could be a Bundle containing a bunch of resources). Otherwise, the response will be a Parameters instance (which might itself contain various resources, possibly including OperationOutcome). You can find more here: http://build.fhir.org/operations.html#response
Thanks LLoyd.
Last updated: Apr 12 2022 at 19:14 UTC