Guía de Implementación de Homologación Regional (PH4H) de Costa Rica - Versión en desarrollo (v0.1.0): borrador de trabajo de la Iniciativa HL7® Costa Rica, que puede cambiar sin aviso.
\r\nmap "https://hl7.or.cr/fhir/ph4h/StructureMap/CRPractitionerRoleToIPS" = "CRPractitionerRoleToIPS"\r\n\r\nuses "http://hl7.org/fhir/5.0/StructureDefinition/PractitionerRole" alias PractitionerRole as source\r\nuses "http://hl7.org/fhir/4.0/StructureDefinition/PractitionerRole" alias PractitionerRoleR4 as target\r\n\r\nimports "https://hl7.or.cr/fhir/ph4h/StructureMap/CRComun"\r\n\r\ngroup CRPractitionerRoleToIPS(source src : PractitionerRole, target tgt : PractitionerRoleR4) {\r\n src.id as v -> tgt.id = v;\r\n src -> tgt.meta as m then {\r\n src -> m.profile = 'http://hl7.org/fhir/uv/ips/StructureDefinition/PractitionerRole-uv-ips' "perfil";\r\n } "meta";\r\n src.active as v -> tgt.active = v "activo";\r\n src.period as p -> tgt.period as tp then Periodo(p, tp) "periodo";\r\n src.practitioner as r -> tgt.practitioner as tr then Referencia(r, tr) "profesional";\r\n src.organization as r -> tgt.organization as tr then Referencia(r, tr) "organizacion";\r\n src.location as r -> tgt.location as tr then Referencia(r, tr) "ubicacion";\r\n src.code as c where (coding.where(system = 'https://hl7.or.cr/fhir/terminology/CodeSystem/cr-profesion-salud').exists()) -> tgt.code as tc then {\r\n c.coding as sc where (system = 'https://hl7.or.cr/fhir/terminology/CodeSystem/cr-profesion-salud') then {\r\n sc -> tc.coding as t then Codificacion(sc, t) "cr";\r\n sc -> tc.coding = translate(sc, 'https://hl7.or.cr/fhir/terminology/ConceptMap/cr-profesion-salud-isco08', 'Coding') "isco08";\r\n } "codings";\r\n c.text as v -> tc.text = v;\r\n } "profesion";\r\n src.specialty as s -> tgt.specialty as ts then Concepto(s, ts) "especialidad";\r\n src.contact as c where (purpose.exists().not()) then {\r\n c.telecom as t -> tgt.telecom as tt then Telecom(t, tt);\r\n } "contactoGeneral";\r\n}\r\n\r\n "},"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"draft","_valueCode":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom","valueCanonical":"https://hl7.or.cr/fhir/ph4h/ImplementationGuide/hl7.fhir.cr.ph4h"}]}}],"url":"https://hl7.or.cr/fhir/ph4h/StructureMap/CRPractitionerRoleToIPS","version":"0.1.0","name":"CRPractitionerRoleToIPS","status":"draft","date":"2026-10-06T00:22:41-06:00","publisher":"Iniciativa HL7 Costa Rica","contact":[{"name":"Iniciativa HL7 Costa Rica","telecom":[{"system":"url","value":"https://hl7.or.cr"}]}],"jurisdiction":[{"coding":[{"system":"urn:iso:std:iso:3166","code":"CR","display":"Costa Rica"}]}],"structure":[{"url":"http://hl7.org/fhir/5.0/StructureDefinition/PractitionerRole","mode":"source","alias":"PractitionerRole"},{"url":"http://hl7.org/fhir/4.0/StructureDefinition/PractitionerRole","mode":"target","alias":"PractitionerRoleR4"}],"import":["https://hl7.or.cr/fhir/ph4h/StructureMap/CRComun"],"group":[{"name":"CRPractitionerRoleToIPS","typeMode":"none","input":[{"name":"src","type":"PractitionerRole","mode":"source"},{"name":"tgt","type":"PractitionerRoleR4","mode":"target"}],"rule":[{"name":"id","source":[{"context":"src","element":"id","variable":"v"}],"target":[{"context":"tgt","contextType":"variable","element":"id","transform":"copy","parameter":[{"valueId":"v"}]}]},{"name":"meta","source":[{"context":"src"}],"target":[{"context":"tgt","contextType":"variable","element":"meta","variable":"m"}],"rule":[{"name":"perfil","source":[{"context":"src"}],"target":[{"context":"m","contextType":"variable","element":"profile","transform":"copy","parameter":[{"valueString":"http://hl7.org/fhir/uv/ips/StructureDefinition/PractitionerRole-uv-ips"}]}]}]},{"name":"activo","source":[{"context":"src","element":"active","variable":"v"}],"target":[{"context":"tgt","contextType":"variable","element":"active","transform":"copy","parameter":[{"valueId":"v"}]}]},{"name":"periodo","source":[{"context":"src","element":"period","variable":"p"}],"target":[{"context":"tgt","contextType":"variable","element":"period","variable":"tp"}],"dependent":[{"name":"Periodo","variable":["p","tp"]}]},{"name":"profesional","source":[{"context":"src","element":"practitioner","variable":"r"}],"target":[{"context":"tgt","contextType":"variable","element":"practitioner","variable":"tr"}],"dependent":[{"name":"Referencia","variable":["r","tr"]}]},{"name":"organizacion","source":[{"context":"src","element":"organization","variable":"r"}],"target":[{"context":"tgt","contextType":"variable","element":"organization","variable":"tr"}],"dependent":[{"name":"Referencia","variable":["r","tr"]}]},{"name":"ubicacion","source":[{"context":"src","element":"location","variable":"r"}],"target":[{"context":"tgt","contextType":"variable","element":"location","variable":"tr"}],"dependent":[{"name":"Referencia","variable":["r","tr"]}]},{"name":"profesion","source":[{"context":"src","element":"code","variable":"c","condition":"coding.where(system = 'https://hl7.or.cr/fhir/terminology/CodeSystem/cr-profesion-salud').exists()"}],"target":[{"context":"tgt","contextType":"variable","element":"code","variable":"tc"}],"rule":[{"name":"codings","source":[{"context":"c","element":"coding","variable":"sc","condition":"system = 'https://hl7.or.cr/fhir/terminology/CodeSystem/cr-profesion-salud'"}],"rule":[{"name":"cr","source":[{"context":"sc"}],"target":[{"context":"tc","contextType":"variable","element":"coding","variable":"t"}],"dependent":[{"name":"Codificacion","variable":["sc","t"]}]},{"name":"isco08","source":[{"context":"sc"}],"target":[{"context":"tc","contextType":"variable","element":"coding","transform":"translate","parameter":[{"valueId":"sc"},{"valueString":"https://hl7.or.cr/fhir/terminology/ConceptMap/cr-profesion-salud-isco08"},{"valueString":"Coding"}]}]}]},{"name":"text","source":[{"context":"c","element":"text","variable":"v"}],"target":[{"context":"tc","contextType":"variable","element":"text","transform":"copy","parameter":[{"valueId":"v"}]}]}]},{"name":"especialidad","source":[{"context":"src","element":"specialty","variable":"s"}],"target":[{"context":"tgt","contextType":"variable","element":"specialty","variable":"ts"}],"dependent":[{"name":"Concepto","variable":["s","ts"]}]},{"name":"contactoGeneral","source":[{"context":"src","element":"contact","variable":"c","condition":"purpose.exists().not()"}],"rule":[{"name":"telecom","source":[{"context":"c","element":"telecom","variable":"t"}],"target":[{"context":"tgt","contextType":"variable","element":"telecom","variable":"tt"}],"dependent":[{"name":"Telecom","variable":["t","tt"]}]}]}]}]}
]]>