Yes, I meant "shouldn't be too difficult". I think the only pattern required is the grouping of three fields with the condition, causality, and relatedness.
Possible code but it could be much more generic by using function arguments to pass number of repeating fields and field names.
Public...