Skip to content

MDT event consumer contract ​

The world health simulation belongs to np_medic. np_mdt-medic should become a consumer that reads local events and delivers accepted medical records to the MDT HTTP API.

Consumer responsibilities ​

  1. Subscribe to np_medic:event only while np_medic is started.
  2. Require envelope.consent.mdt == true and ignore unknown event types.
  3. Deduplicate by eventId; retain durable retries, receipts and dead-letter reporting.
  4. Map event types and payloads to the existing MDT REST schema.
  5. Correlate local patientRef values to MDT patient ids after patient.create is accepted. Keep that remote-id ledger in the consumer, not in np_medic.

np_mdt-medic must not capture damage, own health state, register treatment items, dispatch calls, revive players, manage hospital beds or write death state bags. Emergency consent override is not currently available.

Current boundary ​

np_medic emits a versioned local envelope and typed aliases, but not every reserved event type is generated yet. The contract and real event inventory are documented in events. This workspace change does not edit md-stempeluhr or its consumer.