Stream: implementers
Topic: Validation Messages
Brian Postlethwaite (Feb 18 2018 at 23:53):
Over on the dotnet stream was asking about error messages appropriate for a user as a result of a call to a resource $validate and the OperationOutcome Issues.
Do others think that the Text in the Issue should be applicable to show to a user?
(If not, where should the detail to show the user come from?)
Brian Postlethwaite (Feb 18 2018 at 23:54):
The example that I was going to clean up from the .net validator output was this one:
[Field Display Name in ElementDefinition] is a mandatory field
instead of
Instance count for 'Practitioner.identifier.type' is 0, which is not within the specified cardinality of 1..1
Ewout Kramer (Feb 19 2018 at 15:19):
Well, we could do that. And when you have repeats for a non-repeating field, you'd get something along these lines: "[....] is not a repeatable element". And then when you have something specific, like 1..3 (and having 4 repeats), you'd get the message as we have it now?
Ewout Kramer (Feb 19 2018 at 15:39):
On the details needed to create user-friendlier messages (I just read the messages in the dotnet stream): I am thinking about making the errors more elaborate, by adding a reference to the failing rule, which has the details. E.g. an error as above, would also reference a "CardinalityRule", which has both the lower and upper bounds. Like this, you could first switch on the type of rule, and then create your own text.
But I think you underestimate a bit the number of messages, sometimes created by subsystems like a terminology service. To consistently be able to translate or re-create those, you'd need a framework to communicate not just the text, but the details everywhere. It sounds ambitious.
Grahame Grieve (Feb 19 2018 at 19:47):
yes very much so. I'm thinking of 100s of messages already
Brian Postlethwaite (Feb 19 2018 at 20:15):
So who is the best to turn these errors into something user understandable? Has to be the server side right?
Brian Postlethwaite (Feb 19 2018 at 20:29):
Do other client app writers expect that the error message should be able to be shown to a user?
If not, who is responsible to do the above message conversion?
Brian Postlethwaite (Feb 19 2018 at 20:30):
Or a property to say it's not suitable, which i think is severity.
Last updated: Apr 12 2022 at 19:14 UTC