<!-- BEGIN outreach/questionnaire_summary.tt -->
    [% questionnaire = outreach.questionnaire %]
	<table class="indent outreachResults">
        <tr>
            <td colspan="2" align="center">
                <b><u>Questionnaire summary</u></b>
            </td>
        </tr>          
        <tr>
            <td class="label">Bone pain:</td>
            [%  pain = [];
                pain.push('rib')  IF questionnaire.rib_pain
                    AND NOT questionnaire.rib_pain.match('none');
                pain.push('arm')  IF questionnaire.arm_pain
                    AND NOT questionnaire.arm_pain.match('none');
                pain.push('leg')  IF questionnaire.leg_pain
                    AND NOT questionnaire.leg_pain.match('none');
                pain.push('back') IF questionnaire.back_pain
                    AND NOT questionnaire.back_pain.match('none');
            %]
            <td class="result">
                [%
                    IF pain.size > 2; 'generalised';
                    ELSIF pain.size; pain.join(', '); # 1 or 2
                    ELSE; 0; END;
                %]
            </td>
        </tr>          
        <tr>
            <td class="label">Swelling:</td>
            [%  swelling = [];
                swelling.push('abdominal') IF questionnaire.abdominal_swelling.match('Y');
                swelling.push('cervical')  IF questionnaire.cervical_swelling.match('Y');
                swelling.push('axillary')  IF questionnaire.axillary_swelling.match('Y');
                swelling.push('inguinal')  IF questionnaire.inguinal_swelling.match('Y');
            %]
            <td class="result">
                [%
                    IF swelling.size > 2; 'generalised';
                    ELSIF swelling.size; swelling.join(', '); # 1 or 2
                    ELSE; 0; END;
                %]
            </td>
        </tr>          
        <tr>
            <td class="label">Night sweats:</td>
            <td class="result">
                [% questionnaire.night_sweats || site.html.grey_null %]
            </td>
        </tr>          
        <tr>
            <td class="label">QoL:</td>
            <td class="result">
                1[% questionnaire.mobility       || '?' %]
                2[% questionnaire.self_care      || '?' %]
                3[% questionnaire.usual_activity || '?' %]
                4[% questionnaire.discomfort     || '?' %]
                5[% questionnaire.anxiety        || '?' %]
                [% questionnaire.health_index    || '??' %]
            </td>
        </tr>          
    </table>
<!-- END outreach/questionnaire_summary.tt -->
