# encounter — 已到诊预约即接诊事件
# 消费 transforms 输出表 appointment_encounter_rows(route_by_pattern 已过滤 appo_status IN 4,5,6)
canonical: encounter

emits:
  action: doctor_encounter_started
  subjectType: encounter
  occurredAtField: startedAt

primary:
  table: appointment_encounter_rows
  key: id

field_mapping:
  externalId:        id
  patientExternalId: patient_id
  clinicId:          organization_id
  startedAt:         in_time
  doctorId:          appo_doc_id
  notes:             appo_complaint
