@phenyxhealth/sdk 1.0.7 → 1.0.8
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 +4 -4
- package/package.json +1 -1
- package/src/PhenyxApi.js +20 -12
- package/types/index.d.ts +13 -13
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
|
|
251
|
-
const
|
|
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
|
-
|
|
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
|
|
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.
|
|
3
|
+
"version": "1.0.8",
|
|
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
|
-
|
|
68
|
+
cie10: {
|
|
69
69
|
type: 'Global',
|
|
70
|
-
name: '
|
|
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
|
|
440
|
-
* @param {string} name - Nombre del
|
|
441
|
-
* @returns {string} ID del
|
|
442
|
-
* @throws {Error} Si no se encuentra el
|
|
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
|
|
448
|
+
* const cie10Id = api.getCie10IdByName('C78.9');
|
|
445
449
|
*/
|
|
446
|
-
|
|
447
|
-
const
|
|
448
|
-
if (!
|
|
449
|
-
throw new Error(`
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
413
|
-
* @param name Nombre del
|
|
414
|
-
* @returns ID del
|
|
415
|
-
* @throws Error si no se encuentra el
|
|
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
|
-
|
|
417
|
+
getCie10IdByName(name: string): string;
|
|
418
418
|
|
|
419
419
|
/**
|
|
420
|
-
* Obtiene el ID de un
|
|
421
|
-
* @param name Nombre del
|
|
422
|
-
* @returns ID del
|
|
423
|
-
* @throws Error si no se encuentra el
|
|
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
|
-
|
|
425
|
+
getCie10IdByName(name: string): string;
|
|
426
426
|
|
|
427
427
|
/**
|
|
428
428
|
* Obtiene el estado de peer review formateado
|