diff --git a/src/libs/routes/enrollment.js b/src/libs/routes/enrollment.js index 302d31869697e2be4eee668fa431db4f1eb94636..01ccbc9448ec37a3db25593241ba0eae4f4f23ac 100644 --- a/src/libs/routes/enrollment.js +++ b/src/libs/routes/enrollment.js @@ -604,7 +604,138 @@ rqf.addField({ type: 'integer', field: 'turma_turno_id' } -}, 'filter'); +}, 'filter') +.addValue({ + name: 'low_vision', + table: 'matricula', + tableField: 'baixa_visao', + resultField: 'low_vision', + where: { + relation: '=', + type: 'boolean', + field: 'baixa_visao' + } +}).addValue({ + name: 'blindness', + table: 'matricula', + tableField: 'cegueira', + resultField: 'blindness', + where: { + relation: '=', + type: 'boolean', + field: 'cegueira' + } +}).addValue({ + name: 'deafness', + table: 'matricula', + tableField: 'surdez', + resultField: 'deafness', + where: { + relation: '=', + type: 'boolean', + field: 'surdez' + } +}).addValue({ + name: 'hearing_deficiency', + table: 'matricula', + tableField: 'deficiencia_auditiva', + resultField: 'hearing_deficiency', + where: { + relation: '=', + type: 'boolean', + field: 'deficiencia_auditiva' + } +}).addValue({ + name: 'deafblindness', + table: 'matricula', + tableField: 'surdo_cegueira', + resultField: 'deafblindness', + where: { + relation: '=', + type: 'boolean', + field: 'surdo_cegueira' + } +}).addValue({ + name: 'physical_disability', + table: 'matricula', + tableField: 'deficiencia_fisica', + resultField: 'physical_disability', + where: { + relation: '=', + type: 'boolean', + field: 'deficiencia_fisica' + } +}).addValue({ + name: 'intellectual_disability', + table: 'matricula', + tableField: 'deficiencia_intelectual', + resultField: 'intellectual_disability', + where: { + relation: '=', + type: 'boolean', + field: 'deficiencia_intelectual' + } +}).addValue({ + name: 'multiple_disabilities', + table: 'matricula', + tableField: 'deficiencia_multiplas', + resultField: 'multiple_disabilities', + where: { + relation: '=', + type: 'boolean', + field: 'deficiencia_multiplas' + } +}).addValue({ + name: 'autism', + table: 'matricula', + tableField: 'autismo', + resultField: 'autism', + where: { + relation: '=', + type: 'boolean', + field: 'autismo' + } +}).addValue({ + name: 'asperger_syndrom', + table: 'matricula', + tableField: 'sindrome_asperger', + resultField: 'asperger_syndrom', + where: { + relation: '=', + type: 'boolean', + field: 'sindrome_asperger' + } +}).addValue({ + name: 'rett_syndrom', + table: 'matricula', + tableField: 'sindrome_rett', + resultField: 'rett_syndrom', + where: { + relation: '=', + type: 'boolean', + field: 'sindrome_rett' + } +}).addValue({ + name: 'childhood_desintegrative_disorder', + table: 'matricula', + tableField: 'transtorno_desintegrativo_da_infancia', + resultField: 'childhood_desintegrative_disorder', + where: { + relation: '=', + type: 'boolean', + field: 'transtorno_desintegrativo_da_infancia' + } +}).addValue({ + name: 'supergifted', + table: 'matricula', + tableField: 'superdotado', + resultField: 'supergifted', + where: { + relation: '=', + type: 'boolean', + field: 'superdotado' + } +}); enrollmentApp.get('/', rqf.parse(), (req, res, next) => { req.sql.field('COUNT(*)', 'total')