The class ca.uhn.hl7v2.model.v23.segment.PID does not allow SEQ-21 (Mother's Id) to be repeatable. I believe this is the fault of the "Init" method but I'm not 100% sure if that's the sole problem.
Here is where I think the culprit is: ca.uhn.hl7v2.model.v23.segment.PID line 117:
:::java
That 1 in that method disallows repeatable.
In the official HL7 documentation for version 2.3, it says this for PID-21 (3.3.2.21):
Definition: This field is used, for example, as a link field for newborns. Typically a patient ID or account number may be used. This field can contain multiple identifiers for the same mother. Refer to HL7 table 0061 - Check digit scheme as defined in Chapter 2.