{
  "resourceType": "StructureDefinition",
  "id": "TulipBulb",
  "url": "https://fake-acme.org/fhir/TulipCare/StructureDefinition/TulipBulb",
  "version": "0.1.0",
  "name": "TulipBulb",
  "title": "Tulip Bulb",
  "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:acquisitionDate",
        "path": "Substance.extension",
        "sliceName": "acquisitionDate",
        "short": "Date the bulbs were received or acquired",
        "definition": "Date on which the bulbs were received or acquired from the supplier.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fake-acme.org/fhir/TulipCare/StructureDefinition/ext-acquisitionDate"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Substance.extension:plantingLocation",
        "path": "Substance.extension",
        "sliceName": "plantingLocation",
        "short": "Field or bed identifier where bulbs are/will be planted",
        "definition": "Simple string identifier for the field or bed location.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fake-acme.org/fhir/TulipCare/StructureDefinition/ext-plantingLocation"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Substance.extension:plantingDate",
        "path": "Substance.extension",
        "sliceName": "plantingDate",
        "short": "Date the bulbs were planted",
        "definition": "Date on which the bulbs were planted. Must not precede acquisitionDate.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fake-acme.org/fhir/TulipCare/StructureDefinition/ext-plantingDate"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Substance.extension:supplier",
        "path": "Substance.extension",
        "sliceName": "supplier",
        "short": "Name or identifier of the bulb supplier",
        "definition": "Free-text name or identifier of the bulb supplier or vendor.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fake-acme.org/fhir/TulipCare/StructureDefinition/ext-supplier"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Substance.extension:recordedDate",
        "path": "Substance.extension",
        "sliceName": "recordedDate",
        "short": "Date this bulb record was created in the system",
        "definition": "Server-populated date on which this bulb record was first created in the system.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fake-acme.org/fhir/TulipCare/StructureDefinition/ext-recordedDate"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Substance.extension:bulbStatus",
        "path": "Substance.extension",
        "sliceName": "bulbStatus",
        "short": "Lifecycle status of the bulb batch (TulipCare)",
        "definition": "Current lifecycle status of the bulb batch. Allowed transitions: In Storage → Planted → Bloomed → Harvested or Discarded.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fake-acme.org/fhir/TulipCare/StructureDefinition/ext-bulbStatus"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Substance.identifier",
        "path": "Substance.identifier",
        "short": "Unique identifier for this bulb or bulb batch",
        "definition": "Farmer-assigned or generated unique identifier. System: https://fake-acme.org/fhir/TulipCare/bulb-id.",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Substance.status",
        "path": "Substance.status",
        "short": "FHIR base status (always active for in-use bulbs)",
        "definition": "FHIR Substance lifecycle status. Use ext-bulbStatus for detailed TulipCare lifecycle.",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Substance.code",
        "path": "Substance.code",
        "short": "Coded identity of the variety",
        "definition": "Coded representation of the tulip variety associated with this bulb batch. Carries varietyReference semantics.",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Substance.description",
        "path": "Substance.description",
        "short": "Free-text remarks about this bulb batch",
        "definition": "Optional free-text remarks or observations about this bulb batch.",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Substance.quantity",
        "path": "Substance.quantity",
        "short": "Number of bulbs in this batch",
        "definition": "Number of bulbs in this batch. Minimum value is 1; a value of 1 represents an individual bulb.",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Substance.meta.lastUpdated",
        "path": "Substance.meta.lastUpdated",
        "short": "Date/time the record was last modified",
        "definition": "Server-maintained date and time at which this bulb record was last modified.",
        "min": 1,
        "mustSupport": true
      }
    ]
  }
}