← Platform Foundation

FEAT-MODULE-INTEGRATION

Module Integration

The one contract every feature attaches through. Lab today, Visit Assistant today, imaging or billing tomorrow: each declares what it is and what it brings — its menu, its settings pages, its catalogue entries, order types, vocabulary and device drivers — is checked against the platform's conventions, and in return gets a stable view of the services it needs. Features never reach into one another; they declare what they contribute, and the platform puts each contribution where it belongs.

Why this matters

A platform's value is the leverage every new module gets from the foundation. The first module pays the cost of figuring out how to attach; every subsequent module inherits that work. The lever breaks down if each module re-invents how it attaches — gets its own navigation rendering, its own organisation binding mechanism, its own settings UI, its own audit-event registration path.

The cost shows up as fragmentation. Two modules surface their settings differently to the same hospital admin. A new audit subtype shipped by one module doesn't appear in the same investigation surface as another's. The customer organisation lifecycle has implicit hooks for some modules but not others. A code review of a new module focuses on the module's clinical workflow instead of asking "does it conform to platform conventions?" — because there isn't a single conformance surface to point at.

The Module integration component is the answer. It is the one binding contract every module attaches through, and the one conformance surface the platform reviews against. Adding a new module — first-party or external — is a question of writing a one description of the module and declaring what it contributes; the platform component does the rest.

This is why a hospital's review of a new feature stays small. The binding was reviewed once; what remains is the feature's own clinical behaviour, not another round of questions about how it attaches.

What's in the box

One description per module

Every module ships one description of itself: its code, name and version, the kinds of organisation it suits, the data it keeps in step, and everything it contributes. The platform reads those descriptions at startup, keeps them in one registry that belongs to no single customer, and routes each contribution to wherever it is meant to appear.

A clinical leader asking what a customer organisation runs reads that list. A procurement reviewer assessing a third-party module reads what it declares it will contribute — before it has ever run against live data.

One navigation surface

A module declares its menu items, its organisation-level settings page and its department-level settings pages in one shape. The integration component composes every loaded module's contributions into one navigation tree per (customer organisation, organisation, user role); the platform shell renders it.

The shell reads the way the organisation is structured. The left menu is organisation structure × modules: each department lists the modules usable there — one entry per module, not a flat page list — and "Administration" is a per organisation pseudo-module entry. A module's own subpages render as a tab strip above the content window for whichever module the URL is currently in; the active module and tab are resolved from the URL segments (/o/{tc}/{org}/{module}/{page}), so a deep link lands with the right module lit and the right tab selected. Because the module is the URL segment, this needs no per-module change — every module's contributed items become tabs automatically.

Under this shell the two-level settings contract still holds: a module's organisation-level settings are tabs of the Administration pseudo-module (visible even with the module bound to zero departments — often where it is first configured), and its department-level settings are tabs of that module in the department where it is bound. The platform owns the rendering; the modules contribute the content.

Binding a module to a department

An administrator binds modules to a department from the organisation's settings page. The offered list is derived from the registered modules, so a module becomes bindable by being registered — there is no second list to maintain, and the Administration pseudo-module is never offered because it is organisation-level chrome rather than something a department runs. Editing a department persists its bindings: the platform reconciles to exactly the chosen set, assigning what was added and deactivating what was removed, and a binding the form did not display is never dropped.

Which modules a customer organisation is offered

Not every module is offered to every organisation: relevance hides what does not apply, availability decides what Jengu lists to whom, profiles package modules into named sets, and a per organisation grant has the final say. Every rule above relevance is decided in Jengu's own configuration registry, so an organisation that controls its configuration repository cannot widen its own entitlement — the configuration sync refuses bindings it is not entitled to and removes those whose grant was withdrawn. The picker offers only what the organisation may bind.

See module-entitlement for the full model.

A department's type is fixed once created — the department's code and its configuration file both derive from it — so the field is offered at creation and shown read-only afterwards.

One contribution router

Each part of the platform a module can add to — the service catalogue, ordering, devices, the audit trail, clinical vocabulary, access rules, consent, and the points where an organisation is set up or closed down — accepts contributions in its own way. Modules never address those parts directly. They declare what they bring, and the platform delivers it:

  • Catalog entries (lab tests, imaging studies, partner-routed services) flow to the Hospital service catalog
  • Order types flow to Orders
  • Device-driver bundles flow to the Device management framework
  • New audit subtypes flow to the Audit trail
  • Terminology bindings flow to Terminology & code bindings
  • Access-rule templates flow to the isolation between customers
  • Set-up and shut-down hooks flow to the organisation lifecycle
  • Recording capture client metadata flows to the Recording service

Neither side needs to know the other: the catalogue does not know which module supplied an entry, and the module does not know how the catalogue stores it.

One conformance surface

A module that goes around the platform — reaching into another module, writing its own audit records outside the trail, holding patient identifiers it has no business holding, putting screens outside the shell — is refused at startup, and told which rule it broke. The integration component is where the Clinical Modules group intro's "convention conformance is a prerequisite" property is actually enforced.

A hospital's review works the same way: one description and one list of contributions, judged against one set of rules, rather than working out afresh what the rules should be for each submission.

A stable set of services, version to version

A module reaches the platform's services — which organisation the request belongs to, the audit trail, credentials, the various resolvers — through one stable set of interfaces. The platform makes sure they are present, correctly scoped to one customer, and versioned.

What that buys: an organisation running Lab 2.1 and Visit Assistant 1.7 on platform 0.4 finds both still working after the platform moves to 0.5. The compatibility promise is carried by the contract between them, not by luck.

Standards we lean on

  • HL7 FHIR — every contribution that crosses module boundaries is shaped as a FHIR resource or operation; the integration component does not invent its own data model.
  • The plug-in standard (OSGi Compendium R7) — for modules that contribute device drivers, the standard's start-and-stop lifecycle is the contract (see Device management framework).
  • ISO/IEC 27001:2022 Annex A.5.21 (information security in acquisition and management of supplier services) — the conformance surface is the audit gate for third-party module procurement.

What customers and operators experience

  • A hospital adding a new clinical module to a department does so by enabling the module in the git-tracked customer organisation configuration; the integration component picks the change up at next sync, registers the module's contributions, and the module's menu items + settings page appear in the relevant department's navigation at next page load.
  • A hospital procurement reviewer assessing a third-party module reviews one description and the module's declared contributions against the platform's conformance rules. No bespoke per-module review surface.
  • A module developer, ours or a third party's, writes one description, declares what the module contributes, and inherits the menu, settings, audit, identity, isolation between customers, AI routing, recording and storage without building any of them.
  • A DPO reviewing what a module reaches sees one declared contribution list per module. A module that needs a patient's identity states its purpose on the read, and the disclosure is recorded — there is no ad-hoc code path to it.
  • A clinical leader reviewing what their department actually runs sees the per-(department, module) binding list with enabled / disabled state, the version of each module loaded, and the platform compatibility band.
  • An auditor following an incident queries the audit trail for "what module contributed which audit subtype at the time" through the registry; reconstruction does not require per-module forensics.

Limits and trade-offs

  • The convention surface is the platform's call. Modules that want behaviour outside the conventions don't get a private workaround; they get a platform-level discussion about whether the convention should change. This is intentional — the value of the platform is the uniformity of the conventions — but it sets a real review cost on new contribution types.
  • A module's contributions are visible at the platform layer. A module that wants to keep its catalog entries private from another module on the same customer organisation cannot use the integration contract to enforce that — the catalog is organisation-wide by design. The privacy is at the customer boundary, not between modules within the customer organisation.
  • Compatibility envelope is bounded. A module compiled against platform v0.4 is supported on v0.4 minor versions and the next minor version; beyond that, the module's description may fail conformance validation, and the operator sees a deliberate load failure rather than an unpredictable runtime crash.
  • External modules pay a higher review cost. First-party modules (Lab, Visit Assistant) ship through the same pipeline with the same conformance gate, but external modules carry procurement-side governance on top. The integration component enforces the technical conformance; the procurement review is separate.
What it rests on
0 / 7 passing 3 without a result yet
  • kept by its basis its basis has no result A module adds its own business events to the audit trail, but who acted and when are always stamped by the platform, so no module can impersonate anyone or backdate an entry. REQ-MOD-A-MODULE-ENRICHES-THE-TRAIL-NEVER-FORGES-IT
    Based on 1 promise
    • cited, no result Applications contribute business-level audit events; the machinery stamps actor and time from the validated token and its own clock, overriding caller claims — the trail can be enriched, never impersonated or backdated. REQ-DBO-POL-CUSTOM-AUDIT-EVENTS
      Cited by: cloud.jengu.dbo.fhir.element.ContributedAuditEventTest#whatWasPostedComesBack, cloud.jengu.dbo.fhir.element.ContributedAuditEventTest#whoAndWhenAreTheContainersWhateverWasClaimed
  • kept by its basis its basis has no result A patient's name is shown only when the request says why, and every such disclosure is recorded, including finding out whose an unnamed record is. REQ-PID-A-NAME-ONLY-FOR-A-STATED-PURPOSE
    Based on 2 promises
    • not cited Why an identifying read is happening is stated on the request that makes it — a PurposeOfUse code in the Purpose-Of-Use header — and the request's word replaces any the token carries. Every grant that mints a token may also state one, so a person acting through a delegation states a purpose exactly as a service does; a delegation record carries none, because a standing grant naming a reason would keep asserting it after the reason lapsed. A purpose is an assertion and never an authorisation: it widens nothing, it selects the disclosing mode for the one request it rides rather than for a credential's lifetime, and it is what the trail records. A purpose that is not a code is refused rather than dropped, at the token endpoint and at the door alike. REQ-DBO-AUTH-PURPOSE-IS-STATED-PER-REQUEST
    • not cited Which person a pseudonym belongs to is answered by deriving over the people whose keys could have made it, never by a stored mapping; the question states its scope and its purpose and is recorded as the disclosure it is, and the record names the person rather than the pseudonym. A person whose key is destroyed is not found, and is not distinguishable from one who was never here. REQ-DBO-PDI-PSEUDONYM-RESOLVED-BY-SCAN
  • kept by its basis its basis has no result A patient's identifying details are sealed under a key of that person's own, so the clinical records, and the database beneath them, never say whose they are. REQ-PID-DETAILS-SEALED-UNDER-THE-PERSONS-OWN-KEY
    Based on 2 promises
    • not cited Identifying elements, declared per type/element, live encrypted in the tenant's person vault; the main store holds pseudonymous records and the engine reassembles full resources for authorized reads — isolation is beneath the API, not a caller discipline. REQ-DBO-PDI-STRUCTURAL-VAULT
    • not cited A tenant's database is part of this store's runtime, and personal data passes through it in the clear only in flight — validated, extracted, converted — never landing anywhere the person's key does not cover. The one way it could land is the server logging a statement's parameters, so every database the store is allowed to pin is pinned not to — a managed server keeps that setting for its superuser and hands this store an ordinary role, which is a server to check rather than a store that cannot run. What the sessions will actually see is checked at every bring-up rather than assumed, and an isolated tenant refuses to come up on a database that would write its people down. REQ-DBO-PDI-PLAINTEXT-IN-FLIGHT-LEAVES-NO-TRACE
  • gap: not yet stated Each module describes itself once, and that description can be reviewed before the module runs. FEAT-GAP-87953b5a
  • gap: not yet stated Modules share one navigation surface and one settings contract, and department bindings reconcile to exactly the chosen set. FEAT-GAP-e709e138
  • gap: not yet stated A module that goes around the platform is refused before it runs, naming the rule it breaks. FEAT-GAP-191717fd
  • gap: not yet stated Platform services are stable and versioned within a compatibility envelope, and fail deliberately beyond it. FEAT-GAP-73892457