You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ede/ede/validation_functions/fn3_integridad_datos/fn3FB.py
+17-3Lines changed: 17 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -36,15 +36,20 @@ def fn3FB(conn, return_dict):
36
36
JOIN RefPersonIdentificationSystem rfiLista
37
37
ON numLista.RefPersonIdentificationSystemId=rfiLista.RefPersonIdentificationSystemId
38
38
AND rfiLista.code IN ('listNumber')
39
+
WHERE
40
+
p.RecordEndDateTime IS NULL
39
41
) as 'cantidadNumeroLista'
40
42
,(
41
43
SELECT count(p.personId)
42
44
FROM person p
43
45
JOIN PersonIdentifier numMatri
44
46
ON p.personid = numMatri.personid
47
+
AND numMatri.RecordEndDateTime IS NULL
45
48
JOIN RefPersonIdentificationSystem rfiMatri
46
49
ON numMatri.RefPersonIdentificationSystemId=rfiMatri.RefPersonIdentificationSystemId
47
50
AND rfiMatri.code IN ('SchoolNumber')
51
+
WHERE
52
+
p.RecordEndDateTime IS NULL
48
53
) as 'cantidadNumeroMatricula'
49
54
,(
50
55
SELECT count(p.personId)
@@ -53,7 +58,9 @@ def fn3FB(conn, return_dict):
53
58
ON ps.personId = p.personId
54
59
JOIN RefPersonStatusType rpst
55
60
ON rpst.RefPersonStatusTypeId=ps.RefPersonStatusTypeId
56
-
AND rpst.Description IN ('Estudiante con matrícula definitiva')
61
+
AND rpst.Description IN ('Estudiante con matrícula definitiva', 'Estudiante promovido', 'Estudiante con matrícula provisoria', 'Estudiante Matriculado a través de Decreto 152, artículo 60')
62
+
WHERE
63
+
p.RecordEndDateTime IS NULL
57
64
) as 'cantidadMatriDefinitiva'
58
65
,(
59
66
SELECT count(p.personId)
@@ -64,16 +71,21 @@ def fn3FB(conn, return_dict):
64
71
JOIN RefPersonStatusType rpst
65
72
ON rpst.RefPersonStatusTypeId=ps.RefPersonStatusTypeId
66
73
AND rpst.Description IN ('Estudiante asignado a un curso, se crea número de lista')
74
+
WHERE
75
+
p.RecordEndDateTime IS NULL
67
76
) as 'cantidadNumerosListaAsignados'
68
77
, (
69
78
SELECT group_concat(p.personId)
70
79
FROM person p
71
80
JOIN PersonIdentifier numLista
72
81
ON p.personid = numLista.personid
82
+
AND numLista.RecordEndDateTime IS NULL
73
83
JOIN RefPersonIdentificationSystem rfiLista
74
84
ON numLista.RefPersonIdentificationSystemId=rfiLista.RefPersonIdentificationSystemId
75
85
AND rfiLista.code IN ('listNumber')
76
-
WHERE p.personId NOT IN (
86
+
WHERE
87
+
p.RecordEndDateTime IS NULL
88
+
AND p.personId NOT IN (
77
89
SELECT p.personId
78
90
FROM person p
79
91
JOIN PersonStatus ps
@@ -93,7 +105,9 @@ def fn3FB(conn, return_dict):
93
105
JOIN RefPersonIdentificationSystem rfiMatri
94
106
ON numMatri.RefPersonIdentificationSystemId=rfiMatri.RefPersonIdentificationSystemId
0 commit comments