1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// SPDX-FileCopyrightText: Cadasto B.V.
// SPDX-License-Identifier: BUSL-1.1
//! Where the composition a `link` names was committed.
//!
//! "The engine checks the `meta.url` contained in the FHIR resource and
//! searches all available FHIRconnect context mappings. If a context mapping
//! for this `meta.url` is found, it is executed and saved as a separate
//! composition. This composition is linked using the openEHR links"
//! (`docs/specs/fhirconnect/modules/ROOT/pages/types-of-mappings/concept-type/concept-mappings.adoc`,
//! §Linked mappings). R4 defines no `meta.url`; the profiles a resource claims
//! are `meta.profile`, a list (<https://hl7.org/fhir/R4/resource.html#Meta>).
//!
//! The engine makes no call of its own, so the other context run and the
//! commit belong to the caller: a run that is handed a [`LinkedCompositions`]
//! resolves the resource a `link` names through the reference seam and asks
//! where its composition stands. The answer is a `DV_EHR_URI`, which is what
//! `LINK.target` holds. A run handed none refuses a link whose target is no
//! `ehr:` URI, since one run produces one composition. No specification
//! governs the shape of the seam: our own design.
use fmt;
use Value;
use EhrUri;
use crateReferenceError;
/// Where the composition each linked resource was committed as.
/// What a caller answers for one linked resource.