Convert a canonical :class:`PatientEvent` into a delivery-ready JSON payload.
Runs the JSON pipeline minus delivery: the canonical event is serialised to
JSON (the master payload), the event's ``rule_templates`` are applied as
JSON rules, then the transport/rules metadata (``integration_configs``,
``rule_templates``, ``integration_payload``) is stripped.
Returns the stripped ``payload`` object, its serialised ``json_message``
form (what ``/patient/deliver`` would send), and the per-rule log.
Request
This endpoint expects an object.
event_typeenumRequired
Type of patient lifecycle event
event_timestampdatetimeRequired
UTC timestamp when the event occurred (ISO 8601)
event_idintegerRequired
Unique monotonic event identifier
patientobjectRequired
Full patient record
organization_detailsobject or nullOptional
Organisation context (absent when the event has no org)
referral_detailsobject or nullOptional
Referral source context (absent when there is no referral)
laboratory_informationobject or nullOptional
Laboratory context (absent when not supplied)
rule_templateslist of objectsOptional
Rule templates attached to the event (applied downstream)
integration_configsobject or nullOptional
Integration configuration used to build the outbound message
integration_payloadmap from strings to any or nullOptional
Transport/logging metadata (log_id, lab_id, callback context). Not part of the canonical event; forwarded to the delivery layer so the Fusion worker receives full context / the Mirth receiver gets LABID/LOGID segments.
Response
Successful Response
protocolstring
Always 'JSON' for this endpoint
payloadmap from strings to any
Delivery-ready payload with transport/rules metadata stripped
json_messagestring
Serialised form of payload as sent
rules_appliedlist of objectsOptional