{
  "resourceType": "StructureDefinition",
  "id": "CA-eReC-Consent",
  "url": "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-Consent",
  "name": "Consent",
  "title": "Consent",
  "status": "draft",
  "description": "This profile on Consent is used to record whether a patient has consented or not to be notified about updates to the eReferral.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Consent",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Consent",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Consent.status",
        "path": "Consent.status",
        "mustSupport": true
      },
      {
        "id": "Consent.scope",
        "path": "Consent.scope",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "patient-privacy",
              "system": "http://terminology.hl7.org/CodeSystem/consentscope",
              "display": "Privacy Consent"
            }
          ]
        },
        "mustSupport": true
      },
      {
        "id": "Consent.category",
        "path": "Consent.category",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "59284-0",
              "system": "http://loinc.org",
              "display": "Patient Consent"
            }
          ]
        },
        "mustSupport": true
      },
      {
        "id": "Consent.patient",
        "path": "Consent.patient",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Consent.dateTime",
        "path": "Consent.dateTime",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Consent.policyRule",
        "path": "Consent.policyRule",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Consent.provision",
        "path": "Consent.provision",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Consent.provision.type",
        "path": "Consent.provision.type",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Consent.provision.action",
        "path": "Consent.provision.action",
        "min": 1,
        "max": "1",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "disclose",
              "system": "http://terminology.hl7.org/CodeSystem/consentaction"
            }
          ]
        },
        "mustSupport": true
      }
    ]
  }
}