{
  "resourceType": "StructureDefinition",
  "id": "pt-lm-ServiceRequest",
  "text": {
    "status": "empty",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">No narrative is provided for definitional resources. A human-readable rendering can be found in the implementation guide(s) where this resource is used.</div>"
  },
  "url": "http://medmij.nl/fhir/StructureDefinition/pt-lm-ServiceRequest",
  "name": "LmServiceRequest",
  "title": "ServiceRequest",
  "status": "active",
  "publisher": "MedMij",
  "contact": [
    {
      "name": "MedMij",
      "telecom": [
        {
          "system": "email",
          "value": "info@medmij.nl",
          "use": "work"
        }
      ]
    }
  ],
  "description": "Patient-specific clinical order for a digital (eHealth) activity that a healthcare professional requests for a patient, such as completing a questionnaire, performing home measurements, viewing educational content, or launching a third-party module.",
  "purpose": "To represent the clinical order to start or perform a specific digital (eHealth) activity for a patient. This ServiceRequest provides the clinical intent, context, requested schedule, and patient-specific instructions, and can serve as the basis for one or more Task resources that manage execution and tracking of the activity.",
  "copyright": "Copyright and related rights waived via CC0, https://creativecommons.org/publicdomain/zero/1.0/. This does not apply to information from third parties, for example a medical terminology system. The implementer alone is responsible for identifying and obtaining any necessary licenses or authorizations to utilize third party IP in connection with the specification or otherwise.",
  "fhirVersion": "4.0.1",
  "kind": "logical",
  "abstract": true,
  "type": "http://medmij.nl/fhir/StructureDefinition/pt-lm-ServiceRequest",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Element",
  "derivation": "specialization",
  "snapshot": {
    "element": [
      {
        "id": "pt-lm-ServiceRequest",
        "path": "pt-lm-ServiceRequest",
        "short": "ServiceRequest",
        "definition": "Patient-specific clinical order for a digital (eHealth) activity that a healthcare professional requests for a patient, such as completing a questionnaire, performing home measurements, viewing educational content, or launching a third-party module.",
        "alias": [
          "Zorgopdracht"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "pt-lm-ServiceRequest",
          "min": 0,
          "max": "*"
        },
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "pt-lm-ServiceRequest.id",
        "path": "pt-lm-ServiceRequest.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "Unique id for inter-element referencing",
        "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                "valueUrl": "string"
              }
            ],
            "code": "http://hl7.org/fhirpath/System.String"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "pt-lm-ServiceRequest.extension",
        "path": "pt-lm-ServiceRequest.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "description": "Extensions are always sliced by (at least) url",
          "rules": "open"
        },
        "short": "Additional content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "pt-lm-ServiceRequest.Identifier",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "pt-lm-ServiceRequest.Identifier",
        "short": "Business identifier that uniquely identifies this ServiceRequest within or across systems.",
        "definition": "Business identifier that uniquely identifies this ServiceRequest within or across systems.",
        "alias": [
          "Identifier"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "pt-lm-ServiceRequest.Identifier",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)"
          },
          {
            "identity": "rim",
            "map": "II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]"
          },
          {
            "identity": "servd",
            "map": "Identifier"
          }
        ]
      },
      {
        "id": "pt-lm-ServiceRequest.Status",
        "path": "pt-lm-ServiceRequest.Status",
        "short": "Current state of the service request (e.g. draft, active, completed, cancelled).",
        "definition": "Current state of the service request (e.g. draft, active, completed, cancelled).",
        "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size",
        "alias": [
          "Status"
        ],
        "min": 0,
        "max": "1",
        "base": {
          "path": "pt-lm-ServiceRequest.Status",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "code"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "pt-lm-ServiceRequest.Intent",
        "path": "pt-lm-ServiceRequest.Intent",
        "short": "Indicates the level of authority or intention associated with the request (e.g., order or plan).",
        "definition": "Indicates the level of authority or intention associated with the request (e.g., order or plan).",
        "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size",
        "alias": [
          "Bedoeling"
        ],
        "min": 0,
        "max": "1",
        "base": {
          "path": "pt-lm-ServiceRequest.Intent",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "code"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "pt-lm-ServiceRequest.Subject",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "pt-lm-ServiceRequest.Subject",
        "short": "Patient for whom the digital activity is requested.",
        "definition": "Patient for whom the digital activity is requested.",
        "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.",
        "alias": [
          "Patiënt"
        ],
        "min": 1,
        "max": "1",
        "base": {
          "path": "pt-lm-ServiceRequest.Subject",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Patient"
            ]
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ref-1",
            "severity": "error",
            "human": "SHALL have a contained resource if a local reference is provided",
            "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))",
            "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])",
            "source": "http://hl7.org/fhir/StructureDefinition/Reference"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)"
          }
        ]
      },
      {
        "id": "pt-lm-ServiceRequest.patientInstruction",
        "path": "pt-lm-ServiceRequest.patientInstruction",
        "short": "Patient or consumer-oriented instructions for how the requested activity should be performed. Use this element for patient-specific guidance that should be shown alongside the Task(s) executing this order (e.g., home blood pressure monitoring for 8 weeks, once daily in the morning).",
        "definition": "Patient or consumer-oriented instructions for how the requested activity should be performed. Use this element for patient-specific guidance that should be shown alongside the Task(s) executing this order (e.g., home blood pressure monitoring for 8 weeks, once daily in the morning).",
        "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size",
        "alias": [
          "PatiëntenInstructie"
        ],
        "min": 1,
        "max": "1",
        "base": {
          "path": "pt-lm-ServiceRequest.patientInstruction",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "pt-lm-ServiceRequest.Occurrence",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "pt-lm-ServiceRequest.Occurrence",
        "short": "Requested schedule for performing the provider module, such as duration, frequency and time of day.",
        "definition": "Requested schedule for performing the provider module, such as duration, frequency and time of day.",
        "comment": "Describes the occurrence of an event that may occur multiple times. Timing schedules are used for specifying when events are expected or requested to occur, and may also be used to represent the summary of a past or ongoing event.  For simplicity, the definitions of Timing components are expressed as 'future' events, but such components can also be used to describe historic or ongoing events.\n\nA Timing schedule can be a list of events and/or criteria for when the event happens, which can be expressed in a structured form and/or as a code. When both event and a repeating specification are provided, the list of events should be understood as an interpretation of the information in the repeat structure.",
        "alias": [
          "Tijdschema"
        ],
        "min": 0,
        "max": "1",
        "base": {
          "path": "pt-lm-ServiceRequest.Occurrence",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Timing"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "N/A"
          },
          {
            "identity": "rim",
            "map": "QSET<TS> (GTS)"
          }
        ]
      },
      {
        "id": "pt-lm-ServiceRequest.Requester",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "pt-lm-ServiceRequest.Requester",
        "short": "Healthcare professional role that requests this activity for the patient.",
        "definition": "Healthcare professional role that requests this activity for the patient.",
        "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.",
        "alias": [
          "Aanvrager"
        ],
        "min": 0,
        "max": "1",
        "base": {
          "path": "pt-lm-ServiceRequest.Requester",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/PractitionerRole"
            ]
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ref-1",
            "severity": "error",
            "human": "SHALL have a contained resource if a local reference is provided",
            "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))",
            "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])",
            "source": "http://hl7.org/fhir/StructureDefinition/Reference"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)"
          }
        ]
      },
      {
        "id": "pt-lm-ServiceRequest.AuthoredOn",
        "path": "pt-lm-ServiceRequest.AuthoredOn",
        "short": "Date and time when this service request was created.",
        "definition": "Date and time when this service request was created.",
        "alias": [
          "AanmaakDatumTijd"
        ],
        "min": 0,
        "max": "1",
        "base": {
          "path": "pt-lm-ServiceRequest.AuthoredOn",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      }
    ]
  },
  "differential": {
    "element": [
      {
        "id": "pt-lm-ServiceRequest",
        "path": "pt-lm-ServiceRequest",
        "short": "ServiceRequest",
        "definition": "Patient-specific clinical order for a digital (eHealth) activity that a healthcare professional requests for a patient, such as completing a questionnaire, performing home measurements, viewing educational content, or launching a third-party module.",
        "alias": [
          "Zorgopdracht"
        ]
      },
      {
        "id": "pt-lm-ServiceRequest.Identifier",
        "path": "pt-lm-ServiceRequest.Identifier",
        "short": "Business identifier that uniquely identifies this ServiceRequest within or across systems.",
        "definition": "Business identifier that uniquely identifies this ServiceRequest within or across systems.",
        "alias": [
          "Identifier"
        ],
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Identifier"
          }
        ]
      },
      {
        "id": "pt-lm-ServiceRequest.Status",
        "path": "pt-lm-ServiceRequest.Status",
        "short": "Current state of the service request (e.g. draft, active, completed, cancelled).",
        "definition": "Current state of the service request (e.g. draft, active, completed, cancelled).",
        "alias": [
          "Status"
        ],
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ]
      },
      {
        "id": "pt-lm-ServiceRequest.Intent",
        "path": "pt-lm-ServiceRequest.Intent",
        "short": "Indicates the level of authority or intention associated with the request (e.g., order or plan).",
        "definition": "Indicates the level of authority or intention associated with the request (e.g., order or plan).",
        "alias": [
          "Bedoeling"
        ],
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ]
      },
      {
        "id": "pt-lm-ServiceRequest.Subject",
        "path": "pt-lm-ServiceRequest.Subject",
        "short": "Patient for whom the digital activity is requested.",
        "definition": "Patient for whom the digital activity is requested.",
        "alias": [
          "Patiënt"
        ],
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Patient"
            ]
          }
        ]
      },
      {
        "id": "pt-lm-ServiceRequest.patientInstruction",
        "path": "pt-lm-ServiceRequest.patientInstruction",
        "short": "Patient or consumer-oriented instructions for how the requested activity should be performed. Use this element for patient-specific guidance that should be shown alongside the Task(s) executing this order (e.g., home blood pressure monitoring for 8 weeks, once daily in the morning).",
        "definition": "Patient or consumer-oriented instructions for how the requested activity should be performed. Use this element for patient-specific guidance that should be shown alongside the Task(s) executing this order (e.g., home blood pressure monitoring for 8 weeks, once daily in the morning).",
        "alias": [
          "PatiëntenInstructie"
        ],
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "pt-lm-ServiceRequest.Occurrence",
        "path": "pt-lm-ServiceRequest.Occurrence",
        "short": "Requested schedule for performing the provider module, such as duration, frequency and time of day.",
        "definition": "Requested schedule for performing the provider module, such as duration, frequency and time of day.",
        "alias": [
          "Tijdschema"
        ],
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Timing"
          }
        ]
      },
      {
        "id": "pt-lm-ServiceRequest.Requester",
        "path": "pt-lm-ServiceRequest.Requester",
        "short": "Healthcare professional role that requests this activity for the patient.",
        "definition": "Healthcare professional role that requests this activity for the patient.",
        "alias": [
          "Aanvrager"
        ],
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/PractitionerRole"
            ]
          }
        ]
      },
      {
        "id": "pt-lm-ServiceRequest.AuthoredOn",
        "path": "pt-lm-ServiceRequest.AuthoredOn",
        "short": "Date and time when this service request was created.",
        "definition": "Date and time when this service request was created.",
        "alias": [
          "AanmaakDatumTijd"
        ],
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "dateTime"
          }
        ]
      }
    ]
  }
}