إنتقل إلى المحتوى الرئيسي

WP-06 exchange

Contract type Encounter. Depends on a booked Appointment. Envelope: envelope.md.

Workflow​

  1. A clinician has an appointmentId from WP-05.
  2. The client POSTs notes to /api/v1/afia/clinician/encounters.
  3. The API stores one Encounter row and returns it.
  4. Later updates change notes only.
  5. A patient session is rejected.

Wire​

POST /api/v1/afia/clinician/encounters

req { "appointmentId", "notes" }
res { data: { "id", "appointmentId", "notes" }, ... }

Update on /api/v1/afia/clinician/encounters/{id}:

req { "notes" }
res { data: { "id", "appointmentId", "notes" }, ... }

Errors: missing session, not a clinician, unknown appointment, patient write.

Ownership​

WP-06 writes health.afia.app.clinician.encounter and lib/*/encounter/. Shared language is Encounter.

Does not do​

Appointment persistence. Diagnostics JSON. Class internals. Invented SOAP forms.