simplify child weight condition and add tests
Merge pull request #4094 from dimagi/opm-cz

simplify child weight condition and add tests