You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when submitting a bundle in the report form, we should parse the response bundle and then add any errors that exist from that bundle to the error modal.
using existing check method that we tested with, when "type: "batch-response", check the following:
For every resource response which doesn't have a response that starts with 2:
the error code, the resource type and the diagnostics - maybe in table?
display this in the modal with an error type like we do with a failed REST response
automated tests for this (wooohooo)
in ReportForm.test.ts we make a new test which (at the moment will already have a natural failure because we changed from transaction to batch and didn't quite catch everything)
delete patients and related data
go through the steps to submit a bundle from the front end
assert that there is a modal element with error in the title in there
Update the ReportForm response action to check for any batch responses which have a problem and if there are any, create an error modal
then we'll need to make a test case setup which makes one of the conditions error - possible ideas:
Send a POST request to create two practitioners with the same identifier?
other code suggestions:
create a testUtilities.ts file for shared resources
move the check method into the fhir api.ts?
example output of modal
There was an error submitting the bundle, for now you may need to manually correct this!
Error code
resource type
diagnostic message
404 Not Found
Patient
Organization/8274t6483.... not found
The text was updated successfully, but these errors were encountered:
when submitting a bundle in the report form, we should parse the response bundle and then add any errors that exist from that bundle to the error modal.
2
:transaction
tobatch
and didn't quite catch everything)other code suggestions:
example output of modal
There was an error submitting the bundle, for now you may need to manually correct this!
The text was updated successfully, but these errors were encountered: