@phenyxhealth/sdk 1.0.7 → 1.0.9

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/README.md CHANGED
@@ -247,8 +247,8 @@ const deptId = api.getSendingDepartmentIdByName("Oncología");
247
247
  // Obtener ID de código CEI9
248
248
  const cei9Id = api.getCei9IdByName("C78.9");
249
249
 
250
- // Obtener ID de código CEI10
251
- const cei10Id = api.getCei10IdByName("C78.9");
250
+ // Obtener ID de código CIE10
251
+ const cie10Id = api.getCie10IdByName("C78.9");
252
252
  ```
253
253
 
254
254
  ## Funciones de Validación
@@ -355,7 +355,7 @@ const processPatient = async () => {
355
355
  birthDate: "1980-01-15",
356
356
  sendingDepartmentId: api.getSendingDepartmentIdByName("Oncología"),
357
357
  cei9Id: api.getCei9IdByName("C78.9"),
358
- cei10Id: api.getCei10IdByName("C78.9"),
358
+ cie10Id: api.getCie10IdByName("C78.9"),
359
359
  });
360
360
 
361
361
  // Cambiar estado del paciente
@@ -389,7 +389,7 @@ try {
389
389
 
390
390
  try {
391
391
  const cei9Id = api.getCei9IdByName("C00.0");
392
- const cei10Id = api.getCei10IdByName("C00.0");
392
+ const cie10Id = api.getCie10IdByName("C00.0");
393
393
  } catch (error) {
394
394
  console.error("Código CEI no encontrado:", error.message);
395
395
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phenyxhealth/sdk",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "type": "module",
5
5
  "description": "SDK oficial para PhenyxHealth - Sistema integral de gestión de radioterapia. Incluye gestión de pacientes, recursos humanos, equipos médicos y configuración global.",
6
6
  "main": "./src/index.js",
package/src/PhenyxApi.js CHANGED
@@ -65,9 +65,13 @@ class PhenyxApi {
65
65
  type: 'Global',
66
66
  name: 'CEI9',
67
67
  },
68
- cei10: {
68
+ cie10: {
69
69
  type: 'Global',
70
- name: 'CEI10',
70
+ name: 'CIE10',
71
+ },
72
+ cie10: {
73
+ type: 'Global',
74
+ name: 'CIE10',
71
75
  },
72
76
  treatmentClass: {
73
77
  type: 'Global',
@@ -436,19 +440,23 @@ class PhenyxApi {
436
440
  }
437
441
 
438
442
  /**
439
- * Obtiene el ID de un CEI10 por nombre
440
- * @param {string} name - Nombre del CEI10
441
- * @returns {string} ID del CEI10
442
- * @throws {Error} Si no se encuentra el CEI10
443
+ * Obtiene el ID de un CIE10 por nombre
444
+ * @param {string} name - Nombre del CIE10
445
+ * @returns {string} ID del CIE10
446
+ * @throws {Error} Si no se encuentra el CIE10
443
447
  * @example
444
- * const cei10Id = api.getCei10IdByName('C78.9');
448
+ * const cie10Id = api.getCie10IdByName('C78.9');
445
449
  */
446
- getCei10IdByName = (name) => {
447
- const cei10 = this.getGlobalInfoElement(this.globalTypes.cei10, name);
448
- if (!cei10) {
449
- throw new Error(`CEI10 ${name} not found`);
450
+ getCie10IdByName = (name) => {
451
+ const cie10 = this.getGlobalInfoElement(this.globalTypes.cie10, name);
452
+ if (!cie10) {
453
+ throw new Error(`CIE10 ${name} not found`);
450
454
  }
451
- return cei10.id;
455
+ return cie10.id;
456
+ }
457
+
458
+ getCie10CodeExists = (name) => {
459
+ return !!this.getGlobalInfoElement(this.globalTypes.cie10, name);
452
460
  }
453
461
 
454
462
  /**
package/types/index.d.ts CHANGED
@@ -37,7 +37,7 @@ declare module "@phenyxhealth/sdk" {
37
37
  birthDate: string;
38
38
  sendingDepartmentId?: string;
39
39
  cei9Id?: string;
40
- cei10Id?: string;
40
+ cie10Id?: string;
41
41
  [key: string]: any;
42
42
  }
43
43
 
@@ -128,7 +128,7 @@ declare module "@phenyxhealth/sdk" {
128
128
  birthDate: string;
129
129
  sendingDepartmentId?: string;
130
130
  cei9Id?: string;
131
- cei10Id?: string;
131
+ cie10Id?: string;
132
132
  [key: string]: any;
133
133
  }
134
134
 
@@ -221,7 +221,7 @@ declare module "@phenyxhealth/sdk" {
221
221
  humanResources: GlobalType;
222
222
  sendingDepartment: GlobalType;
223
223
  cei9: GlobalType;
224
- cei10: GlobalType;
224
+ cie10: GlobalType;
225
225
  treatmentClass: GlobalType;
226
226
  treatmentSubClass: GlobalType;
227
227
  treatmentTechnique: GlobalType;
@@ -409,20 +409,20 @@ declare module "@phenyxhealth/sdk" {
409
409
  getSendingDepartmentIdByName(name: string): string;
410
410
 
411
411
  /**
412
- * Obtiene el ID de un CEI9 por nombre
413
- * @param name Nombre del CEI9
414
- * @returns ID del CEI9
415
- * @throws Error si no se encuentra el CEI9
412
+ * Obtiene el ID de un CIE10 por nombre
413
+ * @param name Nombre del CIE10
414
+ * @returns ID del CIE10
415
+ * @throws Error si no se encuentra el CIE10
416
416
  */
417
- getCei9IdByName(name: string): string;
417
+ getCie10IdByName(name: string): string;
418
418
 
419
419
  /**
420
- * Obtiene el ID de un CEI10 por nombre
421
- * @param name Nombre del CEI10
422
- * @returns ID del CEI10
423
- * @throws Error si no se encuentra el CEI10
420
+ * Obtiene el ID de un CIE10 por nombre
421
+ * @param name Nombre del CIE10
422
+ * @returns ID del CIE10
423
+ * @throws Error si no se encuentra el CIE10
424
424
  */
425
- getCei10IdByName(name: string): string;
425
+ getCie10IdByName(name: string): string;
426
426
 
427
427
  /**
428
428
  * Obtiene el estado de peer review formateado