<?xml version="1.0" encoding="UTF-8"?>

<OperationDefinition xmlns="http://hl7.org/fhir">
  <id value="-s-search-measurements-bundle-limit"/>
  <text>
    <status value="generated"/><div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: OperationDefinition -s-search-measurements-bundle-limit</b></p><a name="-s-search-measurements-bundle-limit"> </a><a name="hc-s-search-measurements-bundle-limit"> </a><p>URL: [base]/$$search-measurements-bundle-limit</p><h3>Parameters</h3><table class="grid"><tr><td><b>Use</b></td><td><b>Name</b></td><td><b>Scope</b></td><td><b>Cardinality</b></td><td><b>Type</b></td><td><b>Binding</b></td><td><b>Documentation</b></td></tr><tr><td>IN</td><td>patient</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R4/references.html#Reference">Reference</a></td><td/><td><div><p>Find resource(s) referring the specified patient - Reference(eHealth Patient).</p>
</div></td></tr><tr><td>IN</td><td>episodeOfCare</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R4/references.html#Reference">Reference</a></td><td/><td><div><p>Find resource(s) referring the specified episode of care - Reference(eHealth EpisodeOfCare).</p>
</div></td></tr><tr><td>IN</td><td>count</td><td/><td>1..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#integer">integer</a></td><td/><td><div><p>The number of bundles to return, max allowed value is 100 - Integer.</p>
</div></td></tr><tr><td>IN</td><td>start</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#dateTime">dateTime</a></td><td/><td><div><p>Based on the effective time of measurement, please see <a href="https://ehealth.sundhed.dk/fhir/StructureDefinition-ehealth-observation-definitions.html#key_Observation.effective[x]">Observation.effective[x]</a>, <a href="https://ehealth.sundhed.dk/fhir/StructureDefinition-ehealth-questionnaireresponse.html#effective-period">QuestionnaireResponse.effective-period</a>, and <a href="https://ehealth.sundhed.dk/fhir/StructureDefinition-ehealth-media-definitions.html#key_Media.created[x]">Media.created[x]</a>. If QuestionnaireResponse.effectivePeriod is missing, authored is used instead. If provided, the operation will search for observation, media and QuestionnaireResponse resource(s) with a clinical effective time after this time. The result bundles will be sorted in ascending order - DateTime.</p>
</div></td></tr><tr><td>IN</td><td>end</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#dateTime">dateTime</a></td><td/><td><div><p>Based on the effective time of measurement, please see <a href="https://ehealth.sundhed.dk/fhir/StructureDefinition-ehealth-observation-definitions.html#key_Observation.effective[x]">Observation.effective[x]</a>, <a href="https://ehealth.sundhed.dk/fhir/StructureDefinition-ehealth-questionnaireresponse.html#effective-period">QuestionnaireResponse.effective-period</a>, and <a href="https://ehealth.sundhed.dk/fhir/StructureDefinition-ehealth-media-definitions.html#key_Media.created[x]">Media.created[x]</a>. If QuestionnaireResponse.effectivePeriod is missing, authored is used instead. If provided, the operation will search for observation, media and QuestionnaireResponse resource(s) with a clinical effective time before this time. The result bundles will be sorted in descending order - DateTime.</p>
</div></td></tr><tr><td>IN</td><td>based-on</td><td/><td>0..*</td><td><a href="http://hl7.org/fhir/R4/references.html#Reference">Reference</a></td><td/><td><div><p>Resources(s) must be based on any of the specified service requests - Reference(eHealth ServiceRequest).</p>
</div></td></tr><tr><td>IN</td><td>_tag</td><td/><td>0..*</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#Coding">Coding</a></td><td/><td><div><p>Search for resources which have the given tag.</p>
</div></td></tr><tr><td>OUT</td><td>bundle</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R4/bundle.html">Bundle</a></td><td/><td/></tr></table></div>
  </text>
  <url value="http://ehealth.sundhed.dk/fhir/OperationDefinition/-s-search-measurements-bundle-limit"/>
  <version value="9.0.0"/>
  <name value="search-measurements-bundle-limit"/>
  <title value="Search measurements bundle limit"/>
  <status value="active"/>
  <kind value="operation"/>
  <date value="2026-04-21T07:29:24+00:00"/>
  <publisher value="Den telemedicinske infrastruktur (eHealth Infrastructure)"/>
  <contact>
    <name value="Den telemedicinske infrastruktur (eHealth Infrastructure)"/>
    <telecom>
      <system value="url"/>
      <value value="http://ehealth.sundhed.dk"/>
    </telecom>
  </contact>
  <description value="The search-measurements-bundle-limit operation searches for a number of bundles of related resources having Observations, Media or QuestionnaireResponses matching the search criteria.&#xA;&#xA;&#xA;### Parameter description&#xA;- patient: Find resource(s) referring the specified patient - Reference(eHealth Patient).&#xA;- episodeOfCare: Find resource(s) referring the specified episode of care - Reference(eHealth EpisodeOfCare).&#xA;- count: The number of bundles to return, max allowed value is 100 - Integer.&#xA;- start: Based on the effective time of measurement, please see &lt;a href='https://ehealth.sundhed.dk/fhir/StructureDefinition-ehealth-observation-definitions.html#key_Observation.effective[x]'&gt;Observation.effective[x]&lt;/a&gt; , &lt;a href='https://ehealth.sundhed.dk/fhir/StructureDefinition-ehealth-questionnaireresponse.html#effective-period'&gt;QuestionnaireResponse.effective-period&lt;/a&gt; , and &lt;a href='https://ehealth.sundhed.dk/fhir/StructureDefinition-ehealth-media-definitions.html#key_Media.created[x]'&gt;Media.created[x]&lt;/a&gt;. If QuestionnaireResponse.effectivePeriod is missing, authored is used instead. If provided, the operation will search for observation, media and QuestionnaireResponse resource(s) with a clinical effective time after this time. The result bundles will be sorted in ascending order - DateTime.&#xA;- end: Based on the effective time of measurement, please see &lt;a href='https://ehealth.sundhed.dk/fhir/StructureDefinition-ehealth-observation-definitions.html#key_Observation.effective[x]'&gt;Observation.effective[x]&lt;/a&gt; , &lt;a href='https://ehealth.sundhed.dk/fhir/StructureDefinition-ehealth-questionnaireresponse.html#effective-period'&gt;QuestionnaireResponse.effective-period&lt;/a&gt; , and &lt;a href='https://ehealth.sundhed.dk/fhir/StructureDefinition-ehealth-media-definitions.html#key_Media.created[x]'&gt;Media.created[x]&lt;/a&gt;. If QuestionnaireResponse.effectivePeriod is missing, authored is used instead. If provided, the operation will search for observation, media and QuestionnaireResponse resource(s) with a clinical effective time before this time. The result bundles will be sorted in descending order - DateTime.&#xA;- based-on: Resources(s) must be based on any of the specified service requests - Reference(eHealth ServiceRequest).&#xA;- _tag: When specified, resource(s) must have at least one of the specified tags in meta data - for instance a Coding(ehealth-system CodeSystem) or on token form: http://ehealth.sundhed.dk/cs/ehealth-system|xa. Note that the _tag functions as an optional filter, not as a selection criteria in the way the other parameters work.&#xA;&#xA;&#xA;One of either &quot;start&quot; or &quot;end&quot;, along with the &quot;count&quot; parameter must always be specified.&#xA;&#xA;Additionally at least &quot;patient&quot; or &quot;episodeOfCare&quot; or &quot;based-on&quot; must be specified.&#xA;&#xA;### Output description&#xA;&#xA;The result of this operation returns a Bundle with a list of nested Bundles having resources matching the search parameters. The number of nested Bundles depends on the count parameter.&#xA;&#xA;Each of the nested bundles contains the full set of related eHealth Observation, eHealth Media, eHealth QuestionnaireResponse and eHealth Provenance resources, from the same submission request.&#xA;&#xA;Related resources are the set of resources created by a single invocation of the submit-measurement operation.&#xA;&#xA;"/>
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166"/>
      <code value="DK"/>
      <display value="Denmark"/>
    </coding>
  </jurisdiction>
  <affectsState value="false"/>
  <code value="search-measurements-bundle-limit"/>
  <system value="true"/>
  <type value="false"/>
  <instance value="false"/>
  <parameter>
    <name value="patient"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="Find resource(s) referring the specified patient - Reference(eHealth Patient)."/>
    <type value="Reference"/>
  </parameter>
  <parameter>
    <name value="episodeOfCare"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="Find resource(s) referring the specified episode of care - Reference(eHealth EpisodeOfCare)."/>
    <type value="Reference"/>
  </parameter>
  <parameter>
    <name value="count"/>
    <use value="in"/>
    <min value="1"/>
    <max value="1"/>
    <documentation value="The number of bundles to return, max allowed value is 100 - Integer."/>
    <type value="integer"/>
  </parameter>
  <parameter>
    <name value="start"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="Based on the effective time of measurement, please see [Observation.effective[x]](https://ehealth.sundhed.dk/fhir/StructureDefinition-ehealth-observation-definitions.html#key_Observation.effective[x]), [QuestionnaireResponse.effective-period](https://ehealth.sundhed.dk/fhir/StructureDefinition-ehealth-questionnaireresponse.html#effective-period), and [Media.created[x]](https://ehealth.sundhed.dk/fhir/StructureDefinition-ehealth-media-definitions.html#key_Media.created[x]). If QuestionnaireResponse.effectivePeriod is missing, authored is used instead. If provided, the operation will search for observation, media and QuestionnaireResponse resource(s) with a clinical effective time after this time. The result bundles will be sorted in ascending order - DateTime."/>
    <type value="dateTime"/>
  </parameter>
  <parameter>
    <name value="end"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="Based on the effective time of measurement, please see [Observation.effective[x]](https://ehealth.sundhed.dk/fhir/StructureDefinition-ehealth-observation-definitions.html#key_Observation.effective[x]), [QuestionnaireResponse.effective-period](https://ehealth.sundhed.dk/fhir/StructureDefinition-ehealth-questionnaireresponse.html#effective-period), and [Media.created[x]](https://ehealth.sundhed.dk/fhir/StructureDefinition-ehealth-media-definitions.html#key_Media.created[x]). If QuestionnaireResponse.effectivePeriod is missing, authored is used instead. If provided, the operation will search for observation, media and QuestionnaireResponse resource(s) with a clinical effective time before this time. The result bundles will be sorted in descending order - DateTime."/>
    <type value="dateTime"/>
  </parameter>
  <parameter>
    <name value="based-on"/>
    <use value="in"/>
    <min value="0"/>
    <max value="*"/>
    <documentation value="Resources(s) must be based on any of the specified service requests - Reference(eHealth ServiceRequest)."/>
    <type value="Reference"/>
  </parameter>
  <parameter>
    <name value="_tag"/>
    <use value="in"/>
    <min value="0"/>
    <max value="*"/>
    <documentation value="Search for resources which have the given tag."/>
    <type value="Coding"/>
  </parameter>
  <parameter>
    <name value="bundle"/>
    <use value="out"/>
    <min value="0"/>
    <max value="1"/>
    <type value="Bundle"/>
  </parameter>
</OperationDefinition>