Generated Narrative: StructureMap ProxyForSubjectOfCare-RelatedPerson #xD; map "https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureMap/ProxyForSubjectOfCare-RelatedPerson" = "ProxyForSubjectOfCareToRelatedPerson"#xD; #xD; uses "https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/MODS-ProxyForSubjectOfCare" alias Proxy as source#xD; uses "https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/MODS-RelatedPerson" alias RelatedPerson as target#xD; #xD; group RelatedPerson(source src : Proxy, target tgt : RelatedPerson) {#xD; src -> tgt.id = evaluate(src, id) "setRelatedPersonId";#xD; src.organisation as careProvider -> tgt.extension as careProviderExt then {#xD; src -> careProviderExt.url = 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/Extension-MODS-PersonCareProvider' "84e82c22-a3b9-499d-94e4-65cbc8cf09bd";#xD; src -> careProviderExt.valueReference as careProviderReference then {#xD; src -> careProviderReference.reference = evaluate(careProvider, 'Organization/'+id) "10f19978-1a3b-4330-a464-e00e74022603";#xD; src -> careProviderReference.display = evaluate(careProvider, display) "9e1f7105-7878-4767-9ba7-b34630c3cc19";#xD; src -> careProviderReference.identifier as careProviderReferenceIdentifier then {#xD; src -> careProviderReferenceIdentifier.value = evaluate(careProvider, id) "fe9135e9-76d2-46b0-8ed6-5fbe0978c07b";#xD; } "b5a04295-4c12-4a37-880b-c9ddf5df3891";#xD; } "80515323-a2f5-4454-a056-a66f29d8a9bb";#xD; } "setRelatedPersonOrganization";#xD; src.subjectOfCare as subjectOfCare then {#xD; src -> tgt.patient as patient then {#xD; src -> patient.reference = evaluate(subjectOfCare, 'Patient/'+id) "8c477486-b778-4ec4-81dd-561aae6b2c5a";#xD; src -> patient.display = evaluate(subjectOfCare, display) "a0061ba6-78b4-4dd6-99cc-91a9b04bc2a7";#xD; } "eea3c368-1db6-4d5e-9f38-7e1d597a1d75";#xD; } "setRelatedPersonPatient";#xD; src.relationship as relationship -> tgt.relationship as rel then {#xD; src -> rel.coding as coding then {#xD; src -> coding.system = 'https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole' "86fbb967-22b7-48f7-95be-064d96767f09";#xD; src -> coding.code = evaluate(relationship, code) "68c419db-fdd1-4e3c-9d46-8464cf1a3d31";#xD; src -> coding.display = evaluate(relationship, display) "ebafb674-ab9d-4bcf-a5ea-a3b1c07c03f3";#xD; } "setRelationship";#xD; src -> tgt.name as name then {#xD; src -> name.given = evaluate(src, name.given) "2a1ca90f-461f-49e7-bbba-114fdafcb6aa";#xD; src -> name.family = evaluate(src, name.family) "b4b5a11f-de18-484d-a198-9efccb601ebb";#xD; } "setRelatedPersonName";#xD; src.contactDetails as emailContactDetails then {#xD; emailContactDetails.emailAddressDetails as emailAddressDetails -> tgt.telecom as telecom then {#xD; src -> telecom.system = 'email' "73d0b81c-c56e-4233-a5c3-91219197176f";#xD; src -> telecom.value = evaluate(emailAddressDetails, emailAddress) "501d8d52-d80b-4ded-b721-067d3b3764b8";#xD; src -> telecom.rank = evaluate(emailAddressDetails, preferredOrder) "935aec0d-6230-42b6-85f8-e50b703261f7";#xD; src -> src.emailAddressType = create('Coding') as etvt then {#xD; src -> etvt.system = 'https://data.digitisingsocialcare.co.uk/mods/v1/person-email-address-type' "8334eb82-2e66-41a1-a2f6-5a9f9b348fcc";#xD; src -> etvt.code = evaluate(emailAddressDetails, type.code) "82d1af1f-91c7-4fa4-ade5-074f7c47bca0";#xD; src -> telecom.use = translate(etvt, 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/ConceptMap/MODS-FHIREmailContactPointUse-1', 'code') "64b1a04f-d0d0-41d9-b60c-484b1bf2a7f4";#xD; src -> telecom.extension as emailTypeExt then {#xD; src -> emailTypeExt.url = 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/Extension-MODS-PersonEmailAddressType' "93979724-f372-4d49-8363-f0c4529a5a28";#xD; src -> emailTypeExt.valueCoding as emailTypeValueCoding then {#xD; src -> emailTypeValueCoding.system = 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/CodeSystem/MODS-EmailAddressType-1' "5e3ae7d6-7344-44e1-8cb4-b459747147cb";#xD; src -> emailTypeValueCoding.code = evaluate(emailAddressDetails, type.code) "0d51bd5f-f840-4616-9f9c-79cc9964bc1b";#xD; src -> emailTypeValueCoding.display = evaluate(emailAddressDetails, type.display) "27622a7c-6dc7-4e13-aba5-c71def50d96f";#xD; } "cff5ff28-6a4e-413d-a852-2174e35c516f";#xD; } "356b17ef-0162-4897-8b72-2d0b2c33993b";#xD; } "0c837111-e697-409b-b988-d9fc3c263b1e";#xD; } "setRelatedPersonEmailAddress";#xD; src.contactDetails as telephoneContactDetails then {#xD; telephoneContactDetails.telephoneDetails as telephoneNumberDetails -> tgt.telecom as telecom then {#xD; src -> telecom.system = 'phone' "b4d6b8e8-f286-4f97-aeeb-d1907ca0ac40";#xD; src -> telecom.value = evaluate(telephoneNumberDetails, telephoneNumber) "89d733a1-3d42-4671-9fec-aadc810584b8";#xD; src -> telecom.rank = evaluate(telephoneNumberDetails, preferredOrder) "564c94bd-4b0c-4762-934b-03905504f4a2";#xD; src -> src.telephoneType = create('Coding') as ttvt then {#xD; src -> ttvt.system = 'https://data.digitisingsocialcare.co.uk/mods/v1/person-telephone-type' "bc7fe429-0b68-4378-8641-e5b8e1ed57e0";#xD; src -> ttvt.code = evaluate(telephoneNumberDetails, type.code) "b4a55359-5287-47fb-8c2f-3075238ee200";#xD; src -> telecom.use = translate(ttvt, 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/ConceptMap/MODS-FHIRTelephoneContactPointUse-1', 'code') "9297bf96-fea5-4b12-b841-b3dc14c391b2";#xD; } "bea44f63-f600-4ec1-aa98-9d55ebdc39d7";#xD; src -> telecom.extension as telephoneTypeExt then {#xD; src -> telephoneTypeExt.url = 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/Extension-MODS-PersonTelephoneNumberType' "59db6052-36d2-42d4-88a9-1ad7487930c3";#xD; src -> telephoneTypeExt.valueCoding as telephoneNumberTypeCoding then {#xD; src -> telephoneNumberTypeCoding.system = 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/CodeSystem/MODS-TelephoneNumberType-1' "bafcc922-3810-4961-9cf8-822323334ea4";#xD; src -> telephoneNumberTypeCoding.code = evaluate(telephoneNumberDetails, type.code) "c0196cf7-00a6-4cbd-9092-3677be5b4e41";#xD; src -> telephoneNumberTypeCoding.display = evaluate(telephoneNumberDetails, type.display) "d23489af-6751-4a08-8263-103266bac33b";#xD; } "6ca9449f-c52d-45a5-8940-008d22528a1c";#xD; } "8a47a3dc-74aa-4d7e-99a5-b06eb1508ab6";#xD; } "setRelatedPersonTelephone";#xD; src.address as address where $this.country.empty().not() -> src.addresses as addresses then {#xD; addresses as addr then {#xD; address -> addr.line = evaluate(address, addressEntry1) "6a116fbc-5744-4779-90dd-66e559386d59";#xD; address -> addr.line = evaluate(address, addressEntry2) "c3dfdb56-b427-4124-a98d-c1bce19b0dae";#xD; address -> addr.line = evaluate(address, addressEntry3) "035659e3-0c73-4dba-a5a8-4cb3d696fd64";#xD; address -> addr.line = evaluate(address, addressEntry4) "b95916a3-ac59-44b9-80f5-bfe482a00081";#xD; address -> addr.postalCode = evaluate(address, postCode) "d483dfa0-70e6-4fd4-8336-31d4fad5877b";#xD; address -> addr.country = evaluate(address, country.display) "91e4014d-280c-4ea6-89e6-7de5a975ef17";#xD; address -> addr.extension as extension then {#xD; address -> extension.url = 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/Extension-MODS-AddressCountry' "9d87f04c-c43d-4736-b5b8-f622ec1cf2b5";#xD; address -> extension.valueCoding as countryCoding then {#xD; address -> countryCoding.system = 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/CodeSystem/MODS-Country-1' "6cc292ce-9d14-42dc-bbdc-fc24868a5f30";#xD; address -> countryCoding.code = evaluate(address, country.code) "0fd119da-e46b-4ed2-9be1-b549953e30d2";#xD; address -> countryCoding.display = evaluate(address, country.display) "09faf68f-6d11-43ba-a721-0c4a84f6de54";#xD; } "d7b5495b-8db0-4c9c-b081-a22784757a4d";#xD; } "c33a8771-90f6-442b-9f21-683a7f4f1e08";#xD; } "8a05ffe4-c158-4171-aa73-85651dd79ed5";#xD; addresses -> tgt.address "14c1d340-4e47-440f-9f38-9630b7127a81";#xD; } "setRelatedPersonAddressWithCountry";#xD; };#xD; };#xD; };#xD; }#xD; #xD;
Synanetics Ltd on behalf of DHSC/Social Care Interoperability Platform
United Kingdom of Great Britain and Northern Ireland