{
  "resourceType": "StructureDefinition",
  "id": "logicalmodel-Servicedirection-R4",
  "url": "http://linkehr.com/fhir/logicalmodel-servicedirection-R4",
  "identifier": [
    {
      "system": "openEHR-CKM",
      "value": "openEHR-EHR-CLUSTER.service_direction.v1"
    }
  ],
  "version": "0",
  "name": "Servicedirection",
  "title": "Service direction",
  "status": "draft",
  "date": "2024-06-18",
  "publisher": "openEHR",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://www.veratech.es"
        }
      ]
    }
  ],
  "description": "Structured details of a complex direction for an ordered or requested service.",
  "purpose": "To record structured details of a complex direction for an ordered or requested service.",
  "fhirVersion": "4.0.0",
  "mapping": [
    {
      "identity": "openEHR",
      "uri": "http://openehr.org",
      "name": "openEHR Mapping"
    },
    {
      "identity": "openEHR-natural",
      "uri": "http://openehr.org",
      "name": "openEHR natural path"
    }
  ],
  "kind": "logical",
  "abstract": false,
  "type": "StructureDefinition",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Element",
  "snapshot": {
    "element": [
      {
        "id": "Service_direction",
        "path": "Service_direction",
        "short": "Service direction",
        "definition": "Structured details of a complex direction for an ordered or requested service.",
        "min": 1,
        "max": "1",
        "base": {
          "path": "Service_direction",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": true
      },
      {
        "id": "Service_direction.Direction_sequence",
        "path": "Service_direction.Direction_sequence",
        "short": "Direction sequence",
        "definition": "The intended position of this direction within the overall sequence of directions.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Service_direction.Direction_sequence",
          "min": 0,
          "max": "1"
        }
      },
      {
        "id": "Service_direction.Direction_sequence.value",
        "path": "Service_direction.Direction_sequence.value",
        "short": "Direction sequence",
        "definition": "The intended position of this direction within the overall sequence of directions.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Service_direction.Direction_sequence.value",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Quantity"
          }
        ],
        "mustSupport": false,
        "isModifier": false,
        "isSummary": true
      },
      {
        "id": "Service_direction.Direction_description",
        "path": "Service_direction.Direction_description",
        "short": "Direction description",
        "definition": "Narrative description about the whole direction.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Service_direction.Direction_description",
          "min": 0,
          "max": "1"
        }
      },
      {
        "id": "Service_direction.Direction_description.value",
        "path": "Service_direction.Direction_description.value",
        "short": "Direction description",
        "definition": "Narrative description about the whole direction.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Service_direction.Direction_description.value",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "mustSupport": false,
        "isModifier": false,
        "isSummary": true
      },
      {
        "id": "Service_direction.Activity",
        "path": "Service_direction.Activity",
        "short": "Activity",
        "definition": "A grouping of an amount and timing for a part of a service direction.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Service_direction.Activity",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "mustSupport": false,
        "isModifier": false,
        "isSummary": true
      },
      {
        "id": "Service_direction.Activity.Activity_sequence",
        "path": "Service_direction.Activity.Activity_sequence",
        "short": "Activity sequence",
        "definition": "The intended sequential position of this activity within all activities for the service direction.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Service_direction.Activity.Activity_sequence",
          "min": 0,
          "max": "1"
        }
      },
      {
        "id": "Service_direction.Activity.Activity_sequence.value",
        "path": "Service_direction.Activity.Activity_sequence.value",
        "short": "Activity sequence",
        "definition": "The intended sequential position of this activity within all activities for the service direction.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Service_direction.Activity.Activity_sequence.value",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Quantity"
          }
        ],
        "mustSupport": false,
        "isModifier": false,
        "isSummary": true
      },
      {
        "id": "Service_direction.Activity.Amount",
        "path": "Service_direction.Activity.Amount",
        "short": "Amount",
        "definition": "The amount of service requested as part of a specified activity.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Service_direction.Activity.Amount",
          "min": 0,
          "max": "1"
        }
      },
      {
        "id": "Service_direction.Activity.Amount.value_DV_COUNT",
        "path": "Service_direction.Activity.Amount.value_DV_COUNT",
        "short": "Amount",
        "definition": "The amount of service requested as part of a specified activity.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Service_direction.Activity.Amount.value_DV_COUNT",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Quantity"
          }
        ],
        "mustSupport": false,
        "isModifier": false,
        "isSummary": true
      },
      {
        "id": "Service_direction.Activity.Amount.value_DV_DURATION",
        "path": "Service_direction.Activity.Amount.value_DV_DURATION",
        "short": "Amount",
        "definition": "The amount of service requested as part of a specified activity.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Service_direction.Activity.Amount.value_DV_DURATION",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Duration"
          }
        ],
        "mustSupport": false,
        "isModifier": false,
        "isSummary": true
      },
      {
        "id": "Service_direction.Activity.Intraday_timing",
        "path": "Service_direction.Activity.Intraday_timing",
        "short": "Intraday timing",
        "definition": "Structured details about the timing of the service within a single day.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Service_direction.Activity.Intraday_timing",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "mustSupport": false,
        "isModifier": false,
        "isSummary": true
      },
      {
        "id": "Service_direction.Direction_duration",
        "path": "Service_direction.Direction_duration",
        "short": "Direction duration",
        "definition": "The length of time for which this direction should be applied.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Service_direction.Direction_duration",
          "min": 0,
          "max": "1"
        }
      },
      {
        "id": "Service_direction.Direction_duration.value_DV_CODED_TEXT",
        "path": "Service_direction.Direction_duration.value_DV_CODED_TEXT",
        "short": "Direction duration",
        "definition": "The length of time for which this direction should be applied.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Service_direction.Direction_duration.value_DV_CODED_TEXT",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "mustSupport": false,
        "isModifier": false,
        "isSummary": true
      },
      {
        "id": "Service_direction.Direction_duration.value_DV_DURATION",
        "path": "Service_direction.Direction_duration.value_DV_DURATION",
        "short": "Direction duration",
        "definition": "The length of time for which this direction should be applied.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Service_direction.Direction_duration.value_DV_DURATION",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Duration"
          }
        ],
        "mustSupport": false,
        "isModifier": false,
        "isSummary": true
      },
      {
        "id": "Service_direction.Direction_duration.value_DV_TEXT",
        "path": "Service_direction.Direction_duration.value_DV_TEXT",
        "short": "Direction duration",
        "definition": "The length of time for which this direction should be applied.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Service_direction.Direction_duration.value_DV_TEXT",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "mustSupport": false,
        "isModifier": false,
        "isSummary": true
      },
      {
        "id": "Service_direction.Repetition_timing",
        "path": "Service_direction.Repetition_timing",
        "short": "Repetition timing",
        "definition": "Structured details about pattern of repetition for each set of intraday activities.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Service_direction.Repetition_timing",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "mustSupport": false,
        "isModifier": false,
        "isSummary": true
      },
      {
        "id": "Service_direction.Total_amount",
        "path": "Service_direction.Total_amount",
        "short": "Total amount",
        "definition": "The total number of services or hours available for all activities in this direction.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Service_direction.Total_amount",
          "min": 0,
          "max": "1"
        }
      },
      {
        "id": "Service_direction.Total_amount.value_DV_COUNT",
        "path": "Service_direction.Total_amount.value_DV_COUNT",
        "short": "Total amount",
        "definition": "The total number of services or hours available for all activities in this direction.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Service_direction.Total_amount.value_DV_COUNT",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Quantity"
          }
        ],
        "mustSupport": false,
        "isModifier": false,
        "isSummary": true
      },
      {
        "id": "Service_direction.Total_amount.value_DV_DURATION",
        "path": "Service_direction.Total_amount.value_DV_DURATION",
        "short": "Total amount",
        "definition": "The total number of services or hours available for all activities in this direction.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Service_direction.Total_amount.value_DV_DURATION",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Duration"
          }
        ],
        "mustSupport": false,
        "isModifier": false,
        "isSummary": true
      },
      {
        "id": "Service_direction.Additional_details",
        "path": "Service_direction.Additional_details",
        "short": "Additional details",
        "definition": "Further details about an ordered item direction.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Service_direction.Additional_details",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "mustSupport": false,
        "isModifier": false,
        "isSummary": true
      }
    ]
  }
}