@andes/fhir 1.13.0-beta.3 → 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 +3 -1
- 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':
|
|
@@ -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: [{
|