<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="pt-lm-DigitalGroupPlan" />
  <text>
    <status value="empty" />
    <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>
  </text>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics">
    <valueCode value="can-be-target" />
  </extension>
  <url value="http://medmij.nl/fhir/StructureDefinition/pt-lm-DigitalGroupPlan" />
  <name value="PtLmDigitalGroupPlan" />
  <title value="Digital Group Plan" />
  <status value="draft" />
  <publisher value="MedMij" />
  <contact>
    <name value="MedMij" />
    <telecom>
      <system value="email" />
      <value value="info@medmij.nl" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="Patient-specific digital group plan that groups related tasks belonging to the same digital care module. The digital group plan provides the display label used to present grouped tasks in the patient's task list." />
  <purpose value="This LogicalModel represents the DigitalGroupPlan building block for patient use cases in the context of the data service Provider Tasks (Aanbiedertaken)." />
  <copyright value="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 value="4.0.1" />
  <mapping>
    <identity value="pt-dataset-100-alpha1-20260511" />
    <name value="Dataset Aanbiedertaken MedMij 1.0.0-alpha.2 20260511" />
  </mapping>
  <kind value="logical" />
  <abstract value="false" />
  <type value="http://medmij.nl/fhir/StructureDefinition/pt-lm-DigitalGroupPlan" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Element" />
  <derivation value="specialization" />
  <snapshot>
    <element id="pt-lm-DigitalGroupPlan">
      <path value="pt-lm-DigitalGroupPlan" />
      <short value="Digital group plan" />
      <definition value="Patient-specific digital group plan that groups related tasks belonging to the same digital care module. The digital group plan provides the display label used to present grouped tasks in the patient's task list." />
      <alias value="DigitaalGroepsplan" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="pt-lm-DigitalGroupPlan" />
        <min value="0" />
        <max value="*" />
      </base>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="pt-dataset-100-alpha1-20260511" />
        <map value="pt-dataelement-20" />
        <comment value="DigitalGroupPlan" />
      </mapping>
    </element>
    <element id="pt-lm-DigitalGroupPlan.id">
      <path value="pt-lm-DigitalGroupPlan.id" />
      <representation value="xmlAttr" />
      <short value="Unique id for inter-element referencing" />
      <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Element.id" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
          <valueUrl value="string" />
        </extension>
        <code value="http://hl7.org/fhirpath/System.String" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="pt-lm-DigitalGroupPlan.extension">
      <path value="pt-lm-DigitalGroupPlan.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <description value="Extensions are always sliced by (at least) url" />
        <rules value="open" />
      </slicing>
      <short value="Additional content defined by implementations" />
      <definition value="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 value="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 value="extensions" />
      <alias value="user content" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Element.extension" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Extension" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <constraint>
        <key value="ext-1" />
        <severity value="error" />
        <human value="Must have either extensions or value[x], not both" />
        <expression value="extension.exists() != value.exists()" />
        <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="pt-lm-DigitalGroupPlan.Name">
      <path value="pt-lm-DigitalGroupPlan.Name" />
      <short value="Name" />
      <definition value="Human-readable name of the digital group plan, used as the display label for grouped tasks." />
      <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" />
      <alias value="Naam" />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="pt-lm-DigitalGroupPlan.Name" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="pt-dataset-100-alpha1-20260511" />
        <map value="pt-dataelement-21" />
        <comment value="Name" />
      </mapping>
    </element>
    <element id="pt-lm-DigitalGroupPlan.Status">
      <path value="pt-lm-DigitalGroupPlan.Status" />
      <short value="Status" />
      <definition value="Current state of the digital group plan request." />
      <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" />
      <alias value="Status" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="pt-lm-DigitalGroupPlan.Status" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="code" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <binding>
        <strength value="required" />
        <valueSet value="http://hl7.org/fhir/ValueSet/request-status" />
      </binding>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="pt-dataset-100-alpha1-20260511" />
        <map value="pt-dataelement-22" />
        <comment value="Status" />
      </mapping>
    </element>
    <element id="pt-lm-DigitalGroupPlan.Requester">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="pt-lm-DigitalGroupPlan.Requester" />
      <short value="Requester" />
      <definition value="Healthcare professional that requested this digital group plan for the patient." />
      <comment value="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 value="Aanvrager" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="pt-lm-DigitalGroupPlan.Requester" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Reference" />
        <targetProfile value="http://medmij.nl/fhir/StructureDefinition/medmij-core-lm-HealthProfessional" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <constraint>
        <key value="ref-1" />
        <severity value="error" />
        <human value="SHALL have a contained resource if a local reference is provided" />
        <expression value="reference.exists() implies (reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids')) or (reference='#' and %rootResource!=%resource))" />
        <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Reference" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" />
      </mapping>
      <mapping>
        <identity value="pt-dataset-100-alpha1-20260511" />
        <map value="pt-dataelement-23" />
        <comment value="Requester" />
      </mapping>
    </element>
  </snapshot>
  <differential>
    <element id="pt-lm-DigitalGroupPlan">
      <path value="pt-lm-DigitalGroupPlan" />
      <short value="Digital group plan" />
      <definition value="Patient-specific digital group plan that groups related tasks belonging to the same digital care module. The digital group plan provides the display label used to present grouped tasks in the patient's task list." />
      <alias value="DigitaalGroepsplan" />
      <mapping>
        <identity value="pt-dataset-100-alpha1-20260511" />
        <map value="pt-dataelement-20" />
        <comment value="DigitalGroupPlan" />
      </mapping>
    </element>
    <element id="pt-lm-DigitalGroupPlan.Name">
      <path value="pt-lm-DigitalGroupPlan.Name" />
      <short value="Name" />
      <definition value="Human-readable name of the digital group plan, used as the display label for grouped tasks." />
      <alias value="Naam" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <mapping>
        <identity value="pt-dataset-100-alpha1-20260511" />
        <map value="pt-dataelement-21" />
        <comment value="Name" />
      </mapping>
    </element>
    <element id="pt-lm-DigitalGroupPlan.Status">
      <path value="pt-lm-DigitalGroupPlan.Status" />
      <short value="Status" />
      <definition value="Current state of the digital group plan request." />
      <alias value="Status" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <binding>
        <strength value="required" />
        <valueSet value="http://hl7.org/fhir/ValueSet/request-status" />
      </binding>
      <mapping>
        <identity value="pt-dataset-100-alpha1-20260511" />
        <map value="pt-dataelement-22" />
        <comment value="Status" />
      </mapping>
    </element>
    <element id="pt-lm-DigitalGroupPlan.Requester">
      <path value="pt-lm-DigitalGroupPlan.Requester" />
      <short value="Requester" />
      <definition value="Healthcare professional that requested this digital group plan for the patient." />
      <alias value="Aanvrager" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://medmij.nl/fhir/StructureDefinition/medmij-core-lm-HealthProfessional" />
      </type>
      <mapping>
        <identity value="pt-dataset-100-alpha1-20260511" />
        <map value="pt-dataelement-23" />
        <comment value="Requester" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>