@peopl-health/nexus 5.47.0-dev.7325 → 5.47.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -68,11 +68,6 @@ function validateGateInheritance(elements, gate) {
|
|
|
68
68
|
path: 'elements[].escalation.routes',
|
|
69
69
|
problem: 'gate equipo_tratante_hoy ⇒ un elemento heredado debe incluir equipo_medico_tratante',
|
|
70
70
|
});
|
|
71
|
-
} else if (!sameDayTeamElements.some((element) => /\bhoy\b/i.test(element.recommendation.patient.mainRecommendation))) {
|
|
72
|
-
issues.push({
|
|
73
|
-
path: 'elements[].recommendation.patient.main_recommendation',
|
|
74
|
-
problem: 'gate equipo_tratante_hoy ⇒ la recomendación heredada debe indicar explícitamente contactar al equipo hoy',
|
|
75
|
-
});
|
|
76
71
|
}
|
|
77
72
|
}
|
|
78
73
|
return issues;
|
|
@@ -97,17 +92,13 @@ function validate(elements, options = {}) {
|
|
|
97
92
|
}
|
|
98
93
|
}
|
|
99
94
|
const count = patient.mainRecommendation ? sentenceCount(patient.mainRecommendation) : 0;
|
|
100
|
-
const
|
|
101
|
-
&& options.gate.escalationRoute === 'equipo_tratante_hoy'
|
|
102
|
-
&& element.escalation.routes.includes('equipo_medico_tratante');
|
|
103
|
-
const minSentences = isTriagePlan ? (inheritsSameDayTeamGate ? 4 : 3) : 2;
|
|
95
|
+
const minSentences = isTriagePlan ? 3 : 2;
|
|
104
96
|
if (patient.mainRecommendation && !(count >= minSentences && count <= 4)) {
|
|
105
|
-
const expected = minSentences === 4 ? 'exactamente 4 oraciones' : `${minSentences}-4 oraciones`;
|
|
106
97
|
issues.push({
|
|
107
98
|
path: `${path}.recommendation.patient.main_recommendation`,
|
|
108
99
|
code: SENTENCE_COUNT_CODE,
|
|
109
100
|
warning: true,
|
|
110
|
-
problem: `${
|
|
101
|
+
problem: `${minSentences}-4 oraciones; detectadas: ${count}`,
|
|
111
102
|
});
|
|
112
103
|
}
|
|
113
104
|
if (element.escalation.urgentUnder24h && !patient.whenToEscalate) {
|