{
  "resourceType": "StructureDefinition",
  "id": "Substance",
  "meta": {
    "lastUpdated": "2021-01-01T21:58:31.578+00:00"
  },
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-category",
      "valueString": "Base.Entities"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode": "trial-use"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger": 2
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category",
      "valueCode": "business"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode": "oo"
    },
    {
      "url": "http://hl7.org/fhir/build/StructureDefinition/entered-in-error-status",
      "valueCode": ".status = entered-in-error"
    }
  ],
  "url": "http://hl7.org/fhir/StructureDefinition/Substance",
  "version": "4.5.0",
  "name": "Substance",
  "status": "draft",
  "date": "2021-01-01T21:58:31+00:00",
  "publisher": "Health Level Seven International (Orders and Observations)",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://hl7.org/fhir"
        }
      ]
    },
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://www.hl7.org/Special/committees/orders/index.cfm"
        }
      ]
    }
  ],
  "description": "A homogeneous material with a definite composition.",
  "fhirVersion": "4.5.0",
  "mapping": [
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "orim",
      "uri": "http://hl7.org/orim",
      "name": "Ontological RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Substance",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DomainResource",
  "derivation": "specialization",
  "differential": {
    "element": [
      {
        "id": "Substance",
        "extension": [
          {
            "url": "http://hl7.org/fhir/build/StructureDefinition/svg",
            "valueCode": "0,0"
          }
        ],
        "path": "Substance",
        "short": "A homogeneous material with a definite composition",
        "definition": "A homogeneous material with a definite composition.",
        "min": 0,
        "max": "*",
        "mapping": [
          {
            "identity": "rim",
            "map": "Material"
          },
          {
            "identity": "orim",
            "map": "fhir:Substance rdfs:subClassOf   rim:Entity, [      a owl:Restriction;     owl:onProperty  rim:Act.classCode;     owl:allValuesFrom  cs:EntityClass\\#MAT   ]."
          },
          {
            "identity": "w5",
            "map": "administrative.entity"
          }
        ]
      },
      {
        "id": "Substance.identifier",
        "extension": [
          {
            "url": "http://hl7.org/fhir/build/StructureDefinition/committee-notes",
            "valueString": "6/17/2015 in Reponse to Build warning QA task."
          }
        ],
        "path": "Substance.identifier",
        "short": "Unique identifier",
        "definition": "Unique identifier for the substance. For an instance, an identifier associated with the package/container (usually a label affixed directly).",
        "comment": "This identifier is associated with the kind of substance in contrast to the  Substance.instance.identifier which is associated with the package/container.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "w5",
            "map": "FiveWs.identifier"
          },
          {
            "identity": "rim",
            "map": ".id"
          }
        ]
      },
      {
        "id": "Substance.instance",
        "path": "Substance.instance",
        "short": "Is this an instance of a substance or a kind of one",
        "definition": "A boolean to indicate if this an instance of a substance or a kind of one (a definition).",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "boolean"
          }
        ],
        "isModifier": true,
        "isModifierReason": "Not known why this is labelled a modifier",
        "isSummary": true
      },
      {
        "id": "Substance.status",
        "path": "Substance.status",
        "short": "active | inactive | entered-in-error",
        "definition": "A code to indicate if the substance is actively used.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "isModifier": true,
        "isModifierReason": "This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid",
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "FHIRSubstanceStatus"
            }
          ],
          "strength": "required",
          "description": "A code to indicate if the substance is actively used.",
          "valueSet": "http://hl7.org/fhir/ValueSet/substance-status"
        },
        "mapping": [
          {
            "identity": "w5",
            "map": "FiveWs.status"
          },
          {
            "identity": "rim",
            "map": ".statusCode"
          }
        ]
      },
      {
        "id": "Substance.category",
        "extension": [
          {
            "url": "http://hl7.org/fhir/build/StructureDefinition/committee-notes",
            "valueString": "#7962."
          }
        ],
        "path": "Substance.category",
        "short": "What class/type of substance this is",
        "definition": "A code that classifies the general type of substance.  This is used  for searching, sorting and display purposes.",
        "comment": "The level of granularity is defined by the category concepts in the value set.   More fine-grained filtering can be performed using the metadata and/or terminology hierarchy in Substance.code.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "SubstanceCategory"
            }
          ],
          "strength": "extensible",
          "description": "Category or classification of substance.",
          "valueSet": "http://hl7.org/fhir/ValueSet/substance-category"
        },
        "mapping": [
          {
            "identity": "w5",
            "map": "FiveWs.class"
          },
          {
            "identity": "rim",
            "map": ".code"
          }
        ]
      },
      {
        "id": "Substance.code",
        "extension": [
          {
            "url": "http://hl7.org/fhir/build/StructureDefinition/committee-notes",
            "valueString": "#7961."
          }
        ],
        "path": "Substance.code",
        "short": "What substance this is",
        "definition": "A code (or set of codes) that identify this substance.",
        "comment": "This could be a reference to an externally defined code.  It could also be a locally assigned code (e.g. a formulary),  optionally with translations to the standard drug codes.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "CodeableReference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/SubstanceDefinition"
            ]
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "SubstanceCode"
            }
          ],
          "strength": "example",
          "description": "Substance codes.",
          "valueSet": "http://hl7.org/fhir/ValueSet/substance-code"
        },
        "mapping": [
          {
            "identity": "w5",
            "map": "FiveWs.what[x]"
          },
          {
            "identity": "rim",
            "map": ".code"
          },
          {
            "identity": "orim",
            "map": "fhir:Substance.code rdfs:subPropertyOf rim:Entity.code"
          }
        ]
      },
      {
        "id": "Substance.description",
        "path": "Substance.description",
        "short": "Textual description of the substance, comments",
        "definition": "A description of the substance - its appearance, handling requirements, and other usage notes.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".player.desc"
          }
        ]
      },
      {
        "id": "Substance.expiry",
        "path": "Substance.expiry",
        "short": "When no longer valid to use",
        "definition": "When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".expiryTime"
          }
        ]
      },
      {
        "id": "Substance.quantity",
        "path": "Substance.quantity",
        "short": "Amount of substance in the package",
        "definition": "The amount of the substance.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Quantity",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
            ]
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".player.quantity"
          }
        ]
      },
      {
        "id": "Substance.ingredient",
        "extension": [
          {
            "url": "http://hl7.org/fhir/build/StructureDefinition/svg",
            "valueCode": "400,36"
          }
        ],
        "path": "Substance.ingredient",
        "short": "Composition information about the substance",
        "definition": "A substance can be composed of other substances.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".player.scopesRole[classCode=INGR]"
          }
        ]
      },
      {
        "id": "Substance.ingredient.quantity",
        "path": "Substance.ingredient.quantity",
        "short": "Optional amount (concentration)",
        "definition": "The amount of the ingredient in the substance - a concentration ratio.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Ratio"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".quantity"
          }
        ]
      },
      {
        "id": "Substance.ingredient.substance[x]",
        "extension": [
          {
            "url": "http://hl7.org/fhir/build/StructureDefinition/committee-notes",
            "valueString": "[#9233]."
          }
        ],
        "path": "Substance.ingredient.substance[x]",
        "short": "A component of the substance",
        "definition": "Another substance that is a component of this substance.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          },
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Substance"
            ]
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "SubstanceIngredient"
            }
          ],
          "strength": "example",
          "description": "Substance Ingredient codes.",
          "valueSet": "http://hl7.org/fhir/ValueSet/substance-code"
        },
        "mapping": [
          {
            "identity": "rim",
            "map": ".player"
          }
        ]
      }
    ]
  }
}