{
  "resourceType": "StructureDefinition",
  "id": "ncdhc-consent",
  "url": "http://hl7.org.au/fhir/ch/v1/StructureDefinition/ncdhc-consent",
  "version": "r1.0.0",
  "name": "NCDHC Consent Profile",
  "title": "NCDHC Consent",
  "status": "draft",
  "date": "2019-02-08",
  "publisher": "National Children's Digital Health Collaborative (NCDHC)",
  "copyright": "Copyright © 2019 Australian Digital Health Agency - All rights reserved. This content is licensed under a Creative Commons Attribution 4.0 International License. See https://creativecommons.org/licenses/by/4.0/",
  "fhirVersion": "3.0.2",
  "kind": "resource",
  "abstract": false,
  "type": "Consent",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Consent",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Consent",
        "path": "Consent",
        "short": "NCDHC Consent"
      },
      {
        "id": "Consent.status",
        "path": "Consent.status",
        "comment": "Only Consent with status as 'active' should be returned in query result.",
        "mustSupport": true
      },
      {
        "id": "Consent.category",
        "path": "Consent.category",
        "short": "Classification/Type of the consent statement in NCDHC - for indexing/retrieval",
        "min": 1,
        "mustSupport": false,
        "binding": {
          "strength": "required",
          "valueSetReference": {
            "reference": "http://hl7.org.au/fhir/ch/v1/ValueSet/ncdhc-consent-category-1"
          }
        }
      },
      {
        "id": "Consent.patient",
        "path": "Consent.patient",
        "short": "Who the consent applies to. Provide the reference to the \"machine processable empty Patient\" until the baby is born. Once baby is born, then provide the reference to the Baby patient in the operational Consent.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org.au/fhir/StructureDefinition/au-patient"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Consent.dateTime",
        "path": "Consent.dateTime",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Consent.consentingParty",
        "path": "Consent.consentingParty",
        "short": "Who is agreeing to the policy and exceptions. For all Registration consents, this should be the Authorised Rep.",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org.au/fhir/StructureDefinition/au-organisation"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org.au/fhir/StructureDefinition/au-patient"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org.au/fhir/StructureDefinition/au-practitioner"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
          }
        ]
      },
      {
        "id": "Consent.actor",
        "path": "Consent.actor",
        "short": "Who|what controlled by this consent (or group, by role). This SHALL be provided for all regisration related Consents."
      },
      {
        "id": "Consent.actor.role",
        "path": "Consent.actor.role",
        "binding": {
          "strength": "required",
          "valueSetReference": {
            "reference": "http://hl7.org.au/fhir/ch/v1/ValueSet/ncdhc-security-role-type-1"
          }
        }
      },
      {
        "id": "Consent.actor.reference",
        "path": "Consent.actor.reference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Group"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/CareTeam"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org.au/fhir/StructureDefinition/au-organisation"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org.au/fhir/ch/v1/StructureDefinition/ncdhc-patient-baby"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org.au/fhir/StructureDefinition/au-practitioner"
          }
        ]
      },
      {
        "id": "Consent.organization",
        "path": "Consent.organization",
        "short": "Custodian of the consent. This is the reference to Child Data Hub",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org.au/fhir/StructureDefinition/au-organisation"
          }
        ]
      },
      {
        "id": "Consent.data",
        "path": "Consent.data",
        "comment": "Server may provide the reference to the relevant Health Interaction instances using the data element. 'related ' SHALL be used as Consent.data.meaning."
      }
    ]
  }
}