{
  "resourceType": "StructureDefinition",
  "id": "SendLabResultSubContConsent-260e9471-243f-4977-8b2b-eb0bef221ba9",
  "url": "https://www.esante.lu/fhir-spec/StructureDefinition/SendLabResultSubContConsent",
  "version": "1.2.0",
  "name": "SendLabResultSubContConsent",
  "status": "active",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Consent",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Consent",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Consent.meta",
        "path": "Consent.meta",
        "min": 1
      },
      {
        "id": "Consent.meta.id",
        "path": "Consent.meta.id",
        "max": "0"
      },
      {
        "id": "Consent.meta.versionId",
        "path": "Consent.meta.versionId",
        "max": "0"
      },
      {
        "id": "Consent.meta.lastUpdated",
        "path": "Consent.meta.lastUpdated",
        "max": "0"
      },
      {
        "id": "Consent.meta.source",
        "path": "Consent.meta.source",
        "max": "0"
      },
      {
        "id": "Consent.meta.profile",
        "path": "Consent.meta.profile",
        "min": 1,
        "max": "1",
        "fixedCanonical": "https://www.esante.lu/fhir-spec/StructureDefinition/SendLabResultSubContConsent"
      },
      {
        "id": "Consent.meta.security",
        "path": "Consent.meta.security",
        "max": "0"
      },
      {
        "id": "Consent.meta.tag",
        "path": "Consent.meta.tag",
        "max": "0"
      },
      {
        "id": "Consent.implicitRules",
        "path": "Consent.implicitRules",
        "max": "0"
      },
      {
        "id": "Consent.language",
        "path": "Consent.language",
        "max": "0"
      },
      {
        "id": "Consent.identifier",
        "path": "Consent.identifier",
        "max": "0"
      },
      {
        "id": "Consent.scope",
        "path": "Consent.scope",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "patient-privacy",
              "system": "http://terminology.hl7.org/CodeSystem/consentscope"
            }
          ]
        }
      },
      {
        "id": "Consent.category",
        "path": "Consent.category",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "SendLabResultSubCont",
              "system": "https://www.esante.lu/fhir-spec/CodeSystem/Consents"
            }
          ]
        }
      },
      {
        "id": "Consent.patient",
        "path": "Consent.patient",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.esante.lu/fhir-spec/StructureDefinition/EPPatient"
            ],
            "aggregation": [
              "bundled"
            ]
          }
        ]
      },
      {
        "id": "Consent.patient.reference",
        "path": "Consent.patient.reference",
        "short": "Reference to a patient from the Bundle",
        "min": 1,
        "example": [
          {
            "label": "Example",
            "valueString": "urn:uuid:43b25517-9ab1-4a3b-96b0-809e7f118c41"
          }
        ],
        "condition": [
          "val-uuid"
        ],
        "constraint": [
          {
            "key": "val-uuid",
            "severity": "error",
            "human": "SHALL be a v4 UUID prefixed by urn:uuid:",
            "expression": "startsWith('urn:uuid:') and length()=45",
            "source": "https://www.esante.lu/fhir-spec/StructureDefinition/SendLabResultSubContConsent"
          }
        ]
      },
      {
        "id": "Consent.dateTime",
        "path": "Consent.dateTime",
        "min": 1,
        "condition": [
          "val-dateDayPrecision"
        ],
        "constraint": [
          {
            "key": "val-dateDayPrecision",
            "severity": "error",
            "human": "Shall be precise to the day",
            "expression": "toString().length()=10",
            "source": "https://www.esante.lu/fhir-spec/StructureDefinition/SendLabResultSubContConsent"
          }
        ]
      },
      {
        "id": "Consent.performer",
        "path": "Consent.performer",
        "max": "0"
      },
      {
        "id": "Consent.organization",
        "path": "Consent.organization",
        "max": "0"
      },
      {
        "id": "Consent.source[x]",
        "path": "Consent.source[x]",
        "max": "0"
      },
      {
        "id": "Consent.policy",
        "path": "Consent.policy",
        "max": "0"
      },
      {
        "id": "Consent.policyRule",
        "path": "Consent.policyRule",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "SendLabResultSubCont",
              "system": "https://www.esante.lu/fhir-spec/CodeSystem/Consents"
            }
          ]
        }
      },
      {
        "id": "Consent.verification",
        "path": "Consent.verification",
        "max": "0"
      },
      {
        "id": "Consent.provision.type",
        "path": "Consent.provision.type",
        "min": 1
      },
      {
        "id": "Consent.provision.period",
        "path": "Consent.provision.period",
        "max": "0"
      },
      {
        "id": "Consent.provision.actor",
        "path": "Consent.provision.actor",
        "max": "0"
      },
      {
        "id": "Consent.provision.action",
        "path": "Consent.provision.action",
        "max": "0"
      },
      {
        "id": "Consent.provision.securityLabel",
        "path": "Consent.provision.securityLabel",
        "max": "0"
      },
      {
        "id": "Consent.provision.purpose",
        "path": "Consent.provision.purpose",
        "max": "0"
      },
      {
        "id": "Consent.provision.class",
        "path": "Consent.provision.class",
        "max": "0"
      },
      {
        "id": "Consent.provision.code",
        "path": "Consent.provision.code",
        "max": "0"
      },
      {
        "id": "Consent.provision.dataPeriod",
        "path": "Consent.provision.dataPeriod",
        "max": "0"
      },
      {
        "id": "Consent.provision.data",
        "path": "Consent.provision.data",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Consent.provision.data.meaning",
        "path": "Consent.provision.data.meaning",
        "fixedCode": "instance"
      },
      {
        "id": "Consent.provision.data.reference",
        "path": "Consent.provision.data.reference",
        "short": "Reference to the CarePlan",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.esante.lu/fhir-spec/StructureDefinition/EPLabPrescription"
            ],
            "aggregation": [
              "bundled"
            ]
          }
        ]
      },
      {
        "id": "Consent.provision.provision",
        "path": "Consent.provision.provision",
        "max": "0"
      }
    ]
  }
}