@andes/fhir 1.13.0-beta.2 → 1.13.0-beta.4
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/lib/practitioner.js +7 -5
- package/package.json +1 -1
package/dist/lib/practitioner.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.encode = void 0;
|
|
4
4
|
const config_1 = require("./config");
|
|
5
5
|
const fhirDate_1 = require("../utils/fhirDate");
|
|
6
|
+
const rankingMapping_1 = require("../utils/rankingMapping");
|
|
6
7
|
function encode(practitioner) {
|
|
7
8
|
const data = practitioner;
|
|
8
9
|
if (!data) {
|
|
@@ -34,7 +35,7 @@ function encode(practitioner) {
|
|
|
34
35
|
const contactos = (data.contacto ?? []).map((unContacto) => {
|
|
35
36
|
const cont = {
|
|
36
37
|
value: unContacto.valor,
|
|
37
|
-
rank: unContacto.ranking
|
|
38
|
+
rank: (0, rankingMapping_1.mapAndesRankingToFhirRank)(unContacto.ranking)
|
|
38
39
|
};
|
|
39
40
|
switch (unContacto.tipo) {
|
|
40
41
|
case 'fijo':
|
|
@@ -76,7 +77,7 @@ function encode(practitioner) {
|
|
|
76
77
|
identifier: datosGrado.profesion.nombre
|
|
77
78
|
? [{
|
|
78
79
|
system: 'https://www.saludneuquen.gob.ar/matriculacionGrado',
|
|
79
|
-
value: datosGrado.profesion.nombre
|
|
80
|
+
value: String(datosGrado.profesion.nombre ?? '')
|
|
80
81
|
}]
|
|
81
82
|
: []
|
|
82
83
|
};
|
|
@@ -85,7 +86,7 @@ function encode(practitioner) {
|
|
|
85
86
|
coding: [{
|
|
86
87
|
system: 'http://www.saludneuquen.gob.ar/fiscalizacion.html',
|
|
87
88
|
code: String(datosGrado.profesion.codigo ?? ''),
|
|
88
|
-
display: datosGrado.profesion.tipoDeFormacion
|
|
89
|
+
display: String(datosGrado.profesion.tipoDeFormacion ?? '')
|
|
89
90
|
}],
|
|
90
91
|
text: String(ultima.matriculaNumero ?? '')
|
|
91
92
|
};
|
|
@@ -115,7 +116,7 @@ function encode(practitioner) {
|
|
|
115
116
|
identifier: datosPosgrado.especialidad.nombre
|
|
116
117
|
? [{
|
|
117
118
|
system: 'https://www.saludneuquen.gob.ar/matriculacionEspecialidad/',
|
|
118
|
-
value: datosPosgrado.especialidad.nombre
|
|
119
|
+
value: String(datosPosgrado.especialidad.nombre ?? '')
|
|
119
120
|
}]
|
|
120
121
|
: []
|
|
121
122
|
};
|
|
@@ -124,7 +125,7 @@ function encode(practitioner) {
|
|
|
124
125
|
coding: [{
|
|
125
126
|
system: 'http://www.saludneuquen.gob.ar/fiscalizacion.html',
|
|
126
127
|
code: String(datosPosgrado.especialidad.codigo ?? ''),
|
|
127
|
-
display: datosPosgrado.especialidad.tipo
|
|
128
|
+
display: String(datosPosgrado.especialidad.tipo ?? '')
|
|
128
129
|
}],
|
|
129
130
|
text: String(ultima.matriculaNumero ?? '')
|
|
130
131
|
};
|
|
@@ -167,6 +168,7 @@ function encode(practitioner) {
|
|
|
167
168
|
// -----------------------------
|
|
168
169
|
const profesionalFHIR = {
|
|
169
170
|
resourceType: 'Practitioner',
|
|
171
|
+
id: data._id,
|
|
170
172
|
identifier: identificadores,
|
|
171
173
|
active: data.habilitado ?? undefined,
|
|
172
174
|
name: [{
|