2.0 Form: Validate patient address with smarty
User Story
As a SimpleReport operator, I want to use Smarty to validate patient addresses, so that I can ensure data quality.
Acceptance Criteria
- Integrate Smarty into the patient information section of the 2.0 form. Similar to the 1.0 new patient form
- Upon hitting the
Nextbutton on the patient information page, we hit smarty to validate the address - If the address was invalid, we pop up a modal to show a suggested address. Similar to the 1.0 new patient form
- If the address was valid, we continue with the form submission.
Scenarios
For example, this could look like:
[valid address]
- User fills out all patient information, including a correct address
- User submits the form, continues to the next section
[invalid address with suggestion]
- User fills out all patient information, including an address with a misspelled street
- Modal pops, giving the user the option to
Use address as enteredorUse suggested address - If the user picks one of the
Use...options from the modal, we should update to use that address and not hit smarty again <- Go back to edit addressandSave changesshould still be options in the modal.
[invalid address without suggestion]
- User fills out all patient information, including an invalid address
- Modal pops, giving the user the option to
Use address as entered. The box usually containingUse suggested addressshould instead say "No Suggested address found". - There is an alert banner that reads "The address you entered could not be verified"
- If the user picks the
Use...options from the modal, we should use that address and not hit smarty again <- Go back to edit addressandSave changesshould still be options in the modal.
Design Notes
Existing behavior from the 1.0 patient form:
Additional context
In my experience with Smarty in lowers, using an incorrect street number will not find a suggested address. Using a slightly misspelled street name will frequently come back with a suggested address.
When in doubt refer to the behavior of the 1.0 form.
A problem for the leads to wrestle with: How does cost/benefit change if we do this on every single test report where we used to do it on every single patient (and didn't change it once patient was added)?