openehr-sdk-go

module
v0.26.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2026 License: MIT

README

openehr-sdk-go

CI Go Reference Go Version Release

A first-party Go SDK for openEHR. It covers the openEHR REST API, the Reference Model as typed Go structs, building and validating Compositions from operational templates, AQL, and SMART-on-openEHR authentication.

You don't have to take all of it. The building blocks (RM types, serialization, validation, AQL, template parsing) are plain packages with no dependency on the HTTP client or on auth. If all you need is to validate a Composition in a CI job, you import that one package and nothing else.

Everything the SDK does traces back to a specification that lives in this repository. When the code and a spec disagree, the spec wins.

It's written the way Go code usually is: every I/O call takes a context.Context, you pass in your own *http.Client, configuration is done with functional options, and RM polymorphism goes through generics and a type registry rather than reflection.

Try it

This decodes a canonical-JSON Composition into a typed struct and reads a few fields. No network, no CDR:

var c rm.Composition
if err := canjson.Unmarshal(body, &c); err != nil {
    log.Fatal(err)
}
fmt.Println(c.ArchetypeNodeID, c.Category.Value, len(c.Content))

The runnable version uses a fixture bundled with the repo, so it works straight from a clone:

$ go run ./cmd/examples/canonical_json
composition: archetype_node_id=openEHR-EHR-COMPOSITION.encounter.v1
  name="body_weight"
  language=nl (terminology=ISO_639-1)
  territory=NL
  category=event
  content items=1
OK: canonical-JSON Composition decoded from body_weight.json

To use it in your own project — the SDK is pre-1.0, so pin an exact tag; a minor release can change the public API:

go get github.com/cadasto/openehr-sdk-go@latest   # pre-1.0: then pin the exact tag it resolves to

The version policy is in releases.md, and the roadmap says what has actually landed.

Who it's for

It was built with a few kinds of consumer in mind:

  1. Benchmark and load tools running high-concurrency CRUD against the openEHR REST API.
  2. Synthetic data seeders that use an OPT to drive bulk Compositions and demographic records.
  3. MCP servers that expose openEHR operations as tools for agentic clients, forwarding the caller's token.
  4. Federative API clients that fan out over several openEHR backends, with per-node spec pinning and partial-failure handling.
  5. SMART-on-openEHR apps with a Go backend: server-side launch, token handling, and CDR calls from a Go web or API service.

If you only need one piece (RM modeling, a codec, validation, AQL string construction, OPT parsing), you can import that package on its own.

What's in it

The definitive landed-vs-planned status, with REQ and PROBE identifiers, is in the roadmap and the REQ registry.

  • openEHR REST client — System, EHR, EHR_STATUS, Composition, Directory, Contribution, Query, Definition (stored AQL), Demographic, and Admin, over a versioned transport. wire, transport
  • Reference Model — typed RM structs and a central type registry, generated from pinned BMM dictionaries, plus hand-written identifier, temporal, and locatable-path helpers. rm-modeling
  • Serialization — canonical JSON and XML round-trips, and bidirectional FLAT / STRUCTURED simplified-format codecs driven by a Web Template. wire
  • Templates (ADL 1.4 OPT) — operational-template parsing with typed primitive constraints, a compiled-template foundation, and WebTemplate JSON export for form generation. rm-modeling
  • Compositions — an OPT-driven builder, template-driven validation, and RM-instance synthesis from a template. wire
  • AQL — literal AQL wire models and result sets, fluent struct and verb builders, and static parse-and-lint. wire
  • Authentication — SMART-on-openEHR (PKCE), client credentials, JWT bearer, and basic token sources, all over one injected TokenSource. auth
  • Service discovery — a multi-backend service catalog with per-node spec pinning. service-discovery
  • Cadasto platform extras — mostly on the roadmap: Datamap, MPI, an Extra API, and Care aggregates are planned, and the Cadasto admin package has health probes today (the rest is partial). They live in the same module behind a cadasto/ cut line, so they can be split out later as a subtree move rather than a rewrite. module-layout
  • Conformance — an openEHR wire-conformance probe suite covering round-trip byte-stability and spec-correct envelopes. conformance

Getting started

Start with quick-start.md, then the runnable catalog in examples.md. quick-start covers toolchain setup, whether you have host Go or use the Docker fallback.

If you're working on the SDK itself, make help lists the grouped targets and ci.md explains the PR gate.

AI-assisted development

Much of this codebase and its documentation was written with AI coding assistants such as Claude Code and Cursor. The written specification is what keeps that honest: every change is measured against the specs in this repository, has to pass the make ci gate, and is reviewed before a maintainer merges it. How the assistants are set up, and what they must look up rather than guess, is in ai-workflow.md. The rules for contributing with AI help, including the Assisted-by: commit trailer, are in CONTRIBUTING.md.

Documentation

Spec-driven design (SDD)

The normative source of truth and the design that realises it. When code and specs disagree, the specs win.

Doc Scope
docs/specifications/ Normative specs — REQ / PROBE / STRAND topic specs
docs/specifications/REQ.md Requirement registry (index → canonical topic spec)
docs/specifications/traceability.yaml Machine-readable REQ → package / probe / test map
docs/architecture.md Design narrative + dependency mermaid
docs/adr/ Closed architectural decisions
docs/roadmap.md Landed-vs-planned matrix

Open research strands live in research-strands.md until promoted ADRs land in docs/adr/.

Onboarding & process
Doc Scope
docs/quick-start.md · docs/examples.md Developer onboarding + runnable catalog
docs/development-process.md How work flows: the SDD ladder and its gates
CONTRIBUTING.md How to contribute
docs/ci.md CI and contributor checks
docs/releases.md Release process + version policy
CHANGELOG.md Release log
AGENTS.md Entry point for coding agents
docs/ai-workflow.md AI agent conventions, MCP skills, example-doc upkeep
SECURITY.md Vulnerability reporting

License

MIT — see LICENSE.

Directories

Path Synopsis
Package auth provides the generic TokenSource abstraction and shared OAuth2 primitives (JWKS, discovery, scope builder) used by every authenticated SDK call.
Package auth provides the generic TokenSource abstraction and shared OAuth2 primitives (JWKS, discovery, scope builder) used by every authenticated SDK call.
basic
Package basic implements HTTP Basic authentication (RFC 7617) as an auth.TokenSource for openEHR REST deployments that accept a static username and password on each request.
Package basic implements HTTP Basic authentication (RFC 7617) as an auth.TokenSource for openEHR REST deployments that accept a static username and password on each request.
clientcreds
Package clientcreds implements the OAuth2 Client Credentials grant (RFC 6749 § 4.4) as an auth.TokenSource — for service-to-service callers (benchmark, seeder, MCP server backend, federator) that do not run an interactive user flow.
Package clientcreds implements the OAuth2 Client Credentials grant (RFC 6749 § 4.4) as an auth.TokenSource — for service-to-service callers (benchmark, seeder, MCP server backend, federator) that do not run an interactive user flow.
introspect
Package introspect provides an opt-in RFC 7662 token introspection client for SDK consumers acting as resource servers or MCP gateways.
Package introspect provides an opt-in RFC 7662 token introspection client for SDK consumers acting as resource servers or MCP gateways.
jwtbearer
Package jwtbearer implements the OAuth2 JWT Bearer (RFC 7523) grant as an auth.TokenSource — for systems that already hold a signed assertion and want to exchange it for an access token without an interactive flow.
Package jwtbearer implements the OAuth2 JWT Bearer (RFC 7523) grant as an auth.TokenSource — for systems that already hold a signed assertion and want to exchange it for an access token without an interactive flow.
smart
Package smart implements the SMART-on-openEHR auth provider: PKCE, authorization-code launch flow, token refresh, and JWKS rotation, returning a TokenSource compatible with the parent auth package.
Package smart implements the SMART-on-openEHR auth provider: PKCE, authorization-code launch flow, token refresh, and JWKS rotation, returning a TokenSource compatible with the parent auth package.
Package cadasto is the namespace for Cadasto-platform extras — application-specific layers shipped in the same module in v1 for adoption convenience.
Package cadasto is the namespace for Cadasto-platform extras — application-specific layers shipped in the same module in v1 for adoption convenience.
admin
Package admin is the client for tenant, environment, system info, and healthcheck endpoints on a Cadasto deployment.
Package admin is the client for tenant, environment, system info, and healthcheck endpoints on a Cadasto deployment.
care
Package care exposes opinionated application aggregates over EHR and Demographic resources: Patient, User, CaseLoad, CareTeam, Episode.
Package care exposes opinionated application aggregates over EHR and Demographic resources: Patient, User, CaseLoad, CareTeam, Episode.
datamap
Package datamap is the client and builder for Datamap V2 — the Cadasto-specific format for resource-free read and write of clinical and demographic data across the openEHR REST API surface.
Package datamap is the client and builder for Datamap V2 — the Cadasto-specific format for resource-free read and write of clinical and demographic data across the openEHR REST API surface.
extra
Package extra is the client for the Cadasto Extra API — endpoints that complement openEHR REST on a Cadasto deployment.
Package extra is the client for the Cadasto Extra API — endpoints that complement openEHR REST on a Cadasto deployment.
mpi
Package mpi exposes the minimal Master Patient Index search surface — a preview shape pending the Cadasto MPI / identity resolution / trust federation research outcome.
Package mpi exposes the minimal Master Patient Index search surface — a preview shape pending the Cadasto MPI / identity resolution / trust federation research outcome.
cmd
bmmdiff command
bmmdiff is a small CLI that compares two BMM JSON files and prints a human-readable "what changed" summary.
bmmdiff is a small CLI that compares two BMM JSON files and prints a human-readable "what changed" summary.
bmmgen command
bmmgen is the BMM-driven code generator CLI.
bmmgen is the BMM-driven code generator CLI.
examples
Package examples hosts worked, runnable example programs for each named SDK use case (benchmark, seeder, MCP server, federator).
Package examples hosts worked, runnable example programs for each named SDK use case (benchmark, seeder, MCP server, federator).
examples/aql-build command
Example: build an AQL query two ways — the struct-builder and the verb-functions — and show that both emit byte-identical, canonical AQL (REQ-055, PROBE-020).
Example: build an AQL query two ways — the struct-builder and the verb-functions — and show that both emit byte-identical, canonical AQL (REQ-055, PROBE-020).
examples/aql-parse-structured command
Example: parse an AQL query into the REQ-113 Tier-2 structured AST (parse.Query) and walk its shape.
Example: parse an AQL query into the REQ-113 Tier-2 structured AST (parse.Query) and walk its shape.
examples/canonical_json command
Example: decode a canonical-JSON Composition cassette and print a few key fields.
Example: decode a canonical-JSON Composition cassette and print a few key fields.
examples/canxml_roundtrip command
Example: JSON → struct → XML → struct → JSON round-trip.
Example: JSON → struct → XML → struct → JSON round-trip.
examples/compile-build-validate command
Example: the full clinical pipeline driven entirely through PUBLIC SDK packages (REQ-111) — parse an OPT, compile it with the public openehr/templatecompile bridge, build a *rm.Composition with the REQ-101 builder, serialise it to canonical JSON, round-trip it, and validate it against the same compiled template.
Example: the full clinical pipeline driven entirely through PUBLIC SDK packages (REQ-111) — parse an OPT, compile it with the public openehr/templatecompile bridge, build a *rm.Composition with the REQ-101 builder, serialise it to canonical JSON, round-trip it, and validate it against the same compiled template.
examples/contribution-build command
Example: assemble a multi-version CONTRIBUTION with `contribution.Builder` (REQ-130) and print the `Contribution_create` body it produces.
Example: assemble a multi-version CONTRIBUTION with `contribution.Builder` (REQ-130) and print the `Contribution_create` body it produces.
examples/ehr_create command
Example: end-to-end EHR creation against an in-process httptest server.
Example: end-to-end EHR creation against an in-process httptest server.
examples/flat-roundtrip command
Example: convert an openEHR COMPOSITION to the FLAT and STRUCTURED Simplified Formats and back, driven by the composition's Web Template (REQ-053 + REQ-106).
Example: convert an openEHR COMPOSITION to the FLAT and STRUCTURED Simplified Formats and back, driven by the composition's Web Template (REQ-053 + REQ-106).
examples/generate-example command
Example: synthesise an RM instance from a compiled OPT and emit the canonical JSON to stdout.
Example: synthesise an RM instance from a compiled OPT and emit the canonical JSON to stdout.
examples/lint-aql command
Example: statically lint AQL with openehr/aql/lint and the validation.ValidateAQL bridge (REQ-109).
Example: statically lint AQL with openehr/aql/lint and the validation.ValidateAQL bridge (REQ-109).
examples/opt-parse command
Example: parse an ADL 1.4 operational template (OPT) and print identity, OPT metadata, and path-resolved nodes.
Example: parse an ADL 1.4 operational template (OPT) and print identity, OPT metadata, and path-resolved nodes.
examples/primitive-validate command
Example: parse a minimal OPT with a DV_QUANTITY primitive constraint, resolve a path, and call PrimitiveConstraint.Validate (REQ-103).
Example: parse a minimal OPT with a DV_QUANTITY primitive constraint, resolve a path, and call PrimitiveConstraint.Validate (REQ-103).
examples/smart-launch command
Example: standalone SMART-on-openEHR launch with PKCE (public client).
Example: standalone SMART-on-openEHR launch with PKCE (public client).
examples/template-explore command
Example: introspect a compiled operational template through the public REQ-111 surface — walk the templatecompile.CompiledNode tree to print the template structure (the seed of a form generator) and the addressable primitive-leaf paths (the seed of path discovery / Builder.Set targets).
Example: introspect a compiled operational template through the public REQ-111 surface — walk the templatecompile.CompiledNode tree to print the template structure (the seed of a form generator) and the addressable primitive-leaf paths (the seed of path discovery / Builder.Set targets).
examples/validate-composition command
Example: parse an OPT, compile it, and validate an in-memory *rm.Composition with openehr/validation (REQ-102).
Example: parse an OPT, compile it, and validate an in-memory *rm.Composition with openehr/validation (REQ-102).
examples/validate-from-json command
Example: decode canonical-JSON Composition bytes with canjson, compile vital_signs.opt, and validate (REQ-052 + REQ-102).
Example: decode canonical-JSON Composition bytes with canjson, compile vital_signs.opt, and validate (REQ-052 + REQ-102).
examples/webtemplate-export command
Example: export a compiled operational template as EHRbase openEHR_SDK v2.3 WebTemplate JSON (REQ-106) — the lossy, UI-oriented projection a form renderer or FLAT-path mapper consumes.
Example: export a compiled operational template as EHRbase openEHR_SDK v2.3 WebTemplate JSON (REQ-106) — the lossy, UI-oriented projection a form renderer or FLAT-path mapper consumes.
termgen command
termgen generates the openehr/terminology tables from the pinned openEHR Terminology XML.
termgen generates the openehr/terminology tables from the pinned openEHR Terminology XML.
Package internal hosts implementation helpers that are explicitly excluded from the module's backwards-compatibility promises (per Go convention: anything under internal/ is invisible to external consumers).
Package internal hosts implementation helpers that are explicitly excluded from the module's backwards-compatibility promises (per Go convention: anything under internal/ is invisible to external consumers).
bmmdiff
Package bmmdiff computes a structured, human-readable diff between two loaded BMM schemas.
Package bmmdiff computes a structured, human-readable diff between two loaded BMM schemas.
bmmgen
Package bmmgen is the BMM-driven code generator for the SDK.
Package bmmgen is the BMM-driven code generator for the SDK.
templatecompile
Package templatecompile turns a parsed OPT (openehr/template's wire representation) into a walker-friendly compiled form that the composition builder (REQ-101), validator (REQ-102), and example generator consume.
Package templatecompile turns a parsed OPT (openehr/template's wire representation) into a walker-friendly compiled form that the composition builder (REQ-101), validator (REQ-102), and example generator consume.
templatecompile/walk
Package walk provides a Visitor abstraction over the compiled OPT tree produced by internal/templatecompile.Compile.
Package walk provides a Visitor abstraction over the compiled OPT tree produced by internal/templatecompile.Compile.
templatecompile/walk/templatedump
Package templatedump provides reference walk.Visitor implementations: a pretty-printer that renders a compiled OPT as an indented tree, and a path collector that accumulates every node's canonical AQL path.
Package templatedump provides reference walk.Visitor implementations: a pretty-printer that renders a compiled OPT as an indented tree, and a path collector that accumulates every node's canonical AQL path.
templateinstance/rmwrite
Package rmwrite writes RM attribute values by name without reflection.
Package rmwrite writes RM attribute values by name without reflection.
termgen
Package termgen generates the openehr/terminology tables from the pinned openEHR Terminology XML under resources/terminology/ (REQ-034).
Package termgen generates the openehr/terminology tables from the pinned openEHR Terminology XML under resources/terminology/ (REQ-034).
Package openehr is a namespace marker — generic openEHR primitives live in its sub-packages (rm, serialize, validation, template, aql, composition, client).
Package openehr is a namespace marker — generic openEHR primitives live in its sub-packages (rm, serialize, validation, template, aql, composition, client).
aom/aom14
Package aom14 holds Go types generated from the openEHR Archetype Object Model 1.4 (BMM source: openehr_am_1.4.0.bmm.json + openehr_base_1.3.0.bmm.json).
Package aom14 holds Go types generated from the openEHR Archetype Object Model 1.4 (BMM source: openehr_am_1.4.0.bmm.json + openehr_base_1.3.0.bmm.json).
aql
Package aql provides:
Package aql provides:
aql/contain
Package contain answers, for two AQL class expressions, whether a containment route connects them under the pinned openEHR Reference Model — the shared RM-derived containment relation for the AQL semantic lint (REQ-161), the builder verification (REQ-162), and the path-shape lint's redundant-step check (REQ-164, via TypeRelation.Unavoidable).
Package contain answers, for two AQL class expressions, whether a containment route connects them under the pinned openEHR Reference Model — the shared RM-derived containment relation for the AQL semantic lint (REQ-161), the builder verification (REQ-162), and the path-shape lint's redundant-step check (REQ-164, via TypeRelation.Unavoidable).
aql/internal/semcheck
Package semcheck is the shared rule engine behind the AQL semantic containment checks: it turns REQ-160 containment verdicts into REQ-161 issue codes, once, for every adapter that needs them.
Package semcheck is the shared rule engine behind the AQL semantic containment checks: it turns REQ-160 containment verdicts into REQ-161 issue codes, once, for every adapter that needs them.
aql/lint
Package lint statically checks AQL (REQ-109) over the SDK grammar profile.
Package lint statically checks AQL (REQ-109) over the SDK grammar profile.
aql/parse
Package parse turns an AQL string into a syntax-checked, generated-type-free view (REQ-109).
Package parse turns an AQL string into a syntax-checked, generated-type-free view (REQ-109).
bmm
Package bmm loads openEHR Basic Meta-Model (BMM) schemas — the P_BMM JSON files pinned under resources/bmm/ — into an in-memory model.
Package bmm loads openEHR Basic Meta-Model (BMM) schemas — the P_BMM JSON files pinned under resources/bmm/ — into an in-memory model.
client
Package client groups REST clients per openEHR resource — each sub-package corresponds to an openEHR REST 1.1.0-development surface.
Package client groups REST clients per openEHR resource — each sub-package corresponds to an openEHR REST 1.1.0-development surface.
client/admin
Package admin is the ITS-REST `/admin/*` client (REQ-099).
Package admin is the ITS-REST `/admin/*` client (REQ-099).
client/definition
Package definition is the openEHR REST 1.1.0-development Definition API client.
Package definition is the openEHR REST 1.1.0-development Definition API client.
client/demographic
Package demographic is the openEHR REST client for the Demographic API — the PARTY hierarchy (PERSON, ORGANISATION, GROUP, AGENT, ROLE) with versioned CRUD.
Package demographic is the openEHR REST client for the Demographic API — the PARTY hierarchy (PERSON, ORGANISATION, GROUP, AGENT, ROLE) with versioned CRUD.
client/ehr
Package ehr is the openEHR REST client for the EHR resource and its sub-resources: Composition, Contribution, Directory, EHR_STATUS, and ItemTags.
Package ehr is the openEHR REST client for the EHR resource and its sub-resources: Composition, Contribution, Directory, EHR_STATUS, and ItemTags.
client/ehr/composition
Package composition is the openEHR REST 1.1.0-development Composition sub-resource client.
Package composition is the openEHR REST 1.1.0-development Composition sub-resource client.
client/ehr/contribution
Package contribution is the openEHR REST 1.1.0-development Contribution sub-resource client — multi-version atomic commits against an EHR (Commit) and reads of a persisted contribution by uid (Get, REQ-142), the two operations the ITS-REST pin declares.
Package contribution is the openEHR REST 1.1.0-development Contribution sub-resource client — multi-version atomic commits against an EHR (Commit) and reads of a persisted contribution by uid (Get, REQ-142), the two operations the ITS-REST pin declares.
client/ehr/directory
Package directory is the openEHR REST 1.1.0-development Directory (folder hierarchy) sub-resource client.
Package directory is the openEHR REST 1.1.0-development Directory (folder hierarchy) sub-resource client.
client/ehr/ehrstatus
Package ehrstatus is the openEHR REST 1.1.0-development EHR_STATUS sub-resource client.
Package ehrstatus is the openEHR REST 1.1.0-development EHR_STATUS sub-resource client.
client/ehr/itemtags
Package itemtags implements openEHR REST 1.1.0 ItemTag operations via the openehr-item-tag and openehr-version-item-tag headers (REQ-059).
Package itemtags implements openEHR REST 1.1.0 ItemTag operations via the openehr-item-tag and openehr-version-item-tag headers (REQ-059).
client/query
Package query is the openEHR REST AQL executor.
Package query is the openEHR REST AQL executor.
client/system
Package system is the openEHR REST 1.1.0-development System API client.
Package system is the openEHR REST 1.1.0-development System API client.
composition
Package composition is the generic, OPT-driven Composition builder (REQ-101).
Package composition is the generic, OPT-driven Composition builder (REQ-101).
instance
Package instance synthesises an RM object graph from a compiled operational template (REQ-107).
Package instance synthesises an RM object graph from a compiled operational template (REQ-107).
internal/jsonpoly
Package jsonpoly provides canonical-JSON marshalling helpers for polymorphic (interface-typed) RM fields.
Package jsonpoly provides canonical-JSON marshalling helpers for polymorphic (interface-typed) RM fields.
internal/rmnames
Package rmnames carries the wire-parameterised RM type names that the bare registry names (rm.RMTypeName, ADR 0013) deliberately do not encode.
Package rmnames carries the wire-parameterised RM type names that the bare registry names (rm.RMTypeName, ADR 0013) deliberately do not encode.
rm
Package rm models the openEHR Reference Model.
Package rm models the openEHR Reference Model.
rm/rminfo
Package rminfo answers "what does the openEHR Reference Model declare about RM class X?" — required attributes, attribute RM types, multi-cardinality flags, the universe of known class names, and (REQ-048) the class graph over them: abstractness, immediate parents, transitive ancestors, conformance, the concrete classes an abstract class denotes, and the class each attribute is declared on.
Package rminfo answers "what does the openEHR Reference Model declare about RM class X?" — required attributes, attribute RM types, multi-cardinality flags, the universe of known class names, and (REQ-048) the class graph over them: abstractness, immediate parents, transitive ancestors, conformance, the concrete classes an abstract class denotes, and the class each attribute is declared on.
rm/rmpath
Package rmpath provides read navigation of an in-memory openEHR RM instance by an openEHR path — the PATHABLE read operations (item_at_path, items_at_path, path_exists, path_unique) over the actual object tree (REQ-121).
Package rmpath provides read navigation of an in-memory openEHR RM instance by an openEHR path — the PATHABLE read operations (item_at_path, items_at_path, path_exists, path_unique) over the actual object tree (REQ-121).
rm/typereg
Package typereg holds the central type registry that maps the openEHR _type discriminator to concrete Go RM types for JSON decoding.
Package typereg holds the central type registry that maps the openEHR _type discriminator to concrete Go RM types for JSON decoding.
serialize
Package serialize provides codecs for openEHR data: canonical JSON, canonical XML, FLAT, and STRUCTURED formats.
Package serialize provides codecs for openEHR data: canonical JSON, canonical XML, FLAT, and STRUCTURED formats.
serialize/canjson
Package canjson implements the openEHR canonical JSON codec for the SDK's generated Reference Model types.
Package canjson implements the openEHR canonical JSON codec for the SDK's generated Reference Model types.
serialize/canxml
Package canxml implements the openEHR canonical XML codec for the SDK's generated Reference Model types — the symmetric sibling of github.com/cadasto/openehr-sdk-go/openehr/serialize/canjson.
Package canxml implements the openEHR canonical XML codec for the SDK's generated Reference Model types — the symmetric sibling of github.com/cadasto/openehr-sdk-go/openehr/serialize/canjson.
serialize/internal/poly
Package poly holds shared helpers for polymorphic discrimination across the canjson and canxml codecs.
Package poly holds shared helpers for polymorphic discrimination across the canjson and canxml codecs.
serialize/simplified
Package simplified converts an openEHR COMPOSITION to and from the FLAT and STRUCTURED Simplified Formats (REQ-053).
Package simplified converts an openEHR COMPOSITION to and from the FLAT and STRUCTURED Simplified Formats (REQ-053).
template
Package template parses ADL 1.4 operational templates (OPT) into an in-memory model with openEHR path utilities.
Package template parses ADL 1.4 operational templates (OPT) into an in-memory model with openEHR path utilities.
template/constraints
Package constraints carries the typed primitive constraint values REQ-103 attaches to leaf OPT nodes.
Package constraints carries the typed primitive constraint values REQ-103 attaches to leaf OPT nodes.
template/webtemplate
Package webtemplate exports a compiled openEHR operational template as EHRbase openEHR_SDK v2.3 "WebTemplate" JSON — a lossy, UI-oriented projection consumed by form renderers and data-entry clients.
Package webtemplate exports a compiled openEHR operational template as EHRbase openEHR_SDK v2.3 "WebTemplate" JSON — a lossy, UI-oriented projection consumed by form renderers and data-entry clients.
templatecompile
Package templatecompile is the public bridge that turns a parsed ADL 1.4 operational template into the compiled form consumed by the composition builder, the RM instance synthesiser, the validator, and the AQL static lint — REQ-111.
Package templatecompile is the public bridge that turns a parsed ADL 1.4 operational template into the compiled form consumed by the composition builder, the RM instance synthesiser, the validator, and the AQL static lint — REQ-111.
terminology
Package terminology answers "is this code a member of that openEHR terminology group, what is its rubric, and which code carries this rubric?" — the closed, versioned value sets the RM's own invariants reference (EVENT_CONTEXT.Setting_valid, AUDIT_DETAILS.Change_type_valid, PARTICIPATION.Mode_valid, DV_ORDERED.Normal_status_validity, …).
Package terminology answers "is this code a member of that openEHR terminology group, what is its rubric, and which code carries this rubric?" — the closed, versioned value sets the RM's own invariants reference (EVENT_CONTEXT.Setting_valid, AUDIT_DETAILS.Change_type_valid, PARTICIPATION.Mode_valid, DV_ORDERED.Normal_status_validity, …).
validation
Package validation checks in-memory openEHR Reference Model artefacts against a compiled OPT and reports every issue in one pass — REQ-102 (COMPOSITION) and REQ-110 (any archetypeable root).
Package validation checks in-memory openEHR Reference Model artefacts against a compiled OPT and reports every issue in one pass — REQ-102 (COMPOSITION) and REQ-110 (any archetypeable root).
validation/rmread
Package rmread reads RM attribute values by name without reflection.
Package rmread reads RM attribute values by name without reflection.
Package sandbox is the in-memory openEHR backend that backs REQ-082's Sandbox probe mode.
Package sandbox is the in-memory openEHR backend that backs REQ-082's Sandbox probe mode.
Package smart is the application-level SMART launch surface (REQ-064, REQ-067): typed LaunchContext, ID-token claim parsing, and platform principal claims.
Package smart is the application-level SMART launch surface (REQ-064, REQ-067): typed LaunchContext, ID-token claim parsing, and platform principal claims.
discovery
Package discovery resolves the SMART-on-openEHR service catalog: fetches the SMART configuration document, validates that required services (org.openehr.rest, Cadasto extras when present) are advertised, and exposes a cached, refresh-able ServiceCatalog to the typed clients.
Package discovery resolves the SMART-on-openEHR service catalog: fetches the SMART configuration document, validates that required services (org.openehr.rest, Cadasto extras when present) are advertised, and exposes a cached, refresh-able ServiceCatalog to the typed clients.
Package testkit hosts the conformance probes and the vendored fixtures they read, for SDK consumers and for the SDK's own test suite.
Package testkit hosts the conformance probes and the vendored fixtures they read, for SDK consumers and for the SDK's own test suite.
conformance/webtemplate
Package webtemplate runs the PROBE-086 upstream FLAT serialisation conformance harness: for each body in the pinned EHRbase FLAT corpus, decode it through the REQ-053 codec and re-encode it, then compare the result against the upstream-authored original.
Package webtemplate runs the PROBE-086 upstream FLAT serialisation conformance harness: for each body in the pinned EHRbase FLAT corpus, decode it through the REQ-053 codec and re-encode it, then compare the result against the upstream-authored original.
fixtures
Package fixtures resolves vendored cassette paths under testkit/cassettes/.
Package fixtures resolves vendored cassette paths under testkit/cassettes/.
probe
Package probe is the single home for the conformance-probe result type and the catalog runner (REQ-082).
Package probe is the single home for the conformance-probe result type and the catalog runner (REQ-082).
probes/aql
Package aqlprobes hosts the openEHR conformance probes for openehr/aql — the AQL builders (REQ-055) and the AQL lint pipeline (REQ-109).
Package aqlprobes hosts the openEHR conformance probes for openehr/aql — the AQL builders (REQ-055) and the AQL lint pipeline (REQ-109).
probes/auth
Package authprobes hosts the openEHR conformance probes for authentication and token-refresh behaviour.
Package authprobes hosts the openEHR conformance probes for authentication and token-refresh behaviour.
probes/composition
Package compositionprobes hosts the openEHR conformance probes for openehr/composition/ — the OPT-driven composition builder (REQ-101).
Package compositionprobes hosts the openEHR conformance probes for openehr/composition/ — the OPT-driven composition builder (REQ-101).
probes/definition
Package definitionprobes hosts the openEHR conformance probes for the openEHR REST Definition API (PROBE-067 today; more follow alongside ADL 2 and stored-AQL surfaces).
Package definitionprobes hosts the openEHR conformance probes for the openEHR REST Definition API (PROBE-067 today; more follow alongside ADL 2 and stored-AQL surfaces).
probes/demographic
Package demographicprobes hosts the openEHR conformance probes for the Demographic REST client (openehr/client/demographic).
Package demographicprobes hosts the openEHR conformance probes for the Demographic REST client (openehr/client/demographic).
probes/discovery
Package discoveryprobes hosts the openEHR conformance probes for the openEHR service-discovery layer.
Package discoveryprobes hosts the openEHR conformance probes for the openEHR service-discovery layer.
probes/instance
Package instanceprobes hosts the openEHR conformance probes for openehr/instance/ — template-driven RM instance synthesis (REQ-107).
Package instanceprobes hosts the openEHR conformance probes for openehr/instance/ — template-driven RM instance synthesis (REQ-107).
probes/serialize
Package serializeprobes hosts the openEHR conformance probes for the openEHR serialization codecs.
Package serializeprobes hosts the openEHR conformance probes for the openEHR serialization codecs.
probes/template
Package templateprobes hosts the openEHR conformance probes for the openehr/template/ surface — local ADL 1.4 operational template parsing and path resolution (PROBE-022).
Package templateprobes hosts the openEHR conformance probes for the openehr/template/ surface — local ADL 1.4 operational template parsing and path resolution (PROBE-022).
probes/transport
Package transportprobes hosts the openEHR conformance probes for cross-cutting transport behaviour — properties the `transport/` layer enforces on behalf of every `openehr/client` leaf, rather than properties of one openEHR resource (PROBE-091 and PROBE-101 today).
Package transportprobes hosts the openEHR conformance probes for cross-cutting transport behaviour — properties the `transport/` layer enforces on behalf of every `openehr/client` leaf, rather than properties of one openEHR resource (PROBE-091 and PROBE-101 today).
probes/validation
Package validationprobes hosts the openEHR conformance probes for openehr/validation/ — template-driven RM validation against a compiled OPT (REQ-102, REQ-110).
Package validationprobes hosts the openEHR conformance probes for openehr/validation/ — template-driven RM validation against a compiled OPT (REQ-102, REQ-110).
probes/versioned
Package versionedprobes hosts the openEHR conformance probes for the openEHR REST versioned-write contract (REQ-054).
Package versionedprobes hosts the openEHR conformance probes for the openEHR REST versioned-write contract (REQ-054).
Package transport is the HTTP client wrapper around an injected *http.Client.
Package transport is the HTTP client wrapper around an injected *http.Client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL