paperclip-plugin-autopilot-ops 0.1.21 → 0.1.22
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 +23 -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.22";
|
|
39936
39936
|
var DB_NAMESPACE_SLUG = "autopilot_ops";
|
|
39937
39937
|
var PAGE_ROUTE = "autopilot";
|
|
39938
39938
|
var TOOL_NAMES = {
|
|
@@ -40512,15 +40512,33 @@ function cruzarCircular(input2) {
|
|
|
40512
40512
|
const porA = new Map(filasA.map((f) => [f.codigo, f]));
|
|
40513
40513
|
const porB = new Map(filasB.map((f) => [f.codigo, f]));
|
|
40514
40514
|
const porHis = new Map(act.practicas.map((p) => [p.codigo, p]));
|
|
40515
|
+
const porBase = /* @__PURE__ */ new Map();
|
|
40516
|
+
for (const p of act.practicas) {
|
|
40517
|
+
const raiz = p.codigo.replace(/[A-Z]$/, "");
|
|
40518
|
+
if (raiz !== p.codigo) porBase.set(raiz, [...porBase.get(raiz) ?? [], p]);
|
|
40519
|
+
}
|
|
40520
|
+
const usadas = /* @__PURE__ */ new Set();
|
|
40515
40521
|
const codigos = [.../* @__PURE__ */ new Set([...filasA.map((f) => f.codigo), ...filasB.map((f) => f.codigo)])];
|
|
40516
40522
|
const items = [];
|
|
40517
|
-
for (const
|
|
40518
|
-
const fa = porA.get(
|
|
40519
|
-
const fb = porB.get(
|
|
40520
|
-
|
|
40523
|
+
for (const codigoCircular of codigos) {
|
|
40524
|
+
const fa = porA.get(codigoCircular);
|
|
40525
|
+
const fb = porB.get(codigoCircular);
|
|
40526
|
+
let his = porHis.get(codigoCircular);
|
|
40527
|
+
const variantes = his ? [] : porBase.get(codigoCircular) ?? [];
|
|
40528
|
+
if (!his && variantes.length === 1) his = variantes[0];
|
|
40529
|
+
const codigo = his?.codigo ?? codigoCircular;
|
|
40521
40530
|
const nombre = his?.nombre ?? fb?.nombre ?? fa?.nombre ?? codigo;
|
|
40522
40531
|
const valorActual = his ? redondear(his.componentes.reduce((s, c) => s + c.monto, 0)) : null;
|
|
40523
40532
|
const base = { codigo, codigo_his: his?.codigo_his ?? fb?.codigo_original ?? fa?.codigo_original ?? codigo, nombre, valor_a: fa?.valor_nuevo ?? null, valor_b: fb?.valor_nuevo ?? null, valor_actual: valorActual, valor_nuevo: null, variacion: null, estado: "revisar", motivo: null, componentes_nuevos: null };
|
|
40533
|
+
if (variantes.length > 1) {
|
|
40534
|
+
items.push({ ...base, motivo: `el convenio del HIS tiene ${variantes.length} variantes de este c\xF3digo (${variantes.map((v) => v.codigo_his).join(", ")}): no se carga hasta decidir a cu\xE1l corresponde` });
|
|
40535
|
+
continue;
|
|
40536
|
+
}
|
|
40537
|
+
if (his && usadas.has(his.codigo)) {
|
|
40538
|
+
items.push({ ...base, motivo: `otra fila de la circular ya corresponde a la pr\xE1ctica ${his.codigo_his} del HIS` });
|
|
40539
|
+
continue;
|
|
40540
|
+
}
|
|
40541
|
+
if (his) usadas.add(his.codigo);
|
|
40524
40542
|
if (!fa || !fb) {
|
|
40525
40543
|
items.push({ ...base, motivo: fa ? "solo la ley\xF3 el agente: el programa no la encontr\xF3 en la circular" : "solo la ley\xF3 el programa: el agente no la inform\xF3" });
|
|
40526
40544
|
continue;
|
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.22",
|
|
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": [
|