health.hats.answerRequest

Approve or decline one waiting request. Approving names the grant record the patient wrote to their health.hats.audit.log space and how long it lasts; the coordinator then grants exactly what was picked, until then. Authenticated as the patient (service auth).

Repository @hats.health did:plc:uvvhtareovj2oaregs7vsibv not from the namespace authority
Details · procedure
Kindprocedure
Authorityhats.health
Indexed

Procedure

procedure · POST

Input

application/json

decision

requiredstring
  • knownValues: approve | decline

The health.hats.provider.grant record in the patient's audit space. Required to approve.

id

requiredstring

The request's id, from listRequests.

until

string · datetime

When the grant ends, matching the grant's provision.period.end. Required to approve.

Output

application/json

status

requiredstring
  • knownValues: granted | declined

until

string · datetime

Errors

RequestNotPending

No waiting request has this id: it was never made, or was already answered.

InvalidGrant

The grant isn't a record in the caller's audit space, or the end time is missing, past, or more than a year away.

Similar lexicons

semantic match

Lexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.

  • health.hats.listGrants

    query not from the namespace authority

    Grants the caller gave, as a patient, and grants the caller holds, as a grantee: one entry per request, newest first. Authenticated by service auth, so each caller sees only their own.

  • The asked clinician answers: done, after correcting or verifying the record in their own repo, or declined with a reason. Either ends the access the ask opened. Authenticated as the clinician (service auth).

  • health.hats.requestAccess

    procedure not from the namespace authority

    Pick options from the menu for one patient. The coordinator decides by policy and returns, per pick, the space address or pending while a patient or circle approval is outstanding. It never says whether a space holds records; the requester learns that by syncing. Authenticated as the clinician (service auth) and the institution node (client attestation).

  • health.hats.listRequests

    query not from the namespace authority

    The requests waiting on the caller: access asked for their own spaces that policy leaves to them. Authenticated as the patient (service auth), so each patient sees only their own.