paperclip-plugin-autopilot-ops 0.1.54 → 0.1.56
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.
- package/dist/manifest.js +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/worker.js +10 -5
- package/package.json +1 -1
package/dist/manifest.js
CHANGED
package/dist/ui/index.js
CHANGED
package/dist/worker.js
CHANGED
|
@@ -39932,7 +39932,7 @@ function startWorkerRpcHost(options) {
|
|
|
39932
39932
|
|
|
39933
39933
|
// src/manifest.ts
|
|
39934
39934
|
var PLUGIN_ID = "alephoo.autopilot-ops";
|
|
39935
|
-
var PLUGIN_VERSION = "0.1.
|
|
39935
|
+
var PLUGIN_VERSION = "0.1.56";
|
|
39936
39936
|
var DB_NAMESPACE_SLUG = "autopilot_ops";
|
|
39937
39937
|
var PAGE_ROUTE = "autopilot";
|
|
39938
39938
|
var TOOL_NAMES = {
|
|
@@ -42509,7 +42509,7 @@ function matriculaInvalida(cargada, tipo) {
|
|
|
42509
42509
|
if (/[^0-9\s.\-/]/.test(crudo)) return true;
|
|
42510
42510
|
const d = crudo.replace(/\D/g, "");
|
|
42511
42511
|
if (d.length < (tipo === "provincial" ? 3 : 4)) return true;
|
|
42512
|
-
if (/^(\d)\1+$/.test(d)) return true;
|
|
42512
|
+
if (/^(\d+)\1+$/.test(d)) return true;
|
|
42513
42513
|
return "01234567890".includes(d) || "9876543210".includes(d);
|
|
42514
42514
|
}
|
|
42515
42515
|
var sinTildes = (s) => String(s ?? "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase();
|
|
@@ -42523,6 +42523,8 @@ var PROFESION_POR_ESPECIALIDAD = [
|
|
|
42523
42523
|
[/bioquimic/, "bioquimic"],
|
|
42524
42524
|
[/farmac(ia|eutic)/, "farmac"],
|
|
42525
42525
|
[/instrumentac/, "instrumentad"],
|
|
42526
|
+
[/obstetric|obstetra|partera/, "obstetr|medic"],
|
|
42527
|
+
[/tecnic[oa]|radiolog.*tecnic|hemoterap.*tecnic/, "?"],
|
|
42526
42528
|
[/terapia ocupacional|terapista ocupacional/, "terapista ocupacional"],
|
|
42527
42529
|
[/podolog/, "podolog"]
|
|
42528
42530
|
];
|
|
@@ -42530,10 +42532,12 @@ function profesionEsperada(especialidades) {
|
|
|
42530
42532
|
const lista3 = (Array.isArray(especialidades) ? especialidades.map(String) : String(especialidades ?? "").split(/[,;·]/)).map(sinTildes).map((s) => s.trim()).filter(Boolean);
|
|
42531
42533
|
if (!lista3.length) return null;
|
|
42532
42534
|
const halladas = new Set(lista3.map((e) => PROFESION_POR_ESPECIALIDAD.find(([re]) => re.test(e))?.[1] ?? "medic"));
|
|
42533
|
-
return halladas.size === 1 ? [...halladas][0] : null;
|
|
42535
|
+
return halladas.size === 1 && !halladas.has("?") ? [...halladas][0] : null;
|
|
42534
42536
|
}
|
|
42535
42537
|
function mismaProfesion(profesion, esperada) {
|
|
42536
|
-
|
|
42538
|
+
if (!esperada || !texto4(profesion)) return true;
|
|
42539
|
+
const p = sinTildes(profesion).trim();
|
|
42540
|
+
return esperada.split("|").some((e) => e === "medic" ? p.startsWith("medic") : p.includes(e));
|
|
42537
42541
|
}
|
|
42538
42542
|
function tienePropiaHabilitada(enRegistro, esperada) {
|
|
42539
42543
|
return Array.isArray(enRegistro) && enRegistro.some((m) => m && typeof m === "object" && m.situacion === "habilitado" && m.sancion !== true && mismaProfesion(m.profesion, esperada));
|
|
@@ -42546,8 +42550,9 @@ function fichaMatricula(d) {
|
|
|
42546
42550
|
function observacionMatricula(r, ficha) {
|
|
42547
42551
|
const obs = observacionDe(r);
|
|
42548
42552
|
const esperada = profesionEsperada(ficha.especialidades);
|
|
42549
|
-
if ((obs === "otra_persona" || obs === "no_figura") && (matriculaInvalida(ficha.cargada, ficha.tipo) || tienePropiaHabilitada(ficha.enRegistro, esperada))) return "numero_mal_cargado";
|
|
42553
|
+
if ((obs === "otra_persona" || obs === "no_figura") && (matriculaInvalida(ficha.cargada, ficha.tipo) || tienePropiaHabilitada(ficha.enRegistro, esperada ?? "medic"))) return "numero_mal_cargado";
|
|
42550
42554
|
if (obs === null && !mismaProfesion(r.profesion, esperada)) return "profesion_distinta";
|
|
42555
|
+
if (obs === null && esperada && !texto4(r.profesion)) return "sin_comparar";
|
|
42551
42556
|
return obs;
|
|
42552
42557
|
}
|
|
42553
42558
|
var GRAVES_MATRICULA = ["inhabilitada", "sancion", "otra_persona", "profesion_distinta"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "paperclip-plugin-autopilot-ops",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.56",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Autopilot Care · operación autónoma gobernada para instituciones de salud: workflows determinísticos, validaciones, registro de negocio, políticas (observa/propone/ejecuta/corte) y tablero del director, como plugin de Paperclip.",
|
|
6
6
|
"files": [
|