eehrxf
The European interoperability software component of an EHR system under Regulation (EU) 2025/327 (the European Health Data Space), in Rust: the European electronic health record exchange format of Art 15, as its published proxies carry it until the Art 15(1) implementing act is adopted.
dataset: the format-neutral dataset model. ADatasetModelreads the Xt-EHR EHDS Logical Information Models package (xtehr.eu.ehds.models, a FHIR package archive) as data: every logical model keyed on its canonical URL, every element on its element path (EHDSPatientSummary.allergiesAndIntolerances), and every obligations profile with what a producer and a consumer must do with each element. No element is a Rust type of its own.category: one Cargo feature per priority category of Art 14(1) (patient-summary,prescription,dispensation,imaging,laboratory,discharge), each naming the logical model and the obligations profile of its dataset.crosswalk: per category, the rows from the Xt-EHR element paths to the eHealth Network element ids and to the elements and slices of the HL7 Europe profile, with the producer obligation and the profiles a FHIRconnect context may map to in order to feed each.Crosswalk::checkholds the rows to the packages they name, andCategory::crosswalksnames a category's crosswalks, one per dataset. The patient summary (crosswalk::patient_summary, featurepatient-summary), the electronic prescription (crosswalk::prescription, featureprescription), the electronic dispensation (crosswalk::dispensation, featuredispensation), the imaging report and the imaging study (crosswalk::imaging, featureimaging, against the HL7 Europe Imaging Report 1.0.0-ballot composition with itsDiagnosticReport, and itsImagingStudy), the laboratory report (crosswalk::laboratory, featurelaboratory) and the discharge report (crosswalk::discharge, featuredischarge) carry one, the two medication ones against the HL7 Europe MPD 1.0.0MedicationRequest-eu-mpdandMedicationDispense-eu-mpdprofiles, the laboratory report against the HL7 Europe Laboratory Report 2.0.0Composition-eu-labwith itsDiagnosticReport-eu-labcompanion (Crosswalk::check_with), and the discharge report against the HL7 Europe Hospital Discharge Report 1.0.0composition-eu-hdrprofile.fhir-r4: the FHIR R4 serialisation of the exchange format. It compiles the R4 resources and no openEHR crate.mapping(featureopenehr, which turns onfhir-r4): FHIRconnect 1.0.0 context mappings compiled once against an openEHR operational template and run in process, through thefhirconnectengine, over a canonical-JSON composition. The answer is a FHIR R4Bundleof the mapped resources with oneProvenancecovering them.medication(featurefhir-r4withprescriptionordispensation): the electronic prescription and dispensation datasets as Rust records.Prescription::readreads a member'sMedicationRequests, one per item, andDispense::readitsMedicationDispense, each strictly against FHIR R4 and with a typed refusal for an element the dataset requires and the resource lacks;Prescription::requestsandDispense::resourcewrite them back in the MPD form.Mpdchecks a resource, and eachMedicationit contains, against the vendored MPD profiles by the rules of thereceivecheck. The number of dispensations an item has left travels in the extensionhttps://ferrobridge.eu/fhir/StructureDefinition/remaining-dispensationsondispenseRequest, written only when a value is given; its FHIR R4StructureDefinitionisREMAINING_DISPENSATIONS_DEFINITION, which the FerroBRIDGE site serves at that URL.receive(featurefhir-r4): a document received in the exchange format (Annex II 2.2 and 2.3).ReceivedDocument::readdecodes it against FHIR R4, holds it to the document rules of the R4Bundle(bdl-9,bdl-10,bdl-11), resolves its subject to itsPatiententry and keeps its text byte for byte.ReceivedDocument::checkwalks aBundleand aCompositionprofile read from the vendored package over it: cardinalities,fixed[x]andpattern[x]values, and slices, with every constraint it cannot evaluate listed.ReceivedDocument::categorynames the priority category whose document profile fixes aComposition.typecoding of the document, andCategory::profilesthe profiles a document of it is held to. Withopenehr,Mapping::to_openehrmaps the document into one canonical composition through FHIRconnect and keeps the document in the composition'sFEEDER_AUDIT.original_content;ReceivedComposition::modelis the composition as the RM model holds it.terminology(featurefhir-r4): the terminology rules. Withopenehr,transcodeturns an openEHR text item into FHIR codings and narrative: a code in a preferred system as recorded, aTERM_MAPPINGof match=as a second coding, every other match in the narrative, an archetype-local code displayed with its term from the operational template (local), and any other code in no preferred system under eHN PS Art 10(7).systemwrites each coding's system as a FHIR URI: a local code under its archetype's code system (https://ferrobridge.eu/fhir/CodeSystem/archetype-local/followed by the archetype id, described at that base), the openEHR namesSNOMED-CT,LOINCandICD10as their URIs, and a code of a terminology with no known URI as no coding, in the narrative and reported as unmapped.ehnholds the eHN Patient Summary §4 preferred systems, the default set.Expansionsreads the value set expansions of a package, andbindings::check_requiredholds therequiredbindings of a profile to them, naming every binding it cannot evaluate.Terminologyis the optional FHIR terminology server ($translate, taking onlyequivalentandequal,$lookup,$validate-code) behind theTerminologyServerseam; with none configured every operation fails closed.
The crate authors no mapping language and no profile mapping: the mapping files are its input. It depends on no logging component and on no application, so the two harmonised software components stay independent of each other (Art 2(2)(n), (o)).
Licence
Business Source License 1.1 (LICENSE): free for every non-production use and
for non-commercial production use; a commercial licence for other production
use; Apache License 2.0 four years after each version.