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).
Details · procedure
| Kind | procedure |
|---|---|
| Authority | hats.health |
| Indexed |
Checks
Validunlimited-stringdefs.main.input.schema.properties.decisionNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.main.input.schema.properties.idNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.main.output.schema.properties.statusNo maxLength, maxGraphemes or format limits this string.
{
"$type": "com.atproto.lexicon.schema",
"defs": {
"main": {
"description": "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).",
"errors": [
{
"description": "No waiting request has this id: it was never made, or was already answered.",
"name": "RequestNotPending"
},
{
"description": "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.",
"name": "InvalidGrant"
}
],
"input": {
"encoding": "application/json",
"schema": {
"properties": {
"decision": {
"knownValues": [
"approve",
"decline"
],
"type": "string"
},
"grant": {
"description": "The health.hats.provider.grant record in the patient's audit space. Required to approve.",
"ref": "com.atproto.repo.strongRef",
"type": "ref"
},
"id": {
"description": "The request's id, from listRequests.",
"type": "string"
},
"until": {
"description": "When the grant ends, matching the grant's provision.period.end. Required to approve.",
"format": "datetime",
"type": "string"
}
},
"required": [
"id",
"decision"
],
"type": "object"
}
},
"output": {
"encoding": "application/json",
"schema": {
"properties": {
"status": {
"knownValues": [
"granted",
"declined"
],
"type": "string"
},
"until": {
"format": "datetime",
"type": "string"
}
},
"required": [
"status"
],
"type": "object"
}
},
"type": "procedure"
}
},
"id": "health.hats.answerRequest",
"lexicon": 1
}