openehr-sdk-go

module
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 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

A COMPOSITION is the openEHR clinical document, and canonical JSON is how the REST API carries it. This decodes one into a typed struct and reads a few fields, with no network and no CDR involved:

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, cmd/examples/canonical_json, does the same against 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

archetype_node_id names the archetype the document is built on, language and territory are codes with the terminology they come from, category is the composition category, and content items counts the entries the document carries. The examples catalogue has a program of this size for each SDK surface (validate a composition against a template, build and lint AQL, create an EHR through the REST client, run a SMART launch), each with a note on what to copy into your own application.

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

go get github.com/cadasto/openehr-sdk-go@v0.46.0

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

Who it's for

It was built with these 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 roadmap and the REQ registry hold the authoritative landed-vs-planned status, with REQ and PROBE identifiers.

  • 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): an operational template model that reads an OPT and writes it back in canonical JSON or XML, a compile step with typed primitive constraints, and WebTemplate JSON export for form generation. clinical-modeling
  • Compositions: an OPT-driven builder, template-driven validation, and RM-instance synthesis from a template. clinical-modeling
  • 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 still on the roadmap. Datamap, MPI, an Extra API, and Care aggregates are planned. The Cadasto admin package has health probes today, and the rest of it is partial. These packages live in the same module behind a cadasto/ cut line, so they can later move out as a subtree instead of being rewritten. module-layout
  • Conformance: an openEHR wire-conformance probe suite covering round trips that keep every value 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 keeps that work honest. Every change is measured against the specs in this repository and has to pass the make ci gate. Each change is also reviewed before a maintainer merges it. ai-workflow.md explains how the assistants are set up and what they must look up rather than guess. 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 Delivery stages and the work not yet finished

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

The SDK is released under the MIT licence. See LICENSE.

Vendored third-party artefacts (test fixtures, openEHR specification pins, the AQL grammar) keep their upstream licences. The inventory is LICENSING.md.

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 (batch jobs, data loaders, MCP server backends, federating gateways) 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 (batch jobs, data loaders, MCP server backends, federating gateways) that do not run an interactive user flow.
jwtbearer
Package jwtbearer implements the OAuth2 JWT Bearer (RFC 7523) grant as an auth.TokenSource.
Package jwtbearer implements the OAuth2 JWT Bearer (RFC 7523) grant as an auth.TokenSource.
smart
Package smart implements the SMART-on-openEHR auth provider: PKCE, authorization-code launch flow, token refresh, JWKS rotation and ID-token verification, 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, JWKS rotation and ID-token verification, 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 reserved for the Datamap V2 codec: conversion between the Cadasto Datamap payload format and openEHR canonical JSON, driven by an operational template.
Package datamap is reserved for the Datamap V2 codec: conversion between the Cadasto Datamap payload format and openEHR canonical JSON, driven by an operational template.
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.
Package mpi exposes the minimal Master Patient Index search surface.
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.
cdrcheck command
Command cdrcheck cross-checks the SDK against live openEHR CDRs: it generates documents from a directory of OPTs with the SDK's example generator, posts them to each CDR, and validates each CDR's own template example with the SDK's validator.
Command cdrcheck cross-checks the SDK against live openEHR CDRs: it generates documents from a directory of OPTs with the SDK's example generator, posts them to each CDR, and validates each CDR's own template example with the SDK's validator.
examples
Package examples holds the runnable example programs that show how to use the SDK, one directory per program.
Package examples holds the runnable example programs that show how to use the SDK, one directory per program.
examples/aql-build command
This example builds AQL queries with the openehr/aql package and prints the query text each one produces.
This example builds AQL queries with the openehr/aql package and prints the query text each one produces.
examples/aql-parse-structured command
This example parses AQL text into the structured query tree that the openehr/aql/parse package returns, prints each clause of that tree, and emits the tree back to canonical AQL text.
This example parses AQL text into the structured query tree that the openehr/aql/parse package returns, prints each clause of that tree, and emits the tree back to canonical AQL text.
examples/canonical_json command
Decode an openEHR COMPOSITION from canonical JSON into the SDK's typed Reference Model (RM) structs and print a few of its fields.
Decode an openEHR COMPOSITION from canonical JSON into the SDK's typed Reference Model (RM) structs and print a few of its fields.
examples/canxml_roundtrip command
Take one COMPOSITION through both canonical formats and back: JSON to Go structs, structs to canonical XML, XML back to structs, structs to JSON.
Take one COMPOSITION through both canonical formats and back: JSON to Go structs, structs to canonical XML, XML back to structs, structs to JSON.
examples/compile-build-validate command
Example: the whole clinical pipeline through public SDK packages only.
Example: the whole clinical pipeline through public SDK packages only.
examples/composition-crud command
Save, read and update a COMPOSITION through the SDK's REST client, and handle the refusal a stale update meets.
Save, read and update a COMPOSITION through the SDK's REST client, and handle the refusal a stale update meets.
examples/contribution-build command
This example assembles a CONTRIBUTION with contribution.Builder and prints the Contribution_create request body the builder produces.
This example assembles a CONTRIBUTION with contribution.Builder and prints the Contribution_create request body the builder produces.
examples/definition-lifecycle command
Example: the lifecycle of a template through the Definition REST client.
Example: the lifecycle of a template through the Definition REST client.
examples/ehr_create command
Create an EHR through the SDK's REST client path.
Create an EHR through the SDK's REST client path.
examples/flat-roundtrip command
Example: convert a composition to the FLAT and STRUCTURED simplified formats and back.
Example: convert a composition to the FLAT and STRUCTURED simplified formats and back.
examples/generate-example command
Generate an RM instance from an operational template (OPT) and print it as canonical JSON.
Generate an RM instance from an operational template (OPT) and print it as canonical JSON.
examples/lint-aql command
This example checks AQL queries for problems before they reach a server.
This example checks AQL queries for problems before they reach a server.
examples/opt-parse command
Example: read an ADL 1.4 operational template (OPT), compile it, and look around inside it: identity, provenance metadata, the root node with its attributes, and path lookup.
Example: read an ADL 1.4 operational template (OPT), compile it, and look around inside it: identity, provenance metadata, the root node with its attributes, and path lookup.
examples/primitive-validate command
Example: validate single values against one leaf constraint of an operational template (OPT), without building a composition.
Example: validate single values against one leaf constraint of an operational template (OPT), without building a composition.
examples/query-execute command
This example executes an AQL query and reads its result, picking up where aql-build stops: bind caller data as parameters, send the query with query.Execute, print the RESULT_SET, turn an RM-valued cell into a typed rm.DVQuantity, and classify a query the server refuses.
This example executes an AQL query and reads its result, picking up where aql-build stops: bind caller data as parameters, send the query with query.Execute, print the RESULT_SET, turn an RM-valued cell into a typed rm.DVQuantity, and classify a query the server refuses.
examples/service-auth command
Example: service-to-service authentication, for a backend job that calls an openEHR server with no user present.
Example: service-to-service authentication, for a backend job that calls an openEHR server with no user present.
examples/smart-launch command
Walk through a standalone SMART-on-openEHR launch for a public client: the OAuth 2.0 authorization-code flow with PKCE, which is how a browser-based or native app that cannot keep a client secret obtains an access token.
Walk through a standalone SMART-on-openEHR launch for a public client: the OAuth 2.0 authorization-code flow with PKCE, which is how a browser-based or native app that cannot keep a client secret obtains an access token.
examples/template-explore command
Example: walk a compiled operational template (OPT) through its public introspection tree and print two views of it.
Example: walk a compiled operational template (OPT) through its public introspection tree and print two views of it.
examples/validate-composition command
Example: build a composition in memory as plain Reference Model structs, compile an operational template (OPT), and validate the composition with one call.
Example: build a composition in memory as plain Reference Model structs, compile an operational template (OPT), and validate the composition with one call.
examples/validate-from-json command
Validate a COMPOSITION that arrives as canonical JSON, the way a CI check or an inbound gateway would: read the bytes, compile an operational template (OPT), and decode and validate the document with one call that lists every issue it finds.
Validate a COMPOSITION that arrives as canonical JSON, the way a CI check or an inbound gateway would: read the bytes, compile an operational template (OPT), and decode and validate the document with one call that lists every issue it finds.
examples/webtemplate-export command
Example: export a compiled operational template (OPT) as a Web Template, the JSON form that EHRbase-style form renderers and FLAT-format mappers consume.
Example: export a compiled operational template (OPT) as a Web Template, the JSON form that EHRbase-style form renderers and FLAT-format mappers consume.
probe-record command
Command probe-record captures live openEHR REST exchanges into Cassette recordings (HAR 1.2).
Command probe-record captures live openEHR REST exchanges into Cassette recordings (HAR 1.2).
termgen command
termgen generates the openehr/terminology tables from the pinned openEHR Terminology XML files.
termgen generates the openehr/terminology tables from the pinned openEHR Terminology XML files.
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.
bmmtype
Package bmmtype reads the type names that openEHR BMM schemas and operational templates write as text, such as "DV_INTERVAL<DV_QUANTITY>".
Package bmmtype reads the type names that openEHR BMM schemas and operational templates write as text, such as "DV_INTERVAL<DV_QUANTITY>".
coalesce
Package coalesce holds the rule the SDK's coalesced calls share.
Package coalesce holds the rule the SDK's coalesced calls share.
expiresin
Package expiresin reads the expires_in member of an OAuth 2.0 token response as whole seconds, the one way every token source in the SDK reads it.
Package expiresin reads the expires_in member of an OAuth 2.0 token response as whole seconds, the one way every token source in the SDK reads it.
importguard
Package importguard finds forbidden imports in the packages a Go package pulls in from its own module.
Package importguard finds forbidden imports in the packages a Go package pulls in from its own module.
iso8601
Package iso8601 parses the ISO 8601 date, time, date-time and duration text that openEHR's temporal data values carry, in the forms the openEHR BASE predicates valid_iso8601_date, valid_iso8601_time, valid_iso8601_date_time and valid_iso8601_duration define, and orders the values it parses.
Package iso8601 parses the ISO 8601 date, time, date-time and duration text that openEHR's temporal data values carry, in the forms the openEHR BASE predicates valid_iso8601_date, valid_iso8601_time, valid_iso8601_date_time and valid_iso8601_duration define, and orders the values it parses.
noredirect
Package noredirect builds the HTTP client that sends a request carrying a credential, such as a token, refresh or revocation request: one that returns a 3xx answer to the caller instead of following it, so a 307 or a 308 cannot take the request's form to another URL.
Package noredirect builds the HTTP client that sends a request carrying a credential, such as a token, refresh or revocation request: one that returns a 3xx answer to the caller instead of following it, so a 307 or a 308 cannot take the request's form to another URL.
rmaccess
Package rmaccess reads the attributes of an openEHR Reference Model value by name, without reflection, through access the generator emits for every concrete RM class the type registry decodes.
Package rmaccess reads the attributes of an openEHR Reference Model value by name, without reflection, through access the generator emits for every concrete RM class the type registry decodes.
rmjsonwalk
Package rmjsonwalk reads a canonical-JSON document against the openEHR Reference Model's own attribute lists, as openehr/rm/rminfo publishes them, without decoding it into Go values.
Package rmjsonwalk reads a canonical-JSON document against the openEHR Reference Model's own attribute lists, as openehr/rm/rminfo publishes them, without decoding it into Go values.
rmjsonwalk/polyreg
Package polyreg holds the table of polymorphic RM interfaces that the openehr/rm package registers when it is initialised: for each interface, the BMM class it stands for.
Package polyreg holds the table of polymorphic RM interfaces that the openehr/rm package registers when it is initialised: for each interface, the BMM class it stands for.
rmlists
Package rmlists names the optional openEHR Reference Model lists that canonical JSON writes as an empty array when they are present and empty.
Package rmlists names the optional openEHR Reference Model lists that canonical JSON writes as an empty array when they are present and empty.
rmroots
Package rmroots names the openEHR Reference Model classes whose objects are always archetype roots.
Package rmroots names the openEHR Reference Model classes whose objects are always archetype roots.
templatecompile
Package templatecompile turns an ADL 1.4 operational template, read into the operational template model (openehr/aom/aom14), into a walker-friendly compiled form that the composition builder, validator, and example generator consume.
Package templatecompile turns an ADL 1.4 operational template, read into the operational template model (openehr/aom/aom14), into a walker-friendly compiled form that the composition builder, validator, and example generator consume.
templatecompile/walk
Package walk provides a Visitor abstraction over the compiled OPT tree produced by internal/templatecompile.Compile: depth-first traversal with pre- and post-order hooks and subtree pruning.
Package walk provides a Visitor abstraction over the compiled OPT tree produced by internal/templatecompile.Compile: depth-first traversal with pre- and post-order hooks and subtree pruning.
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/: the Foundation's openehr_terminology.xml, openehr_external_terminologies.xml and PropertyUnitData.xml.
Package termgen generates the openehr/terminology tables from the pinned openEHR Terminology XML under resources/terminology/: the Foundation's openehr_terminology.xml, openehr_external_terminologies.xml and PropertyUnitData.xml.
urlredact
Package urlredact masks the password in a URL's userinfo, so that a URL the caller configured or the SDK discovered can go into an error, a panic or a log line without the password.
Package urlredact masks the password in a URL's userinfo, so that a URL the caller configured or the SDK discovered can go into an error, a panic or a log line without the password.
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, in the form the AM Release-1.4 XML schemas give an ADL 1.4 operational template (BMM source: the SDK's openehr_operational_template_1.4.0 root over openehr_am_1.4.0.bmm.json, the RM and openehr_base_1.3.0.bmm.json).
Package aom14 holds Go types generated from the openEHR Archetype Object Model 1.4, in the form the AM Release-1.4 XML schemas give an ADL 1.4 operational template (BMM source: the SDK's openehr_operational_template_1.4.0 root over openehr_am_1.4.0.bmm.json, the RM and openehr_base_1.3.0.bmm.json).
aql
Package aql builds AQL queries and models AQL requests and results.
Package aql builds AQL queries and models AQL requests and results.
aql/contain
Package contain answers, for two AQL class expressions, whether a containment route connects them under the pinned openEHR Reference Model.
Package contain answers, for two AQL class expressions, whether a containment route connects them under the pinned openEHR Reference Model.
aql/internal/semcheck
Package semcheck is the shared rule engine behind the AQL semantic containment checks: it turns containment verdicts from openehr/aql/contain into issue codes, once, for every adapter that needs them.
Package semcheck is the shared rule engine behind the AQL semantic containment checks: it turns containment verdicts from openehr/aql/contain into issue codes, once, for every adapter that needs them.
aql/lint
Package lint statically checks AQL over the SDK grammar profile.
Package lint statically checks AQL over the SDK grammar profile.
aql/parse
Package parse turns an AQL string into a syntax-checked, generated-type-free view.
Package parse turns an AQL string into a syntax-checked, generated-type-free view.
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.
Package client groups REST clients per openEHR resource.
client/admin
Package admin is the ITS-REST `/admin/*` client.
Package admin is the ITS-REST `/admin/*` client.
client/definition
Package definition is the openEHR REST 1.1.0 Definition API client.
Package definition is the openEHR REST 1.1.0 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 Composition sub-resource client.
Package composition is the openEHR REST 1.1.0 Composition sub-resource client.
client/ehr/contribution
Package contribution is the openEHR REST 1.1.0 Contribution sub-resource client: multi-version atomic commits against an EHR (Commit) and reads of a persisted contribution by uid (Get), the two operations ITS-REST declares.
Package contribution is the openEHR REST 1.1.0 Contribution sub-resource client: multi-version atomic commits against an EHR (Commit) and reads of a persisted contribution by uid (Get), the two operations ITS-REST declares.
client/ehr/directory
Package directory is the openEHR REST 1.1.0 Directory (folder hierarchy) sub-resource client.
Package directory is the openEHR REST 1.1.0 Directory (folder hierarchy) sub-resource client.
client/ehr/ehrstatus
Package ehrstatus is the openEHR REST 1.1.0 EHR_STATUS sub-resource client.
Package ehrstatus is the openEHR REST 1.1.0 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.
Package itemtags implements openEHR REST 1.1.0 ItemTag operations via the openehr-item-tag and openehr-version-item-tag headers.
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 System API client.
Package system is the openEHR REST 1.1.0 System API client.
composition
Package composition is the generic, OPT-driven Composition builder.
Package composition is the generic, OPT-driven Composition builder.
instance
Package instance synthesises an RM object graph from a compiled operational template.
Package instance synthesises an RM object graph from a compiled operational template.
internal/decodeopts
Package decodeopts tells the operational template reader of openehr/aom/aom14 what a list of canonical-XML decode options asks for, where the reader has to know it before it decodes.
Package decodeopts tells the operational template reader of openehr/aom/aom14 what a list of canonical-XML decode options asks for, where the reader has to know it before it decodes.
internal/refused
Package refused carries the JSON text of a value one of the SDK's hand-written primitive codecs refused, from that codec to the canonical-JSON decode entry point that reports the failure.
Package refused carries the JSON text of a value one of the SDK's hand-written primitive codecs refused, from that codec to the canonical-JSON decode entry point that reports the failure.
internal/rmbind
Package rmbind holds the rule that binds an RM value to one of the nodes an operational template allows under one attribute, and the type tests that rule reads.
Package rmbind holds the rule that binds an RM value to one of the nodes an operational template allows under one attribute, and the type tests that rule reads.
internal/rmnames
Package rmnames carries the wire-parameterised RM type names that the bare registry names (rm.RMTypeName) do not encode.
Package rmnames carries the wire-parameterised RM type names that the bare registry names (rm.RMTypeName) do not encode.
internal/xmlschema
Package xmlschema holds what the openEHR ITS-XML schemas say about the canonical XML of the generated classes beyond their BMM names and shapes, for the generated packages and openehr/serialize/canxml, which import it: the type aliases the decoder reads, the root elements the encoder writes, the children the encoder leaves out where a schema makes them optional, the reading of an `xsi:type` discriminator, an XML Schema built-in datatype under a prefix among it, and the values of a BMM `Any` member, in canonical XML and in the canonical JSON that carries the same values.
Package xmlschema holds what the openEHR ITS-XML schemas say about the canonical XML of the generated classes beyond their BMM names and shapes, for the generated packages and openehr/serialize/canxml, which import it: the type aliases the decoder reads, the root elements the encoder writes, the children the encoder leaves out where a schema makes them optional, the reading of an `xsi:type` discriminator, an XML Schema built-in datatype under a prefix among it, and the values of a BMM `Any` member, in canonical XML and in the canonical JSON that carries the same values.
internal/xmlunmatched
Package xmlunmatched tracks unmatched content on the canonical-XML decode path: the content a decode does not read.
Package xmlunmatched tracks unmatched content on the canonical-XML decode path: the content a decode does not read.
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 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 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.
Package rmpath provides read navigation of an in-memory openEHR RM instance by an openEHR path.
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.
Package canxml implements the openEHR canonical XML codec for the SDK's generated Reference Model types.
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.
Package simplified converts an openEHR COMPOSITION to and from the FLAT and STRUCTURED Simplified Formats.
template
Package template holds what the SDK's ADL 1.4 operational template (OPT) tooling shares: the openEHR path grammar and the small value types a compiled template hands out.
Package template holds what the SDK's ADL 1.4 operational template (OPT) tooling shares: the openEHR path grammar and the small value types a compiled template hands out.
template/constraints
Package constraints carries the typed primitive constraint values attached to leaf OPT nodes.
Package constraints carries the typed primitive constraint values attached 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 turns an ADL 1.4 operational template, read into the operational template model of github.com/cadasto/openehr-sdk-go/openehr/aom/aom14, into the compiled form consumed by the composition builder, the RM instance synthesiser, the validator, and the AQL static lint.
Package templatecompile turns an ADL 1.4 operational template, read into the operational template model of github.com/cadasto/openehr-sdk-go/openehr/aom/aom14, into the compiled form consumed by the composition builder, the RM instance synthesiser, the validator, and the AQL static lint.
terminology
Package terminology answers "is this code a member of that openEHR terminology group, what is its rubric, and which code carries this rubric?" and "is this code a member of that code set?" for 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, ENTRY.Language_valid, …).
Package terminology answers "is this code a member of that openEHR terminology group, what is its rubric, and which code carries this rubric?" and "is this code a member of that code set?" for 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, ENTRY.Language_valid, …).
validation
Package validation checks in-memory openEHR Reference Model artefacts against a compiled OPT and reports every issue in one pass, for COMPOSITION and for any other archetypeable root.
Package validation checks in-memory openEHR Reference Model artefacts against a compiled OPT and reports every issue in one pass, for COMPOSITION and for any other archetypeable root.
Package sandbox is the in-memory openEHR backend behind the probe runner's Sandbox mode.
Package sandbox is the in-memory openEHR backend behind the probe runner's Sandbox mode.
Package smart is the application-level SMART launch surface: a typed LaunchContext, ID-token verification that forwards to auth/smart (ValidateIDToken, IDTokenClaims), and platform principal claims.
Package smart is the application-level SMART launch surface: a typed LaunchContext, ID-token verification that forwards to auth/smart (ValidateIDToken, IDTokenClaims), and platform principal claims.
discovery
Package discovery resolves the SMART-on-openEHR service catalog: fetches the SMART configuration document, validates that the required services (org.openehr.rest by default, or the identifiers given to WithRequiredServices) 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 the required services (org.openehr.rest by default, or the identifiers given to WithRequiredServices) 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/crossformat
Package crossformat runs the PROBE-105 upstream cross-format parity harness.
Package crossformat runs the PROBE-105 upstream cross-format parity harness.
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 SDK's FLAT 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 SDK's FLAT codec and re-encode it, then compare the result against the upstream-authored original.
expectedform
Package expectedform builds the expected form of a canonical-JSON input: the document that a decode and re-encode of the input must be wire-equivalent to (testkit/wireequiv).
Package expectedform builds the expected form of a canonical-JSON input: the document that a decode and re-encode of the input must be wire-equivalent to (testkit/wireequiv).
fixtures
Package fixtures resolves paths to the vendored fixture documents under testkit/corpus/.
Package fixtures resolves paths to the vendored fixture documents under testkit/corpus/.
probe
Package probe is the single home for the conformance-probe result type and the catalog runner.
Package probe is the single home for the conformance-probe result type and the catalog runner.
probes/aql
Package aqlprobes hosts the openEHR conformance probes for openehr/aql: the AQL builders and the AQL lint pipeline.
Package aqlprobes hosts the openEHR conformance probes for openehr/aql: the AQL builders and the AQL lint pipeline.
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.
Package compositionprobes hosts the openEHR conformance probes for openehr/composition/, the OPT-driven composition builder.
probes/definition
Package definitionprobes hosts the openEHR conformance probes for the openEHR REST Definition API (PROBE-067 and PROBE-093).
Package definitionprobes hosts the openEHR conformance probes for the openEHR REST Definition API (PROBE-067 and PROBE-093).
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.
Package instanceprobes hosts the openEHR conformance probes for openehr/instance/, template-driven RM instance synthesis.
probes/query
Package queryprobes hosts the openEHR conformance probes for openehr/client/query: ad-hoc and stored AQL execution over the REST Query API.
Package queryprobes hosts the openEHR conformance probes for openehr/client/query: ad-hoc and stored AQL execution over the REST Query API.
probes/rest
Package restprobes hosts openEHR REST-binding conformance probes for the System capabilities operation, the Admin bulk-delete surface, the Definition example endpoint, the openehr-audit-details header grammar, the EHR creation round-trip, and the composition representation formats (canonical XML, FLAT and STRUCTURED).
Package restprobes hosts openEHR REST-binding conformance probes for the System capabilities operation, the Admin bulk-delete surface, the Definition example endpoint, the openehr-audit-details header grammar, the EHR creation round-trip, and the composition representation formats (canonical XML, FLAT and STRUCTURED).
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, path resolution and primitive-constraint validation (PROBE-022, PROBE-024).
Package templateprobes hosts the openEHR conformance probes for the openehr/template/ surface: local ADL 1.4 operational template parsing, path resolution and primitive-constraint validation (PROBE-022, PROBE-024).
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, as opposed to properties of one openEHR resource (PROBE-091 and PROBE-101).
Package transportprobes hosts the openEHR conformance probes for cross-cutting transport behaviour: properties the `transport/` layer enforces on behalf of every `openehr/client` leaf, as opposed to properties of one openEHR resource (PROBE-091 and PROBE-101).
probes/validation
Package validationprobes hosts the openEHR conformance probes for openehr/validation/: template-driven RM validation against a compiled OPT.
Package validationprobes hosts the openEHR conformance probes for openehr/validation/: template-driven RM validation against a compiled OPT.
probes/versioned
Package versionedprobes hosts the openEHR conformance probes for the openEHR REST versioned-resource contract, its writes and its version reads.
Package versionedprobes hosts the openEHR conformance probes for the openEHR REST versioned-resource contract, its writes and its version reads.
wireequiv
Package wireequiv is a JSON wire-equivalence oracle for the canonical-JSON round-trip tests and the canonical-JSON round-trip conformance probe.
Package wireequiv is a JSON wire-equivalence oracle for the canonical-JSON round-trip tests and the canonical-JSON round-trip conformance probe.
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