{
  "resourceType": "StructureDefinition",
  "meta": {
    "lastUpdated": "2019-02-08T10:04:31.601+00:00"
  },
  "url": "http://medico-emr.net/stu3/sd/AllergyIntolerance-AllergyIntolerance-1",
  "name": "AllergyIntolerance-AllergyIntolerance-1",
  "status": "active",
  "date": "2019-02-08T10:04:31.4176448+00:00",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "AllergyIntolerance",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/AllergyIntolerance",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "AllergyIntolerance.id",
        "path": "AllergyIntolerance.id",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "id"
            }
          ],
          "rules": "open"
        },
        "definition": "Format:  Allergy-####",
        "min": 1
      },
      {
        "id": "AllergyIntolerance.id:Allergy",
        "path": "AllergyIntolerance.id",
        "sliceName": "Allergy"
      },
      {
        "id": "AllergyIntolerance.id:Allergy.id",
        "path": "AllergyIntolerance.id.id",
        "definition": "Format: Allergy-#####",
        "min": 1
      },
      {
        "id": "AllergyIntolerance.id:AllergyPerCase",
        "path": "AllergyIntolerance.id",
        "sliceName": "AllergyPerCase"
      },
      {
        "id": "AllergyIntolerance.id:AllergyPerCase.id",
        "path": "AllergyIntolerance.id.id",
        "definition": "Format:  AllergyPerCase-####",
        "min": 1
      },
      {
        "id": "AllergyIntolerance.meta",
        "path": "AllergyIntolerance.meta",
        "min": 1
      },
      {
        "id": "AllergyIntolerance.meta.id",
        "path": "AllergyIntolerance.meta.id",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.meta.versionId",
        "path": "AllergyIntolerance.meta.versionId",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.meta.lastUpdated",
        "path": "AllergyIntolerance.meta.lastUpdated",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.meta.profile",
        "path": "AllergyIntolerance.meta.profile",
        "min": 1,
        "max": "1",
        "fixedUri": "http://medico-emr.net/stu3/sd/AllergyIntolerance-AllergyIntolerance-1"
      },
      {
        "id": "AllergyIntolerance.meta.security",
        "path": "AllergyIntolerance.meta.security",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.meta.tag",
        "path": "AllergyIntolerance.meta.tag",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.meta.tag.id",
        "path": "AllergyIntolerance.meta.tag.id",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.meta.tag.system",
        "path": "AllergyIntolerance.meta.tag.system",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.meta.tag.version",
        "path": "AllergyIntolerance.meta.tag.version",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.meta.tag.code",
        "path": "AllergyIntolerance.meta.tag.code",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.meta.tag.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "AllergyIntolerance.meta.tag.display",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.meta.tag.userSelected",
        "path": "AllergyIntolerance.meta.tag.userSelected",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.implicitRules",
        "path": "AllergyIntolerance.implicitRules",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.language",
        "path": "AllergyIntolerance.language",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.text",
        "path": "AllergyIntolerance.text",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.contained",
        "path": "AllergyIntolerance.contained",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.extension",
        "path": "AllergyIntolerance.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "AllergyIntolerance.extension:MXT-AllergyIntolerance-ReferenceEncounter-1",
        "path": "AllergyIntolerance.extension",
        "sliceName": "MXT-AllergyIntolerance-ReferenceEncounter-1",
        "definition": "An extension that can generically be used to link to an Encounter resource\r\nused e.g. in AllergyIntolerance - if it was originally recorded for just an encounter.\r\nProvided only if the allergy is mapped to an Encounter - and not to a patient.",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://medico-emr.net/stu3/sd/MXT-AllergyIntolerance-ReferenceEncounter-1"
          }
        ]
      },
      {
        "id": "AllergyIntolerance.extension:MXT-AllergyIntolerance-ReferenceEncounter-1.valueReference:valueReference",
        "path": "AllergyIntolerance.extension.valueReference",
        "sliceName": "valueReference",
        "max": "1"
      },
      {
        "id": "AllergyIntolerance.identifier",
        "path": "AllergyIntolerance.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        },
        "min": 1,
        "max": "1"
      },
      {
        "id": "AllergyIntolerance.identifier:medicoResourceId",
        "path": "AllergyIntolerance.identifier",
        "sliceName": "medicoResourceId",
        "max": "1",
        "type": [
          {
            "code": "Identifier",
            "profile": "http://medico-emr.net/stu3/sd/Identifier-medicoResourceId-1"
          }
        ]
      },
      {
        "id": "AllergyIntolerance.identifier:medicoResourceId.system",
        "path": "AllergyIntolerance.identifier.system",
        "definition": "Allergy is bound to patient",
        "comment": "Dynamically resolved for validation\r\n--FixedValue=http://medico-emr.net/%KUNDE%/sid1/Allergy"
      },
      {
        "id": "AllergyIntolerance.identifier:medicoResourceId2",
        "path": "AllergyIntolerance.identifier",
        "sliceName": "medicoResourceId2",
        "max": "1",
        "type": [
          {
            "code": "Identifier",
            "profile": "http://medico-emr.net/stu3/sd/Identifier-medicoResourceId-1"
          }
        ]
      },
      {
        "id": "AllergyIntolerance.identifier:medicoResourceId2.system",
        "path": "AllergyIntolerance.identifier.system",
        "definition": "Allergy is bound to Encounter of type case",
        "comment": "Dynamically resolved for validation\r\n--FixedValue=http://medico-emr.net/%KUNDE%/sid1/AllergyPerCase"
      },
      {
        "id": "AllergyIntolerance.clinicalStatus",
        "path": "AllergyIntolerance.clinicalStatus",
        "definition": "always active - value has no meaning because there is no corresponding value in medico",
        "min": 1,
        "fixedCode": "active"
      },
      {
        "id": "AllergyIntolerance.verificationStatus",
        "path": "AllergyIntolerance.verificationStatus",
        "fixedCode": "confirmed"
      },
      {
        "id": "AllergyIntolerance.type",
        "path": "AllergyIntolerance.type",
        "min": 1,
        "fixedCode": "allergy"
      },
      {
        "id": "AllergyIntolerance.category",
        "path": "AllergyIntolerance.category",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.criticality",
        "path": "AllergyIntolerance.criticality",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.code",
        "path": "AllergyIntolerance.code",
        "definition": "Code for an allergy or intolerance statement (either a positive or a negated/excluded statement).  This may be a code for a substance or pharmaceutical product that is considered to be responsible for the adverse reaction risk (e.g., \"Latex\"), an allergy or intolerance condition (e.g., \"Latex allergy\"), or a negated/excluded code for a specific substance or class (e.g., \"No latex allergy\") or a general or categorical negated statement (e.g.,  \"No known allergy\", \"No known drug allergies\").\r\nmedico: this is specific to a customer",
        "min": 1,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "AllergyIntoleranceCode"
            }
          ],
          "strength": "example",
          "valueSetReference": {
            "reference": "http://medico-emr.net/%KUNDE%/vs/AllergyIntolerance-AllergyIntolerance-1"
          }
        }
      },
      {
        "id": "AllergyIntolerance.code.id",
        "path": "AllergyIntolerance.code.id",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.code.coding",
        "path": "AllergyIntolerance.code.coding",
        "min": 1
      },
      {
        "id": "AllergyIntolerance.code.coding.id",
        "path": "AllergyIntolerance.code.coding.id",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.code.coding.system",
        "path": "AllergyIntolerance.code.coding.system",
        "definition": "Reference to customer-specific Code-System",
        "comment": "Dynamically resolved for validation\r\n--FixedValue=http://medico-emr.net/%KUNDE%/cs/AllergyAttributes",
        "min": 1
      },
      {
        "id": "AllergyIntolerance.code.coding.version",
        "path": "AllergyIntolerance.code.coding.version",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.code.coding.code",
        "path": "AllergyIntolerance.code.coding.code",
        "short": "the medico allergy code",
        "min": 1
      },
      {
        "id": "AllergyIntolerance.code.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "AllergyIntolerance.code.coding.display",
        "definition": "Plain text for the selected code - as defined by the customer",
        "min": 1
      },
      {
        "id": "AllergyIntolerance.code.coding.userSelected",
        "path": "AllergyIntolerance.code.coding.userSelected",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.code.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "AllergyIntolerance.code.text",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.patient",
        "path": "AllergyIntolerance.patient",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": "http://medico-emr.net/stu3/sd/Reference-SubjectPatient-1",
            "targetProfile": "http://medico-emr.net/stu3/sd/Patient-Patient-1"
          }
        ]
      },
      {
        "id": "AllergyIntolerance.patient.reference",
        "path": "AllergyIntolerance.patient.reference",
        "min": 1
      },
      {
        "id": "AllergyIntolerance.onset[x]:onsetDateTime",
        "path": "AllergyIntolerance.onsetDateTime",
        "sliceName": "onsetDateTime",
        "min": 1,
        "type": [
          {
            "code": "dateTime"
          }
        ]
      },
      {
        "id": "AllergyIntolerance.onset[x]:onsetDateTime.id",
        "path": "AllergyIntolerance.onsetDateTime.id",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.assertedDate",
        "path": "AllergyIntolerance.assertedDate",
        "definition": "Represents the date/time the record was created in medico",
        "min": 1
      },
      {
        "id": "AllergyIntolerance.recorder",
        "path": "AllergyIntolerance.recorder",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.asserter",
        "path": "AllergyIntolerance.asserter",
        "definition": "Reference to the user how last changed or created the allergy record.",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://medico-emr.net/stu3/sd/Practitioner-User-1"
          }
        ]
      },
      {
        "id": "AllergyIntolerance.asserter.id",
        "path": "AllergyIntolerance.asserter.id",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.asserter.reference",
        "path": "AllergyIntolerance.asserter.reference",
        "min": 1
      },
      {
        "id": "AllergyIntolerance.asserter.identifier",
        "path": "AllergyIntolerance.asserter.identifier",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.asserter.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "AllergyIntolerance.asserter.display",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.lastOccurrence",
        "path": "AllergyIntolerance.lastOccurrence",
        "definition": "if set - marks \"the end\" of the allergy or intolerance to the substance"
      },
      {
        "id": "AllergyIntolerance.note",
        "path": "AllergyIntolerance.note",
        "max": "1"
      },
      {
        "id": "AllergyIntolerance.note.id",
        "path": "AllergyIntolerance.note.id",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.note.author[x]:authorReference",
        "path": "AllergyIntolerance.note.authorReference",
        "sliceName": "authorReference",
        "max": "0",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
          }
        ]
      },
      {
        "id": "AllergyIntolerance.note.time",
        "path": "AllergyIntolerance.note.time",
        "max": "0"
      },
      {
        "id": "AllergyIntolerance.reaction",
        "path": "AllergyIntolerance.reaction",
        "max": "0"
      }
    ]
  }
}