{
  "resourceType": "StructureDefinition",
  "id": "TulipVariety",
  "url": "https://fake-acme.org/fhir/TulipCare/StructureDefinition/TulipVariety",
  "version": "0.1.0",
  "name": "TulipVariety",
  "title": "Tulip Variety",
  "status": "draft",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Substance",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Substance",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Substance.extension",
        "path": "Substance.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Substance.extension:bloomSeason",
        "path": "Substance.extension",
        "sliceName": "bloomSeason",
        "short": "Seasonal bloom period",
        "definition": "The season in which this variety blooms, derived from KAVB bloom time chart.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fake-acme.org/fhir/TulipCare/StructureDefinition/ext-bloomSeason"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Substance.extension:heightRangeMin",
        "path": "Substance.extension",
        "sliceName": "heightRangeMin",
        "short": "Minimum expected plant height in inches",
        "definition": "Minimum expected plant height in inches.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fake-acme.org/fhir/TulipCare/StructureDefinition/ext-heightRangeMin"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Substance.extension:heightRangeMax",
        "path": "Substance.extension",
        "sliceName": "heightRangeMax",
        "short": "Maximum expected plant height in inches",
        "definition": "Maximum expected plant height in inches.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fake-acme.org/fhir/TulipCare/StructureDefinition/ext-heightRangeMax"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Substance.extension:flowerColour",
        "path": "Substance.extension",
        "sliceName": "flowerColour",
        "short": "Descriptive colour of the bloom",
        "definition": "Descriptive or coded colour of the bloom. Free text for v1.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fake-acme.org/fhir/TulipCare/StructureDefinition/ext-flowerColour"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Substance.extension:varietyRecordedDate",
        "path": "Substance.extension",
        "sliceName": "varietyRecordedDate",
        "short": "Date the variety was added to the catalogue",
        "definition": "Server-populated date on which this variety record was created in the catalogue.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fake-acme.org/fhir/TulipCare/StructureDefinition/ext-varietyRecordedDate"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Substance.identifier",
        "path": "Substance.identifier",
        "short": "Unique system identifier for this variety record",
        "definition": "Server-assigned unique identifier for the variety record.",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Substance.code",
        "path": "Substance.code",
        "short": "Variety name coded identity",
        "definition": "The common name of the cultivar or species encoded as the substance code. Text carries the varietyName.",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Substance.code.coding",
        "path": "Substance.code.coding",
        "short": "Horticultural classification group (tulipClass)",
        "definition": "Horticultural classification group based on KAVB classification (13 recognised groups).",
        "min": 1,
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "valueSet": "https://fake-acme.org/fhir/TulipCare/models/ValueSet/TulipClass-lm"
        }
      },
      {
        "id": "Substance.code.text",
        "path": "Substance.code.text",
        "short": "Cultivar or species common name (varietyName)",
        "definition": "Common name of the cultivar or species. Must be unique within the catalogue.",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Substance.description",
        "path": "Substance.description",
        "short": "Free-text remarks about the variety",
        "definition": "Optional free-text remarks or observations about this variety.",
        "min": 0,
        "max": "1",
        "mustSupport": true
      }
    ]
  }
}