{
  "resourceType": "StructureDefinition",
  "url": "http://example.org/fhir/StructureDefinition/ObservationTobaksbruk",
  "name": "Tobaksbruk",
  "status": "draft",
  "description": "Innehåller tobakskonsumtion och tobaksförbrukning",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Observation",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation.identifier",
        "path": "Observation.identifier",
        "max": "1",
        "type": [
          {
            "code": "Identifier",
            "profile": "ObservationsID"
          }
        ]
      },
      {
        "id": "Observation.basedOn",
        "path": "Observation.basedOn",
        "max": "0"
      },
      {
        "id": "Observation.status",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint",
            "valueString": "default: final"
          }
        ],
        "path": "Observation.status",
        "label": "Observation status",
        "short": "registered | preliminary | final | amended+",
        "fixedCode": "känd förekomst"
      },
      {
        "id": "Observation.category",
        "path": "Observation.category",
        "max": "0"
      },
      {
        "id": "Observation.code",
        "path": "Observation.code",
        "label": "Typ av tobak",
        "code": [
          {
            "system": "http://snomed.info/sct",
            "version": "2018",
            "display": "Typ av tobaksbruk"
          }
        ],
        "definition": "Typ av tobak.",
        "fixedCodeableConcept": {
          "coding": [
            {
              "system": "kv-typ av tobaksbruk",
              "code": "2302008",
              "display": "Piprökare"
            },
            {
              "system": "kv-typ av tobaksbruk",
              "code": "5568007",
              "display": "Cigarettrökare"
            }
          ]
        },
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ObservationCode"
            }
          ],
          "strength": "preferred"
        }
      },
      {
        "id": "Observation.code.coding",
        "path": "Observation.code.coding",
        "code": [
          {
            "system": "http://snomed.info/sct",
            "version": "2018",
            "code": "Typ av tobaksbruk",
            "display": "Typ av tobaksbruk"
          }
        ],
        "max": "1",
        "fixedCoding": {
          "system": "http://snomed.info/sct",
          "code": "5568007: CigarettrökareI 2302008: PiprökareI 9978006: CigarrökareI 698289004: VattenpipsrökareI 228504007: Snusare",
          "userSelected": true
        },
        "binding": {
          "strength": "required",
          "description": "Typ av tobak",
          "valueSetUri": "http://snomed.info/sct"
        }
      },
      {
        "id": "Observation.subject",
        "path": "Observation.subject",
        "label": "Patient",
        "definition": "Patient",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
          }
        ]
      },
      {
        "id": "Observation.context",
        "path": "Observation.context",
        "max": "0"
      },
      {
        "id": "Observation.effective[x]",
        "path": "Observation.effective[x]",
        "max": "0"
      },
      {
        "id": "Observation.issued",
        "path": "Observation.issued",
        "label": "Observations tid"
      },
      {
        "id": "Observation.performer",
        "path": "Observation.performer",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
          }
        ]
      },
      {
        "id": "Observation.value[x]:valueCodeableConcept",
        "path": "Observation.valueCodeableConcept",
        "sliceName": "valueCodeableConcept",
        "label": "Värde",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "strength": "preferred",
          "description": "Observations värde",
          "valueSetReference": {
            "reference": "https://browser.ihtsdotools.org/?perspective=full&conceptId1=46051000052106&edition=se-edition&release=v20181130&server=https://prod-browser-exten.ihtsdotools.org/api/snomed/&langRefset=46011000052107"
          }
        }
      },
      {
        "id": "Observation.value[x]:valueCodeableConcept.coding",
        "path": "Observation.valueCodeableConcept.coding",
        "min": 1,
        "max": "1",
        "fixedCoding": {
          "system": "http://snomed.info/sct"
        }
      },
      {
        "id": "Observation.dataAbsentReason",
        "path": "Observation.dataAbsentReason",
        "max": "0"
      },
      {
        "id": "Observation.interpretation",
        "path": "Observation.interpretation",
        "max": "0"
      },
      {
        "id": "Observation.comment",
        "path": "Observation.comment",
        "max": "0"
      },
      {
        "id": "Observation.bodySite",
        "path": "Observation.bodySite",
        "max": "0"
      },
      {
        "id": "Observation.method",
        "path": "Observation.method",
        "max": "0"
      },
      {
        "id": "Observation.specimen",
        "path": "Observation.specimen",
        "max": "0"
      },
      {
        "id": "Observation.device",
        "path": "Observation.device",
        "max": "0"
      },
      {
        "id": "Observation.referenceRange",
        "path": "Observation.referenceRange",
        "max": "0"
      },
      {
        "id": "Observation.component",
        "path": "Observation.component",
        "label": "Tobaksförbrukning",
        "short": "Tobaksförbrukning",
        "max": "1"
      },
      {
        "id": "Observation.component.code",
        "path": "Observation.component.code",
        "code": [
          {
            "code": "Cigarett / Cigarr",
            "display": "Cigarett- eller cigarr förbrukning"
          },
          {
            "code": "Snus",
            "display": "Snus"
          }
        ]
      },
      {
        "id": "Observation.component.code.coding",
        "path": "Observation.component.code.coding",
        "label": "Tobaksförbrukning antal/gram",
        "min": 1,
        "max": "1",
        "fixedCoding": {
          "code": "Tobaksförbrukning per dag I Tobaksförbrukning per vecka"
        }
      },
      {
        "id": "Observation.component.value[x]:valueQuantity",
        "path": "Observation.component.valueQuantity",
        "sliceName": "valueQuantity",
        "label": "Antal per dag",
        "min": 1,
        "type": [
          {
            "code": "Quantity"
          }
        ]
      },
      {
        "id": "Observation.component.value[x]:valueQuantity.value",
        "path": "Observation.component.valueQuantity.value",
        "label": "Tobaksförbrukning antal eller gram",
        "min": 1
      },
      {
        "id": "Observation.component.dataAbsentReason",
        "path": "Observation.component.dataAbsentReason",
        "max": "0"
      },
      {
        "id": "Observation.component.interpretation",
        "path": "Observation.component.interpretation",
        "max": "0"
      },
      {
        "id": "Observation.component.referenceRange",
        "path": "Observation.component.referenceRange",
        "max": "0"
      }
    ]
  }
}