I am wondering how to create new patients from within an HTML Form.
Scenario: As part of registering a patient in ART care, it is necessary to add members of the household with names, DOB, and one or so attributes plus a relationship between the main patient and the members of the household.
I am wondering, is this possible and if so how has it been done? Is there a workaround to having to register each member of the household on their own as that becomes too tedious.
@ball Thank you, well I am learning alot as we strive to improve a complex deployment.
The challenge with the patient tag is that it uses the current patient in the context so cannot be integrated into an existing form say for a parent, to show the members of the household.
How did the Rwanda team use it to create new patients? Is it in popup? Then how is the information linked to the current form being filled?
hi Musoke, …we don’t use the patient tag for creating new patients. We mainly create new patients using the Rwanda Primary Care module and use HTML Forms for adding/editing patient data like encounters, obs,… . I don’t know a workaround to this in your case but I would try to create new persons/patients using the normal openmrs UI and use the relationship tag in HTML Form to create the required relationships.
@ssmusoke, not sure if you saw @rubailly’s post above, but I believe the relationship tag is what was created and is used for the use case you describe.
@mseaton the relationships tag will not cut it. The use case if for a labor and delivery scenario in the image below, the form being displayed is for the mother, and there is need to register the babies born in a single shot rather than go through the process of registering each one separately.
Which is why I am looking even at the possibility of adding a new tag for this use case which is very common in MCH settings
@ssmusoke the “registerPatient” option you lay out seems like a reasonable approach, though I would check to see if the existing “patient” tag could be multi-purposed to do any of this.
For editing, if you could get away without doing editing in the first pass, that would be a good way to simplify things.
@ssmusoke, I see. That would be a useful feature to have. But it definitely gets complicated as you are basically talking about editing the attributes (and potentially even encounters and observations) of multiple patients on the same form.
One approach I might recommend you try would be to:
Capture the above data as Obs in the mother’s encounter (1 obs group per baby)
Implement a postSubmissionAction that inspects these Obs Groups, and creates (and potentially updates) new patient records based on the submitted data.
An additional benefit of this is that you capture and preserve the fidelity of what was entered on this form for these fields, even if the baby’s patient record is later updated (i.e. they would be observations in the mother’s encounter, and then the post submission action would also make them observations or other attributes if desired in the child’s record).
It also means that you could make decisions like “only register a new patient if the infant is born alive” that are embedded in your postSubmissionAction rule. So, if a baby is born alive, create a new record for them in the system. Otherwise, just retain the information as observational history in the mother’s record.