Generated Narrative: StructureMap Registration-Patient #xD; map "https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureMap/Registration-Patient" = "RegistrationToPatient"#xD; #xD; uses "https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/MODS-SubjectOfCareRegistration" alias Registration as source#xD; uses "https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/MODS-Patient" alias Patient as target#xD; #xD; group RegistrationPatient(source src : Registration, target tgt : Patient) {#xD; src -> tgt.id = evaluate(src, subjectOfCareId) "00e9f63a-468b-4175-abc3-425edb549da1";#xD; src.sex as sex, sex.code as sexCode then {#xD; src -> src.sex = create('Coding') as sxvt then {#xD; src -> sxvt.code = sexCode "c52db195-f186-48a1-933f-6a375e486853";#xD; src -> sxvt.system = 'https://data.digitisingsocialcare.co.uk/mods/v1/person-sex' "128d701d-9bb2-4aa9-a6dc-1ce75928002c";#xD; src -> tgt.extension as birthSexExt then {#xD; src -> birthSexExt.url = 'https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-BirthSex' "8a0d3b39-8704-4f01-b2e6-62eb860f2548";#xD; src -> birthSexExt.valueCodeableConcept = translate(sxvt, 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/ConceptMap/MODS-FHIRBirthSex-1', 'CodeableConcept') "76144650-bd83-480b-ba62-8f1a27bc3d64";#xD; } "9f7da33c-8344-4704-91c2-0b57ef007b68";#xD; } "7d587212-b486-4a2c-b645-57388f72da76";#xD; } "setPatientBirthSex";#xD; src.genderIdentity as genderIdentity then {#xD; src -> tgt.extension as genderIdentityExt then {#xD; src -> genderIdentityExt.url = 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/Extension-MODS-PersonGenderIdentity' "b86ee800-a7b3-4b6c-8b0a-e4b74a8da793";#xD; src -> genderIdentityExt.valueCodeableConcept as genderIdentityCode then {#xD; src -> genderIdentityCode.coding as coding then {#xD; src -> coding.system = 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/CodeSystem/MODS-PersonGenderIdentityCode-1' "471a74e1-4d16-48c3-adb5-6dd9403cdf03";#xD; src -> coding.code = evaluate(genderIdentity, code) "d5ef49e5-6c57-447f-9de2-e055041d7881";#xD; src -> coding.display = evaluate(genderIdentity, display) "e5a014da-130e-4496-a9bd-276391634ab7";#xD; } "9317e171-7bb6-4a17-b555-85e8ae068abe";#xD; } "70d24b7d-08a0-47f8-b0c6-8cd12bc5db69";#xD; } "7cabef6e-d447-4163-a30e-fcaa8d609684";#xD; } "setGenderIdentity";#xD; src.ethnicity as ethnicity then {#xD; src -> tgt.extension as ethnicityExt then {#xD; src -> ethnicityExt.url = 'https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-EthnicCategory' "e0d8ae9b-6278-4eec-9c10-98b3dd3a1817";#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' "1474ddfc-6586-45cc-b540-9c68116b8314";#xD; src -> coding.code = evaluate(ethnicity, code) "b2331ab1-2f78-435a-9edc-f56e4cbbd91e";#xD; src -> coding.display = evaluate(ethnicity, display) "84e9148b-6a7a-4893-a095-4dbf191acd5f";#xD; } "42214afe-5a03-49f4-890b-8ee3b98db43d";#xD; } "0e9fe38e-4162-4245-9c27-403b9c496b7b";#xD; } "ef28cd78-9d21-4ae1-833f-706c456229e9";#xD; } "setPatientEthnicity";#xD; src.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' "17ec9060-a1d9-48bf-b366-727208c2868a";#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' "1d8f0381-738b-4b3f-9a34-ad5092bfa80a";#xD; src -> coding.code = evaluate(religion, code) "7dfb7972-d926-4152-ac31-72600f055196";#xD; src -> coding.display = evaluate(religion, display) "a70f09c6-7e3d-4c16-801f-92643f80701d";#xD; } "f68dbcd8-6074-47e1-860b-e8ee5a635e82";#xD; } "fc88e5fc-2c0f-4bd5-9ac0-834ff55662f0";#xD; } "68091bd6-0439-4363-b00d-22fd5e412d36";#xD; } "setPatientReligion";#xD; src.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' "7c361efe-dab9-400b-b8c0-7156638e315f";#xD; src -> sexualOrientationExt.valueCodeableConcept as sexualOrientationCode then {#xD; src -> sexualOrientationCode.coding as coding then {#xD; src -> coding.system = 'http://snomed.info/ct' "b1e7d3a7-c725-43fd-b1c8-4605003c63dc";#xD; src -> coding.code = evaluate(sexualOrientation, code) "43f81d80-fbea-4d34-9dbc-be6769829e79";#xD; src -> coding.display = evaluate(sexualOrientation, display) "01541caa-5251-4da2-a1bc-b4fec6ca6042";#xD; } "2843a89d-3428-4b03-b6e9-4ef3f5252d4c";#xD; } "5cf21372-9aaf-48c6-a31c-9901eb4c9b7a";#xD; } "f3827207-622c-4204-90fa-7c4932b33a90";#xD; } "setPatientSexualOrientation";#xD; src -> tgt.name as name then {#xD; src -> name.given = evaluate(src, name.given) "33148443-014d-4b2e-9664-91371189e7e8";#xD; src -> name.family = evaluate(src, name.family) "4b733097-8d89-4f65-9f53-2cae271dc983";#xD; } "setPatientName";#xD; src.nhsNumber -> tgt.identifier as identifier then {#xD; src -> identifier.use = 'official' "573aa6d2-e287-4c7f-9384-6ed32cec632b";#xD; src -> identifier.system = 'https://fhir.nhs.uk/Id/nhs-number' "9cd57652-c970-49db-b18f-47fa45fb0a4c";#xD; src -> identifier.value = evaluate(src, nhsNumber.value) "fe123ed3-ce6e-4002-ac19-559779b0a7b3";#xD; src -> identifier.extension as extension then {#xD; src -> extension.url = 'https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus' "9987c016-c7e0-4ba5-b06d-c85de0e59322";#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' "d893cec9-c410-4293-a466-b169183536ec";#xD; src -> coding.code = evaluate(src, nhsNumber.statusIndicator.code) "dd735001-5d09-4a94-8cb1-449e1605b376";#xD; src -> coding.display = evaluate(src, nhsNumber.statusIndicator.display) "d553d674-ecc8-4db5-93aa-e6d02d52e5a8";#xD; } "fad70144-5c22-47f1-b8d9-772bb8d9c10b";#xD; } "2cc64160-b0e1-42b0-bc94-d7205fb7fbf8";#xD; } "fd0f942f-748d-4eba-b3be-2698c0c536c8";#xD; } "setPatientNHSNumber";#xD; src.nationalInsuranceNumber then {#xD; src -> tgt.identifier as id then {#xD; src -> id.system = 'https://fhir.hl7.org.uk/Id/nino' "af99e76d-a473-45df-9554-fab9b6e2db70";#xD; src -> id.value = evaluate(src, nationalInsuranceNumber) "8bb8bee1-c411-4737-a6c4-206df83420bd";#xD; } "d98a25d4-6e0a-436c-88d5-c2aed2a5f808";#xD; } "setNationalInsuranceNumber";#xD; src.otherIdentifier as otherIdentifier then {#xD; src -> tgt.identifier as id then {#xD; src -> id.system = evaluate(otherIdentifier, system) "d347873f-b4bf-4e69-809f-5c2c7ba24d4b";#xD; src -> id.value = evaluate(otherIdentifier, value) "b0d25559-a31f-41d7-9ea9-bcfece6b05a3";#xD; } "f9550172-88f7-406a-bc70-3e9c2a8e1366";#xD; } "setOtherPatientIdentifier";#xD; src.dateOfBirth -> tgt.birthDate "setPatientBirthDate";#xD; src.genderIdentity as genderIdentity, genderIdentity.code as genderIdentityCode then {#xD; src -> src.genderIdentity = create('Coding') as givt then {#xD; src -> givt.code = genderIdentityCode "2c2eb2c2-e116-4813-854b-c0303a8ed669";#xD; src -> givt.system = 'https://data.digitisingsocialcare.co.uk/mods/v1/person-gender-identity' "37db9c93-e35e-41c3-bd16-71f7db7076b6";#xD; src -> tgt.gender = translate(givt, 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/ConceptMap/MODS-FHIRGenderIdentity-1', 'code') "c73e52e2-26db-452e-b753-8dec5de29f62";#xD; } "f52f22ab-1fdc-49cc-80b6-89df56379917";#xD; } "setPatientGender";#xD; src.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' "ab18a1f6-745b-42c4-b400-38e6d05c56d0";#xD; src -> maritalStatusCoding.code = maritalStatusCode "72816b02-924e-4d89-98c7-785d2441d31b";#xD; src -> maritalStatusCoding.display = maritalStatusDisplay "484279ce-793c-4f99-87b6-bf2ff3d8146e";#xD; } "189232f8-2b7d-4a39-9cc6-84adb84f99cc";#xD; } "setPatientMaritalStatus";#xD; src.homeAddress as address where $this.country.empty().not() -> tgt.address as addr then {#xD; src -> addr.line = evaluate(address, addressEntry1) "4fba9702-9a20-4c00-b648-92280ab14dc7";#xD; src -> addr.line = evaluate(address, addressEntry2) "06f68e76-bfd1-45c3-9755-98cf21ec13d6";#xD; src -> addr.line = evaluate(address, addressEntry3) "b92088b6-c7f1-49e4-9844-1dd096e9adb1";#xD; src -> addr.line = evaluate(address, addressEntry4) "cf465f0f-f5ac-40a1-8d2b-76d6e7f60e55";#xD; src -> addr.postalCode = evaluate(address, postCode) "b9fde70f-e324-41b1-b4b8-d52da30aef6f";#xD; src -> addr.country = evaluate(address, country.display) "d28de831-c35b-471b-8840-8ed66ff15072";#xD; src -> addr.extension as extension then {#xD; src -> extension.url = 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/Extension-MODS-AddressCountry' "c1d8a98c-fb31-46f1-b788-92d6ea7a28e5";#xD; src -> extension.valueCoding as countryCoding then {#xD; src -> countryCoding.system = 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/CodeSystem/MODS-Country-1' "fec84c6b-7457-49db-9220-c2d159ec1f4c";#xD; src -> countryCoding.code = evaluate(address, country.code) "e9b214b1-21a7-448a-b4f2-b3ac053025f0";#xD; src -> countryCoding.display = evaluate(address, country.display) "38236b3c-20a0-4bd6-bd71-ceeec9892684";#xD; } "c9d395c8-d66e-43ea-978f-2845ad8ec6cb";#xD; } "35cd9065-54d7-41ce-88d2-1219c4140f80";#xD; } "setExtendedPatientAddress";#xD; src.homeAddress as address where $this.country.empty() -> tgt.address as addr then {#xD; src -> addr.line = evaluate(address, addressEntry1) "c98b2bba-177b-4fe2-bc52-4f44dbc3c9f4";#xD; src -> addr.line = evaluate(address, addressEntry2) "4fff75a4-23c2-4c35-9f77-8589de7f71d8";#xD; src -> addr.line = evaluate(address, addressEntry3) "43620999-78ac-449f-b3d7-5bbad9e8cb26";#xD; src -> addr.line = evaluate(address, addressEntry4) "00caee37-21ea-4bde-92e5-08a685c280c4";#xD; src -> addr.postalCode = evaluate(address, postCode) "38fe9452-ee4b-4cbf-b645-460a714c7d53";#xD; } "setPatientAddress";#xD; }#xD; #xD;
Synanetics Ltd on behalf of DHSC/Social Care Interoperability Platform
United Kingdom of Great Britain and Northern Ireland