WP-06 exchange
Contract type Encounter. Depends on a booked Appointment. Envelope: envelope.md.
Workflow
- A clinician has an
appointmentIdfrom WP-05. - The client POSTs notes to
/api/v1/afia/clinician/encounters. - The API stores one
Encounterrow and returns it. - Later updates change
notesonly. - 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.