paperclip-plugin-autopilot-ops 0.1.64 → 0.1.65

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  // src/manifest.ts
2
2
  var PLUGIN_ID = "alephoo.autopilot-ops";
3
- var PLUGIN_VERSION = "0.1.64";
3
+ var PLUGIN_VERSION = "0.1.65";
4
4
  var DB_NAMESPACE_SLUG = "autopilot_ops";
5
5
  var PAGE_ROUTE = "autopilot";
6
6
  var TOOL_NAMES = {
package/dist/ui/index.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
 
9
9
  // src/manifest.ts
10
10
  var PLUGIN_ID = "alephoo.autopilot-ops";
11
- var PLUGIN_VERSION = "0.1.64";
11
+ var PLUGIN_VERSION = "0.1.65";
12
12
  var DB_NAMESPACE_SLUG = "autopilot_ops";
13
13
  var PAGE_ROUTE = "autopilot";
14
14
  var TOOL_NAMES = {
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.64";
39935
+ var PLUGIN_VERSION = "0.1.65";
39936
39936
  var DB_NAMESPACE_SLUG = "autopilot_ops";
39937
39937
  var PAGE_ROUTE = "autopilot";
39938
39938
  var TOOL_NAMES = {
@@ -45483,21 +45483,27 @@ function evaluarCostoInternacion(input2) {
45483
45483
  const costo = redondear7(honorarios + insumos + cama + quirofano);
45484
45484
  const calculable = faltas.length === 0 && facturado > 0;
45485
45485
  const margen = calculable ? redondear7(facturado - costo) : null;
45486
- const margen_pct = margen !== null ? Math.round(margen / facturado * 1e3) / 10 : null;
45486
+ let margen_pct = margen !== null ? Math.round(margen / facturado * 1e3) / 10 : null;
45487
+ if (margen_pct !== null && margen_pct < -RESULTADO_DUDOSO_PCT) {
45488
+ faltas.push("facturado_dudoso");
45489
+ margen_pct = null;
45490
+ }
45487
45491
  let clase2;
45488
45492
  if (margen === null || margen_pct === null) clase2 = "datos_incompletos";
45489
45493
  else if (margen < 0) clase2 = "perdida";
45490
45494
  else if (margen_pct < umbral) clase2 = "margen_bajo";
45491
45495
  else clase2 = "rentable";
45492
- return { clase: clase2, facturado, honorarios, insumos, cama, quirofano, costo, margen, margen_pct, umbral, dias: total, dias_por_servicio, minutos_quirofano: minutos, faltas, avisos, insumos_sin_costo: sinCosto, prestaciones_sin_regla: sinRegla };
45496
+ return { clase: clase2, facturado, honorarios, insumos, cama, quirofano, costo, margen: margen_pct === null ? null : margen, margen_pct, umbral, dias: total, dias_por_servicio, minutos_quirofano: minutos, faltas, avisos, insumos_sin_costo: sinCosto, prestaciones_sin_regla: sinRegla };
45493
45497
  }
45494
45498
  var NOMBRE_FALTA2 = {
45495
45499
  sin_facturar: "no tiene nada facturado",
45496
45500
  insumo_sin_costo: "hay insumos sin costo de compra en el HIS",
45497
45501
  sin_costo_cama: "falta el costo del d\xEDa cama",
45498
45502
  sin_costo_quirofano: "falta el costo de la hora de quir\xF3fano",
45499
- cirugia_sin_duracion: "hay cirug\xEDas sin la duraci\xF3n en el parte quir\xFArgico"
45503
+ cirugia_sin_duracion: "hay cirug\xEDas sin la duraci\xF3n en el parte quir\xFArgico",
45504
+ facturado_dudoso: "lo que cost\xF3 es m\xE1s de cuatro veces lo facturado: hay que verificar la facturaci\xF3n o los d\xEDas"
45500
45505
  };
45506
+ var RESULTADO_DUDOSO_PCT = 300;
45501
45507
  var porcentaje2 = (n2) => `${n2.toLocaleString("es-AR", { maximumFractionDigits: 1 })} %`;
45502
45508
  var enumerar = (xs) => xs.length > 1 ? `${xs.slice(0, -1).join(", ")} y ${xs[xs.length - 1]}` : xs[0] ?? "";
45503
45509
  function oracionCostoInternacion(l, e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "paperclip-plugin-autopilot-ops",
3
- "version": "0.1.64",
3
+ "version": "0.1.65",
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": [