Bundled plugins
These core plugins live in the repository under external-plugins/, are loaded from
TypeScript source, and ship inside the API image (they are not published to the
registry). They form the layered clinical foundation the demos build on (see
Architecture for the layering
rationale). Each row of a contributions table is a fact from the plugin's plugin.yaml.
@posos/common
The most classic non-clinical building blocks, shared by every business plugin.
| Contribution | Items |
|---|---|
| context kinds | patient, encounter, order, document |
| types | Coding, CodeableConcept, Quantity, Period, Annotation, Reference, ValidationDecision |
| value-sets | decision-outcome |
| nodes | trigger.communication-received, text.join |
Everything domain-specific — including these classics and the context kinds themselves — is a plugin contribution; the engine itself holds only primitives and the meta type system.
@posos/clinical
dependsOn: @posos/common
The general-purpose clinical foundation, independent of any specific use case: core
FHIR resources, the classic clinical triggers, and the generic patient-record read/write
and human-validation nodes. It owns the patient and prescription port contracts
(@posos/clinical/ports, typed on the DPI model in @posos/clinical/domain) and ships
their reference in-memory adapters (dev/demo, zero infra, seeded from the instance
config) and their simulation sandboxes. Use-case-specific computations live
elsewhere (e.g. in the example plugins).
| Contribution | Items |
|---|---|
| types | Observation, Condition, MedicationStatement, Allergy, Procedure, Prescription, Demographics, DrugAlert, DrugInteraction, AdverseEffect, CalculationResult |
| value-sets | administrative-gender, observation-status, condition-clinical, condition-verification, alert-type, interaction-severity, incidence, allergy-criticality, procedure-status, medication-status, time-horizon |
| dimensions | filtration-rate |
| conversions | Prescription → Annotation |
| adapters | patient:in-memory (declared record port of the patient context kind, record: { contextKind: patient }), prescription:in-memory |
| port sandboxes | patient, prescription |
| triggers | bio-result-received, critical-result-received, discharge-prescription-edited, medication-prescribed, procedure-scheduled, patient-admitted, patient-discharged, allergy-recorded, condition-recorded |
| record nodes | patient.load-* (demographics, medications, conditions, allergies, procedures, observations), patient.update-demographics, patient.append-* (observation, condition, allergy, procedure, medication), order.load-prescription, order.record-reconciliation |
| human tasks | human.confirm-condition, human.acknowledge-critical |
@posos/fhir
dependsOn: @posos/clinical, @posos/common
Connects an existing FHIR R4 warehouse (tested with Blaze + Synthea) to the patient and
prescription ports. Demonstrates port-adapter contribution: switch the target system
without touching the engine or the workflows.
| Contribution | Items |
|---|---|
| adapters | patient:fhir (declared record port of the patient context kind), prescription:fhir |
| event sources | fhir-poll |
| event bindings | fhir-creatinine, fhir-medication-prescribed, fhir-procedure-scheduled, fhir-patient-admitted, fhir-patient-discharged, fhir-allergy-recorded, fhir-communication-received, fhir-condition-recorded, fhir-validation-decided |
The fhir-validation-decided binding is the resolve-mode binding described in
ADR 0002.
@posos/llm
The LLM agent runner (Anthropic + OpenAI-compatible APIs) — an adapter for the
agent port, selected by the instance manifest (ports.agent = { adapter: llm }). Keys
via environment variables.
| Contribution | Items |
|---|---|
| adapters | agent:llm |
@posos/notify
Outbound notification delivery — it owns the notification port contract
(@posos/notify/ports) and ships its adapters and simulation sandbox. Distinct
from the record trail (writing a FHIR Communication through the patient port): here we
alert humans through a channel, we do not write clinical data.
| Contribution | Items |
|---|---|
| nodes | notify.send |
| value-sets | notification-severity |
| adapters | notification:console, notification:webhook |
| port sandboxes | notification |
@posos/snomed
Contributes the terminology resolver for the snomed-ct code system
(Hermes). Selected via the instance manifest
(terminology.snomed-ct = { adapter: hermes, config: { baseUrl } }).
| Contribution | Items |
|---|---|
| nodes | snomed.verify-concept, snomed.preferred-term, snomed.subsumes |
| value-sets | snomed-ct (external) |
| adapters | terminology:hermes |