{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "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).",
      "errors": [
        {
          "description": "No open ask under that id is addressed to the caller.",
          "name": "AskNotOpen"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "answer": {
              "description": "Required to decline: the reason, which stays with the record beside the patient's statement.",
              "type": "string"
            },
            "id": {
              "description": "The ask's id, from listAsks.",
              "type": "string"
            },
            "outcome": {
              "knownValues": [
                "done",
                "declined"
              ],
              "type": "string"
            },
            "patient": {
              "description": "The patient who asked.",
              "format": "did",
              "type": "string"
            }
          },
          "required": [
            "patient",
            "id",
            "outcome"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "status": {
              "type": "string"
            }
          },
          "required": [
            "status"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "health.hats.answerAsk",
  "lexicon": 1
}
