File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import {
1414 AndesRelacion
1515} from '../types/andes/practitioner.types' ;
1616import { formatFHIRDateTime , formatFHIRDate } from '../utils/fhirDate' ;
17+ import { mapAndesRankingToFhirRank } from '../utils/rankingMapping' ;
1718
1819export function encode ( practitioner : AndesPractitioner | null | undefined ) : Practitioner | null {
1920 const data = practitioner ;
@@ -52,7 +53,7 @@ export function encode(practitioner: AndesPractitioner | null | undefined): Prac
5253 const contactos : ContactPoint [ ] = ( data . contacto ?? [ ] ) . map ( ( unContacto : AndesContacto ) : ContactPoint => {
5354 const cont : ContactPoint = {
5455 value : unContacto . valor ,
55- rank : unContacto . ranking
56+ rank : mapAndesRankingToFhirRank ( unContacto . ranking )
5657 } ;
5758
5859 switch ( unContacto . tipo ) {
@@ -206,6 +207,7 @@ export function encode(practitioner: AndesPractitioner | null | undefined): Prac
206207 // -----------------------------
207208 const profesionalFHIR : Practitioner = {
208209 resourceType : 'Practitioner' ,
210+ id : data . _id ,
209211 identifier : identificadores ,
210212 active : data . habilitado ?? undefined ,
211213 name : [ {
You can’t perform that action at this time.
0 commit comments