@andes/fhir 1.13.0-beta.3 → 1.13.0-beta.5
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
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':
|
|
@@ -123,8 +124,8 @@ function encode(practitioner) {
|
|
|
123
124
|
unaMatricula.code = {
|
|
124
125
|
coding: [{
|
|
125
126
|
system: 'http://www.saludneuquen.gob.ar/fiscalizacion.html',
|
|
126
|
-
code: String(datosPosgrado.especialidad.codigo ?? ''),
|
|
127
|
-
display: String(datosPosgrado.especialidad.
|
|
127
|
+
code: String(datosPosgrado.especialidad.codigo.sisa ?? ''),
|
|
128
|
+
display: String(datosPosgrado.especialidad.nombre ?? '')
|
|
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: [{
|