Integration

Medical-Device Integration

Connect medical devices, map incoming measurements, validate units, retain source details, and check device integrations.

Follow this guide to connect a medical device to AMCDR, check its data and prepare the interface for use. The steps cover gateway setup, authentication, device registration, terminology and unit mapping, patient association, testing, deployment and retirement.

Before you finish

Before enabling the interface, confirm that its gateway has dedicated credentials, its adapter and device are registered, and every metric is mapped. Verify the patient association, process a test message without quarantine, and check the FHIR/openEHR projections. Complete monitoring and downtime procedures and obtain the site's sign-off.

choose adapter -> prepare gateway -> register adapter -> register device
-> map metrics/units -> associate + verify patient -> send test message
-> inspect messages/events/projections -> run negative tests -> approve production

Jump to: integration boundary · choose adapter · prerequisites · register adapter · register device · map metrics · associate patient · send test data · verify · negative tests · production · live monitoring · troubleshoot.

Before you start

AMCDR's central inbound medical-device route is an authenticated HTTP JSON API. The included AMCDR Edge Connector runs inside the facility network and supplies durable local HTTP, HL7 v2 MLLP and watched-folder inputs. An existing integration engine or vendor gateway can use the same connector. SDC participation, DICOM storage and proprietary SDKs remain governed protocol plug-ins or upstream systems; they do not run in the clinician's browser.

device/manufacturer gateway
  -> site edge receiver (MLLP, SDC, DICOM, vendor protocol)
  -> authenticated POST /medical-devices/adapters/{adapter_id}/messages
  -> selected AMCDR family adapter
  -> CanonicalDeviceEvent
  -> identity + association + terminology + UCUM + quality gates
       |-> FHIR R4 exchange projection
       `-> openEHR template/path envelope + feeder audit

endpoint_url is governed connection metadata; registering it does not start a listener in the central server. The separately deployed Edge Connector handles framing, sender authentication, durable acknowledgement, reconnect, buffering, certificate validation and forwarding.

FHIR is not a compulsory intermediate. AMCDR normalizes each family payload once to CanonicalDeviceEvent, then derives FHIR and openEHR representations in parallel.

Deploy the AMCDR Edge Connector

The installable service is checked in under edge_connector/. Deploy one or more instances per facility, laboratory or network trust zone. Each input route binds to one registered AMCDR adapter UUID and exact device identifier.

cd edge_connector
python3 -m venv .venv
. .venv/bin/activate
pip install .
cp config.example.json edge-connector.json
export AMCDR_EDGE_CLIENT_SECRET='read from the site secret store'
export AMCDR_EDGE_INGEST_KEY='long random local ingest secret'
amcdr-edge --config edge-connector.json serve

The connector accepts authenticated local HTTP, configured MLLP frames and watched-folder exports. It commits each message to a SQLite WAL queue before returning HTTP 202 or MLLP AA, retries with the same message ID and reports queue/heartbeat health to Resources → Medical devices → Edge connectors. It refuses unauthenticated network HTTP listeners and plain HTTP to a remote AMCDR server. An MLLP listener bound beyond loopback also requires an explicit allowed_clients IP/CIDR allowlist.

An iPhone does not need WebHID or this connector for patient/specimen QR capture. Open AMCDR through HTTPS, select Scan, grant camera access and use the rear camera. The UI uses a Safari-compatible decoder when the browser has no native barcode detector. Proprietary document scanners use their macOS/Windows driver and submit through connector HTTP or a watched folder.

Step 1 — Choose the adapter family

SourceAdapter typeAMCDR payloadSite edge responsibility
Monitor/ventilatorihe_pcd_hl7v2HL7 v2 ER7 with MSH/PID/PV1/EQU/OBXReceive MLLP and preserve the original message
SDC point-of-care deviceieee_11073_sdcNormalized JSON or safe SOAP/XML metric/alert stateSDC/SDPi participation and subscriptions
Infusion pumpihe_pumpStart/rate/bolus/pause/resume/stop/completion/alarm JSONManufacturer gateway or IHE PIV interface
FHIR gatewayfhir_r4R4 Bundle, Observation, MedicationAdministration, Device or DeviceMetricValidate sender and forward complete resources
Imaging/waveform sourcedicomwebDICOM JSON metadata, UIDs and HTTPS object referenceKeep bulk object in PACS/VNA and expose governed retrieval
Analyser/POCTlaboratoryNormalized JSON or HL7 v2 ORU_R01Receive analyser protocol and preserve specimen/QC evidence
Home/personal devicepersonal_healthIEEE 11073 PHD-normalized JSON or FHIR ObservationPair/authenticate device and preserve patient assignment

Use a separate adapter record for each connection with its own access and trust requirements. Do not mix unrelated manufacturers or facilities. After authentication, call GET /medical-devices/profiles to confirm the deployed capabilities.

Step 2 — Assign owners and gather device details

EvidenceAccountable owner
Clinical purpose and which values enter the longitudinal recordClinical service owner
Manufacturer/model/UDI/serial/firmware/gateway versionBiomedical or clinical engineering
Protocol and exact vendor conformance statementIntegration engineer/vendor
Network, ports, DNS, certificates and NTP sourceInfrastructure/security
Vendor metrics, types, units, states and alarmsIntegration modeler
Canonical code, UCUM unit and reference rangesAmyTerm/terminology authority
Active openEHR template key and exact RM pathSemantic Studio modeler
Alarm/downtime responseClinical safety lead
Normal, boundary, malformed, duplicate and unknown messagesVendor/site acceptance team

Use only synthetic or properly de-identified data during development.

Step 3 — Prepare AMCDR, identity and gateway

  1. Confirm AMCDR health. Hosted deployments normally expose the backend through https://<amcdr-host>/backend.
  2. Confirm Alembic includes 0130_medical_device_integration or a later head.
  3. Create facility/location records and any platform Resource linked to the device.
  4. Approve canonical terminology and exact UCUM codes in AmyTerm.
  5. Import/validate the openEHR template and obtain the real key/path in Semantic Studio.
  6. Create a synthetic patient and encounter. Match the fixture's patient identifier or edit the fixture.
  7. Synchronize device, gateway and AMCDR hosts to the approved NTP source.
  8. Prepare PACS/VNA/object/telemetry storage for DICOM or high-rate waveform content.
cd backend
alembic current
alembic upgrade head
alembic current

Gateway identity

Use a dedicated non-interactive identity per interface. The recommended production pattern is a Keycloak confidential service client whose validated token resolves to an active AMCDR identity/membership with only device_gateway and the correct signed tenant/organisation/facility context. Do not reuse a human administrator's token in a gateway.

  1. Create a confidential client such as amcdr-device-icu-monitor-01 in the AMCDR realm.
  2. Enable client authentication and service-account roles; disable browser/direct-password flows for it.
  3. Add the expected AMCDR API audience and map roles: device_gateway.
  4. Map signed tenant_id and, when scoped, organisation_id, environment_id and facility_id UUID claims.
  5. Store its generated secret in the gateway secret store, never in source control.
export AMCDR_OIDC_TOKEN_URL='https://auth.example.org/realms/amcdr/protocol/openid-connect/token'
export AMCDR_DEVICE_CLIENT_ID='amcdr-device-icu-monitor-01'
read -rsp 'Device client secret: ' AMCDR_DEVICE_CLIENT_SECRET; printf '\n'

TOKEN_JSON="$(curl --fail-with-body --silent --show-error \
  -X POST "$AMCDR_OIDC_TOKEN_URL" \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'grant_type=client_credentials' \
  --data-urlencode "client_id=${AMCDR_DEVICE_CLIENT_ID}" \
  --data-urlencode "client_secret=${AMCDR_DEVICE_CLIENT_SECRET}")"
unset AMCDR_DEVICE_CLIENT_SECRET
export AMCDR_GATEWAY_TOKEN="$(printf '%s' "$TOKEN_JSON" | jq -er '.access_token')"

For acceptance, inspect the decoded token's issuer, audience, expiry, device_gateway role and governance claims. Decoding alone is not validation; AMCDR still verifies the token signature and configured issuer/audience.

Use a separate short-lived human setup token with biomedical_engineer, clinical_engineer, integration_modeler, system_admin or super_admin. Obtain it through the approved OIDC login/administrative CLI. Do not elevate the gateway client merely to make configuration calls work.

export AMCDR_API_BASE='https://dev-amcdr.sandbox.hygeoniq.com/backend'
export AMCDR_ADMIN_TOKEN='<short-lived-human-setup-token>'

curl --fail-with-body --silent --show-error \
  -H "Authorization: Bearer ${AMCDR_ADMIN_TOKEN}" \
  "${AMCDR_API_BASE}/medical-devices/profiles" | jq .

A successful list proves the human setup token's authentication, operator role and tenant context. The gateway token is proved when Step 8 returns HTTP 202. 401 indicates credential validation; 403 indicates role/context denial; 409 can indicate that the route received no resolved tenant context.

Network and secret checklist

Step 4 — Register the adapter

User interface

  1. Sign in as a biomedical/device integration administrator.
  2. Open Resources in the sidebar, then select the Medical devices local tab.
  3. Expand Register adapter.
  4. Enter a stable lowercase key, name, adapter family and protocol/version.
  5. Use the API/OpenAPI workspace for endpoint, secret/TLS references, profile and advanced configuration.

API body

POST ${AMCDR_API_BASE}/medical-devices/adapters
Authorization: Bearer ${AMCDR_ADMIN_TOKEN}
Content-Type: application/json

{
  "key": "icu-monitor-gateway-01",
  "name": "ICU monitor gateway 01",
  "adapter_type": "ihe_pcd_hl7v2",
  "protocol": "HL7 v2.6 ORU_R01 over site MLLP gateway",
  "profile": "IHE DEV PCD-01 DEC",
  "version": "site-interface-1.0",
  "endpoint_url": "mllp://icu-interface.internal:2575",
  "auth_secret_ref": "secret://amcdr/device-gateways/icu-monitor-01",
  "tls_profile_ref": "trust://amcdr/device-gateways/icu-monitor-01",
  "status": "active",
  "trust_mode": "verify"
}

Expected: HTTP 201 and an adapter UUID. Complete the connector, network and credential prechecks before this request: the current API has no general update route, so this runnable path creates the adapter active. The UI also creates an active adapter. Do not send production traffic until all acceptance steps below pass; use a governed version-specific process for any adapter deliberately registered inactive.

Step 5 — Register the device

Under Register device, select the adapter and enter the identifier actually emitted by the payload, plus type, manufacturer, model and serial. Add UDI, firmware, location and resource linkage through the API when available.

POST ${AMCDR_API_BASE}/medical-devices/devices
Authorization: Bearer ${AMCDR_ADMIN_TOKEN}
Content-Type: application/json

{
  "adapter_id": "<adapter-uuid>",
  "identifier": "MONITOR-ICU-001",
  "identifier_system": "urn:hygeoniq:device-id",
  "udi_carrier": "(01)01234567890128(21)MONITOR001",
  "device_type_code": "monitor",
  "device_type_display": "Multiparameter bedside monitor",
  "manufacturer": "Synthetic Test Manufacturer",
  "model_number": "SIM-MON-1",
  "serial_number": "SIM-0001",
  "firmware_version": "1.0.0-test",
  "status": "active",
  "operational_status": "ready",
  "details": {"synthetic_test_device": true}
}

Expected: HTTP 201. Save the returned id as DEVICE_ID. The registered identifier must exactly equal the source device identifier.

Step 6 — Map every metric and exact unit

An unknown source code is quarantined. Quantitative metrics require exact, case-sensitive UCUM codes such as %, /min, Cel, kg, mm[Hg] or mL/h.

The supplied IHE PCD fixture requires two mappings:

Metric keyVendor/canonical codeSystemTypeUCUM unit
heart-rate8867-4http://loinc.orgquantity/min
oxygen-saturation59408-5http://loinc.orgquantity%
POST ${AMCDR_API_BASE}/medical-devices/devices/${DEVICE_ID}/metrics
Authorization: Bearer ${AMCDR_ADMIN_TOKEN}
Content-Type: application/json

{
  "metric_key": "heart-rate",
  "vendor_code": "8867-4",
  "vendor_system": "http://loinc.org",
  "canonical_code": "8867-4",
  "canonical_system": "http://loinc.org",
  "canonical_display": "Heart rate",
  "value_type": "quantity",
  "unit_code": "/min",
  "unit_system": "http://unitsofmeasure.org",
  "unit_display": "beats/minute",
  "mapping_version": "site-acceptance-1",
  "openehr_mapping": {}
}

Repeat for oxygen saturation. Leaving openehr_mapping empty produces fhir_ready. Before production, use the exact deployed template and Semantic Studio path:

{
  "template_key": "<real-active-template-key>",
  "path": "<exact-RM-path-from-Semantic-Studio>"
}
Never copy a synthetic test path into production. openehr_ready means the projection passed its map, not that an openEHR Composition has already been committed.

Step 7 — Associate and verify the patient

Clinical device data requires one active, human-verified association.

  1. Open the synthetic patient and active encounter.
  2. Open Resources → Medical devices, select the device and choose Associate current patient.
  3. Independently compare wristband/MRN, encounter/bed and the identifier displayed by the device/gateway.
  4. Select Verify. Do not verify from an unconfirmed remote bed list.
POST ${AMCDR_API_BASE}/medical-devices/associations
{
  "device_id": "<device-uuid>",
  "patient_id": "<synthetic-patient-uuid>",
  "encounter_id": "<synthetic-encounter-uuid>",
  "external_association_id": "SITE-ACCEPTANCE-001",
  "association_type": "point_of_care",
  "source": "manual",
  "started_at": "2026-08-27T10:00:00Z"
}

POST ${AMCDR_API_BASE}/medical-devices/associations/<association-uuid>/verify
{"status":"active","reason":"Wristband, encounter, bed and device identity independently checked"}

The first response must be pending/verified: false; the verification response must be active/verified: true with actor and time.

Step 8 — Send the first test message

Use a trusted checkout containing examples/medical_devices. The tested IHE PCD payload is preserved as a JSON string:

jq -n \
  --rawfile payload examples/medical_devices/ihe_pcd_oru_r01.hl7 \
  --arg association_id "$ASSOCIATION_ID" \
  --arg sent_at "$(date -u +%Y-%m-%dT%H:%M:%SZ)" '{
    external_message_id: ("SITE-ACCEPTANCE-ORU-" + $sent_at),
    device_identifier: "MONITOR-ICU-001",
    message_type: "ORU_R01",
    association_id: $association_id,
    source_timestamp: $sent_at,
    sequence_number: "1",
    payload: $payload,
    provenance: {
      source: "AMCDR synthetic medical-device corpus",
      fixture: "ihe_pcd_oru_r01.hl7",
      purpose: "site-acceptance"
    }
  }' | curl --fail-with-body --silent --show-error \
    -X POST "${AMCDR_API_BASE}/medical-devices/adapters/${ADAPTER_ID}/messages" \
    -H "Authorization: Bearer ${AMCDR_GATEWAY_TOKEN}" \
    -H 'Content-Type: application/json' \
    --data-binary @- | jq .

Expected HTTP 202:

{
  "status": "processed",
  "event_count": 2,
  "accepted_count": 2,
  "quarantined_count": 0,
  "validation_issues": []
}

The fixture contains patient identifier PATIENT-DEVICE-001. Give the synthetic patient that enterprise ID/MRN or edit the fixture to one of the patient's AMCDR UUID, enterprise patient ID or MRN.

Step 9 — Verify end to end

GET ${AMCDR_API_BASE}/medical-devices/messages?adapter_id=${ADAPTER_ID}&device_id=${DEVICE_ID}
GET ${AMCDR_API_BASE}/medical-devices/events?patient_id=${PATIENT_ID}&device_id=${DEVICE_ID}
GET ${AMCDR_API_BASE}/medical-devices/exceptions?adapter_id=${ADAPTER_ID}&device_id=${DEVICE_ID}

Require all of the following:

How events are stored. AMCDR stores the canonical event, FHIR projection and openEHR projection envelope. It does not yet commit every openehr_ready event as a Composition. Do not report it as part of the canonical longitudinal openEHR record until openehr_composition_id is populated.

Step 10 — Run mandatory negative tests

TestRequired result
Repeat the same external ID and payloadduplicate; no extra events
No verified associationpatient-association-required
Wrong patient identifierpatient-identity-mismatch
Wrong device identifierdevice-identity-mismatch
Unknown source codemetric-mapping-required
Wrong unitunit-mismatch
Wrong value typevalue-type-mismatch
Malformed family payloadMessage exception/adapter-validation
Inactive adapter/deviceRejected before parsing
Identity without ingest roleHTTP 403
Other tenant identityDenied/not found without disclosure
DICOM inline bulk bytesRejected; use external object reference

Correct source transformation or governed mappings, then replay the original stable message ID. Never bypass a safety gate or edit accepted stored events.

Step 11 — Test all seven families

AdapterChecked-in fixturePayload shapeExpected result
ihe_pcd_hl7v2ihe_pcd_oru_r01.hl7String2 Observations
ieee_11073_sdcsdc_report.json, sdc_report.xmlObject/XML stringObservation + alarm
ihe_pumppump_events.jsonObject/list2 MedicationAdministrations + alarm
fhir_r4fhir_r4_bundle.jsonFHIR objectDevice, DeviceMetric, Observation, MedicationAdministration
dicomwebdicomweb_waveform_metadata.jsonDICOM metadata objectDocumentReference with HTTPS URL, no inline data
laboratorylaboratory_result.json, laboratory_oru_r01.hl7Object/HL7 stringLaboratory Observations
personal_healthpersonal_health_measurements.json, personal_health_observation.fhir.jsonJSON/FHIR objectHome Observations

For JSON fixtures use jq --slurpfile payload <file> and submit $payload[0]. For XML/HL7 use --rawfile. For each family first register the matching adapter/device, map every code/unit in manifest.json, and verify the patient association.

Open the complete synthetic corpus and manifest on GitHub.

Step 12 — Apply modality-specific safety rules

Alarms

AMCDR is a secondary operational record, not the manufacturer's primary alarm display. Respond at the device, then acknowledge/resolve in AMCDR with actor and time.

Laboratory

Technical ingestion is not result verification. A production result must also pass order, patient, specimen, analyser/QC, verification and release workflows.

Infusion pumps

Reconcile administration evidence with the medication order, product, patient, route, dose/rate and nurse workflow. Live remote command dispatch remains disabled.

DICOM and waveforms

Keep Study/Series/SOP UIDs and an authorized retrieval reference in AMCDR. Keep bulk data in PACS/VNA or an approved telemetry store; persist reviewed summaries/snapshots to openEHR.

Step 13 — Production acceptance and cutover

  1. Add de-identified messages from the exact manufacturer/model/firmware/gateway to a site-owned corpus.
  2. Test normal, boundary, malformed, unknown, alarm and disconnect cases against the device display and an independent reference.
  3. Prove time, clock drift, sequence, retry and replay behaviour.
  4. Prove identity, mapping, unit and association failures quarantine safely.
  5. Validate applicable FHIR profiles and exact openEHR template/path/FEEDER_AUDIT mapping.
  6. Test certificate rotation, network loss, gateway restart, AMCDR recreation, database restore and downtime reconciliation.
  7. Test tenant isolation, least privilege and credential revocation.
  8. Monitor last_seen_at, exceptions, alarm backlog, latency, clock drift and queue age.
  9. Approve rollback and manual clinical downtime procedures.
  10. Obtain biomedical, clinical engineering, cybersecurity, privacy, clinical-safety, service and site-owner signatures.

Live connected-device monitoring

Session-based personal devices, bedside monitors and gateways use the same source-neutral telemetry path. Select the patient and open Resources → Medical devices. After registering the device, mapping heart rate to LOINC 8867-4 with UCUM /min, and verifying its patient association, use Monitoring sessions to start the session. Copy its ID into the connected client.

Apple Watch → HealthKit → iPhone HTTPS relay --+
Synthetic device CLI --------------------------+→ monitoring session → canonical events
                                                 → five-second UI → governed summary

The panel shows waiting, connected, reconnecting, offline or stopped state. The session-filtered graph shows current heart rate, original measurement time, sample count, minimum, maximum and average. Stable sample IDs make client retry idempotent. AMCDR rejects ambiguous timestamps, non-finite values, inactive sessions and unverified patient-device relationships.

Use the same API without Apple hardware:

export AMCDR_BASE_URL='https://dev-amcdr.sandbox.hygeoniq.com/backend'
export AMCDR_TOKEN='<short-lived-token>'
./scripts/device-simulator --session-id '<session-uuid>' \
  --scenario walking --duration 300 --interval 5
openEHR first. Stopping calculates a source-labelled summary. AMCDR writes an openEHR Composition only when a deployed template key and exact paths are configured; it never invents clinical paths. The FHIR Observation Bundle is an exchange projection.

The Xcode project and novice Mac deployment guide are in apple/AMCDRHealth. Apple compilation, signing, HealthKit permission and physical Watch streaming are verified on macOS with the paired devices, not on the Linux server.

Step 14 — Operate, view trends, troubleshoot and recover

The Device trends panel reads governed numeric events from GET /medical-devices/events. Select a patient/device, measurement and time range to see current-value tiles, reference-range shading, historical points, quality state, alarm markers and provenance. Near-live performs an authenticated five-second refresh; it is not presented as a validated bedside waveform stream.

The patient Overview → Trends tab provides a concise longitudinal view of persisted temperature, oxygen saturation, heart rate, blood pressure and other supported vital signs with a 24-hour default and optional 30-second refresh. Use Device trends for device-specific quality/alarm/provenance review and Patient trends for care-context review.

Supplementary display. Verify critical values and alarms on the approved bedside or central monitoring system. High-rate waveforms remain in the approved telemetry, PACS or object store.

The development deployment refreshes a clearly labelled demonstration for patient MRN SIM-DEVICE-001 and device SIM-ICU-MONITOR-001: 485 observations across five LOINC/UCUM metrics and one resolved simulated alarm. Kubernetes and VPS deployments do not run this seed.

python scripts/seed_medical_device_trend_demo.py --tenant-key default

# Development deployer opt-out
export AMCDR_DEV_SEED_DEVICE_TRENDS=false

The seed replaces only rows carrying its clinician-device-trends-v1 marker and submits every observation through the normal association, terminology/unit, FHIR and openEHR projection gates.

SymptomCheckResponse
401Expiry, issuer, audience, signature, TLSObtain a valid token; never disable verification
403Gateway/admin role and active membershipCorrect governed assignment
409 contextSigned tenant/organisation/facility claimsCorrect identity/client mapping
Device not foundPayload vs registered identifier and tenantCorrect registry/gateway; do not alias silently
All quarantinedAssociation, maps, units, typesCorrect governance and replay original IDs
DuplicatePreviously accepted external IDTreat as idempotent replay; compare hash
DICOM unavailablePACS authorization/retention/WADO URLRestore governed external access
openehr_ready, no CompositionTemplate/EHR/composition writerDo not claim persistence; investigate projection

PostgreSQL is authoritative. Back it up with gateway configuration, installation identity, secret references, trust material and the external object catalogue.

Step 15 — End association and decommission

POST ${AMCDR_API_BASE}/medical-devices/associations/${ASSOCIATION_ID}/end
Authorization: Bearer ${AMCDR_ADMIN_TOKEN}
Content-Type: application/json

{"reason":"Device removed after site-acceptance test"}

End an association when the device is removed, reassigned, transferred or the patient is discharged. For permanent retirement, stop the connector, revoke its credential, retire the registry record through governance, retain audit/clinical evidence and prove that new messages are rejected.

API and role reference

RoutePurpose
GET /medical-devices/profilesAdapter capabilities
GET/POST /medical-devices/adaptersAdapter registry
GET/POST /medical-devices/devicesDevice registry
GET/POST /medical-devices/devices/{id}/metricsCanonical maps
GET/POST /medical-devices/associationsPatient-device relationships
GET/POST /medical-devices/monitoring-sessionsStart and list connected-device sessions
GET /medical-devices/monitoring-sessions/{id}Connection state, counts and summary
POST /medical-devices/monitoring-sessions/{id}/samplesIdempotent timestamped telemetry batches
POST /medical-devices/monitoring-sessions/{id}/stopClose session and generate governed summary
POST /medical-devices/adapters/{id}/messagesIdempotent gateway ingest
GET /medical-devices/messages, /exceptions, /events, /alarmsOperational review and clinician trends; events accept patient/device/metric/time filters
GET /medical-devices/devices/{id}/fhir, /metrics/{id}/fhirFHIR Device/DeviceMetric

Configuration uses biomedical/clinical engineering, integration modeler or administrator roles. Ingestion uses device_gateway or an explicitly approved technical role. Every record remains tenant-owned under forced PostgreSQL row-level security. The installed OpenAPI document under Documentation → API documentation is the field-level authority.

Adapter tests

cd backend
pytest -q tests/test_medical_device_adapters.py

AMCDR_ENTERPRISE_TEST_DATABASE_URL='postgresql+psycopg://...' \
  pytest -q tests/test_medical_devices_postgres.py

The sample messages cover every declared payload format. The FHIR Bundle was checked with HL7 FHIR validator CLI 6.9.7 against R4 core 4.0.1. Adapter tests check parsing, normalization, access controls and projections. Test the actual device and gateway separately before deployment; sample-message tests do not certify a manufacturer's hardware.

Final checklist

See also Interoperability and Integration, openEHR Conformance, Laboratory Lifecycle, Medication Safety, Authentication and Access-Control Matrix and Deployment and Runtime.