Generated Narrative: StructureMap PlanNetToNdhHealthcareServiceSM #xD; map "http://hl7.org/fhir/us/ndh/StructureMap/PlanNetToNdhHealthcareServiceSM" = "PlanNetToNdhHealthcareServiceSM"#xD; #xD; // This StructureMap defines the mapping from Plan-Net HealthcareService to NDH HealthcareService.#xD; #xD; uses "http://hl7.org/fhir/us/davinci-pdex-plan-net/StructureDefinition/plannet-HealthcareService" alias HealthcareServicePN as source#xD; uses "http://hl7.org/fhir/us/ndh/StructureDefinition/ndh-HealthcareService" alias HealthcareServiceNDH as target#xD; #xD; group PlanNetToNdhHealthcareService(source src : HealthcareServicePN, target tgt : HealthcareServiceNDH) {#xD; src.language as vLanguage -> tgt.language = vLanguage;#xD; src.text as vText -> tgt.text = vText;#xD; src.extension as vNewPatientsSrc where (url = 'http://hl7.org/fhir/us/davinci-pdex-plan-net/StructureDefinition/newpatients') -> tgt.extension as vNewPatientsTgt then {#xD; vNewPatientsSrc as vNewPatientsForUrl -> vNewPatientsTgt.url = 'http://hl7.org/fhir/us/ndh/StructureDefinition/base-ext-newpatients' "setNewPatientsUrl";#xD; vNewPatientsSrc.extension as vFromNetworkSrc where (url = 'fromNetwork') -> vNewPatientsTgt.extension = vFromNetworkSrc "copyNewPatientsFromNetwork";#xD; vNewPatientsSrc.extension as vCharacteristicsSrc where (url = 'characteristics') -> vNewPatientsTgt.extension = vCharacteristicsSrc "copyNewPatientsCharacteristics";#xD; vNewPatientsSrc.extension as vAcceptingPatientsSrc where (url = 'acceptingPatients') -> vNewPatientsTgt.extension as vAcceptingPatientsTgt then {#xD; vAcceptingPatientsSrc.url as vAcceptingPatientsUrl -> vAcceptingPatientsTgt.url = vAcceptingPatientsUrl "copyAcceptingPatientsUrl";#xD; vAcceptingPatientsSrc.value as vAcceptingPatientsValueSrc where (coding.exists()) -> vAcceptingPatientsTgt.value = create('CodeableConcept') as vAcceptingPatientsValueTgt then {#xD; vAcceptingPatientsValueSrc.coding as vAcceptingPatientsCodingSrc where (system = 'http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/AcceptingPatientsCS') -> vAcceptingPatientsValueTgt.coding = translate(vAcceptingPatientsCodingSrc, 'http://hl7.org/fhir/us/ndh/ConceptMap/plannet-to-ndh-accepting-patients', 'Coding') "translateAcceptingPatientsCoding";#xD; vAcceptingPatientsValueSrc.coding as vAcceptingPatientsOtherCodingSrc where (system != 'http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/AcceptingPatientsCS') -> vAcceptingPatientsValueTgt.coding = vAcceptingPatientsOtherCodingSrc "copyAcceptingPatientsOtherCoding";#xD; } "copyAcceptingPatientsValue";#xD; } "copyNewPatientsAcceptingPatients";#xD; } "copyNewPatientsExtension";#xD; src.extension as vDeliveryMethod where (url = 'http://hl7.org/fhir/us/davinci-pdex-plan-net/StructureDefinition/delivery-method') -> tgt.extension as vDeliveryMethodTgt then {#xD; vDeliveryMethod as vDeliveryMethodForUrl -> vDeliveryMethodTgt.url = 'http://hl7.org/fhir/us/ndh/StructureDefinition/base-ext-delivery-method' "setDeliveryMethodUrl";#xD; vDeliveryMethod.extension as vDeliveryMethodTypeSrc where (url = 'type') -> vDeliveryMethodTgt.extension as vDeliveryMethodTypeTgt then {#xD; vDeliveryMethodTypeSrc as vDeliveryMethodTypeForUrl -> vDeliveryMethodTypeTgt.url = 'deliveryMethodtype' "setDeliveryMethodTypeUrl";#xD; vDeliveryMethodTypeSrc.value as vDeliveryMethodTypeValueSrc where (coding.exists() and ($this is CodeableConcept)) -> vDeliveryMethodTypeTgt.value = create('CodeableConcept') as vDeliveryMethodTypeValueTgt then {#xD; vDeliveryMethodTypeValueSrc.coding as vDeliveryMethodTypeCodingSrc where (system = 'http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/DeliveryMethodCS') -> vDeliveryMethodTypeValueTgt.coding = translate(vDeliveryMethodTypeCodingSrc, 'http://hl7.org/fhir/us/ndh/ConceptMap/plannet-to-ndh-delivery-method', 'Coding') "translateDeliveryMethodTypeCoding";#xD; vDeliveryMethodTypeValueSrc.coding as vDeliveryMethodTypeOtherCodingSrc where (system != 'http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/DeliveryMethodCS') -> vDeliveryMethodTypeValueTgt.coding = vDeliveryMethodTypeOtherCodingSrc "copyDeliveryMethodTypeOtherCoding";#xD; } "copyDeliveryMethodTypeValue";#xD; } "copyDeliveryMethodTypeSubExt";#xD; vDeliveryMethod.extension as vVirtualModalitiesSrc where (url = 'virtualModalities') -> vDeliveryMethodTgt.extension as vVirtualModalitiesTgt then {#xD; vVirtualModalitiesSrc.url as vVirtualModalitiesUrl -> vVirtualModalitiesTgt.url = vVirtualModalitiesUrl "copyVirtualModalitiesUrl";#xD; vVirtualModalitiesSrc.value as vVirtualModalitiesValueSrc where (coding.exists() and ($this is CodeableConcept)) -> vVirtualModalitiesTgt.value = create('CodeableConcept') as vVirtualModalitiesValueTgt then {#xD; vVirtualModalitiesValueSrc.coding as vVirtualModalitiesCodingSrc where (system = 'http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/VirtualModalitiesCS') -> vVirtualModalitiesValueTgt.coding = translate(vVirtualModalitiesCodingSrc, 'http://hl7.org/fhir/us/ndh/ConceptMap/plannet-to-ndh-virtual-modalities', 'Coding') "translateVirtualModalitiesCoding";#xD; vVirtualModalitiesValueSrc.coding as vVirtualModalitiesOtherCodingSrc where (system != 'http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/VirtualModalitiesCS') -> vVirtualModalitiesValueTgt.coding = vVirtualModalitiesOtherCodingSrc "copyVirtualModalitiesOtherCoding";#xD; } "copyVirtualModalitiesValue";#xD; } "copyVirtualModalitiesSubExt";#xD; vDeliveryMethod.extension as vDeliveryMethodOtherSubExt where ((url != 'type') and (url != 'virtualModalities')) -> vDeliveryMethodTgt.extension = vDeliveryMethodOtherSubExt "copyDeliveryMethodOtherSubExt";#xD; } "copyDeliveryMethodExtension";#xD; src.identifier as vIdentifier -> tgt.identifier = vIdentifier;#xD; src.location as vLocation -> tgt.location = vLocation;#xD; src.name as vName -> tgt.name = vName;#xD; src.telecom as vTelecomSrc -> tgt.telecom as vTelecomTgt then {#xD; vTelecomSrc.system as vTelecomSystem -> vTelecomTgt.system = vTelecomSystem "copyTelecomSystem";#xD; vTelecomSrc.value as vTelecomValue -> vTelecomTgt.value = vTelecomValue "copyTelecomValue";#xD; vTelecomSrc.use as vTelecomUse -> vTelecomTgt.use = vTelecomUse "copyTelecomUse";#xD; vTelecomSrc.rank as vTelecomRank -> vTelecomTgt.rank = vTelecomRank "copyTelecomRank";#xD; vTelecomSrc.period as vTelecomPeriod -> vTelecomTgt.period = vTelecomPeriod "copyTelecomPeriod";#xD; vTelecomSrc.extension as vContactpointAvailabletimeSrc where (url = 'http://hl7.org/fhir/us/davinci-pdex-plan-net/StructureDefinition/contactpoint-availabletime') -> vTelecomTgt.extension as vContactpointAvailabletimeTgt then {#xD; vContactpointAvailabletimeSrc as vContactpointAvailabletimeForUrl -> vContactpointAvailabletimeTgt.url = 'http://hl7.org/fhir/us/ndh/StructureDefinition/base-ext-contactpoint-availabletime' "setContactpointAvailabletimeUrl";#xD; vContactpointAvailabletimeSrc.extension as vContactpointAvailabletimeSubExt -> vContactpointAvailabletimeTgt.extension = vContactpointAvailabletimeSubExt "copyContactpointAvailabletimeSubExt";#xD; vContactpointAvailabletimeSrc.value as vContactpointAvailabletimeValue -> vContactpointAvailabletimeTgt.value = vContactpointAvailabletimeValue "copyContactpointAvailabletimeValue";#xD; } "copyTelecomContactpointAvailabletime";#xD; vTelecomSrc.extension as vViaIntermediarySrc where (url = 'http://hl7.org/fhir/us/davinci-pdex-plan-net/StructureDefinition/via-intermediary') -> vTelecomTgt.extension as vViaIntermediaryTgt then {#xD; vViaIntermediarySrc as vViaIntermediaryForUrl -> vViaIntermediaryTgt.url = 'http://hl7.org/fhir/us/ndh/StructureDefinition/base-ext-via-intermediary' "setViaIntermediaryUrl";#xD; vViaIntermediarySrc.extension as vViaIntermediarySubExt -> vViaIntermediaryTgt.extension = vViaIntermediarySubExt "copyViaIntermediarySubExt";#xD; vViaIntermediarySrc.value as vViaIntermediaryValue -> vViaIntermediaryTgt.value = vViaIntermediaryValue "copyViaIntermediaryValue";#xD; } "copyTelecomViaIntermediary";#xD; } "copyTelecom";#xD; src.program as vProgram -> tgt.program = vProgram;#xD; src.endpoint as vEndpoint -> tgt.endpoint = vEndpoint;#xD; src.active as vActive -> tgt.active = vActive;#xD; src.providedBy as vProvidedBy -> tgt.providedBy = vProvidedBy;#xD; src.coverageArea as vCoverageArea -> tgt.coverageArea = vCoverageArea;#xD; // Translate Plan-Net HealthcareService category coding to NDH coding via ConceptMap.#xD; src.category as vCategorySrc -> tgt.category as vCategoryTgt then {#xD; vCategorySrc.text as vCategoryText -> vCategoryTgt.text = vCategoryText "copyCategoryText";#xD; vCategorySrc.coding as vCategoryCodingSrc where (system = 'http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/HealthcareServiceCategoryCS') -> vCategoryTgt.coding as vCategoryCodingTgt then {#xD; vCategoryCodingSrc as vCategoryCodingForSystem -> vCategoryCodingTgt.system = 'http://terminology.hl7.org/CodeSystem/ndh-healthcare-service-category' "setCategoryCodingSystem";#xD; vCategoryCodingSrc.code as vCategoryCodeSrc -> vCategoryCodingTgt.code = translate(vCategoryCodeSrc, 'http://hl7.org/fhir/us/ndh/ConceptMap/plannet-to-ndh-healthcare-service-category', 'code') "translateCategoryCode";#xD; vCategoryCodingSrc.display as vCategoryDisplay -> vCategoryCodingTgt.display = vCategoryDisplay "copyCategoryDisplay";#xD; } "translateCategoryCoding";#xD; vCategorySrc.coding as vCategoryCodingOtherSrc where (system != 'http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/HealthcareServiceCategoryCS') -> vCategoryTgt.coding = vCategoryCodingOtherSrc "copyCategoryCodingOther";#xD; } "copyCategory";#xD; src.type as vType -> tgt.type = vType;#xD; src.specialty as vSpecialty -> tgt.specialty = vSpecialty;#xD; src.appointmentRequired as vAppointmentRequired -> tgt.appointmentRequired = vAppointmentRequired;#xD; src.availableTime as vAvailableTime -> tgt.availableTime = vAvailableTime;#xD; src.notAvailable as vNotAvailable -> tgt.notAvailable = vNotAvailable;#xD; src.availabilityExceptions as vAvailabilityExceptions -> tgt.availabilityExceptions = vAvailabilityExceptions;#xD; src.eligibility as vEligibility -> tgt.eligibility = vEligibility;#xD; src.serviceProvisionCode as vServiceProvisionCode -> tgt.serviceProvisionCode = vServiceProvisionCode;#xD; src.comment as vComment -> tgt.comment = vComment;#xD; src.extraDetails as vExtraDetails -> tgt.extraDetails = vExtraDetails;#xD; src.photo as vPhoto -> tgt.photo = vPhoto;#xD; src.characteristic as vCharacteristic -> tgt.characteristic = vCharacteristic;#xD; src.communication as vCommunication -> tgt.communication = vCommunication;#xD; src.referralMethod as vReferralMethod -> tgt.referralMethod = vReferralMethod;#xD; src.meta as vMetaSrc -> tgt.meta as vMetaTgt then {#xD; vMetaSrc.lastUpdated as vLastUpdated -> vMetaTgt.lastUpdated = vLastUpdated "copyMetaLastUpdated";#xD; vMetaSrc as vMetaProfileSrc -> vMetaTgt.profile = 'http://hl7.org/fhir/us/ndh/StructureDefinition/ndh-HealthcareService' "setTargetProfile";#xD; } "copyMeta";#xD; }#xD; #xD;
This StructureMap defines the mapping from Plan-Net HealthcareService to NDH HealthcareService.
HL7 International / Patient Administration
(url = 'http://hl7.org/fhir/us/davinci-pdex-plan-net/StructureDefinition/newpatients')
(system = 'http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/AcceptingPatientsCS')
(system != 'http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/AcceptingPatientsCS')
(url = 'http://hl7.org/fhir/us/davinci-pdex-plan-net/StructureDefinition/delivery-method')
(coding.exists() and ($this is CodeableConcept))
(system = 'http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/DeliveryMethodCS')
(system != 'http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/DeliveryMethodCS')
(system = 'http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/VirtualModalitiesCS')
(system != 'http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/VirtualModalitiesCS')
((url != 'type') and (url != 'virtualModalities'))
(url = 'http://hl7.org/fhir/us/davinci-pdex-plan-net/StructureDefinition/contactpoint-availabletime')
(url = 'http://hl7.org/fhir/us/davinci-pdex-plan-net/StructureDefinition/via-intermediary')
(system = 'http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/HealthcareServiceCategoryCS')
(system != 'http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/HealthcareServiceCategoryCS')