Details
-
Type:
New Feature
-
Status: Done
-
Priority:
Must
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Registration
-
Labels:None
-
Complexity:Medium
-
Sprint:Micro Frontends Sprint 1
-
Epic Link:
Description
As a clinician,
I want my patient's address to be recorded,
So that I can contact the patient.
Context
We need a component to allow the user record a person address. It will primarily be used in the registration screen where a new patient will have an address assigned. It will not be limited to record the patient's address, but likely other person addresses such as a Contact person's address.
This ticket covers the first version of this component which would simply support inputting address entries as free text, i.e., not leveraging on the Address Hierarchy module.
The component will largely consume the Address Template configuration file to determine its behaviour. This address template can be retrieved from the back-end via the global property layout.address.format.
In Scope
- Recording the first two lines of a patient's address in unformatted text fields
- Recording city/village, state/province, country, and postal code
- Latitude and longitude
- Start date and end date of residency
Out of Scope
- Field validation
- Making anything customisable
- Address properties that are not in the General Template
- Not leveraging on the Address Hierarchy module
Dev Notes
- Field values will need to match the data models types: https://docs.openmrs.org/datamodel/
- The control would display a series of free text boxes to record only the address levels specified in the address template
- Each free text box would take into account the format validation provided by the address template (by the elementRegex tag)
- Each text box would have a label next to it to specify which level it records and this label will be the "name" as provided in the address template (from the lack of a better choice that is i18n compatible etc.)
- The UI would allow to specify what field is required or not, based on what the address template provides
Questions
- Recording an unidentified patient's address (unconscious but at home?), unconfirmed address (flag needed?)
- Should the address be a required field? Do we want to capture whether a person is homeless (checkbox) or just that there is no address recorded?
- "Void" fields - should there be a "reason for void" field?
Acceptance Criteria
- Address is Recorded
- Given I am completing the Address section of the form,
- When I enter my patient's address,
- Then the address is added to the Patient Registration Resource.
- Address is Unknown
- Given I am completing the Address section of the form,
- When I do not know the patient's address,
- Then I can click an Unknown checkbox to fill in the fields with "void".
Notes
- The Patient Registration Resource is the payload that is passed to the backend.