{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A patient-signed pre-authorization of a sharing class: a FHIR R4 Consent (scope patient-privacy) under the HATS profile. Stored in the patient's health.hats.audit.log space; read by the coordinator when it answers checkUserAccess.",
      "key": "tid",
      "record": {
        "properties": {
          "prev": {
            "ref": "health.hats.defs#prev",
            "type": "ref"
          },
          "resourceType": {
            "const": "Consent",
            "description": "FHIR resource type.",
            "type": "string"
          },
          "signatures": {
            "ref": "health.hats.defs#signatures",
            "type": "ref"
          }
        },
        "required": [
          "resourceType"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "health.hats.institution.sharingGrant",
  "lexicon": 1
}
