Packages
The module path is github.com/cadasto/openehr-sdk-go. API detail is on pkg.go.dev.
These tables name the packages a consumer imports directly. Internal packages and a few narrower helpers are left out; pkg.go.dev lists every package. The roadmap records which parts have landed and which are planned. Where a runnable program shows a package at work, the Example column links its entry in the examples catalogue.
Building blocks (no HTTP)
None of these import transport/ or auth/, directly or through another
package.
| Import | Role | Example |
|---|---|---|
openehr/rm |
Reference Model types, generated from the BMM this SDK builds against | canonical_json |
openehr/rm/typereg |
_type discriminator → concrete Go type |
query-execute |
openehr/terminology |
openEHR terminology groups and code sets, generated from the openEHR Terminology release | validate-composition |
openehr/serialize/canjson |
Canonical JSON | canonical_json |
openehr/serialize/canxml |
Canonical XML | canxml_roundtrip |
openehr/serialize/simplified |
FLAT and STRUCTURED | flat-roundtrip |
openehr/aom/aom14 |
Archetype Object Model 1.4 and the ADL 1.4 operational template model: ReadOperationalTemplate reads an OPT, and both canonical codecs write it back |
opt-parse |
openehr/template |
ADL 1.4 operational template path grammar and the small types a compiled template shares | opt-parse |
openehr/templatecompile |
Compile an OPT for the builder, validator, and AQL lint | compile-build-validate |
openehr/template/webtemplate |
Web Template JSON export from a compiled OPT, EHRbase v2.3 ids | webtemplate-export |
openehr/validation |
Reference Model rules with no template (ValidateRM), a Composition or other RM root against a compiled OPT, and a canonical JSON or XML document decoded and validated in one call (ValidateJSON, ValidateXML) |
validate-from-json |
openehr/validation/aqlvalidation |
AQL lint reported as validation issues, kept apart so instance validation links no AQL parser | lint-aql |
openehr/instance |
Synthesise an RM instance from a compiled template | generate-example |
openehr/composition |
OPT-driven Composition builder | compile-build-validate |
openehr/aql |
AQL builders and request / result models | aql-build |
openehr/aql/parse |
AQL syntax parser | aql-parse-structured |
openehr/aql/lint |
Static lint | lint-aql, through aqlvalidation.Validate |
openehr/aql/contain |
Containment admissibility | aql-build |
openehr/bmm |
BMM loader |
REST client
Typed packages over the ITS-REST Release-1.1.0 OpenAPI files kept in this repository. Workflow lists the CDRs this client has been run against.
| Import | Role | Example |
|---|---|---|
transport |
Injected *http.Client, retries, error mapping, optional OTel |
ehr_create |
smart/discovery |
Service catalog | ehr_create |
smart |
SMART launch context and ID-token claims after the auth/smart exchange (partial: app registration is open) |
|
openehr/client |
The types every REST client shares: version ids, Ref, version metadata, item tags |
composition-crud |
openehr/client/ehr |
EHR identity, create and reads | ehr_create |
openehr/client/ehr/composition |
Composition CRUD in canonical JSON, canonical XML, FLAT or STRUCTURED, revision history and version reads | composition-crud |
openehr/client/ehr/contribution |
Multi-version commits | contribution-build |
openehr/client/ehr/directory |
Directory / folder | |
openehr/client/ehr/ehrstatus |
EHR_STATUS, its revision history and version reads | |
openehr/client/ehr/itemtags |
openehr-item-tag headers on composition, EHR_STATUS and directory reads and on composition writes (partial: the EHR's own ITEM_TAG routes have no client yet) |
|
openehr/client/query |
Ad-hoc and stored AQL | query-execute |
openehr/client/definition |
Templates and stored queries | definition-lifecycle |
openehr/client/demographic |
Demographic API: PARTY CRUD in canonical JSON or canonical XML, revision history and version reads, and the ITEM_TAG routes; DEVELOPMENT status inside ITS-REST Release-1.1.0 |
demographic-crud |
openehr/client/system |
Capabilities and version | service-auth |
openehr/client/admin |
ITS-REST admin; DEVELOPMENT status inside ITS-REST Release-1.1.0 |
Auth
The generic auth.TokenSource sits at the bottom; the providers build on it.
| Import | Role | Example |
|---|---|---|
auth |
TokenSource |
service-auth |
auth/smart |
SMART-on-openEHR PKCE | smart-launch |
auth/clientcreds |
OAuth2 client credentials | service-auth |
auth/jwtbearer |
JWT Bearer (RFC 7523) | |
auth/basic |
HTTP Basic |
Test and sandbox
| Import | Role | Example |
|---|---|---|
sandbox |
In-memory openEHR backend (http.RoundTripper) |
composition-crud |
testkit/probe |
Shared probe result type and catalog runner | |
testkit/corpus |
Fixture documents kept in the repository (bodies, not HTTP recordings) | |
testkit/recordings |
Cassette-mode HAR 1.2 recordings |
Cadasto extras
The cadasto/ packages ship in the same module, kept separate so they can
move to their own module later. Most of the surface is planned;
cadasto/admin has health checks today. None of it is part of the openEHR
REST contract.
| Import | Maturity |
|---|---|
cadasto/admin |
partial, live/ready probes |
cadasto/extra |
planned |
cadasto/datamap |
planned |
cadasto/mpi |
planned |
cadasto/care |
planned |