From 99ed371252a6d8ac1ac6298f8720a43e7e67daf6 Mon Sep 17 00:00:00 2001
From: Fernando Gbur <fgs21@inf.ufpr.br>
Date: Wed, 17 Jan 2024 11:33:56 -0300
Subject: [PATCH] [ADD] Adding the following filters/dimensions:
 instruction_level, adm_dependency, attends_school, modality and
 attended_modality

---
 src/libs/routes_v1/newPnad.js | 52 ++++++++++++++++++++++++++++++++++-
 1 file changed, 51 insertions(+), 1 deletion(-)

diff --git a/src/libs/routes_v1/newPnad.js b/src/libs/routes_v1/newPnad.js
index 1ac5bd59..29b6b6c9 100644
--- a/src/libs/routes_v1/newPnad.js
+++ b/src/libs/routes_v1/newPnad.js
@@ -107,7 +107,57 @@ rqf.addField({
     where: {
         relation: '=',
         type: 'integer',
-        field: 'years_of_study'
+        field: 'anos_de_estudo'
+    }
+}).addValue({
+    name: 'instruction_level',
+    table: 'pnad_novo',
+    tableField: 'nivel_de_instrucao',
+    resultField: 'instruction_level',
+    where: {
+        relation: '=',
+        type: 'integer',
+        field: 'nivel_de_instrucao'
+    }
+}).addValue({
+    name: 'adm_dependency',
+    table: 'pnad_novo',
+    tableField: 'dependencia_adm',
+    resultField: 'adm_dependency',
+    where: {
+        relation: '=',
+        type: 'integer',
+        field: 'dependencia_adm'
+    }
+}).addValue({
+    name: 'attends_school',
+    table: 'pnad_novo',
+    tableField: 'frequenta_escola',
+    resultField: 'attends_school',
+    where: {
+        relation: '=',
+        type: 'integer',
+        field: 'frequenta_escola'
+    }
+}).addValue({
+    name: 'modality',
+    table: 'pnad_novo',
+    tableField: 'modalidade',
+    resultField: 'modality',
+    where: {
+        relation: '=',
+        type: 'integer',
+        field: 'modalidade'
+    }
+}).addValue({
+    name: 'attended_modality',
+    table: 'pnad_novo',
+    tableField: 'nivel_etapa_modalidade_freq',
+    resultField: 'attended_modality',
+    where: {
+        relation: '=',
+        type: 'integer',
+        field: 'nivel_etapa_modalidade_freq'
     }
 }).addValue({
     name: 'min_year',
-- 
GitLab