health.hats.requestAccess

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).

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

Procedure

procedure · POST

Input

application/json

patient

requiredstring · did

The patient: the authority of the spaces asked for.

picks

requiredarray

Option ids from listAccessOptions under the same reason. 'tier' picks every option on the menu.

  • minLength: 1
itemsstring

reason

requiredref
Reference

Output

application/json

results

requiredarray
itemsref
Reference

Errors

InvalidReason

The reason code is not one the coordinator accepts.

InvalidPick

A pick is not on the caller's menu for this reason.

#reason

object

Properties

code

requiredstring

HL7 PurposeOfUse code, in the code system's case. Matched exactly: a policy for ETREAT does not cover ERTREAT or BTG.

  • knownValues: TREAT | ETREAT | ERTREAT | BTG

Free-text justification. A BTG renewal needs a new one.

#result

object

The outcome of one picked option.

Properties

option

requiredstring

The option id.

space

string · space-ref

The space address, at://{patient}/space/{spaceType}/{skey}. Present when granted.

status

requiredstring
  • knownValues: granted | pending

Similar lexicons

semantic match

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

  • health.hats.listAccessOptions

    query not from the namespace authority

    The menu: what the caller may ask for under a reason. Built only from policy (the requester's role and institution, from authentication, and the reason), never from any patient, so it is the same for every patient.

  • 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.

  • 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.

  • health.hats.answerRequest

    procedure not from the namespace authority

    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).