Stream: implementers
Topic: differentiating "unavailable" vs "none found"
Jose Costa Teixeira (Dec 06 2020 at 17:20):
I have 2 care plan profiles on a server (HomeCarePlan and MedicationPlan"), and I need to allow a client to ask a server for distinguish "this type of CarePlan is not supported by this server" vs "there are no instances of this type of CarePlan". How can the client make that distinction?
Lloyd McKenzie (Dec 06 2020 at 20:07):
So, more generically, when you perform a search, distinguishing between "there are currently no records that match those criteria" from "there's no hope of there ever being any records that match those criteria". I suppose a server could include an OperationOutcome with a warning along with its 0-record response.
Jose Costa Teixeira (Dec 06 2020 at 20:16):
Yes. I suppose I'd make it a bit more assertive - more like "no records for you" vs "you really came to the wrong place".
What would be needed to have this solution?
Lloyd McKenzie (Dec 06 2020 at 20:18):
"wrong place" is a hard call to make. Maybe they came to the right place but asked the wrong question. To have the solution, the server would just need to inspect the search parameters and identify that some would never be satisfiable and decide to populate the OperationOutcome with a warning. It's not a generic behavior that's defined in the spec or that you could expect most servers to support.
Jose Costa Teixeira (Dec 06 2020 at 20:41):
yeah, "wrong place" is more "wrong question". Is there a standardized way to specify that behaviour?
I see CapStatement. rest.resource.supportedProfile - if the profile is NOT in there, should the server respond with a 418 or something?
Lloyd McKenzie (Dec 06 2020 at 21:05):
You could specify comments in your search parameters, but no computable way.
Jose Costa Teixeira (Dec 07 2020 at 08:17):
never ever? I mean, isn't this something that should be computable?
Lloyd McKenzie (Dec 07 2020 at 14:16):
There's extension space. I'm not sure we're looking to add yet more complexity to CapabilityStatement in this area, though it's possible the new profiling approach to CS might help.
Last updated: Apr 12 2022 at 19:14 UTC