{
  "resourceType": "StructureDefinition",
  "id": "sfm-lib-List",
  "url": "http://ehelse.no/fhir/StructureDefinition/sfm-lib-List",
  "version": "2.0",
  "name": "SfmLibList",
  "title": "sfm-lib-List",
  "status": "active",
  "date": "2023-04-12",
  "description": "LIB items and related warnings for selected patient in a given period.",
  "fhirVersion": "4.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "List",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/List",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "List",
        "path": "List",
        "short": "LIB list with extended information",
        "definition": "LIB erteries and meta data related to medication. May also include correspondance details and html preview for user."
      },
      {
        "id": "List.extension",
        "path": "List.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 0
      },
      {
        "id": "List.extension:actor",
        "path": "List.extension",
        "sliceName": "actor",
        "min": 0,
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://ehelse.no/fhir/StructureDefinition/sfm-actor"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "List.extension:actor.extension",
        "path": "List.extension.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 2
      },
      {
        "id": "List.extension:actor.extension:role",
        "path": "List.extension.extension",
        "sliceName": "role",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "List.extension:actor.extension:practioner",
        "path": "List.extension.extension",
        "sliceName": "practioner",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "List.extension:metaData",
        "path": "List.extension",
        "sliceName": "metaData",
        "min": 0,
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://ehelse.no/fhir/StructureDefinition/sfm-lib-list-meta-data"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "List.extension:warnings",
        "path": "List.extension",
        "sliceName": "warnings",
        "min": 0,
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://ehelse.no/fhir/StructureDefinition/sfm-warning"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "List.status",
        "path": "List.status",
        "mustSupport": true
      },
      {
        "id": "List.mode",
        "path": "List.mode",
        "mustSupport": true
      },
      {
        "id": "List.title",
        "path": "List.title",
        "max": "0"
      },
      {
        "id": "List.code",
        "path": "List.code",
        "short": "List of prescriptions",
        "fixedCodeableConcept": {
          "text": "medications"
        }
      },
      {
        "id": "List.code.coding.system",
        "path": "List.code.coding.system",
        "fixedUri": "http://ehelse.no/fhir/CodeSystem/sfm-type-lib-list"
      },
      {
        "id": "List.subject",
        "path": "List.subject",
        "max": "0"
      },
      {
        "id": "List.date",
        "path": "List.date",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "List.source",
        "path": "List.source",
        "max": "0"
      },
      {
        "id": "List.note",
        "path": "List.note",
        "mustSupport": true
      },
      {
        "id": "List.entry",
        "path": "List.entry",
        "mustSupport": true
      },
      {
        "id": "List.entry.item",
        "path": "List.entry.item",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://ehelse.no/fhir/StructureDefinition/sfm-MedicationStatement",
              "http://nhn.no/kj/fhir/StructureDefinition/KjAllergyIntolerance",
              "http://ehelse.no/fhir/StructureDefinition/sfm-NutritionStatement",
              "http://ehelse.no/fhir/StructureDefinition/sfm-Magistrell-Medication"
            ]
          }
        ]
      }
    ]
  }
}