{
  "resourceType": "StructureDefinition",
  "meta": {
    "lastUpdated": "2022-02-15T06:39:11.411+00:00"
  },
  "url": "http://example.org/fhir/StructureDefinition/crs-allergyIntolerance",
  "name": "CrsAllergyIntolerance",
  "status": "draft",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "AllergyIntolerance",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/AllergyIntolerance",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "AllergyIntolerance.clinicalStatus",
        "path": "AllergyIntolerance.clinicalStatus",
        "min": 1
      },
      {
        "id": "AllergyIntolerance.clinicalStatus.coding.system",
        "path": "AllergyIntolerance.clinicalStatus.coding.system",
        "fixedUri": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
      },
      {
        "id": "AllergyIntolerance.category",
        "path": "AllergyIntolerance.category",
        "min": 1,
        "max": "1"
      },
      {
        "id": "AllergyIntolerance.code",
        "path": "AllergyIntolerance.code",
        "min": 1
      },
      {
        "id": "AllergyIntolerance.code.text",
        "path": "AllergyIntolerance.code.text",
        "min": 1
      },
      {
        "id": "AllergyIntolerance.onset[x]",
        "path": "AllergyIntolerance.onset[x]",
        "min": 1,
        "type": [
          {
            "code": "Period"
          }
        ]
      },
      {
        "id": "AllergyIntolerance.onset[x].start",
        "path": "AllergyIntolerance.onset[x].start",
        "min": 1
      },
      {
        "id": "AllergyIntolerance.reaction.substance.coding",
        "path": "AllergyIntolerance.reaction.substance.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "AllergyIntolerance.reaction.substance.coding.system",
        "path": "AllergyIntolerance.reaction.substance.coding.system",
        "fixedUri": "urn:oid:1.2.410.100110.400.1"
      },
      {
        "id": "AllergyIntolerance.reaction.onset",
        "path": "AllergyIntolerance.reaction.onset",
        "min": 1
      }
    ]
  }
}