0.1.0 - ci-build

SENAITEFHIRImplementationGuide - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

: SENAITE FHIR API Capability Statement - TTL Representation

Draft as of 2026-09-09

Raw ttl | Download

@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

<http://hl7.org/fhir/CapabilityStatement/SenaiteCapabilityStatement> a fhir:CapabilityStatement ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "SenaiteCapabilityStatement"] ; # 
  fhir:text [
     fhir:status [ fhir:v "extensions" ] ;
     fhir:div [ fhir:v "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: CapabilityStatement SenaiteCapabilityStatement</b></p><a name=\"SenaiteCapabilityStatement\"> </a><a name=\"hcSenaiteCapabilityStatement\"> </a><h2 id=\"title\">SENAITE FHIR API Capability Statement</h2><ul><li>Implementation Guide Version: 0.1.0 </li><li>FHIR Version: 5.0.0 </li><li>Supported Formats: <code>json</code>, <code>xml</code></li><li>Published on: 2026-09-09 </li><li>Published by: Naralabs </li></ul><blockquote class=\"impl-note\"><p><strong>Note to Implementers: FHIR Capabilities</strong></p><p>Any FHIR capability may be 'allowed' by the system unless explicitly marked as 'SHALL NOT'. A few items are marked as MAY in the Implementation Guide to highlight their potential relevance to the use case.</p></blockquote><h2 id=\"rest\">FHIR RESTful Capabilities</h2><div class=\"panel panel-default\"><div class=\"panel-heading\"><h3 id=\"mode1\" class=\"panel-title\">Mode: <code>server</code></h3></div><div class=\"panel-body\"><div><p>SENAITE exposes a FHIR R5 RESTful API supporting the Lab Request and Results workflow and the Instrument Integration workflow.</p>\n<p><strong>Transaction processing.</strong> Lab requests are submitted as a <code>transaction</code> Bundle conforming to SenaiteRequestBundle. Entry <code>fullUrl</code> values are <code>urn:uuid</code> placeholders used only to resolve references between entries in the same Bundle; they have no persistence. <code>Resource.id</code> SHALL be absent on POST entries — the server assigns every logical id. The response is a SenaiteBundleResponse containing one entry per request entry, in the same order; that positional correspondence is how a consumer reconciles the placeholders it sent with the ids the server assigned. A failed transaction returns no response Bundle — the server returns an HTTP 4xx or 5xx with a single OperationOutcome and creates nothing.</p>\n<p><strong>Conditional create.</strong> Patient, Practitioner and Organization entries may carry <code>request.ifNoneExist</code>, so that a repeat submission matches the existing resource (<code>200 OK</code>) rather than creating a duplicate (<code>201 Created</code>). The key takes the form <code>identifier=\\&lt;system&gt;|\\&lt;value&gt;</code> and the system is mandatory, because the identifier search parameter matches on system and value and ignores <code>Identifier.use</code>. Either identifier may be used: the consumer's own external ID (<code>use = secondary</code>), or the internal SENAITE ID (<code>use = usual</code>) returned by an earlier order. Using the internal ID as a match key is permitted; supplying it in the resource body is not. Multiple matches fail the whole transaction. Conditional create is a trial-use part of the FHIR specification. Resources that carry no identifier cannot be matched this way; create them once and thereafter reference them by logical id.</p>\n<p><strong>Multi-sample orders.</strong> A SenaiteRequestBundle carries exactly one ServiceRequest and one Specimen. An order spanning several sample types (tubes) is submitted as one transaction per tube, each ServiceRequest carrying the same <code>requisition</code>. Its system is fixed by this IG to the Sample Group ID namespace (<code>https://fhir.senaite.org/NamingSystem/sample-group-id</code>); the consumer chooses the value, which must be unique within the consumer. Consumers SHOULD submit these sequentially — the first transaction creates any Patient, Practitioner and Organization (with <code>request.ifNoneExist</code>) and later transactions reference the logical ids returned — because conditional create is not safe against concurrent creates. Every request sharing a <code>requisition</code> must be for the same Patient and the same Client: a Bundle whose Patient or Client differs from those already recorded for that value is rejected with <code>422 Unprocessable Entity</code> and an OperationOutcome, and nothing is created. Transactions are atomic individually, not across tubes.</p>\n<p><strong>Prefer header.</strong> SenaiteBundleResponse does not honour <code>Prefer: return=representation</code>; the Specimen resource body described below is returned unconditionally, and no other entry ever carries one. Consumers read the assigned id for the other resources from <code>entry.fullUrl</code> or <code>entry.response.location</code> and perform a read if their body is needed.</p>\n<p><strong>Specimen resource body.</strong> Unlike every other entry, the Specimen entry in SenaiteBundleResponse always carries the full created SenaiteSpecimen in <code>entry.resource</code>. This is the only place the SENAITE-assigned internal Sample ID is available without a follow-up read, and lets the consumer confirm any Client Sample ID it supplied was preserved.</p>\n<p><strong>Versioning.</strong> Most resources are served with <code>no-version</code>: <code>meta.versionId</code> is not maintained, <code>Location</code> headers and <code>Bundle.entry.response.location</code> carry <code>[base]/[type]/[id]</code> with no <code>/_history/[vid]</code> suffix, and no ETag is returned. Task is the exception — see below. No <code>vread</code> or <code>history</code> interactions are offered on any resource.</p>\n</div></div></div><h3 id=\"resourcesCap1\">Capabilities by Resource/Profile</h3><h4 id=\"resourcesSummary1\">Summary</h4><p>The summary table lists the resources that are part of this configuration, and for each resource it lists:</p><ul><li>The relevant profiles (if any)</li><li>The interactions supported by each resource (<b><span class=\"bg-info\">R</span></b>ead, <b><span class=\"bg-info\">S</span></b>earch, <b><span class=\"bg-info\">U</span></b>pdate, and <b><span class=\"bg-info\">C</span></b>reate, are always shown, while <b><span class=\"bg-info\">VR</span></b>ead, <b><span class=\"bg-info\">P</span></b>atch, <b><span class=\"bg-info\">D</span></b>elete, <b><span class=\"bg-info\">H</span></b>istory on <b><span class=\"bg-info\">I</span></b>nstance, or <b><span class=\"bg-info\">H</span></b>istory on <b><span class=\"bg-info\">T</span></b>ype are only present if at least one of the resources has support for them.</li><li><span>The required, recommended, and some optional search parameters (if any). </span></li><li>The linked resources enabled for <code>_include</code></li><li>The other resources enabled for <code>_revinclude</code></li><li>The operations on the resource (if any)</li></ul><div class=\"table-responsive\"><table class=\"table table-condensed table-hover\"><thead><tr><th><b>Resource Type</b></th><th><b>Profile</b></th><th class=\"text-center\"><b title=\"GET a resource (read interaction)\">R</b></th><th class=\"text-center\"><b title=\"GET all set of resources of the type (search interaction)\">S</b></th><th class=\"text-center\"><b title=\"PUT a new resource version (update interaction)\">U</b></th><th class=\"text-center\"><b title=\"PATCH a new resource version (patch interaction)\">P</b></th><th class=\"text-center\"><b title=\"POST a new resource (create interaction)\">C</b></th><th><b title=\"Required and recommended search parameters\">Searches</b></th><th><code><b>_include</b></code></th><th><code><b>_revinclude</b></code></th><th><b>Operations</b></th></tr></thead><tbody><tr><td><a href=\"#Bundle1-1\">Bundle</a></td><td><a href=\"http://hl7.org/fhir/R5/bundle.html\">http://hl7.org/fhir/StructureDefinition/Bundle</a><br/><em>Additional supported profiles:</em><br/>  <a href=\"StructureDefinition-SenaiteRequestBundle.html\">Senaite Service Request Bundle</a><br/>  <a href=\"StructureDefinition-SenaiteBundleResponse.html\">Senaite Bundle Response</a></td><td class=\"text-center\"/><td class=\"text-center\"/><td class=\"text-center\"/><td class=\"text-center\"/><td class=\"text-center\"><span title=\"SHALL\"><b>Y</b></span></td><td></td><td/><td/><td/></tr><tr><td><a href=\"#ServiceRequest1-2\">ServiceRequest</a></td><td><a href=\"http://hl7.org/fhir/R5/servicerequest.html\">http://hl7.org/fhir/StructureDefinition/ServiceRequest</a><br/><em>Additional supported profiles:</em><br/>  <a href=\"StructureDefinition-SenaiteServiceRequest.html\">SENAITE Service Request</a><br/>  <a href=\"StructureDefinition-SenaiteServiceRequestRevocation.html\">Senaite ServiceRequest Revoked</a></td><td class=\"text-center\"><span title=\"SHALL\"><b>Y</b></span></td><td class=\"text-center\"><span title=\"SHALL\"><b>Y</b></span></td><td class=\"text-center\"/><td class=\"text-center\"/><td class=\"text-center\"/><td>status, _lastUpdated</td><td/><td/><td><code>$revoke</code></td></tr><tr><td><a href=\"#DiagnosticReport1-3\">DiagnosticReport</a></td><td><a href=\"http://hl7.org/fhir/R5/diagnosticreport.html\">http://hl7.org/fhir/StructureDefinition/DiagnosticReport</a><br/><em>Additional supported profiles:</em><br/>  <a href=\"StructureDefinition-SenaiteDiagnosticReport.html\">SenaiteDiagnosticReport</a><br/>  <a href=\"StructureDefinition-SenaiteResultsBundle.html\">Senaite Results Bundle</a></td><td class=\"text-center\"><span title=\"SHALL\"><b>Y</b></span></td><td class=\"text-center\"><span title=\"SHALL\"><b>Y</b></span></td><td class=\"text-center\"/><td class=\"text-center\"/><td class=\"text-center\"/><td>_lastUpdated, _summary, identifier</td><td><code>Observation:result</code></td><td/><td/></tr><tr><td><a href=\"#Observation1-4\">Observation</a></td><td><a href=\"http://hl7.org/fhir/R5/observation.html\">http://hl7.org/fhir/StructureDefinition/Observation</a><br/><em>Additional supported profiles:</em><br/>  <a href=\"StructureDefinition-SenaiteObservation.html\">SenaiteObservation</a></td><td class=\"text-center\"/><td class=\"text-center\"/><td class=\"text-center\"/><td class=\"text-center\"/><td class=\"text-center\"><span title=\"SHALL\"><b>Y</b></span></td><td></td><td/><td/><td/></tr><tr><td><a href=\"#Device1-5\">Device</a></td><td><a href=\"http://hl7.org/fhir/R5/device.html\">http://hl7.org/fhir/StructureDefinition/Device</a><br/><em>Additional supported profiles:</em><br/>  <a href=\"StructureDefinition-SenaiteDevice.html\">Senaite Device</a></td><td class=\"text-center\"/><td class=\"text-center\"><span title=\"SHALL\"><b>Y</b></span></td><td class=\"text-center\"/><td class=\"text-center\"/><td class=\"text-center\"/><td>identifier</td><td/><td/><td/></tr><tr><td><a href=\"#Patient1-6\">Patient</a></td><td><a href=\"http://hl7.org/fhir/R5/patient.html\">http://hl7.org/fhir/StructureDefinition/Patient</a><br/><em>Additional supported profiles:</em><br/>  <a href=\"StructureDefinition-SenaitePatient.html\">SenaitePatient</a></td><td class=\"text-center\"><span title=\"SHALL\"><b>Y</b></span></td><td class=\"text-center\"><span title=\"SHALL\"><b>Y</b></span></td><td class=\"text-center\"/><td class=\"text-center\"/><td class=\"text-center\"><span title=\"SHALL\"><b>Y</b></span></td><td>identifier</td><td/><td/><td/></tr><tr><td><a href=\"#Practitioner1-7\">Practitioner</a></td><td><a href=\"http://hl7.org/fhir/R5/practitioner.html\">http://hl7.org/fhir/StructureDefinition/Practitioner</a><br/><em>Additional supported profiles:</em><br/>  <a href=\"StructureDefinition-SenaitePractitioner.html\">SenaitePractitioner</a></td><td class=\"text-center\"><span title=\"SHALL\"><b>Y</b></span></td><td class=\"text-center\"><span title=\"SHALL\"><b>Y</b></span></td><td class=\"text-center\"/><td class=\"text-center\"/><td class=\"text-center\"><span title=\"SHALL\"><b>Y</b></span></td><td>identifier</td><td/><td/><td/></tr><tr><td><a href=\"#Specimen1-8\">Specimen</a></td><td><a href=\"http://hl7.org/fhir/R5/specimen.html\">http://hl7.org/fhir/StructureDefinition/Specimen</a><br/><em>Additional supported profiles:</em><br/>  <a href=\"StructureDefinition-SenaiteSpecimen.html\">SenaiteSpecimen</a></td><td class=\"text-center\"><span title=\"SHALL\"><b>Y</b></span></td><td class=\"text-center\"><span title=\"SHOULD\">Y</span></td><td class=\"text-center\"/><td class=\"text-center\"/><td class=\"text-center\"><span title=\"SHALL\"><b>Y</b></span></td><td>identifier</td><td/><td/><td/></tr><tr><td><a href=\"#Organization1-9\">Organization</a></td><td><a href=\"http://hl7.org/fhir/R5/organization.html\">http://hl7.org/fhir/StructureDefinition/Organization</a><br/><em>Additional supported profiles:</em><br/>  <a href=\"StructureDefinition-SenaiteOrganization.html\">SenaiteOrganization</a></td><td class=\"text-center\"><span title=\"SHALL\"><b>Y</b></span></td><td class=\"text-center\"><span title=\"SHALL\"><b>Y</b></span></td><td class=\"text-center\"/><td class=\"text-center\"/><td class=\"text-center\"><span title=\"SHALL\"><b>Y</b></span></td><td>identifier</td><td/><td/><td/></tr><tr><td><a href=\"#Task1-10\">Task</a></td><td><a href=\"http://hl7.org/fhir/R5/task.html\">http://hl7.org/fhir/StructureDefinition/Task</a><br/><em>Additional supported profiles:</em><br/>  <a href=\"StructureDefinition-SenaiteWorksheetTask.html\">Senaite Worksheet Task</a></td><td class=\"text-center\"><span title=\"SHALL\"><b>Y</b></span></td><td class=\"text-center\"><span title=\"SHOULD\">Y</span></td><td class=\"text-center\"/><td class=\"text-center\"><span title=\"SHALL\"><b>Y</b></span></td><td class=\"text-center\"/><td>status, requestedperformer-reference</td><td/><td/><td/></tr></tbody></table></div><hr/><div class=\"panel panel-default\"><div class=\"panel-heading\"><h4 id=\"Bundle1-1\" class=\"panel-title\"><span style=\"float: right;\">Resource Conformance: unspecified </span>Bundle</h4></div><div class=\"panel-body\"><div class=\"container\"><div class=\"row\"><div class=\"col-lg-6\"><span class=\"lead\">Base System Profile</span><br/><a href=\"http://hl7.org/fhir/R5/bundle.html\">Bundle</a></div><div class=\"col-lg-3\"><span class=\"lead\">Profile Conformance</span><br/><b>SHALL</b></div><div class=\"col-lg-3\"><span class=\"lead\">Reference Policy</span><br/></div></div><p/><div class=\"row\"><div class=\"col-6\"><span class=\"lead\">Supported Profiles</span><p><a href=\"StructureDefinition-SenaiteRequestBundle.html\">Senaite Service Request Bundle</a><br/><a href=\"StructureDefinition-SenaiteBundleResponse.html\">Senaite Bundle Response</a></p></div><div class=\"col-lg-6\"><span class=\"lead\">Interaction summary</span><br/><ul><li><strong>SHALL</strong> support <br/><code>create</code><div><p>POST a SenaiteRequestBundle transaction to submit a lab request.</p>\n</div></li></ul></div></div><p/><div class=\"row\"><div class=\"col-12\"><span class=\"lead\">Documentation</span><blockquote><div><p>POST a SenaiteRequestBundle (transaction) to submit a lab request. Returns a SenaiteBundleResponse on success or a single OperationOutcome on failure. Transactions are atomic: if any entry fails, nothing is created.</p>\n</div></blockquote></div></div></div></div></div><div class=\"panel panel-default\"><div class=\"panel-heading\"><h4 id=\"ServiceRequest1-2\" class=\"panel-title\"><span style=\"float: right;\">Resource Conformance: unspecified </span>ServiceRequest</h4></div><div class=\"panel-body\"><div class=\"container\"><div class=\"row\"><div class=\"col-lg-6\"><span class=\"lead\">Base System Profile</span><br/><a href=\"http://hl7.org/fhir/R5/servicerequest.html\">ServiceRequest</a></div><div class=\"col-lg-3\"><span class=\"lead\">Profile Conformance</span><br/><b>SHALL</b></div><div class=\"col-lg-3\"><span class=\"lead\">Reference Policy</span><br/></div></div><p/><div class=\"row\"><div class=\"col-6\"><span class=\"lead\">Supported Profiles</span><p><a href=\"StructureDefinition-SenaiteServiceRequest.html\">SENAITE Service Request</a><br/><a href=\"StructureDefinition-SenaiteServiceRequestRevocation.html\">Senaite ServiceRequest Revoked</a></p></div><div class=\"col-lg-6\"><span class=\"lead\">Interaction summary</span><br/><ul><li><strong>SHALL</strong> support <br/><code>read</code><div><p>Retrieve a ServiceRequest by the logical id returned in the transaction response.</p>\n</div><code>search-type</code><div><p>Search ServiceRequests. Used by instrument middleware to fetch and incrementally refresh the worklist.</p>\n</div></li></ul></div></div><p/><div class=\"row\"><div class=\"col-12\"><span class=\"lead\">Documentation</span><blockquote><div><p>ServiceRequests are created via a SenaiteRequestBundle transaction and revoked via the $revoke operation.</p>\n<p>SENAITE holds no stored ServiceRequest object; a ServiceRequest is a projection over the AnalysisRequest created from the Bundle. The logical id returned in the transaction response is nonetheless stable and resolvable via the read interaction, and is the id supplied to $revoke.</p>\n<p><strong>No <code>identifier</code>; optional <code>requisition</code>.</strong> SenaiteServiceRequest constrains <code>identifier</code> to <code>0..0</code>, so there is no identifier search on ServiceRequest. Sample identity is carried on Specimen and DiagnosticReport; a consumer supplying its own reference for one sample puts it on the Specimen entry as the Client Sample ID. A ServiceRequest may carry <code>requisition</code> (<code>0..1</code>), the Sample Group ID: its system is fixed to <code>https://fhir.senaite.org/NamingSystem/sample-group-id</code> and its value is a consumer-owned label shared by the ServiceRequests of one multi-tube order, unique within the consumer. No search by <code>requisition</code> is offered on ServiceRequest: the combined report for an order is found by searching DiagnosticReport on the same value as an identifier. The server does not enforce that it is unique per sample.</p>\n<p><strong>Panel and orderDetail rules:</strong> The <code>code</code> element identifies the ordered panel. The <code>orderDetail</code> element enumerates individual test codes and follows these rules:</p>\n<ul>\n<li><strong>Empty <code>orderDetail</code>:</strong> The server creates the sample for all tests in the panel (defers to the panel definition).</li>\n<li><strong><code>orderDetail</code> is a superset:</strong> All panel tests plus additional tests are included — the sample is created for the full panel plus the extras.</li>\n<li><strong><code>orderDetail</code> is a proper subset:</strong> One or more panel tests are absent. The server rejects the request with <code>400 Bad Request</code> and an <code>OperationOutcome</code> listing the missing test codes.</li>\n</ul>\n<p><strong>$revoke response codes:</strong> Returns <code>200 OK</code> on success, <code>409 Conflict</code> if results are published, <code>404</code> if not found, <code>422</code> if the current status does not permit revocation.</p>\n</div></blockquote></div></div><div class=\"row\"><div class=\"col-lg-7\"><span class=\"lead\">Search Parameters</span><table class=\"table table-condensed table-hover\"><thead><tr><th>Conformance</th><th>Parameter</th><th>Type</th><th>Documentation</th></tr></thead><tbody><tr><td><b>SHALL</b></td><td>status</td><td><code>token</code></td><td><div><p>Filter by status e.g. status=active. Used by instrument middleware to fetch the worklist.</p>\n</div></td></tr><tr><td><b>SHALL</b></td><td>_lastUpdated</td><td><code>date</code></td><td><div><p>Filter by last updated date. Used by instrument middleware to retrieve only new or changed requests since the last poll.</p>\n</div></td></tr></tbody></table></div><div class=\"col-lg-5\"> </div></div><div class=\"row\"><div class=\"col-12\"><span class=\"lead\">Extended Operations</span><table class=\"table table-condensed table-hover\"><thead><tr><th>Conformance</th><th>Operation</th><th>Documentation</th></tr></thead><tbody><tr><td><b>SHALL</b></td><td><a href=\"OperationDefinition-SenaiteServiceRequestRevoke.html\">$revoke</a></td><td><div><p>Revoke a ServiceRequest. POST /ServiceRequest/{id}/$revoke with an optional Parameters body containing a reason string. Only valid for ServiceRequests in active or on-hold status.</p>\n</div></td></tr></tbody></table></div></div></div></div></div><div class=\"panel panel-default\"><div class=\"panel-heading\"><h4 id=\"DiagnosticReport1-3\" class=\"panel-title\"><span style=\"float: right;\">Resource Conformance: unspecified </span>DiagnosticReport</h4></div><div class=\"panel-body\"><div class=\"container\"><div class=\"row\"><div class=\"col-lg-6\"><span class=\"lead\">Base System Profile</span><br/><a href=\"http://hl7.org/fhir/R5/diagnosticreport.html\">DiagnosticReport</a></div><div class=\"col-lg-3\"><span class=\"lead\">Profile Conformance</span><br/><b>SHALL</b></div><div class=\"col-lg-3\"><span class=\"lead\">Reference Policy</span><br/></div></div><p/><div class=\"row\"><div class=\"col-6\"><span class=\"lead\">Supported Profiles</span><p><a href=\"StructureDefinition-SenaiteDiagnosticReport.html\">SenaiteDiagnosticReport</a><br/><a href=\"StructureDefinition-SenaiteResultsBundle.html\">Senaite Results Bundle</a></p></div><div class=\"col-lg-6\"><span class=\"lead\">Interaction summary</span><br/><ul><li><strong>SHALL</strong> support <br/><code>read</code><div><p>Retrieve a specific DiagnosticReport by id. Returns the full resource including the base64-encoded PDF in presentedForm.data. Do not use _summary on this request.</p>\n</div><code>search-type</code><div><p>Poll for new or updated DiagnosticReports. Requires _summary=true and _lastUpdated. A single response may contain multiple DiagnosticReports if more than one Sample was completed since the last poll, and may contain both per-sample and combined reports. Use _include=Observation:result to retrieve associated Observations in the same request.</p>\n</div></li></ul></div></div><p/><div class=\"row\"><div class=\"col-12\"><span class=\"lead\">Documentation</span><blockquote><div><p>DiagnosticReports are created internally by SENAITE after results are verified and are not directly writable by external consumers.</p>\n<p><strong>Polling pattern:</strong> Consumers poll for new or updated reports using a GET search with <code>_lastUpdated</code>, <code>_summary=true</code>, and <code>_include=Observation:result</code>. The <code>_summary=true</code> parameter is required on all search requests for performance reasons — <code>presentedForm.data</code> (the base64 PDF payload) is excluded from summary responses.</p>\n<p><strong>PDF retrieval:</strong> After discovering a new report via polling, consumers retrieve the full PDF by performing a direct read: <code>GET DiagnosticReport/{id}</code> (without <code>_summary</code>). The response will include the complete <code>presentedForm.data</code> attachment.</p>\n<p><strong>Per-sample and combined reports.</strong> A per-sample report is a projection of one Sample and has at most one <code>basedOn</code> ServiceRequest. A <em>combined</em> report is published by the laboratory for the Samples with a common <code>ServiceRequest.requisition</code>: it lists every ServiceRequest it covers in <code>basedOn</code> (more than one — this is the marker), carries the single combined PDF in <code>presentedForm</code>, carries one Sample ID for each Sample it covers, a Client Sample ID for each Sample that has one, and the Sample Group ID (the requisition value) as identifiers. These lists are unordered and carry no pairing: do not infer which Client Sample ID belongs to which Sample ID from list position. The report also references the Specimen of each Sample it covers in <code>specimen</code> (one on a per-sample report, one per covered Sample on a combined report); each Specimen carries its own Sample ID and Client Sample ID, so read the Specimens, or use the per-sample report, to pair them. A per-sample report carries no Sample Group ID. The two kinds coexist; a search by Sample ID returns that Sample's per-sample report and any combined report covering it. Consumers should ingest per-sample reports as the results and treat a combined report as a document. Observations always identify their own ServiceRequest through <code>basedOn</code>, so a combined report's <code>result</code> list can be split by sample. A combined report is created only when every covered Sample is final; its membership is fixed at publication, and a correction or late tube is delivered as a new combined report with the superseded one marked <code>entered-in-error</code>.</p>\n</div></blockquote></div></div><div class=\"row\"><div class=\"col-lg-7\"><span class=\"lead\">Search Parameters</span><table class=\"table table-condensed table-hover\"><thead><tr><th>Conformance</th><th>Parameter</th><th>Type</th><th>Documentation</th></tr></thead><tbody><tr><td><b>SHALL</b></td><td>_lastUpdated</td><td><code>date</code></td><td><div><p>Filter reports updated since a given datetime. Consumers should store the timestamp of the last successful fetch and pass it as the value on each subsequent poll, e.g. _lastUpdated=gt2026-01-01T00:00:00Z.</p>\n</div></td></tr><tr><td><b>SHALL</b></td><td>_summary</td><td><code>token</code></td><td><div><p>_summary=true is required on all DiagnosticReport search requests. This excludes presentedForm.data (the PDF payload) from the response, keeping polling lightweight. To retrieve the PDF, perform a direct read by id.</p>\n</div></td></tr><tr><td><b>SHOULD</b></td><td>identifier</td><td><code>token</code></td><td><div><p>Search by Sample ID (identifier=https://fhir.senaite.org/NamingSystem/sample-id|SAMP-SENAITE-001) or Client Sample ID to find the per-sample report (a search by either also returns any combined report covering that Sample), or by Sample Group ID (identifier=https://fhir.senaite.org/NamingSystem/sample-group-id|&lt;value&gt;) to find the combined report(s) for an order. A combined report carries one Sample ID, and a Client Sample ID where there is one, per covered Sample; a per-sample report carries no Sample Group ID. System and value are both required.</p>\n</div></td></tr></tbody></table></div><div class=\"col-lg-5\"> </div></div></div></div></div><div class=\"panel panel-default\"><div class=\"panel-heading\"><h4 id=\"Observation1-4\" class=\"panel-title\"><span style=\"float: right;\">Resource Conformance: unspecified </span>Observation</h4></div><div class=\"panel-body\"><div class=\"container\"><div class=\"row\"><div class=\"col-lg-6\"><span class=\"lead\">Base System Profile</span><br/><a href=\"http://hl7.org/fhir/R5/observation.html\">Observation</a></div><div class=\"col-lg-3\"><span class=\"lead\">Profile Conformance</span><br/><b>SHALL</b></div><div class=\"col-lg-3\"><span class=\"lead\">Reference Policy</span><br/></div></div><p/><div class=\"row\"><div class=\"col-6\"><span class=\"lead\">Supported Profiles</span><p><a href=\"StructureDefinition-SenaiteObservation.html\">SenaiteObservation</a></p></div><div class=\"col-lg-6\"><span class=\"lead\">Interaction summary</span><br/><ul><li><strong>SHALL</strong> support <br/><code>create</code><div><p>POST a single SenaiteObservation. Used by instrument middleware to push individual analyte results as they arrive from the instrument.</p>\n</div></li></ul></div></div><p/><div class=\"row\"><div class=\"col-12\"><span class=\"lead\">Documentation</span><blockquote><div><p>POSTed individually by instrument middleware as results arrive from the instrument. Each Observation references the originating ServiceRequest via basedOn and the instrument via device. Also returned via _include in DiagnosticReport searches.</p>\n</div></blockquote></div></div></div></div></div><div class=\"panel panel-default\"><div class=\"panel-heading\"><h4 id=\"Device1-5\" class=\"panel-title\"><span style=\"float: right;\">Resource Conformance: unspecified </span>Device</h4></div><div class=\"panel-body\"><div class=\"container\"><div class=\"row\"><div class=\"col-lg-6\"><span class=\"lead\">Base System Profile</span><br/><a href=\"http://hl7.org/fhir/R5/device.html\">Device</a></div><div class=\"col-lg-3\"><span class=\"lead\">Profile Conformance</span><br/><b>SHALL</b></div><div class=\"col-lg-3\"><span class=\"lead\">Reference Policy</span><br/></div></div><p/><div class=\"row\"><div class=\"col-6\"><span class=\"lead\">Supported Profiles</span><p><a href=\"StructureDefinition-SenaiteDevice.html\">Senaite Device</a></p></div><div class=\"col-lg-6\"><span class=\"lead\">Interaction summary</span><br/><ul><li><strong>SHALL</strong> support <br/><code>search-type</code><div><p>GET /Device?identifier=&lt;asset_number&gt; to confirm device registration.</p>\n</div></li></ul></div></div><p/><div class=\"row\"><div class=\"col-12\"><span class=\"lead\">Documentation</span><blockquote><div><p>Device records are created manually in SENAITE by a lab administrator. The instrument middleware performs a one-time GET at startup to confirm registration and retrieve the logical Device id.</p>\n</div></blockquote></div></div><div class=\"row\"><div class=\"col-lg-7\"><span class=\"lead\">Search Parameters</span><table class=\"table table-condensed table-hover\"><thead><tr><th>Conformance</th><th>Parameter</th><th>Type</th><th>Documentation</th></tr></thead><tbody><tr><td><b>SHALL</b></td><td>identifier</td><td><code>token</code></td><td><div><p>Search by asset register identifier. Used by instrument middleware at startup to confirm device registration.</p>\n</div></td></tr></tbody></table></div><div class=\"col-lg-5\"> </div></div></div></div></div><div class=\"panel panel-default\"><div class=\"panel-heading\"><h4 id=\"Patient1-6\" class=\"panel-title\"><span style=\"float: right;\">Resource Conformance: unspecified </span>Patient</h4></div><div class=\"panel-body\"><div class=\"container\"><div class=\"row\"><div class=\"col-lg-6\"><span class=\"lead\">Base System Profile</span><br/><a href=\"http://hl7.org/fhir/R5/patient.html\">Patient</a></div><div class=\"col-lg-3\"><span class=\"lead\">Profile Conformance</span><br/><b>SHALL</b></div><div class=\"col-lg-3\"><span class=\"lead\">Reference Policy</span><br/></div></div><p/><div class=\"row\"><div class=\"col-6\"><span class=\"lead\">Supported Profiles</span><p><a href=\"StructureDefinition-SenaitePatient.html\">SenaitePatient</a></p></div><div class=\"col-lg-6\"><span class=\"lead\">Interaction summary</span><br/><ul><li><strong>SHALL</strong> support <br/><code>create</code><div><p>Created as an entry within a SenaiteRequestBundle transaction. Standalone POST is not part of this IG.</p>\n</div><code>read</code><div><p>Retrieve a Patient by the logical id returned in a transaction response.</p>\n</div><code>search-type</code><div><p>Search by identifier. Required so the server can evaluate request.ifNoneExist on Patient Bundle entries.</p>\n</div></li></ul></div></div><p/><div class=\"row\"><div class=\"col-12\"><span class=\"lead\">Documentation</span><blockquote><div><p>Created as part of a SenaiteRequestBundle transaction, optionally with request.ifNoneExist so a repeat submission matches an existing Patient. Read is supported so the logical id returned in the transaction response is dereferenceable, and so a consumer that has stored the id can reference the Patient in a later Bundle without resubmitting demographics. Note that a conditional-create match discards the submitted body: demographic changes are not applied to an already-matched Patient.</p>\n</div></blockquote></div></div><div class=\"row\"><div class=\"col-lg-7\"><span class=\"lead\">Search Parameters</span><table class=\"table table-condensed table-hover\"><thead><tr><th>Conformance</th><th>Parameter</th><th>Type</th><th>Documentation</th></tr></thead><tbody><tr><td><b>SHALL</b></td><td>identifier</td><td><code>token</code></td><td><div><p>Search by patient identifier, e.g. identifier=https://ehr.example.org/mrn|MRN-20394857 for the consumer's external ID, or identifier=https://fhir.senaite.org/NamingSystem/patient-id|PAT-001 for the internal SENAITE ID. Backs conditional create. The system is mandatory: this parameter matches on system and value regardless of Identifier.use, so the system URI is the only thing scoping a query to the consumer's own external namespace rather than SENAITE's internal one. External namespaces are agreed per-integration and default to https://fhir.senaite.org/NamingSystem/patient-mrn.</p>\n</div></td></tr></tbody></table></div><div class=\"col-lg-5\"> </div></div></div></div></div><div class=\"panel panel-default\"><div class=\"panel-heading\"><h4 id=\"Practitioner1-7\" class=\"panel-title\"><span style=\"float: right;\">Resource Conformance: unspecified </span>Practitioner</h4></div><div class=\"panel-body\"><div class=\"container\"><div class=\"row\"><div class=\"col-lg-6\"><span class=\"lead\">Base System Profile</span><br/><a href=\"http://hl7.org/fhir/R5/practitioner.html\">Practitioner</a></div><div class=\"col-lg-3\"><span class=\"lead\">Profile Conformance</span><br/><b>SHALL</b></div><div class=\"col-lg-3\"><span class=\"lead\">Reference Policy</span><br/></div></div><p/><div class=\"row\"><div class=\"col-6\"><span class=\"lead\">Supported Profiles</span><p><a href=\"StructureDefinition-SenaitePractitioner.html\">SenaitePractitioner</a></p></div><div class=\"col-lg-6\"><span class=\"lead\">Interaction summary</span><br/><ul><li><strong>SHALL</strong> support <br/><code>create</code><div><p>Created as an entry within a SenaiteRequestBundle transaction. Standalone POST is not part of this IG.</p>\n</div><code>read</code><div><p>Retrieve a Practitioner by the logical id returned in a transaction response.</p>\n</div><code>search-type</code><div><p>Search by identifier. Required so the server can evaluate request.ifNoneExist on Practitioner Bundle entries.</p>\n</div></li></ul></div></div><p/><div class=\"row\"><div class=\"col-12\"><span class=\"lead\">Documentation</span><blockquote><div><p>Created as part of a SenaiteRequestBundle transaction, optionally with request.ifNoneExist so a repeat submission matches an existing Practitioner. Read is supported so the logical id returned in the transaction response is dereferenceable and reusable in later Bundles.</p>\n</div></blockquote></div></div><div class=\"row\"><div class=\"col-lg-7\"><span class=\"lead\">Search Parameters</span><table class=\"table table-condensed table-hover\"><thead><tr><th>Conformance</th><th>Parameter</th><th>Type</th><th>Documentation</th></tr></thead><tbody><tr><td><b>SHALL</b></td><td>identifier</td><td><code>token</code></td><td><div><p>Search by practitioner identifier, e.g. identifier=https://ehr.example.org/practitioner|PRACT-DR-SULLIVAN for the consumer's external ID, or the internal SENAITE ID namespace for the server-assigned one. Backs conditional create. The system is mandatory. External namespaces are agreed per-integration and default to https://fhir.senaite.org/NamingSystem/practitioner-external-id.</p>\n</div></td></tr></tbody></table></div><div class=\"col-lg-5\"> </div></div></div></div></div><div class=\"panel panel-default\"><div class=\"panel-heading\"><h4 id=\"Specimen1-8\" class=\"panel-title\"><span style=\"float: right;\">Resource Conformance: unspecified </span>Specimen</h4></div><div class=\"panel-body\"><div class=\"container\"><div class=\"row\"><div class=\"col-lg-6\"><span class=\"lead\">Base System Profile</span><br/><a href=\"http://hl7.org/fhir/R5/specimen.html\">Specimen</a></div><div class=\"col-lg-3\"><span class=\"lead\">Profile Conformance</span><br/><b>SHALL</b></div><div class=\"col-lg-3\"><span class=\"lead\">Reference Policy</span><br/></div></div><p/><div class=\"row\"><div class=\"col-6\"><span class=\"lead\">Supported Profiles</span><p><a href=\"StructureDefinition-SenaiteSpecimen.html\">SenaiteSpecimen</a></p></div><div class=\"col-lg-6\"><span class=\"lead\">Interaction summary</span><br/><ul><li><strong>SHALL</strong> support <br/><code>create</code><div><p>Created as an entry within a SenaiteRequestBundle transaction. Standalone POST is not part of this IG.</p>\n</div><code>read</code><div><p>Retrieve a Specimen by the logical id returned in a transaction response.</p>\n</div></li><li><strong>SHOULD</strong> support <br/><code>search-type</code><div><p>Search by identifier, so the internal Sample ID can be used to identify a Specimen on read.</p>\n</div></li></ul></div></div><p/><div class=\"row\"><div class=\"col-12\"><span class=\"lead\">Documentation</span><blockquote><div><p>Created as part of a SenaiteRequestBundle transaction. Always created, never matched — request.ifNoneExist is not permitted on Specimen entries, since a specimen is never reused. Read is supported so the logical id returned in the transaction response is dereferenceable. Search by identifier is offered so that the internal Sample ID, and the Client Sample ID where one was supplied, can be used to locate a Specimen after creation.</p>\n</div></blockquote></div></div><div class=\"row\"><div class=\"col-lg-7\"><span class=\"lead\">Search Parameters</span><table class=\"table table-condensed table-hover\"><thead><tr><th>Conformance</th><th>Parameter</th><th>Type</th><th>Documentation</th></tr></thead><tbody><tr><td><b>SHOULD</b></td><td>identifier</td><td><code>token</code></td><td><div><p>Search by the internal Sample ID, e.g. identifier=https://fhir.senaite.org/NamingSystem/sample-id|SAMP-SENAITE-001, or by the Client Sample ID where one was supplied. Both Specimen namespaces are fixed by this IG. Not used for conditional create — Specimen entries never carry request.ifNoneExist.</p>\n</div></td></tr></tbody></table></div><div class=\"col-lg-5\"> </div></div></div></div></div><div class=\"panel panel-default\"><div class=\"panel-heading\"><h4 id=\"Organization1-9\" class=\"panel-title\"><span style=\"float: right;\">Resource Conformance: unspecified </span>Organization</h4></div><div class=\"panel-body\"><div class=\"container\"><div class=\"row\"><div class=\"col-lg-6\"><span class=\"lead\">Base System Profile</span><br/><a href=\"http://hl7.org/fhir/R5/organization.html\">Organization</a></div><div class=\"col-lg-3\"><span class=\"lead\">Profile Conformance</span><br/><b>SHALL</b></div><div class=\"col-lg-3\"><span class=\"lead\">Reference Policy</span><br/></div></div><p/><div class=\"row\"><div class=\"col-6\"><span class=\"lead\">Supported Profiles</span><p><a href=\"StructureDefinition-SenaiteOrganization.html\">SenaiteOrganization</a></p></div><div class=\"col-lg-6\"><span class=\"lead\">Interaction summary</span><br/><ul><li><strong>SHALL</strong> support <br/><code>create</code><div><p>Created as an entry within a SenaiteRequestBundle transaction. Standalone POST is not part of this IG.</p>\n</div><code>read</code><div><p>Retrieve an Organization by logical id. Required so a consumer can dereference and reuse the Client id returned in a transaction response.</p>\n</div><code>search-type</code><div><p>Search by identifier. Required so the server can evaluate request.ifNoneExist on Organization Bundle entries.</p>\n</div></li></ul></div></div><p/><div class=\"row\"><div class=\"col-12\"><span class=\"lead\">Documentation</span><blockquote><div><p>Represents the Client Organisation submitting the lab request. Every SenaiteRequestBundle must identify its Client via the SenaiteClient extension on the ServiceRequest, but the Organization entry itself is optional: include it when the Client may not yet exist, or omit it and reference the Client by logical id.</p>\n<p>Organizations without an external identifier cannot be matched by request.ifNoneExist. Create such an Organization once, store the logical id from the transaction response, and reference it thereafter.</p>\n<p>Deployments that manage Clients administratively — where a Client carries contract or pricing configuration — should provision Organizations in SENAITE directly and supply integrators with the logical id out of band, rather than allowing consumers to auto-provision their own Client on first order.</p>\n</div></blockquote></div></div><div class=\"row\"><div class=\"col-lg-7\"><span class=\"lead\">Search Parameters</span><table class=\"table table-condensed table-hover\"><thead><tr><th>Conformance</th><th>Parameter</th><th>Type</th><th>Documentation</th></tr></thead><tbody><tr><td><b>SHALL</b></td><td>identifier</td><td><code>token</code></td><td><div><p>Search by organization identifier, e.g. identifier=https://ehr.example.org/org|ORG-RMH-MEL for the consumer's external ID, or the internal SENAITE ID namespace for the server-assigned Client ID. Backs conditional create. The system is mandatory. External namespaces are agreed per-integration and default to https://fhir.senaite.org/NamingSystem/organization-external-id.</p>\n</div></td></tr></tbody></table></div><div class=\"col-lg-5\"> </div></div></div></div></div><div class=\"panel panel-default\"><div class=\"panel-heading\"><h4 id=\"Task1-10\" class=\"panel-title\"><span style=\"float: right;\">Resource Conformance: unspecified </span>Task</h4></div><div class=\"panel-body\"><div class=\"container\"><div class=\"row\"><div class=\"col-lg-6\"><span class=\"lead\">Base System Profile</span><br/><a href=\"http://hl7.org/fhir/R5/task.html\">Task</a></div><div class=\"col-lg-3\"><span class=\"lead\">Profile Conformance</span><br/><b>SHALL</b></div><div class=\"col-lg-3\"><span class=\"lead\">Reference Policy</span><br/></div></div><p/><div class=\"row\"><div class=\"col-6\"><span class=\"lead\">Supported Profiles</span><p><a href=\"StructureDefinition-SenaiteWorksheetTask.html\">Senaite Worksheet Task</a></p></div><div class=\"col-lg-6\"><span class=\"lead\">Interaction summary</span><br/><ul><li><strong>SHALL</strong> support <br/><code>read</code><div><p>Retrieve a specific worksheet Task by id. The response carries an ETag; clients supply it as If-Match on the subsequent patch.</p>\n</div><code>patch</code><div><p>The owning instrument/middleware transitions status from ready to in-progress via PATCH once it begins acting on the worksheet. This is the only write this profile supports — no update (PUT) interaction is offered. Clients SHALL supply an If-Match header with the currently-known ETag/versionId; the server SHALL reject with 412 Precondition Failed if the Task has changed since the client's last read, and SHALL reject any transition other than ready -&gt; in-progress with 409 Conflict.</p>\n</div></li><li><strong>SHOULD</strong> support <br/><code>search-type</code><div><p>Poll for worksheets by status, e.g. status=ready&amp;requestedperformer-reference=Device/{id} to find worksheets that have been locked into their ready state and are waiting to be claimed, or status=draft&amp;requestedperformer-reference=Device/{id} to see worksheets still being assembled for that instrument (informational only — not yet actionable, since composition can still change).</p>\n</div></li></ul></div></div><p/><div class=\"row\"><div class=\"col-12\"><span class=\"lead\">Documentation</span><blockquote><div><p>Represents a SENAITE worksheet scoped to a single instrument. Created and, for the most part, transitioned internally by SENAITE — exposed read-only for those transitions. The exception is the transition to in-progress (from either ready or draft), which the owning instrument/middleware writes itself via patch once it begins acting on the worksheet — locking the worksheet in SENAITE as a side effect if it wasn't already locked. Complements, rather than replaces, the standard instrument worklist poll — not all instrument work arrives via a worksheet. Consumers fetch the referenced SenaiteInstrumentServiceRequest resources in Task.input directly rather than via reverse search.</p>\n</div></blockquote></div></div><div class=\"row\"><div class=\"col-lg-7\"><span class=\"lead\">Search Parameters</span><table class=\"table table-condensed table-hover\"><thead><tr><th>Conformance</th><th>Parameter</th><th>Type</th><th>Documentation</th></tr></thead><tbody><tr><td><b>SHOULD</b></td><td>status</td><td><code>token</code></td><td><div><p>Filter by status, e.g. status=ready to find worksheets that have been locked and are safe to claim and act on, status=draft to see worksheets still being assembled (also actionable — see the patch interaction above), or the comma-separated status=ready,draft to retrieve both in one poll.</p>\n</div></td></tr><tr><td><b>SHOULD</b></td><td>requestedperformer-reference</td><td><code>reference</code></td><td><div><p>The standard Task search parameter targeting the reference component of requestedPerformer. Filter by the instrument (Device) the worksheet is scoped to.</p>\n</div></td></tr></tbody></table></div><div class=\"col-lg-5\"> </div></div></div></div></div></div>"^^rdf:XMLLiteral ]
  ] ; # 
  fhir:url [ fhir:v "https://fhir.senaite.org/CapabilityStatement/SenaiteCapabilityStatement"^^xsd:anyURI] ; # 
  fhir:version [ fhir:v "0.1.0"] ; # 
  fhir:name [ fhir:v "SenaiteCapabilityStatement"] ; # 
  fhir:title [ fhir:v "SENAITE FHIR API Capability Statement"] ; # 
  fhir:status [ fhir:v "draft"] ; # 
  fhir:experimental [ fhir:v true] ; # 
  fhir:date [ fhir:v "2026-09-09"^^xsd:date] ; # 
  fhir:publisher [ fhir:v "Naralabs"] ; # 
  fhir:contact ( [
     fhir:name [ fhir:v "Naralabs" ] ;
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "https://naralabs.com" ]
     ] [
       fhir:system [ fhir:v "email" ] ;
       fhir:value [ fhir:v "info@naralabs.com" ]
     ] )
  ] [
     fhir:name [ fhir:v "Senaite FHIR" ] ;
     fhir:telecom ( [
       fhir:system [ fhir:v "email" ] ;
       fhir:value [ fhir:v "info@naralabs.com" ] ;
       fhir:use [ fhir:v "work" ]
     ] )
  ] ) ; # 
  fhir:description [ fhir:v "FHIR R5 capability statement for the SENAITE LIMS FHIR API. SENAITE acts as the API server. External consumers and instrument middleware interact with this API to submit lab requests, revoke requests, push instrument results, and retrieve diagnostic reports."] ; # 
  fhir:kind [ fhir:v "instance"] ; # 
  fhir:implementation [
     fhir:description [ fhir:v "SENAITE FHIR API" ]
  ] ; # 
  fhir:fhirVersion [ fhir:v "5.0.0"] ; # 
  fhir:format ( [ fhir:v "json"] [ fhir:v "xml"] ) ; # 
  fhir:rest ( [
     fhir:mode [ fhir:v "server" ] ;
     fhir:documentation [ fhir:v "SENAITE exposes a FHIR R5 RESTful API supporting the Lab Request and Results workflow and the Instrument Integration workflow.\n\n**Transaction processing.** Lab requests are submitted as a `transaction` Bundle conforming to SenaiteRequestBundle. Entry `fullUrl` values are `urn:uuid` placeholders used only to resolve references between entries in the same Bundle; they have no persistence. `Resource.id` SHALL be absent on POST entries — the server assigns every logical id. The response is a SenaiteBundleResponse containing one entry per request entry, in the same order; that positional correspondence is how a consumer reconciles the placeholders it sent with the ids the server assigned. A failed transaction returns no response Bundle — the server returns an HTTP 4xx or 5xx with a single OperationOutcome and creates nothing.\n\n**Conditional create.** Patient, Practitioner and Organization entries may carry `request.ifNoneExist`, so that a repeat submission matches the existing resource (`200 OK`) rather than creating a duplicate (`201 Created`). The key takes the form `identifier=<system>|<value>` and the system is mandatory, because the identifier search parameter matches on system and value and ignores `Identifier.use`. Either identifier may be used: the consumer's own external ID (`use = secondary`), or the internal SENAITE ID (`use = usual`) returned by an earlier order. Using the internal ID as a match key is permitted; supplying it in the resource body is not. Multiple matches fail the whole transaction. Conditional create is a trial-use part of the FHIR specification. Resources that carry no identifier cannot be matched this way; create them once and thereafter reference them by logical id.\n\n**Multi-sample orders.** A SenaiteRequestBundle carries exactly one ServiceRequest and one Specimen. An order spanning several sample types (tubes) is submitted as one transaction per tube, each ServiceRequest carrying the same `requisition`. Its system is fixed by this IG to the Sample Group ID namespace (`https://fhir.senaite.org/NamingSystem/sample-group-id`); the consumer chooses the value, which must be unique within the consumer. Consumers SHOULD submit these sequentially — the first transaction creates any Patient, Practitioner and Organization (with `request.ifNoneExist`) and later transactions reference the logical ids returned — because conditional create is not safe against concurrent creates. Every request sharing a `requisition` must be for the same Patient and the same Client: a Bundle whose Patient or Client differs from those already recorded for that value is rejected with `422 Unprocessable Entity` and an OperationOutcome, and nothing is created. Transactions are atomic individually, not across tubes.\n\n**Prefer header.** SenaiteBundleResponse does not honour `Prefer: return=representation`; the Specimen resource body described below is returned unconditionally, and no other entry ever carries one. Consumers read the assigned id for the other resources from `entry.fullUrl` or `entry.response.location` and perform a read if their body is needed.\n\n**Specimen resource body.** Unlike every other entry, the Specimen entry in SenaiteBundleResponse always carries the full created SenaiteSpecimen in `entry.resource`. This is the only place the SENAITE-assigned internal Sample ID is available without a follow-up read, and lets the consumer confirm any Client Sample ID it supplied was preserved.\n\n**Versioning.** Most resources are served with `no-version`: `meta.versionId` is not maintained, `Location` headers and `Bundle.entry.response.location` carry `[base]/[type]/[id]` with no `/_history/[vid]` suffix, and no ETag is returned. Task is the exception — see below. No `vread` or `history` interactions are offered on any resource." ] ;
     fhir:resource ( [
       fhir:type [ fhir:v "Bundle" ] ;
       fhir:profile [
         fhir:v "http://hl7.org/fhir/StructureDefinition/Bundle"^^xsd:anyURI ;
         fhir:link <http://hl7.org/fhir/StructureDefinition/Bundle>
       ] ;
       fhir:supportedProfile ( [
         fhir:v "https://fhir.senaite.org/StructureDefinition/SenaiteRequestBundle"^^xsd:anyURI ;
         fhir:link <https://fhir.senaite.org/StructureDefinition/SenaiteRequestBundle>
       ] [
         fhir:v "https://fhir.senaite.org/StructureDefinition/SenaiteBundleResponse"^^xsd:anyURI ;
         fhir:link <https://fhir.senaite.org/StructureDefinition/SenaiteBundleResponse>
       ] ) ;
       fhir:documentation [ fhir:v "POST a SenaiteRequestBundle (transaction) to submit a lab request. Returns a SenaiteBundleResponse on success or a single OperationOutcome on failure. Transactions are atomic: if any entry fails, nothing is created." ] ;
       fhir:interaction ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:code [ fhir:v "create" ] ;
         fhir:documentation [ fhir:v "POST a SenaiteRequestBundle transaction to submit a lab request." ]
       ] ) ;
       fhir:versioning [ fhir:v "no-version" ]
     ] [
       fhir:type [ fhir:v "ServiceRequest" ] ;
       fhir:profile [
         fhir:v "http://hl7.org/fhir/StructureDefinition/ServiceRequest"^^xsd:anyURI ;
         fhir:link <http://hl7.org/fhir/StructureDefinition/ServiceRequest>
       ] ;
       fhir:supportedProfile ( [
         fhir:v "https://fhir.senaite.org/StructureDefinition/SenaiteServiceRequest"^^xsd:anyURI ;
         fhir:link <https://fhir.senaite.org/StructureDefinition/SenaiteServiceRequest>
       ] [
         fhir:v "https://fhir.senaite.org/StructureDefinition/SenaiteServiceRequestRevocation"^^xsd:anyURI ;
         fhir:link <https://fhir.senaite.org/StructureDefinition/SenaiteServiceRequestRevocation>
       ] ) ;
       fhir:documentation [ fhir:v "ServiceRequests are created via a SenaiteRequestBundle transaction and revoked via the $revoke operation.\n\nSENAITE holds no stored ServiceRequest object; a ServiceRequest is a projection over the AnalysisRequest created from the Bundle. The logical id returned in the transaction response is nonetheless stable and resolvable via the read interaction, and is the id supplied to $revoke.\n\n**No `identifier`; optional `requisition`.** SenaiteServiceRequest constrains `identifier` to `0..0`, so there is no identifier search on ServiceRequest. Sample identity is carried on Specimen and DiagnosticReport; a consumer supplying its own reference for one sample puts it on the Specimen entry as the Client Sample ID. A ServiceRequest may carry `requisition` (`0..1`), the Sample Group ID: its system is fixed to `https://fhir.senaite.org/NamingSystem/sample-group-id` and its value is a consumer-owned label shared by the ServiceRequests of one multi-tube order, unique within the consumer. No search by `requisition` is offered on ServiceRequest: the combined report for an order is found by searching DiagnosticReport on the same value as an identifier. The server does not enforce that it is unique per sample.\n\n**Panel and orderDetail rules:** The `code` element identifies the ordered panel. The `orderDetail` element enumerates individual test codes and follows these rules:\n- **Empty `orderDetail`:** The server creates the sample for all tests in the panel (defers to the panel definition).\n- **`orderDetail` is a superset:** All panel tests plus additional tests are included — the sample is created for the full panel plus the extras.\n- **`orderDetail` is a proper subset:** One or more panel tests are absent. The server rejects the request with `400 Bad Request` and an `OperationOutcome` listing the missing test codes.\n\n**$revoke response codes:** Returns `200 OK` on success, `409 Conflict` if results are published, `404` if not found, `422` if the current status does not permit revocation." ] ;
       fhir:interaction ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:code [ fhir:v "read" ] ;
         fhir:documentation [ fhir:v "Retrieve a ServiceRequest by the logical id returned in the transaction response." ]
       ] [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:code [ fhir:v "search-type" ] ;
         fhir:documentation [ fhir:v "Search ServiceRequests. Used by instrument middleware to fetch and incrementally refresh the worklist." ]
       ] ) ;
       fhir:versioning [ fhir:v "no-version" ] ;
       fhir:searchParam ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:name [ fhir:v "status" ] ;
         fhir:type [ fhir:v "token" ] ;
         fhir:documentation [ fhir:v "Filter by status e.g. status=active. Used by instrument middleware to fetch the worklist." ]
       ] [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:name [ fhir:v "_lastUpdated" ] ;
         fhir:type [ fhir:v "date" ] ;
         fhir:documentation [ fhir:v "Filter by last updated date. Used by instrument middleware to retrieve only new or changed requests since the last poll." ]
       ] ) ;
       fhir:operation ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:name [ fhir:v "revoke" ] ;
         fhir:definition [
           fhir:v "https://fhir.senaite.org/OperationDefinition/SenaiteServiceRequestRevoke"^^xsd:anyURI ;
           fhir:link <https://fhir.senaite.org/OperationDefinition/SenaiteServiceRequestRevoke>
         ] ;
         fhir:documentation [ fhir:v "Revoke a ServiceRequest. POST /ServiceRequest/{id}/$revoke with an optional Parameters body containing a reason string. Only valid for ServiceRequests in active or on-hold status." ]
       ] )
     ] [
       fhir:type [ fhir:v "DiagnosticReport" ] ;
       fhir:profile [
         fhir:v "http://hl7.org/fhir/StructureDefinition/DiagnosticReport"^^xsd:anyURI ;
         fhir:link <http://hl7.org/fhir/StructureDefinition/DiagnosticReport>
       ] ;
       fhir:supportedProfile ( [
         fhir:v "https://fhir.senaite.org/StructureDefinition/SenaiteDiagnosticReport"^^xsd:anyURI ;
         fhir:link <https://fhir.senaite.org/StructureDefinition/SenaiteDiagnosticReport>
       ] [
         fhir:v "https://fhir.senaite.org/StructureDefinition/SenaiteResultsBundle"^^xsd:anyURI ;
         fhir:link <https://fhir.senaite.org/StructureDefinition/SenaiteResultsBundle>
       ] ) ;
       fhir:documentation [ fhir:v "DiagnosticReports are created internally by SENAITE after results are verified and are not directly writable by external consumers.\n\n**Polling pattern:** Consumers poll for new or updated reports using a GET search with `_lastUpdated`, `_summary=true`, and `_include=Observation:result`. The `_summary=true` parameter is required on all search requests for performance reasons — `presentedForm.data` (the base64 PDF payload) is excluded from summary responses.\n\n**PDF retrieval:** After discovering a new report via polling, consumers retrieve the full PDF by performing a direct read: `GET DiagnosticReport/{id}` (without `_summary`). The response will include the complete `presentedForm.data` attachment.\n\n**Per-sample and combined reports.** A per-sample report is a projection of one Sample and has at most one `basedOn` ServiceRequest. A *combined* report is published by the laboratory for the Samples with a common `ServiceRequest.requisition`: it lists every ServiceRequest it covers in `basedOn` (more than one — this is the marker), carries the single combined PDF in `presentedForm`, carries one Sample ID for each Sample it covers, a Client Sample ID for each Sample that has one, and the Sample Group ID (the requisition value) as identifiers. These lists are unordered and carry no pairing: do not infer which Client Sample ID belongs to which Sample ID from list position. The report also references the Specimen of each Sample it covers in `specimen` (one on a per-sample report, one per covered Sample on a combined report); each Specimen carries its own Sample ID and Client Sample ID, so read the Specimens, or use the per-sample report, to pair them. A per-sample report carries no Sample Group ID. The two kinds coexist; a search by Sample ID returns that Sample's per-sample report and any combined report covering it. Consumers should ingest per-sample reports as the results and treat a combined report as a document. Observations always identify their own ServiceRequest through `basedOn`, so a combined report's `result` list can be split by sample. A combined report is created only when every covered Sample is final; its membership is fixed at publication, and a correction or late tube is delivered as a new combined report with the superseded one marked `entered-in-error`." ] ;
       fhir:interaction ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:code [ fhir:v "read" ] ;
         fhir:documentation [ fhir:v "Retrieve a specific DiagnosticReport by id. Returns the full resource including the base64-encoded PDF in presentedForm.data. Do not use _summary on this request." ]
       ] [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:code [ fhir:v "search-type" ] ;
         fhir:documentation [ fhir:v "Poll for new or updated DiagnosticReports. Requires _summary=true and _lastUpdated. A single response may contain multiple DiagnosticReports if more than one Sample was completed since the last poll, and may contain both per-sample and combined reports. Use _include=Observation:result to retrieve associated Observations in the same request." ]
       ] ) ;
       fhir:versioning [ fhir:v "no-version" ] ;
       fhir:searchInclude ( [ fhir:v "Observation:result" ] ) ;
       fhir:searchParam ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:name [ fhir:v "_lastUpdated" ] ;
         fhir:type [ fhir:v "date" ] ;
         fhir:documentation [ fhir:v "Filter reports updated since a given datetime. Consumers should store the timestamp of the last successful fetch and pass it as the value on each subsequent poll, e.g. _lastUpdated=gt2026-01-01T00:00:00Z." ]
       ] [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:name [ fhir:v "_summary" ] ;
         fhir:type [ fhir:v "token" ] ;
         fhir:documentation [ fhir:v "_summary=true is required on all DiagnosticReport search requests. This excludes presentedForm.data (the PDF payload) from the response, keeping polling lightweight. To retrieve the PDF, perform a direct read by id." ]
       ] [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHOULD"
           ]
         ] ) ;
         fhir:name [ fhir:v "identifier" ] ;
         fhir:type [ fhir:v "token" ] ;
         fhir:documentation [ fhir:v "Search by Sample ID (identifier=https://fhir.senaite.org/NamingSystem/sample-id|SAMP-SENAITE-001) or Client Sample ID to find the per-sample report (a search by either also returns any combined report covering that Sample), or by Sample Group ID (identifier=https://fhir.senaite.org/NamingSystem/sample-group-id|<value>) to find the combined report(s) for an order. A combined report carries one Sample ID, and a Client Sample ID where there is one, per covered Sample; a per-sample report carries no Sample Group ID. System and value are both required." ]
       ] )
     ] [
       fhir:type [ fhir:v "Observation" ] ;
       fhir:profile [
         fhir:v "http://hl7.org/fhir/StructureDefinition/Observation"^^xsd:anyURI ;
         fhir:link <http://hl7.org/fhir/StructureDefinition/Observation>
       ] ;
       fhir:supportedProfile ( [
         fhir:v "https://fhir.senaite.org/StructureDefinition/SenaiteObservation"^^xsd:anyURI ;
         fhir:link <https://fhir.senaite.org/StructureDefinition/SenaiteObservation>
       ] ) ;
       fhir:documentation [ fhir:v "POSTed individually by instrument middleware as results arrive from the instrument. Each Observation references the originating ServiceRequest via basedOn and the instrument via device. Also returned via _include in DiagnosticReport searches." ] ;
       fhir:interaction ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:code [ fhir:v "create" ] ;
         fhir:documentation [ fhir:v "POST a single SenaiteObservation. Used by instrument middleware to push individual analyte results as they arrive from the instrument." ]
       ] ) ;
       fhir:versioning [ fhir:v "no-version" ]
     ] [
       fhir:type [ fhir:v "Device" ] ;
       fhir:profile [
         fhir:v "http://hl7.org/fhir/StructureDefinition/Device"^^xsd:anyURI ;
         fhir:link <http://hl7.org/fhir/StructureDefinition/Device>
       ] ;
       fhir:supportedProfile ( [
         fhir:v "https://fhir.senaite.org/StructureDefinition/SenaiteDevice"^^xsd:anyURI ;
         fhir:link <https://fhir.senaite.org/StructureDefinition/SenaiteDevice>
       ] ) ;
       fhir:documentation [ fhir:v "Device records are created manually in SENAITE by a lab administrator. The instrument middleware performs a one-time GET at startup to confirm registration and retrieve the logical Device id." ] ;
       fhir:interaction ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:code [ fhir:v "search-type" ] ;
         fhir:documentation [ fhir:v "GET /Device?identifier=<asset_number> to confirm device registration." ]
       ] ) ;
       fhir:versioning [ fhir:v "no-version" ] ;
       fhir:searchParam ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:name [ fhir:v "identifier" ] ;
         fhir:type [ fhir:v "token" ] ;
         fhir:documentation [ fhir:v "Search by asset register identifier. Used by instrument middleware at startup to confirm device registration." ]
       ] )
     ] [
       fhir:type [ fhir:v "Patient" ] ;
       fhir:profile [
         fhir:v "http://hl7.org/fhir/StructureDefinition/Patient"^^xsd:anyURI ;
         fhir:link <http://hl7.org/fhir/StructureDefinition/Patient>
       ] ;
       fhir:supportedProfile ( [
         fhir:v "https://fhir.senaite.org/StructureDefinition/SenaitePatient"^^xsd:anyURI ;
         fhir:link <https://fhir.senaite.org/StructureDefinition/SenaitePatient>
       ] ) ;
       fhir:documentation [ fhir:v "Created as part of a SenaiteRequestBundle transaction, optionally with request.ifNoneExist so a repeat submission matches an existing Patient. Read is supported so the logical id returned in the transaction response is dereferenceable, and so a consumer that has stored the id can reference the Patient in a later Bundle without resubmitting demographics. Note that a conditional-create match discards the submitted body: demographic changes are not applied to an already-matched Patient." ] ;
       fhir:interaction ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:code [ fhir:v "create" ] ;
         fhir:documentation [ fhir:v "Created as an entry within a SenaiteRequestBundle transaction. Standalone POST is not part of this IG." ]
       ] [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:code [ fhir:v "read" ] ;
         fhir:documentation [ fhir:v "Retrieve a Patient by the logical id returned in a transaction response." ]
       ] [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:code [ fhir:v "search-type" ] ;
         fhir:documentation [ fhir:v "Search by identifier. Required so the server can evaluate request.ifNoneExist on Patient Bundle entries." ]
       ] ) ;
       fhir:versioning [ fhir:v "no-version" ] ;
       fhir:searchParam ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:name [ fhir:v "identifier" ] ;
         fhir:type [ fhir:v "token" ] ;
         fhir:documentation [ fhir:v "Search by patient identifier, e.g. identifier=https://ehr.example.org/mrn|MRN-20394857 for the consumer's external ID, or identifier=https://fhir.senaite.org/NamingSystem/patient-id|PAT-001 for the internal SENAITE ID. Backs conditional create. The system is mandatory: this parameter matches on system and value regardless of Identifier.use, so the system URI is the only thing scoping a query to the consumer's own external namespace rather than SENAITE's internal one. External namespaces are agreed per-integration and default to https://fhir.senaite.org/NamingSystem/patient-mrn." ]
       ] )
     ] [
       fhir:type [ fhir:v "Practitioner" ] ;
       fhir:profile [
         fhir:v "http://hl7.org/fhir/StructureDefinition/Practitioner"^^xsd:anyURI ;
         fhir:link <http://hl7.org/fhir/StructureDefinition/Practitioner>
       ] ;
       fhir:supportedProfile ( [
         fhir:v "https://fhir.senaite.org/StructureDefinition/SenaitePractitioner"^^xsd:anyURI ;
         fhir:link <https://fhir.senaite.org/StructureDefinition/SenaitePractitioner>
       ] ) ;
       fhir:documentation [ fhir:v "Created as part of a SenaiteRequestBundle transaction, optionally with request.ifNoneExist so a repeat submission matches an existing Practitioner. Read is supported so the logical id returned in the transaction response is dereferenceable and reusable in later Bundles." ] ;
       fhir:interaction ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:code [ fhir:v "create" ] ;
         fhir:documentation [ fhir:v "Created as an entry within a SenaiteRequestBundle transaction. Standalone POST is not part of this IG." ]
       ] [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:code [ fhir:v "read" ] ;
         fhir:documentation [ fhir:v "Retrieve a Practitioner by the logical id returned in a transaction response." ]
       ] [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:code [ fhir:v "search-type" ] ;
         fhir:documentation [ fhir:v "Search by identifier. Required so the server can evaluate request.ifNoneExist on Practitioner Bundle entries." ]
       ] ) ;
       fhir:versioning [ fhir:v "no-version" ] ;
       fhir:searchParam ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:name [ fhir:v "identifier" ] ;
         fhir:type [ fhir:v "token" ] ;
         fhir:documentation [ fhir:v "Search by practitioner identifier, e.g. identifier=https://ehr.example.org/practitioner|PRACT-DR-SULLIVAN for the consumer's external ID, or the internal SENAITE ID namespace for the server-assigned one. Backs conditional create. The system is mandatory. External namespaces are agreed per-integration and default to https://fhir.senaite.org/NamingSystem/practitioner-external-id." ]
       ] )
     ] [
       fhir:type [ fhir:v "Specimen" ] ;
       fhir:profile [
         fhir:v "http://hl7.org/fhir/StructureDefinition/Specimen"^^xsd:anyURI ;
         fhir:link <http://hl7.org/fhir/StructureDefinition/Specimen>
       ] ;
       fhir:supportedProfile ( [
         fhir:v "https://fhir.senaite.org/StructureDefinition/SenaiteSpecimen"^^xsd:anyURI ;
         fhir:link <https://fhir.senaite.org/StructureDefinition/SenaiteSpecimen>
       ] ) ;
       fhir:documentation [ fhir:v "Created as part of a SenaiteRequestBundle transaction. Always created, never matched — request.ifNoneExist is not permitted on Specimen entries, since a specimen is never reused. Read is supported so the logical id returned in the transaction response is dereferenceable. Search by identifier is offered so that the internal Sample ID, and the Client Sample ID where one was supplied, can be used to locate a Specimen after creation." ] ;
       fhir:interaction ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:code [ fhir:v "create" ] ;
         fhir:documentation [ fhir:v "Created as an entry within a SenaiteRequestBundle transaction. Standalone POST is not part of this IG." ]
       ] [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:code [ fhir:v "read" ] ;
         fhir:documentation [ fhir:v "Retrieve a Specimen by the logical id returned in a transaction response." ]
       ] [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHOULD"
           ]
         ] ) ;
         fhir:code [ fhir:v "search-type" ] ;
         fhir:documentation [ fhir:v "Search by identifier, so the internal Sample ID can be used to identify a Specimen on read." ]
       ] ) ;
       fhir:versioning [ fhir:v "no-version" ] ;
       fhir:searchParam ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHOULD"
           ]
         ] ) ;
         fhir:name [ fhir:v "identifier" ] ;
         fhir:type [ fhir:v "token" ] ;
         fhir:documentation [ fhir:v "Search by the internal Sample ID, e.g. identifier=https://fhir.senaite.org/NamingSystem/sample-id|SAMP-SENAITE-001, or by the Client Sample ID where one was supplied. Both Specimen namespaces are fixed by this IG. Not used for conditional create — Specimen entries never carry request.ifNoneExist." ]
       ] )
     ] [
       fhir:type [ fhir:v "Organization" ] ;
       fhir:profile [
         fhir:v "http://hl7.org/fhir/StructureDefinition/Organization"^^xsd:anyURI ;
         fhir:link <http://hl7.org/fhir/StructureDefinition/Organization>
       ] ;
       fhir:supportedProfile ( [
         fhir:v "https://fhir.senaite.org/StructureDefinition/SenaiteOrganization"^^xsd:anyURI ;
         fhir:link <https://fhir.senaite.org/StructureDefinition/SenaiteOrganization>
       ] ) ;
       fhir:documentation [ fhir:v "Represents the Client Organisation submitting the lab request. Every SenaiteRequestBundle must identify its Client via the SenaiteClient extension on the ServiceRequest, but the Organization entry itself is optional: include it when the Client may not yet exist, or omit it and reference the Client by logical id.\n\nOrganizations without an external identifier cannot be matched by request.ifNoneExist. Create such an Organization once, store the logical id from the transaction response, and reference it thereafter.\n\nDeployments that manage Clients administratively — where a Client carries contract or pricing configuration — should provision Organizations in SENAITE directly and supply integrators with the logical id out of band, rather than allowing consumers to auto-provision their own Client on first order." ] ;
       fhir:interaction ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:code [ fhir:v "create" ] ;
         fhir:documentation [ fhir:v "Created as an entry within a SenaiteRequestBundle transaction. Standalone POST is not part of this IG." ]
       ] [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:code [ fhir:v "read" ] ;
         fhir:documentation [ fhir:v "Retrieve an Organization by logical id. Required so a consumer can dereference and reuse the Client id returned in a transaction response." ]
       ] [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:code [ fhir:v "search-type" ] ;
         fhir:documentation [ fhir:v "Search by identifier. Required so the server can evaluate request.ifNoneExist on Organization Bundle entries." ]
       ] ) ;
       fhir:versioning [ fhir:v "no-version" ] ;
       fhir:searchParam ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:name [ fhir:v "identifier" ] ;
         fhir:type [ fhir:v "token" ] ;
         fhir:documentation [ fhir:v "Search by organization identifier, e.g. identifier=https://ehr.example.org/org|ORG-RMH-MEL for the consumer's external ID, or the internal SENAITE ID namespace for the server-assigned Client ID. Backs conditional create. The system is mandatory. External namespaces are agreed per-integration and default to https://fhir.senaite.org/NamingSystem/organization-external-id." ]
       ] )
     ] [
       fhir:type [ fhir:v "Task" ] ;
       fhir:profile [
         fhir:v "http://hl7.org/fhir/StructureDefinition/Task"^^xsd:anyURI ;
         fhir:link <http://hl7.org/fhir/StructureDefinition/Task>
       ] ;
       fhir:supportedProfile ( [
         fhir:v "https://fhir.senaite.org/StructureDefinition/SenaiteWorksheetTask"^^xsd:anyURI ;
         fhir:link <https://fhir.senaite.org/StructureDefinition/SenaiteWorksheetTask>
       ] ) ;
       fhir:documentation [ fhir:v "Represents a SENAITE worksheet scoped to a single instrument. Created and, for the most part, transitioned internally by SENAITE — exposed read-only for those transitions. The exception is the transition to in-progress (from either ready or draft), which the owning instrument/middleware writes itself via patch once it begins acting on the worksheet — locking the worksheet in SENAITE as a side effect if it wasn't already locked. Complements, rather than replaces, the standard instrument worklist poll — not all instrument work arrives via a worksheet. Consumers fetch the referenced SenaiteInstrumentServiceRequest resources in Task.input directly rather than via reverse search." ] ;
       fhir:interaction ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:code [ fhir:v "read" ] ;
         fhir:documentation [ fhir:v "Retrieve a specific worksheet Task by id. The response carries an ETag; clients supply it as If-Match on the subsequent patch." ]
       ] [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHOULD"
           ]
         ] ) ;
         fhir:code [ fhir:v "search-type" ] ;
         fhir:documentation [ fhir:v "Poll for worksheets by status, e.g. status=ready&requestedperformer-reference=Device/{id} to find worksheets that have been locked into their ready state and are waiting to be claimed, or status=draft&requestedperformer-reference=Device/{id} to see worksheets still being assembled for that instrument (informational only — not yet actionable, since composition can still change)." ]
       ] [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHALL"
           ]
         ] ) ;
         fhir:code [ fhir:v "patch" ] ;
         fhir:documentation [ fhir:v "The owning instrument/middleware transitions status from ready to in-progress via PATCH once it begins acting on the worksheet. This is the only write this profile supports — no update (PUT) interaction is offered. Clients SHALL supply an If-Match header with the currently-known ETag/versionId; the server SHALL reject with 412 Precondition Failed if the Task has changed since the client's last read, and SHALL reject any transition other than ready -> in-progress with 409 Conflict." ]
       ] ) ;
       fhir:versioning [ fhir:v "versioned-update" ] ;
       fhir:searchParam ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHOULD"
           ]
         ] ) ;
         fhir:name [ fhir:v "status" ] ;
         fhir:type [ fhir:v "token" ] ;
         fhir:documentation [ fhir:v "Filter by status, e.g. status=ready to find worksheets that have been locked and are safe to claim and act on, status=draft to see worksheets still being assembled (also actionable — see the patch interaction above), or the comma-separated status=ready,draft to retrieve both in one poll." ]
       ] [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:code ;
             fhir:v "SHOULD"
           ]
         ] ) ;
         fhir:name [ fhir:v "requestedperformer-reference" ] ;
         fhir:type [ fhir:v "reference" ] ;
         fhir:documentation [ fhir:v "The standard Task search parameter targeting the reference component of requestedPerformer. Filter by the instrument (Device) the worksheet is scoped to." ]
       ] )
     ] )
  ] ) . #