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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
//! openEHR **ITS** — Implementation Technology Specifications. This crate
//!
//! mirrors the four `specifications-ITS-*` sub-repos (aggregated by
//! `specifications-ITS`): how openEHR RM instances are serialized and exposed.
//!
//! - [`json`] — **ITS-JSON**: canonical JSON. The named entry points
//! (`to_canonical_json`/`from_canonical_json`/`from_canonical_value`, over the
//! native [`json_codec`]) + the vendored ITS-JSON schema + the interop
//! fidelity gate (round-trip the EHRbase corpus, `tests/`).
//! - [`json_codec`] — **ITS-JSON**, native codec: emitted `ToJson`/`FromJson`
//! impls over a hand-written writer/reader runtime — the canonical-JSON
//! (de)serialization for every spec type (there is no serde derive on the spec
//! types; the codec owns the `_type` / number-typing / omission contract).
//! - [`wire_validate`] — the wire-boundary RM class-invariant dispatch layer:
//! reads a canonical-JSON node, deserializes via the codec, and runs the RM
//! invariant cores of `openehr_rm::validate` (the `Validate` impls and every
//! value-level decision stay in `openehr-rm`/`openehr-base`).
//! - [`rm_instance`] — the template-independent validation of a whole RM
//! instance tree: the RM-invariant and terminology passes, the
//! [`rm_instance::ValidationMessage`] report shape, and the composed
//! [`rm_instance::validate_composition`] entry point.
//! - [`xml`] — **ITS-XML**: canonical XML via `quick-xml`, validated against the
//! vendored XSDs (`schemas/xml/`). (Implementation is P5.)
//! - [`rest`] — **ITS-REST**: the openEHR REST API contract. The machine-readable
//! OpenAPI specs are vendored (`vendor/rest-oas/`); the server that implements
//! them is `ferroehr-rest` (P6).
//! - [`bmm`] — **ITS-BMM**: BMM serialization. The vendored BMM meta-model that
//! drives code generation lives in `openehr-codegen/vendor/bmm`; the generated
//! runtime BMM object model is `openehr-lang`.
//! - [`flat`] — **ITS-REST Formats**: openEHR Simplified Formats
//! (FLAT / STRUCTURED data instances + the Web Template model). The
//! *Formats* specification is a STABLE ITS-REST 1.1.0 sub-specification
//! (`docs/specs/openehr/ITS-REST/docs/simplified_formats/`), so it lives
//! here alongside the other ITS surfaces; hand-written (BMM has no
//! simplified-format model), unlike the emitted JSON/XML/REST codecs.
//!
//! Serialization here is native codec machinery: the canonical-JSON `ToJson`/
//! `FromJson` codec and the canonical-XML codec are generated over hand-written
//! runtimes, so the spec crates carry no serde derive.
//!
//! # Feature `full` (default)
//!
//! Every surface above rides the default `full` feature. Taken with
//! `default-features = false` the crate compiles to `rest::smart_scopes` alone —
//! the std-only SMART scope grammar, with no dependency of any kind — so a REST
//! client that must parse scope strings on `wasm32-unknown-unknown` (the admin
//! console's scope previewer) shares the very grammar the CDR enforces instead
//! of carrying a second parser.
// Doctests are copy-paste templates: they must use `?`, never unwrap
// (C-QUESTION-MARK, https://rust-lang.github.io/api-guidelines/documentation.html#c-question-mark).
/// The openEHR specification version this crate implements.
///
/// The pin is deliberately independent of the crates.io package version,
/// which is the crate's own SemVer line and moves only with this
/// implementation's code.
pub const SPEC_VERSION: &str = "1.1.0";