<commit_before>function (doc) {
    // !code util/mvp.js
    if (isChildCloseForm(doc) ||
        isPregnancyCloseForm(doc)) {
        var indicators = get_indicators(doc),
            closed_date = new Date(doc.form.meta.timeEnd),
            indicator_keys = new Array(),
            close_reason = "",
            termination_reason = "";

        if (indicators.close_reason && indicators.close_reason.value) {
            close_reason = indicators.close_reason.value;
        }

        if (indicators.termination_reason && indicators.termination_reason.value) {
            termination_reason = indicators.termination_reason.value;
        }

        if (isChildCloseForm(doc)
            && close_reason === 'death'
            && (indicators.date_of_death && indicators.date_of_death.value)
            && (indicators.child_dob && indicators.child_dob.value)) {
            var date_of_death = new Date(indicators.date_of_death.value),
                child_dob = new Date(indicators.child_dob.value);

            if (child_dob <= date_of_death) {
                var difference = date_of_death.getTime() - child_dob.getTime();
                if (difference <= 28*MS_IN_DAY) {
                    indicator_keys.push("neonatal_death");
                }
                if (difference < 330*MS_IN_DAY) {
                    indicator_keys.push("infant_death")
                }
                if (difference < 1860*MS_IN_DAY) {
                    indicator_keys.push("under5_death")
                }

            }
        }

        if (isPregnancyCloseForm(doc)
            && termination_reason === 'stillbirth') {
            indicator_keys.push("neonatal_death");
            indicator_keys.push("infant_death");
            indicator_keys.push("under5_death");
        }<commit_msg>1825 for under5<commit_after>function (doc) {
    // !code util/mvp.js
    if (isChildCloseForm(doc) ||
        isPregnancyCloseForm(doc)) {
        var indicators = get_indicators(doc),
            closed_date = new Date(doc.form.meta.timeEnd),
            indicator_keys = new Array(),
            close_reason = "",
            termination_reason = "";

        if (indicators.close_reason && indicators.close_reason.value) {
            close_reason = indicators.close_reason.value;
        }

        if (indicators.termination_reason && indicators.termination_reason.value) {
            termination_reason = indicators.termination_reason.value;
        }

        if (isChildCloseForm(doc)
            && close_reason === 'death'
            && (indicators.date_of_death && indicators.date_of_death.value)
            && (indicators.child_dob && indicators.child_dob.value)) {
            var date_of_death = new Date(indicators.date_of_death.value),
                child_dob = new Date(indicators.child_dob.value);

            if (child_dob <= date_of_death) {
                var difference = date_of_death.getTime() - child_dob.getTime();
                if (difference <= 28*MS_IN_DAY) {
                    indicator_keys.push("neonatal_death");
                }
                if (difference < 330*MS_IN_DAY) {
                    indicator_keys.push("infant_death")
                }
                if (difference < 1825*MS_IN_DAY) {
                    indicator_keys.push("under5_death")
                }

            }
        }

        if (isPregnancyCloseForm(doc)
            && termination_reason === 'stillbirth') {
            indicator_keys.push("neonatal_death");
            indicator_keys.push("infant_death");
            indicator_keys.push("under5_death");
        }
{'fraction_non_alphanumeric': 0.10710321864594895, 'fraction_numerical': 0.007491675915649278, 'mean_word_length': 1.8770949720670391, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2550524', 'n_tokens_mistral': 1121, 'n_tokens_neox': 1010, 'n_words': 140}