{
  "resourceType": "StructureDefinition",
  "id": "shr-entity-Substance",
  "text": {
    "status": "generated",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n  <p><b>SHR Substance Profile</b></p>\n  <p>Any matter of defined composition that has discrete existence, whose origin may be biological, mineral or chemical.</p>\n  <p><b>SHR Mapping Summary</b></p>\n  <p><pre>shr.entity.Substance maps to Substance:\n  Type maps to code\n  Ingredient maps to ingredient\n  Ingredient.IngredientAmount maps to ingredient.quantity\n  Ingredient.CodeableConcept maps to ingredient.substance[x]\n  Ingredient.Substance maps to ingredient.substance[x]\n</pre></p>\n</div>"
  },
  "url": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-entity-Substance",
  "identifier": [
    {
      "system": "http://standardhealthrecord.org",
      "value": "shr.entity.Substance"
    }
  ],
  "version": "0.0.1",
  "name": "SHR Substance Profile",
  "status": "draft",
  "date": "2017-12-20",
  "publisher": "The MITRE Corporation: Standard Health Record Collaborative",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://standardhealthrecord.org"
        }
      ]
    }
  ],
  "description": "Any matter of defined composition that has discrete existence, whose origin may be biological, mineral or chemical.",
  "fhirVersion": "3.0.1",
  "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/w5",
      "name": "W5 Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Substance",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Substance",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Substance:shr-entity-Substance",
        "path": "Substance",
        "short": "SHR Substance Profile",
        "definition": "Any matter of defined composition that has discrete existence, whose origin may be biological, mineral or chemical."
      },
      {
        "id": "Substance:shr-entity-Substance.extension:relatedencounter",
        "path": "Substance.extension",
        "sliceName": "relatedencounter",
        "definition": "If content was generated during a patient encounter, related encounter is the encounter where the information was gained.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-base-RelatedEncounter-extension"
          }
        ]
      },
      {
        "id": "Substance:shr-entity-Substance.extension:author",
        "path": "Substance.extension",
        "sliceName": "author",
        "definition": "The person or organization who created the entry and is responsible for (and may certify) the content.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-base-Author-extension"
          }
        ]
      },
      {
        "id": "Substance:shr-entity-Substance.extension:informant",
        "path": "Substance.extension",
        "sliceName": "informant",
        "definition": "The person or entity that provided the information in the entry, as distinct from who created the entry, e.g. the subject (patient), medical professional, family member, device or software program.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-base-Informant-extension"
          }
        ]
      },
      {
        "id": "Substance:shr-entity-Substance.extension:category",
        "path": "Substance.extension",
        "sliceName": "category",
        "definition": "A class or division of people or things having particular shared characteristics",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-core-Category-extension"
          }
        ]
      },
      {
        "id": "Substance:shr-entity-Substance.extension:category.valueCodeableConcept",
        "path": "Substance.extension.valueCodeableConcept",
        "binding": {
          "strength": "extensible",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/substance-category"
          }
        }
      },
      {
        "id": "Substance:shr-entity-Substance.extension:activeflagasacodeableconcept",
        "path": "Substance.extension",
        "sliceName": "activeflagasacodeableconcept",
        "definition": "If the ActiveFlag is false, it indicates the record or item is no longer to be used and should generally be hidden for the user in the UI.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-entity-ActiveFlagAsaCodeableConcept-extension"
          }
        ]
      },
      {
        "id": "Substance:shr-entity-Substance.extension:activeflagasacodeableconcept.valueCodeableConcept",
        "path": "Substance.extension.valueCodeableConcept",
        "binding": {
          "strength": "required",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/substance-status"
          }
        }
      },
      {
        "id": "Substance:shr-entity-Substance.extension:details",
        "path": "Substance.extension",
        "sliceName": "details",
        "definition": "An text note containing additional details, explanation, description, comment, or summarization. Details can discuss, support, explain changes to, or dispute information.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-core-Details-extension"
          }
        ]
      },
      {
        "id": "Substance:shr-entity-Substance.code",
        "path": "Substance.code",
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "SubstanceCode"
            }
          ],
          "strength": "preferred",
          "description": "Substance codes",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/substance-code"
          }
        }
      },
      {
        "id": "Substance:shr-entity-Substance.ingredient",
        "path": "Substance.ingredient"
      },
      {
        "id": "Substance:shr-entity-Substance.ingredient.quantity",
        "path": "Substance.ingredient.quantity",
        "type": [
          {
            "code": "Ratio",
            "profile": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-core-Ratio"
          }
        ]
      },
      {
        "id": "Substance:shr-entity-Substance.ingredient.substance[x]",
        "path": "Substance.ingredient.substance[x]",
        "type": [
          {
            "code": "CodeableConcept"
          },
          {
            "code": "Reference",
            "targetProfile": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-entity-Substance"
          }
        ]
      }
    ]
  }
}