@peopl-health/nexus 5.56.9 → 5.56.10
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.
|
@@ -258,7 +258,12 @@ async function handler(args, context = {}) {
|
|
|
258
258
|
|
|
259
259
|
async function scanSafetyFlags(text) {
|
|
260
260
|
try {
|
|
261
|
-
|
|
261
|
+
const patterns = await getSafetyFlagPatterns();
|
|
262
|
+
if (!patterns?.length) {
|
|
263
|
+
logger.warn('[extractClinicalInfo] no safety patterns configured; treating the scan as unavailable');
|
|
264
|
+
return null;
|
|
265
|
+
}
|
|
266
|
+
return detectSafetyFlags(text, patterns);
|
|
262
267
|
} catch (err) {
|
|
263
268
|
logger.warn('[extractClinicalInfo] deterministic safety scan failed', { error: err?.message });
|
|
264
269
|
return null;
|