-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Open
Display prepopulation errors in forms#1815
Description
Is your feature request related to a problem? Please describe.
When a form is launched and prepopulated, errors may occur. At the moment only a pop-up dialog showing "Form partially populated, there might be pre-population issues. View console for details." is shown. This is not suitable for production systems and unreasonable for clinical users to view console errors and interpret.
Describe the solution you'd like
Errors that occur need to be displayed in a user friendly manner so they can decide what (if anything) to do about them.
Here is a proposed (partial) solution:
- The prepopulation service returns an OperationOutcome resource along with the QuestionnaireReponse as part of the $populate response as described in the SDC. The OperationOutcome resource lists the errors including information about the error itself and identify the item in the Questionnaire the error relates to as a FHIRpath expression.
- The OperationOutcome resource is available to the renderer so it can can display those errors to the user. Those errors need to be presented in a way the user can assess and action. These errors may be presented as a summary screen of all errors. Better still, the errors are displayed at the appropriate place in the rendered Questionnaire. For example, if there is an error populating an allergy, the error will be displayed at the allergy item location (or the allergy item's parent group). This error needs enough information for the user to understand what's happened. For repeating items/groups, additional information on top of the FHIRpath Questionnaire position will be required to know what it relates to as multiple answers can be associated with a single linkId.
Some error scenarios considered are:
- The preopulation service requested a resource type from the server and it either doesn't support that type or permission was not given to access that type. The user needs to know that items requiring that resource type for prepopulation have not been prepopulated and why.
- A coding has been provided for prepopulation but for some reason it could not be used. This might be because the coding supplied does not have a display. The render attempts to perform $lookup to retrieve the display, but the code could not be found.
There are likely more scenarios to discover.
Metadata
Metadata
Assignees
Labels
No labels