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
cid bafyreig3qtckqdm453fehytaquiwwxj76xot34cjikud2vgu6lz73ivhga

Checks

Valid
JSONDownload
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "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).",
      "errors": [
        {
          "description": "The reason code is not one the coordinator accepts.",
          "name": "InvalidReason"
        },
        {
          "description": "A pick is not on the caller's menu for this reason.",
          "name": "InvalidPick"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "patient": {
              "description": "The patient: the authority of the spaces asked for.",
              "format": "did",
              "type": "string"
            },
            "picks": {
              "description": "Option ids from listAccessOptions under the same reason. 'tier' picks every option on the menu.",
              "items": {
                "type": "string"
              },
              "minLength": 1,
              "type": "array"
            },
            "reason": {
              "ref": "#reason",
              "type": "ref"
            }
          },
          "required": [
            "patient",
            "reason",
            "picks"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "results": {
              "items": {
                "ref": "#result",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "results"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    },
    "reason": {
      "properties": {
        "code": {
          "description": "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"
          ],
          "type": "string"
        },
        "description": {
          "description": "Free-text justification. A BTG renewal needs a new one.",
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    },
    "result": {
      "description": "The outcome of one picked option.",
      "properties": {
        "option": {
          "description": "The option id.",
          "type": "string"
        },
        "space": {
          "description": "The space address, at://{patient}/space/{spaceType}/{skey}. Present when granted.",
          "format": "space-ref",
          "type": "string"
        },
        "status": {
          "knownValues": [
            "granted",
            "pending"
          ],
          "type": "string"
        }
      },
      "required": [
        "option",
        "status"
      ],
      "type": "object"
    }
  },
  "id": "health.hats.requestAccess",
  "lexicon": 1
}