Netherlands - Generic Functions for data exchange Implementation Guide
0.1.0 - ci-build
Netherlands - Generic Functions for data exchange Implementation Guide - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
| Official URL: http://minvws.github.io/generiekefuncties-docs/StructureMap/KvkBasisprofielToOrganization | Version: 0.1.0 | |||
| Draft as of 2026-03-05 | Computable Name: KvkBasisprofielToOrganization | |||
StructureMap die een KVK Basisprofiel API response transformeert naar een FHIR Organization resource.
map "http://minvws.github.io/generiekefuncties-docs/StructureMap/KvkBasisprofielToOrganization" = "KvkBasisprofielToOrganization" // StructureMap die een KVK Basisprofiel API response transformeert naar een FHIR Organization resource. uses "http://minvws.github.io/generiekefuncties-docs/StructureDefinition/kvk-basisprofiel" alias KvkBasisprofiel as source uses "http://minvws.github.io/generiekefuncties-docs/StructureDefinition/nl-gf-organization" alias NlGfOrganization as target group KvkBasisprofielToOrganization(source src : KvkBasisprofiel, target tgt : Organization) { src -> tgt.meta as meta then { src -> meta.profile = 'http://minvws.github.io/generiekefuncties-docs/StructureDefinition/nl-gf-organization' "setProfileUrl"; } "setProfile"; src.kvkNummer as kvkNum -> tgt.identifier as kvkId then { kvkNum -> kvkId.use = 'official' "kvkUse"; kvkNum -> kvkId.system = 'http://fhir.nl/fhir/NamingSystem/kvk' "kvkSystem"; kvkNum -> kvkId.value = kvkNum "kvkValue"; }; src.uraNummer as uraNum -> tgt.identifier as uraId then { uraNum -> uraId.use = 'official' "uraUse"; uraNum -> uraId.system = 'http://fhir.nl/fhir/NamingSystem/ura' "uraSystem"; uraNum -> uraId.value = uraNum "uraValue"; uraNum -> uraId.assigner as assignerRef then { uraNum -> assignerRef.identifier as assignerId then { uraNum -> assignerId.system = 'http://fhir.nl/fhir/NamingSystem/ura' "assignerIdSystem"; uraNum -> assignerId.value = '00000001' "assignerIdValue"; uraNum -> assignerId.type as assignerIdType then { uraNum -> assignerIdType.coding as assignerIdTypeCoding then { uraNum -> assignerIdTypeCoding.system = 'http://terminology.hl7.org/CodeSystem/provenance-participant-type' "assignerIdTypeCodingSystem"; uraNum -> assignerIdTypeCoding.code = 'author' "assignerIdTypeCodingCode"; } "assignerIdTypeCoding"; } "assignerIdType"; } "assignerIdentifier"; } "uraAssigner"; }; src.naam as naam -> tgt.name = naam; src -> tgt.active = true "setActive"; src.statutaireNaam as statNaam -> tgt.alias = statNaam; src.handelsnamen as hn then KvkHandelsnaamToAlias(hn, tgt); src.sbiActiviteiten as sbi -> tgt.type as cc then KvkSBIToCodeableConcept(sbi, cc); src.embedded as emb then { emb.eigenaar as eig then { eig.rsin as rsin -> tgt.identifier as rsinId then { rsin -> rsinId.system = 'http://fhir.nl/fhir/NamingSystem/rsin' "rsinSystem"; rsin -> rsinId.value = rsin "rsinValue"; }; }; emb.hoofdvestiging as hv then { hv.adressen as adres -> tgt.address as addr then KvkAdresToAddress(adres, addr); hv.websites as web -> tgt.telecom as tel then KvkWebsiteToContactPoint(web, tel); }; }; } group KvkHandelsnaamToAlias(source src, target tgt : Organization) { src.naam as naam -> tgt.alias = naam; } group KvkSBIToCodeableConcept(source src, target tgt : CodeableConcept) { src -> tgt.coding as coding then { src -> coding.system = 'http://minvws.github.io/generiekefuncties-docs/CodeSystem/nl-gf-sbi-2025-cs' "sbiSystem"; src.sbiCode as code -> coding.code = code; src.sbiOmschrijving as omschr -> coding.display = omschr "sbiDisplay"; } "sbiCoding"; } group KvkAdresToAddress(source src, target tgt : Address) { src.volledigAdres as volledigAdres -> tgt.text = volledigAdres; src.straatnaam as straat -> tgt.line = straat as addrLine then { straat -> addrLine.extension as ext then { straat -> ext.url = 'http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetName' "streetNameExtUrl"; straat -> ext.valueString = straat "streetNameExtValue"; } "streetNameExt"; }; src.huisnummer as huisnr -> tgt.line = cast(huisnr, 'string') as addrLine2 then { huisnr -> addrLine2.extension as ext then { huisnr -> ext.url = 'http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-houseNumber' "houseNumberExtUrl"; huisnr -> ext.valueString = cast(huisnr, 'string') "houseNumberExtValue"; } "houseNumberExt"; }; src.huisletter as huisltr -> tgt.line = huisltr as addrLine3 then { huisltr -> addrLine3.extension as ext then { huisltr -> ext.url = 'http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-buildingNumberSuffix' "houseLetterExtUrl"; huisltr -> ext.valueString = huisltr "houseLetterExtValue"; } "houseLetterExt"; }; src.huisnummerToevoeging as huisnrToev -> tgt.line = huisnrToev as addrLine4 then { huisnrToev -> addrLine4.extension as ext then { huisnrToev -> ext.url = 'http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-buildingNumberSuffix' "houseNumberAdditionExtUrl"; huisnrToev -> ext.valueString = huisnrToev "houseNumberAdditionExtValue"; } "houseNumberAdditionExt"; }; src.postcode as pc -> tgt.postalCode = pc; src.plaats as plaats -> tgt.city = plaats; src.land as land -> tgt.country = land; src -> tgt.use = 'work' "setUse"; } group KvkWebsiteToContactPoint(source src, target tgt : ContactPoint) { src -> tgt.system = 'url' "setSystem"; src as url -> tgt.value = url "setValue"; src -> tgt.use = 'work' "setUse"; }