@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.