{
  "resourceType": "StructureDefinition",
  "id": "d592108c-1bc5-462c-9042-34bf07e43a3f",
  "meta": {
    "versionId": "2",
    "lastUpdated": "2019-05-06T16:58:33.4736053+00:00"
  },
  "url": "https://ehealthontario.ca/API/FHIR/StructureDefinition/ca-on-medications-profile-Consent",
  "name": "Consent-Consent",
  "status": "draft",
  "date": "2019-05-06T16:58:33.2102035Z",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Consent",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Consent",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Consent.identifier",
        "path": "Consent.identifier",
        "comment": "Will be assigned by server or supplied by consumer. This identifier is identifies this copy of the consent. Where this identifier is also used elsewhere as the identifier for a consent record (e.g. a CDA consent document) then the consent details are expected to be the same.",
        "mustSupport": true
      },
      {
        "id": "Consent.identifier.system",
        "path": "Consent.identifier.system",
        "mustSupport": false
      },
      {
        "id": "Consent.identifier.value",
        "path": "Consent.identifier.value",
        "mustSupport": false
      },
      {
        "id": "Consent.status",
        "path": "Consent.status",
        "fixedCode": "active",
        "mustSupport": true
      },
      {
        "id": "Consent.category",
        "path": "Consent.category",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Consent.category.coding",
        "path": "Consent.category.coding",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Consent.category.coding.system",
        "path": "Consent.category.coding.system",
        "min": 1,
        "mustSupport": true,
        "binding": {
          "strength": "example",
          "description": "A code specifying the particular kind of Act that the Act-instance represents within its class.",
          "valueSetUri": "http://hl7.org/fhir/v3/ActCode"
        }
      },
      {
        "id": "Consent.category.coding.code",
        "path": "Consent.category.coding.code",
        "min": 1,
        "fixedCode": "INFA",
        "mustSupport": true
      },
      {
        "id": "Consent.category.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Consent.category.coding.display",
        "min": 1,
        "fixedString": "information access",
        "mustSupport": true
      },
      {
        "id": "Consent.patient",
        "path": "Consent.patient",
        "comment": "Health card number, First & Last Name of a Patient",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://ehealthontario.ca/API/FHIR/StructureDefinition/ca-on-medications-profile-Patient-Consent"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Consent.patient.reference",
        "path": "Consent.patient.reference",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Consent.dateTime",
        "path": "Consent.dateTime",
        "mustSupport": true
      },
      {
        "id": "Consent.consentingParty",
        "path": "Consent.consentingParty",
        "comment": "Consenting party is either patient or SDM (substitute decision maker)",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://ehealthontario.ca/API/FHIR/StructureDefinition/ca-on-medications-profile-Patient-Consent"
          },
          {
            "code": "Reference",
            "targetProfile": "https://ehealthontario.ca/API/FHIR/NamingSystem/ca-on-medications-profile-RelatedPerson-Consent"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Consent.consentingParty.reference",
        "path": "Consent.consentingParty.reference",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Consent.organization",
        "path": "Consent.organization",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://ehealthontario.ca/API/FHIR/StructureDefinition/ca-on-medications-profile-Organization-Consent"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Consent.organization.reference",
        "path": "Consent.organization.reference",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Consent.policy",
        "path": "Consent.policy",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Consent.policy.authority",
        "path": "Consent.policy.authority",
        "min": 1,
        "fixedUri": "https://www.ontario.ca",
        "mustSupport": true
      },
      {
        "id": "Consent.except",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
            "valueString": "Except"
          }
        ],
        "path": "Consent.except",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Consent.except.type",
        "path": "Consent.except.type",
        "fixedCode": "permit",
        "mustSupport": true
      },
      {
        "id": "Consent.except.period",
        "path": "Consent.except.period",
        "definition": "The timeframe in this exception is valid. (Duration of the unblock).",
        "comment": "Not used in the current release (see below). \r\nThis is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. \"the patient was an inpatient of the hospital for this time range\") or one value from the range applies (e.g. \"give to the patient between these two times\"). If duration is required, specify the type as Interval|Duration.",
        "mustSupport": true
      },
      {
        "id": "Consent.except.period.start",
        "path": "Consent.except.period.start",
        "comment": "In the current release this will be overridden by the time the server received the message.\r\nIf the low element is missing, the meaning is that the low boundary is not known.",
        "mustSupport": true
      },
      {
        "id": "Consent.except.period.end",
        "path": "Consent.except.period.end",
        "comment": "Always 4 hours after start. The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has a end value of 2012-02-03.",
        "mustSupport": true
      },
      {
        "id": "Consent.except.actor",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
            "valueString": "ExceptActor"
          }
        ],
        "path": "Consent.except.actor",
        "comment": "Only “Consent Obtainer” role is supported in the current release.",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Consent.except.actor.role",
        "path": "Consent.except.actor.role",
        "short": "Consent Directive Actor Role",
        "mustSupport": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ConsentActorRole"
            }
          ],
          "strength": "extensible",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/v3/ParticipationType"
          }
        }
      },
      {
        "id": "Consent.except.actor.role.coding",
        "path": "Consent.except.actor.role.coding",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Consent.except.actor.role.coding.system",
        "path": "Consent.except.actor.role.coding.system",
        "min": 1,
        "mustSupport": true,
        "binding": {
          "strength": "extensible",
          "description": "Participation Type",
          "valueSetUri": "http://hl7.org/fhir/v3/ParticipationType"
        }
      },
      {
        "id": "Consent.except.actor.role.coding.code",
        "path": "Consent.except.actor.role.coding.code",
        "min": 1,
        "fixedCode": "IRCP",
        "mustSupport": true
      },
      {
        "id": "Consent.except.actor.role.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Consent.except.actor.role.coding.display",
        "min": 1,
        "fixedString": "information recipient",
        "mustSupport": true
      },
      {
        "id": "Consent.except.actor.reference",
        "path": "Consent.except.actor.reference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://ehealthontario.ca/API/FHIR/StructureDefinition/ca-on-medications-profile-Practitioner-Consent"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Consent.except.actor.reference.reference",
        "path": "Consent.except.actor.reference.reference",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Consent.except.action",
        "path": "Consent.except.action",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Consent.except.action.coding",
        "path": "Consent.except.action.coding",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Consent.except.action.coding.system",
        "path": "Consent.except.action.coding.system",
        "min": 1,
        "fixedUri": "http://hl7.org/fhir/consentaction",
        "mustSupport": true,
        "binding": {
          "strength": "extensible",
          "description": "Consent Action",
          "valueSetUri": "http://hl7.org/fhir/consentaction"
        }
      },
      {
        "id": "Consent.except.action.coding.code",
        "path": "Consent.except.action.coding.code",
        "min": 1,
        "fixedCode": "access",
        "mustSupport": true
      },
      {
        "id": "Consent.except.action.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Consent.except.action.coding.display",
        "min": 1,
        "fixedString": "Access",
        "mustSupport": true
      },
      {
        "id": "Consent.except.purpose",
        "path": "Consent.except.purpose",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Consent.except.purpose.system",
        "path": "Consent.except.purpose.system",
        "min": 1,
        "fixedUri": "http://hl7.org/fhir/v3/ActReason",
        "mustSupport": true,
        "binding": {
          "strength": "extensible",
          "description": "Act Reason",
          "valueSetUri": "http://hl7.org/fhir/v3/ActReason"
        }
      },
      {
        "id": "Consent.except.purpose.code",
        "path": "Consent.except.purpose.code",
        "min": 1,
        "fixedCode": "TREAT",
        "mustSupport": true
      },
      {
        "id": "Consent.except.purpose.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Consent.except.purpose.display",
        "min": 1,
        "fixedString": "treatment",
        "mustSupport": true
      },
      {
        "id": "Consent.except.class",
        "path": "Consent.except.class",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Consent.except.class.system",
        "path": "Consent.except.class.system",
        "min": 1,
        "fixedUri": "urn:ietf:rfc:3986",
        "mustSupport": true
      },
      {
        "id": "Consent.except.class.code",
        "path": "Consent.except.class.code",
        "min": 1,
        "fixedCode": "https://ehealthontario.ca/API/FHIR/Medications",
        "mustSupport": true
      },
      {
        "id": "Consent.except.class.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Consent.except.class.display",
        "min": 1,
        "fixedString": "Ontario Medications",
        "mustSupport": true
      }
    ]
  }
}