{
  "resourceType": "StructureDefinition",
  "id": "Condition-exists-CCpattern",
  "url": "http://example.org/StructureDefinition/Condition-exists-CCpattern",
  "name": "ConditionExistsCCPattern",
  "title": "Condition (Exists Slice with patternCodeableConcept)",
  "status": "draft",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Condition",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Condition",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Condition.code",
        "path": "Condition.code",
        "comment": "Coding is optional, if coding is sent there shall at least be one coding from the ICD-9-CM code system",
        "mustSupport": true,
        "slicing": {
          "discriminator": [
            {
              "type": "exists",
              "path": "coding.system"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Condition.code:slice1",
        "path": "Condition.code",
        "sliceName": "slice1",
        "comment": "Coding is optional, if coding is sent there shall at least be one coding from the ICD-9-CM code system",
        "mustSupport": true,
        "patternCodeableConcept": {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/icd9cm"
            }
          ]
        }
      },
      {
        "id": "Condition.code:slice1.coding.system",
        "path": "Condition.code.coding.system",
        "min": "1"
      },
      {
        "id": "Condition.code:slice2",
        "path": "Condition.code",
        "sliceName": "slice2"
      },
      {
        "id": "Condition.code:slice2.coding.system",
        "path": "Condition.code.coding.system",
        "max": "0"
      },
      {
        "id": "Condition.subject.reference",
        "path": "Condition.subject.reference",
        "min": 1,
        "mustSupport": true
      }
    ]
  }
}