
{
  "resourceType": "AccessPolicy",
  "name": "Patient Access Policy Template",
  "compartment": {
    "reference": "Patient/%patient"
  },
  "resource": [
    {
      "resourceType": "Patient",
      "criteria": "Patient?_compartment=%patient",
      "readonly": true
    },
    {
      "resourceType": "Observation",
      "criteria": "Observation?_compartment=%patient"
    },
    {
      "resourceType": "CarePlan",
      "criteria": "CarePlan?_compartment=%patient",
      "readonly": true
    },
    {
      "resourceType": "Communication",
      "criteria": "Communication?_compartment=%patient",
      "readonly": false
    },
    {
      "resourceType": "CommunicationRequest"
    },
    {
      "resourceType": "Task",
      "criteria": "Task?_compartment=%patient"
    },
    {
      "resourceType": "QuestionnaireResponse",
      "criteria": "QuestionnaireResponse?_compartment=%patient"
    },
    {
      "resourceType": "Questionnaire",
      "readonly": true
    },
    {
      "resourceType": "HealthcareService",
      "readonly": true
    },
    {
      "resourceType": "Endpoint",
      "readonly": true
    },
    {
      "resourceType": "Group"
    },
    {
      "resourceType": "Subscription",
      "criteria": "Subscription?type=websocket"
    },
    {
      "resourceType": "Organization",
      "readonly": true
    },
    {
      "resourceType": "List",
      "readonly": true
    },
    {
      "resourceType": "Condition",
      "criteria": "Condition?_compartment=%patient",
      "readonly": true
    },
    {
      "resourceType": "EpisodeOfCare",
      "criteria": "EpisodeOfCare?_compartment=%patient",
      "readonly": true
    },
    {
      "resourceType": "CodeSystem",
      "readonly": true
    },
    {
      "resourceType": "RelatedPerson",
      "criteria": "RelatedPerson?_compartment=%patient"
    },
    {
      "resourceType": "Coverage",
      "criteria": "Coverage?_compartment=%patient",
      "readonly": true
    },
    {
      "resourceType": "Questionnaire",
      "readonly": true
    },
    {
      "resourceType": "ValueSet",
      "readonly": true
    },
    {
      "resourceType": "Practitioner",
      "readonly": true
    },
    {
      "resourceType": "PractitionerRole",
      "readonly": true
    },
    {
      "resourceType": "Binary"
    },
    {
      "resourceType": "Media"
    }
  ]
}
