Generated Narrative: StructureMap SubjectOfCare-Patient #xD; map "https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureMap/SubjectOfCare-Patient" = "SubjectOfCareToPatient"#xD; #xD; uses "https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/MODS-SubjectOfCare" alias SubjectOfCare as source#xD; uses "https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/MODS-Patient" alias Patient as target#xD; #xD; group Patient(source src : SubjectOfCare, target tgt : Patient) {#xD; src -> tgt.id = evaluate(src, id) "setPatientId";#xD; src.demographics as demographics, demographics.sex as sex, sex.code as sexCode then {#xD; src -> src.sex = create('Coding') as sxvt then {#xD; src -> sxvt.code = sexCode "12f54fdb-c9a1-44f2-b149-2851a8498972";#xD; src -> sxvt.system = 'https://data.digitisingsocialcare.co.uk/mods/v1/person-sex' "28b599b2-7388-4c05-9bd3-9e1ac3600d6b";#xD; src -> tgt.extension as birthSexExt then {#xD; src -> birthSexExt.url = 'https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-BirthSex' "f45ec68e-5c48-4d02-a472-77f2a8c0353e";#xD; src -> birthSexExt.valueCodeableConcept = translate(sxvt, 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/ConceptMap/MODS-FHIRBirthSex-1', 'CodeableConcept') "09a0ed80-3a67-45c3-a335-f684139b6f9d";#xD; } "7c94959c-4e8f-4579-85e4-0a9c6969d7eb";#xD; } "0dc8772f-6222-424b-b00a-3b9b70b69144";#xD; } "setPatientBirthSex";#xD; src.demographics as demographics, demographics.ethnicity as ethnicity then {#xD; src -> tgt.extension as ethnicityExt then {#xD; src -> ethnicityExt.url = 'https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-EthnicCategory' "773950dd-a9af-4437-81a1-96879fec04f7";#xD; src -> ethnicityExt.valueCodeableConcept as ethnicCategory then {#xD; src -> ethnicCategory.coding as coding then {#xD; src -> coding.system = 'https://fhir.hl7.org.uk/CodeSystem/UKCore-EthnicCategoryEngland' "ee22b11d-c32f-4d03-b720-462434d4c6ef";#xD; src -> coding.code = evaluate(ethnicity, code) "f784da5d-fcd0-4751-87a2-240d47f91abb";#xD; src -> coding.display = evaluate(ethnicity, display) "a37853df-11f7-4f62-8619-62109fc7ebb4";#xD; } "94cdead7-7123-4fa8-bc64-e3eecfc2ebc8";#xD; } "3cb3b1f5-31f6-4688-8c5e-1accaf03e227";#xD; } "42424e23-d610-4292-9e36-7776de3eb252";#xD; } "setPatientEthnicity";#xD; src.demographics as demographics, demographics.religion as religion then {#xD; src -> tgt.extension as religionExt then {#xD; src -> religionExt.url = 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/Extension-MODS-PersonReligiousAffiliation' "d688851c-e295-439e-b79e-1266c33194ec";#xD; src -> religionExt.valueCodeableConcept as ethnicCategory then {#xD; src -> ethnicCategory.coding as coding then {#xD; src -> coding.system = 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/CodeSystem/MODS-PersonReligionCode-1' "ea6319ea-7256-4108-9551-920044991ca2";#xD; src -> coding.code = evaluate(religion, code) "6eeccb2e-3d54-4122-addd-4f3c162296ad";#xD; src -> coding.display = evaluate(religion, display) "9e796800-83ce-45c7-a2ae-342deec2c691";#xD; } "4e52cbe3-0140-406c-8fe6-aaf2c8034bad";#xD; } "97edf42d-49ee-4f0b-8a21-4920359a151a";#xD; } "899b03b8-f7d0-4b4d-8a37-0d3a9d8675e9";#xD; } "setPatientReligion";#xD; src.demographics as demographics, demographics.sexualOrientation as sexualOrientation then {#xD; src -> tgt.extension as sexualOrientationExt then {#xD; src -> sexualOrientationExt.url = 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/Extension-MODS-PersonSexualOrientation' "6d66366f-855b-4096-b448-b10b3180db64";#xD; src -> sexualOrientationExt.valueCodeableConcept as sexualOrientationCode then {#xD; src -> sexualOrientationCode.coding as coding then {#xD; src -> coding.system = 'http://snomed.info/ct' "46574c71-8dfd-4ace-bcc3-86370ce64384";#xD; src -> coding.code = evaluate(sexualOrientation, code) "5764fa99-9bcf-4bee-bba7-90b1724d2b9b";#xD; src -> coding.display = evaluate(sexualOrientation, display) "70b4c68c-4245-4fad-be88-0a76ba589613";#xD; } "815cf457-a5ed-4738-9c91-84aa10cb7753";#xD; } "80452a30-f9d0-4e94-aff3-7c0ac367e0b6";#xD; } "d8cd91bf-b532-4711-a661-0c81cf639852";#xD; } "setPatientSexualOrientation";#xD; src -> tgt.name as name then {#xD; src -> name.given = evaluate(src, name.given) "af5e2cb8-1b4c-4397-9d60-7bdb78b337c4";#xD; src -> name.family = evaluate(src, name.family) "3e68a297-14b1-48b2-a010-6939ab06d8eb";#xD; } "setPatientName";#xD; src.identification -> tgt.identifier as identifier then {#xD; src -> identifier.use = 'official' "f650311b-f393-470c-9307-4c7c59f11028";#xD; src -> identifier.system = 'https://fhir.nhs.uk/Id/nhs-number' "61dab28e-8dbf-4baf-8231-a01559e4f2b4";#xD; src -> identifier.value = evaluate(src, identification.nhsNumber.value) "ebee4041-7917-4064-a10a-d082fc81d15f";#xD; src -> identifier.extension as extension then {#xD; src -> extension.url = 'https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus' "2bb38019-8fbe-4074-bbb8-11c8bf1bb8c3";#xD; src -> extension.valueCodeableConcept as cc then {#xD; src -> cc.coding as coding then {#xD; src -> coding.system = 'https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatusEngland' "52e1f37e-f2ac-437c-bae4-68031e926b30";#xD; src -> coding.code = evaluate(src, identification.nhsNumber.statusIndicator.code) "7e4e69ec-ea3a-4077-a8e2-2a89df53275e";#xD; src -> coding.display = evaluate(src, identification.nhsNumber.statusIndicator.display) "8d88f096-cca5-42cb-9f35-8a4b423aace7";#xD; } "5743fbc8-69d6-4d4a-9f8d-7f9da940ee8f";#xD; } "87cc812d-f5be-4b00-96fd-3aa079112464";#xD; } "400a81ad-d0c5-4689-8f8b-72d4adfa8c0c";#xD; } "setPatientNHSNumber";#xD; src.identification as identification, identification.otherIdentifier as otherId then {#xD; src -> tgt.identifier as id then {#xD; src -> id.system = evaluate(otherId, system) "ea8c660c-6ff3-436a-bcbb-92b4c70627bd";#xD; src -> id.value = evaluate(otherId, value) "a960df19-3667-4a5c-91b3-77329f90ff7f";#xD; } "7bf73750-8d66-4b0b-a2e5-016b1d413db8";#xD; } "setOtherPatientIdentifier";#xD; src.demographics -> tgt.birthDate = evaluate(src, demographics.dateOfBirth) "setPatientBirthDate";#xD; src.demographics as demographics, demographics.genderIdentity as genderIdentity, genderIdentity.code as genderIdentityCode then {#xD; src -> src.genderIdentity = create('Coding') as givt then {#xD; src -> givt.code = genderIdentityCode "7eaf91de-2b92-4406-93a6-d8344bedd7d9";#xD; src -> givt.system = 'https://data.digitisingsocialcare.co.uk/mods/v1/person-gender-identity' "493d4186-2aeb-4ef6-b0b6-a3939cb55b2e";#xD; src -> tgt.gender = translate(givt, 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/ConceptMap/MODS-FHIRGenderIdentity-1', 'code') "d8b46278-a8ac-42b6-9c02-64d4f81506ed";#xD; } "bcf22250-f89a-4c50-9257-7169766b8d74";#xD; } "setPatientGender";#xD; src.address as address where $this.country.empty().not() -> tgt.address as addr then {#xD; src -> addr.line = evaluate(address, addressEntry1) "052996ec-1691-4ee1-bae1-aad872f18e50";#xD; src -> addr.line = evaluate(address, addressEntry2) "d960a076-5a77-4852-8e9b-22c153ec1608";#xD; src -> addr.line = evaluate(address, addressEntry3) "20f10d92-378f-4381-a172-f4d61041be24";#xD; src -> addr.line = evaluate(address, addressEntry4) "69ff48cd-56c0-43a5-b24f-694b30e6e53d";#xD; src -> addr.postalCode = evaluate(address, postCode) "ce7ee804-6c31-486e-9551-e21a2348d482";#xD; src -> addr.country = evaluate(address, country.display) "3c074e89-367e-480f-8f8e-f7f7ab0f8c3d";#xD; src -> addr.extension as extension then {#xD; src -> extension.url = 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/Extension-MODS-AddressCountry' "57fb99db-9eda-49ea-acf2-fb8187836bb8";#xD; src -> extension.valueCoding as countryCoding then {#xD; src -> countryCoding.system = 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/CodeSystem/MODS-Country-1' "0769fc02-0f6a-43b9-b9a3-48578581e3f6";#xD; src -> countryCoding.code = evaluate(address, country.code) "31eefb2b-ceb7-4ba0-ab52-52cbe05a8e66";#xD; src -> countryCoding.display = evaluate(address, country.display) "fc16ddb7-2157-42f8-b889-1131e3553339";#xD; } "6a8a1302-1f1a-4bdc-99e8-0b0f7f85e89a";#xD; } "8fd46de5-b422-4f12-b3b3-cba3fafbac29";#xD; } "setExtendedPatientAddress";#xD; src.address as address where $this.country.empty() -> tgt.address as addr then {#xD; src -> addr.line = evaluate(address, addressEntry1) "4d2f121a-188c-40e6-9614-22c5f7d76416";#xD; src -> addr.line = evaluate(address, addressEntry2) "de9197f4-e104-495c-94ec-53d9f3a6b9a5";#xD; src -> addr.line = evaluate(address, addressEntry3) "abab6c74-ea72-48fd-a5aa-04a402a62c84";#xD; src -> addr.line = evaluate(address, addressEntry4) "a84dff0f-cc20-43a8-a22b-81a4f3651469";#xD; src -> addr.postalCode = evaluate(address, postCode) "39ad83b9-6686-43f4-a39b-e5b8ddc6107a";#xD; } "setPatientAddress";#xD; src.demographics as demographics, demographics.maritalStatus as maritalStatus, maritalStatus.code as maritalStatusCode, maritalStatus.display as maritalStatusDisplay then {#xD; src -> tgt.maritalStatus = create('CodeableConcept') as msvt, msvt.coding = create('Coding') as maritalStatusCoding then {#xD; src -> maritalStatusCoding.system = 'https://fhir.hl7.org.uk/CodeSystem/UKCore-PersonMaritalStatusEngland' "c12aa5a7-b417-45fc-ac09-162210d77d09";#xD; src -> maritalStatusCoding.code = maritalStatusCode "fae753e2-ff1b-42e9-97a9-4dbcd2957561";#xD; src -> maritalStatusCoding.display = maritalStatusDisplay "9f606955-a2e0-4dc0-aed1-500f37c24172";#xD; } "18847a65-6091-4725-bcba-0df2596bb4ae";#xD; } "setPatientMaritalStatus";#xD; src.demographics as demographics, demographics.firstLanguage as firstLanguage then {#xD; src -> tgt.communication as communication, communication.language as firstLang, firstLang.coding as firstLangCoding then {#xD; src -> communication.preferred = true "bed51a00-eb30-4ff3-8086-b0d58609c75b";#xD; src -> firstLangCoding.system = 'urn:ietf:bcp:47' "a7e9779a-24a9-4da5-8265-80673d15e2ad";#xD; src -> firstLangCoding.code = evaluate(firstLanguage, code) "bb9d8368-beb6-4333-97ca-9203ded83897";#xD; src -> firstLangCoding.display = evaluate(firstLanguage, display) "cb5693f7-13f0-4af5-a34f-12d121960e8f";#xD; } "1df74ddf-38a3-47a3-919c-07542f8d37c9";#xD; } "setFirstLanguage";#xD; src.demographics as demographics, demographics.otherLanguage as otherLanguage then {#xD; src -> tgt.communication as communication, communication.language as otherLang, otherLang.coding as otherLangCoding then {#xD; src -> otherLangCoding.system = 'urn:ietf:bcp:47' "05526fb0-2876-4de3-90c8-596863bc629e";#xD; src -> otherLangCoding.code = evaluate(otherLanguage, code) "1db24501-dd9e-4bf4-abe6-40b21ab3dbdb";#xD; src -> otherLangCoding.display = evaluate(otherLanguage, display) "18eebe14-91cb-4af7-83a0-ca3203c329e5";#xD; } "c03baae3-2132-402f-b3a2-7dc075eb10a7";#xD; } "setOtherLanguage";#xD; src.demographics as demographics, demographics.interpreterRequired as interpreterRequired where $this!='Unknown' then {#xD; src -> tgt.extension as interpreterRequiredExt then {#xD; src -> interpreterRequiredExt.url = 'http://hl7.org/fhir/StructureDefinition/patient-interpreterRequired' "18f097bb-5fe2-4d57-bd97-1d584089bee8";#xD; src -> interpreterRequiredExt.valueBoolean = evaluate(interpreterRequired, toBoolean()) "84e1ffdb-a9f2-483b-a344-298fc1c60941";#xD; } "05a16107-f6ee-4bb9-baa7-bd918d644fe9";#xD; } "setInterpreterRequired";#xD; src.contactDetails as emailContactDetails then {#xD; emailContactDetails.emailAddressDetails as emailAddressDetails -> tgt.telecom as telecom then {#xD; src -> telecom.system = 'email' "4d4881e6-7cdf-4f85-a5d0-5c914233ce96";#xD; src -> telecom.value = evaluate(emailAddressDetails, emailAddress) "eb0cbea1-2105-4600-ae94-2e3be07fc6f6";#xD; src -> telecom.rank = evaluate(emailAddressDetails, preferredOrder) "5bc65900-f82b-4185-a783-601c8431ef38";#xD; src -> src.emailAddressType = create('Coding') as etvt then {#xD; src -> etvt.system = 'https://data.digitisingsocialcare.co.uk/mods/v1/person-email-address-type' "ce4e1cd4-7532-4492-b253-c3f27d6b6f70";#xD; src -> etvt.code = evaluate(emailAddressDetails, type.code) "5cd2b05d-ed47-4f64-ac50-f304074516bb";#xD; src -> telecom.use = translate(etvt, 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/ConceptMap/MODS-FHIREmailContactPointUse-1', 'code') "aa3d176b-d3e2-4bc9-87db-7c5c7957e6af";#xD; src -> telecom.extension as emailTypeExt then {#xD; src -> emailTypeExt.url = 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/Extension-MODS-PersonEmailAddressType' "3a58053c-81a5-437e-89ff-c8b85f0d966d";#xD; src -> emailTypeExt.valueCoding as emailTypeValueCoding then {#xD; src -> emailTypeValueCoding.system = 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/CodeSystem/MODS-EmailAddressType-1' "86ebc2b8-a82b-4c28-aade-a77740ab69a2";#xD; src -> emailTypeValueCoding.code = evaluate(emailAddressDetails, type.code) "c81349e0-dced-4faf-88aa-21bc31f5ea57";#xD; src -> emailTypeValueCoding.display = evaluate(emailAddressDetails, type.display) "d09a4460-ff61-4328-9ff4-77da3dfc04ec";#xD; } "39249744-3872-4f33-9017-d163789b012f";#xD; } "d7aab36b-8d44-4f16-b901-6233170a38c8";#xD; } "0782c4df-205a-4002-8c7d-fc21c7584185";#xD; } "setPatientEmailAddress";#xD; src.contactDetails as telephoneContactDetails then {#xD; telephoneContactDetails.telephoneDetails as telephoneNumberDetails -> tgt.telecom as telecom then {#xD; src -> telecom.system = 'phone' "c6d33ec7-c70e-4c9f-9ad0-6914f24f699f";#xD; src -> telecom.value = evaluate(telephoneNumberDetails, telephoneNumber) "b9f52b34-629a-435d-93ad-3f599aec02b0";#xD; src -> telecom.rank = evaluate(telephoneNumberDetails, preferredOrder) "f7001e0a-0b20-4fb0-a5b4-3655f3f8ade2";#xD; src -> src.telephoneType = create('Coding') as ttvt then {#xD; src -> ttvt.system = 'https://data.digitisingsocialcare.co.uk/mods/v1/person-telephone-type' "0c7032f0-039c-4798-8e6e-001023d8d144";#xD; src -> ttvt.code = evaluate(telephoneNumberDetails, type.code) "0a220dbe-8a56-4cc7-bb94-d045a78033ed";#xD; src -> telecom.use = translate(ttvt, 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/ConceptMap/MODS-FHIRTelephoneContactPointUse-1', 'code') "b3153b67-1cff-4e0a-a77f-35c5179631d1";#xD; } "9718e4fe-cfd9-44bf-a420-9e2b82281250";#xD; src -> telecom.extension as telephoneTypeExt then {#xD; src -> telephoneTypeExt.url = 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/Extension-MODS-PersonTelephoneNumberType' "badc5b90-ff0a-40c3-9b7a-c4f93e4397da";#xD; src -> telephoneTypeExt.valueCoding as telephoneNumberTypeCoding then {#xD; src -> telephoneNumberTypeCoding.system = 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/CodeSystem/MODS-TelephoneNumberType-1' "583667ab-3614-4889-b05f-ffa8b1938396";#xD; src -> telephoneNumberTypeCoding.code = evaluate(telephoneNumberDetails, type.code) "185e4cd2-3645-479e-bb5f-992e04072e78";#xD; src -> telephoneNumberTypeCoding.display = evaluate(telephoneNumberDetails, type.display) "04a7e832-1c9c-4ce8-82ae-6b25610d228a";#xD; } "0cc72ee8-8d18-48f4-8351-c33663b3f2b4";#xD; } "c25031dd-b40e-4d88-bdc7-26031cd75721";#xD; } "setPatientTelephone";#xD; src.deathDetails as deathDetails then {#xD; src -> tgt.extension as deathDetailsExt then {#xD; src -> deathDetailsExt.url = 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/Extension-MODS-PersonDeathDetails' "93f728a1-46ae-4b62-a111-9f1a1542319f";#xD; src -> deathDetailsExt.extension as deathCauseIdentificationMethodExt then {#xD; src -> deathCauseIdentificationMethodExt.url = 'deathCauseIdentificationMethod' "ecb3afd8-6950-4b82-aeed-dbf572e4ef8c";#xD; src -> deathCauseIdentificationMethodExt.valueCoding as deathCauseIdentificationMethodCoding then {#xD; src -> deathCauseIdentificationMethodCoding.system = 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/CodeSystem/MODS-DeathCauseIdentificationMethod-1' "7488a2ce-0f7b-4068-8728-1a5035439a66";#xD; src -> deathCauseIdentificationMethodCoding.code = evaluate(deathDetails, deathCauseIdentificationMethod.code) "1858bd7a-ed06-44c5-b6c9-a7c45efe6b43";#xD; src -> deathCauseIdentificationMethodCoding.display = evaluate(deathDetails, deathCauseIdentificationMethod.display) "e8249e6a-a93a-4506-89a2-3215a9e5cabd";#xD; } "b5ef50fe-cd3b-4a81-afeb-dae0f97d31e8";#xD; } "setDeathCauseIdentificationMethod";#xD; src -> deathDetailsExt.extension as deathLocationTypeExt then {#xD; src -> deathLocationTypeExt.url = 'deathLocationType' "e711df8b-795e-4873-8765-a7021d9945aa";#xD; src -> deathLocationTypeExt.valueCoding as deathLocationTypeCoding then {#xD; src -> deathLocationTypeCoding.system = 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/CodeSystem/MODS-DeathLocationTypeCode-1' "b40253f7-de7a-4410-8b20-31deafc56194";#xD; src -> deathLocationTypeCoding.code = evaluate(deathDetails, deathLocationType.code) "f3af96e1-7da1-42cb-be0e-c916a5dd9c4d";#xD; src -> deathLocationTypeCoding.display = evaluate(deathDetails, deathLocationType.display) "e95a65b4-6045-419a-b383-9fba0489bfab";#xD; } "3f48fd6b-2e9c-415c-a08b-3f99295f3dc3";#xD; } "setDeathLocationType";#xD; src -> deathDetailsExt.extension as personDeathLocationDiscussedExt then {#xD; src -> personDeathLocationDiscussedExt.url = 'preferredLocationOfDeathDiscussed' "5bcce75e-047a-478e-a197-0f7bc3858cc5";#xD; src -> personDeathLocationDiscussedExt.valueCoding as personDeathLocationDiscussedCoding then {#xD; src -> personDeathLocationDiscussedCoding.system = 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/CodeSystem/MODS-PersonDeathLocationDiscussedIndicator-1' "93fa8f62-0410-4b54-a63c-ca42234dd012";#xD; src -> personDeathLocationDiscussedCoding.code = evaluate(deathDetails, preferredDeathLocationDiscussed.code) "79988ee1-42b3-45da-9ba1-ea446dc6b1e0";#xD; src -> personDeathLocationDiscussedCoding.display = evaluate(deathDetails, preferredDeathLocationDiscussed.display) "12a7826e-2315-43b2-a1e6-684d15454023";#xD; } "3939f746-f1d4-4774-9528-9c7a23a0c793";#xD; } "setPersonDeathLocationDiscussed";#xD; src -> deathDetailsExt.extension as deathNotAtPreferredLocationReasonExt then {#xD; src -> deathNotAtPreferredLocationReasonExt.url = 'deathNotAtPreferredLocationReason' "572482e6-799b-4ff1-92e4-93f94d69e7b9";#xD; src -> deathNotAtPreferredLocationReasonExt.valueCoding as deathNotAtPreferredLocationReasonCoding then {#xD; src -> deathNotAtPreferredLocationReasonCoding.system = 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/CodeSystem/MODS-DeathNotAtPreferredLocationReasonCode-1' "9e72568c-04a7-433b-9625-006fba7bc61b";#xD; src -> deathNotAtPreferredLocationReasonCoding.code = evaluate(deathDetails, deathNotAtPreferredLocationReason.code) "cc818b64-7060-4bb2-9ff2-ac5e09251d4e";#xD; src -> deathNotAtPreferredLocationReasonCoding.display = evaluate(deathDetails, deathNotAtPreferredLocationReason.display) "c75a9499-9ab5-4df2-aba7-92845bec0b69";#xD; } "4d0a0087-aecd-4fb7-8844-32492c547a9e";#xD; } "setDeathNotAtPreferredLocationReason";#xD; src -> deathDetailsExt.extension as personAtRiskOfUnexpectedDeathExt then {#xD; src -> personAtRiskOfUnexpectedDeathExt.url = 'personAtRiskOfUnexpectedDeath' "746f2b04-883d-4d6b-91a9-51795492abbc";#xD; src -> personAtRiskOfUnexpectedDeathExt.valueCoding as personAtRiskOfUnexpectedDeathCoding then {#xD; src -> personAtRiskOfUnexpectedDeathCoding.system = 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/CodeSystem/MODS-PersonAtRiskOfUnexpectedDeathIndicator-1' "ff5dfb06-7d25-4c84-b436-22d361ce1383";#xD; src -> personAtRiskOfUnexpectedDeathCoding.code = evaluate(deathDetails, personAtRiskOfUnexpectedDeath.code) "187a2f94-2b54-412f-a996-6e9c91bb5a78";#xD; src -> personAtRiskOfUnexpectedDeathCoding.display = evaluate(deathDetails, personAtRiskOfUnexpectedDeath.display) "620d1be1-58d8-49e6-b602-61cadb83b8d0";#xD; } "114d50f3-dd09-487e-9195-529e22f2291d";#xD; } "setPersonAtRiskOfUnexpectedDeath";#xD; src -> deathDetailsExt.extension as personDateOfDeathExt then {#xD; src -> personDateOfDeathExt.url = 'personDateOfDeath' "aa547937-2ffc-411c-b1de-52b7ad7750fb";#xD; src -> personDateOfDeathExt.valueDate = evaluate(deathDetails, personDeathDate) "265584c4-4599-410f-98d3-8e4590716df4";#xD; } "setPersonDateOfDeath";#xD; src -> deathDetailsExt.extension as personTimeOfDeathExt then {#xD; src -> personTimeOfDeathExt.url = 'personTimeOfDeath' "772fe8bb-1a7a-4c49-a10c-553d053ba4a5";#xD; src -> personTimeOfDeathExt.valueTime = evaluate(deathDetails, personDeathTime) "76ca9939-662f-4cda-8172-f99749504fb8";#xD; } "setPersonDateOfTime";#xD; } "d4e07546-6ca7-4360-bad9-4bcc19087a12";#xD; src -> tgt.deceasedDateTime = evaluate(deathDetails, personDateOfDeath) "33b525b5-d78d-4852-a1bb-d73e34369f7b";#xD; } "setDeathDetails";#xD; src.careProvider as careProvider -> tgt.extension as careProviderExt then {#xD; src -> careProviderExt.url = 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/Extension-MODS-PersonCareProvider' "e9d10ffe-08ca-465f-893e-987459e2daba";#xD; src -> careProviderExt.valueReference as careProviderReference then {#xD; src -> careProviderReference.reference = evaluate(careProvider, 'Organization/'+id) "cb2bac38-a6b8-4590-800d-3f46668c1844";#xD; src -> careProviderReference.display = evaluate(careProvider, display) "788592f4-5554-427c-a425-fd00ce894e8f";#xD; src -> careProviderReference.identifier as careProviderReferenceIdentifier then {#xD; src -> careProviderReferenceIdentifier.value = evaluate(careProvider, id) "7c1100b9-efee-4ff5-9a9b-43810e817579";#xD; } "50be655c-59ab-4b92-bce5-c97e5440cb04";#xD; } "a3af97ae-e1cd-4ecc-a2c4-a400d0686cbe";#xD; } "setPatientManagingOrganization";#xD; src.generalPractice as generalPractice -> tgt.generalPractitioner as generalPractitioner then {#xD; src -> generalPractitioner.identifier as gpIdentifier then {#xD; src -> gpIdentifier.use = 'official' "164aa211-8322-4ba7-a5ed-6e07f850a126";#xD; src -> gpIdentifier.system = 'https://fhir.nhs.uk/Id/ods-organization-code' "0cfd2059-ce1f-40da-b802-8ed34c728ff4";#xD; src -> gpIdentifier.value = evaluate(generalPractice, id) "1d0b4a06-786f-4fbf-a2a1-4be085f24638";#xD; } "setPatientGeneralPractitionerIdentifier";#xD; src -> generalPractitioner.display = evaluate(generalPractice, display) "27f7decc-b3f6-404c-bc68-45b06a8a170f";#xD; } "setPatientGeneralPractitioner";#xD; };#xD; };#xD; }#xD; #xD;
Synanetics Ltd on behalf of DHSC/Social Care Interoperability Platform
United Kingdom of Great Britain and Northern Ireland