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

WP-02 exchange

Contract type PatientProfile. Envelope: envelope.md.

Workflow​

  1. A patient session GETs /api/v1/afia/patient/profile.
  2. The API returns accountId and displayName.
  3. The client PUTs or PATCHes displayName.
  4. The API writes the same profile row and returns it.

Wire​

GET /api/v1/afia/patient/profile

res { data: { "accountId", "displayName" }, status, message, errors }

Write:

req { "displayName": "..." }
res { data: { "accountId", "displayName" }, ... }

Errors: missing session, not a patient, validation on displayName.

Ownership​

WP-02 writes health.afia.app.patient.profile and lib/*/patient/profile/. Shared language is PatientProfile. Account.id comes from identity once WP-01 exists.

Does not do​

Appointment or results JSON. Class internals. Invented screens.