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

<OperationDefinition xmlns="http://hl7.org/fhir">
  <id value="crmi-publish"/>
  <language value="en"/>
  <text>
    <status value="generated"/><div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: OperationDefinition crmi-publish</b></p><a name="crmi-publish"> </a><a name="hccrmi-publish"> </a><p>URL: [base]/$publish</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>bundle</td><td/><td>1..1</td><td><a href="http://hl7.org/fhir/R4/bundle.html">Bundle</a> (<a href="StructureDefinition-crmi-publishable-bundle.html" title="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishable-bundle">CRMI Publishable Bundle</a>)</td><td/><td><div><p>The publishable bundle to be processed. The bundle must conform to the CRMIPublishableBundle profile, meaning:</p>
<ul>
<li>Bundle type must be 'transaction'</li>
<li>First entry must contain an ImplementationGuide resource</li>
<li>All entries must have proper transaction request information</li>
</ul>
<p>The bundle contains all related artifacts that should be published as an atomic unit.</p>
</div></td></tr><tr><td>OUT</td><td>return</td><td/><td>1..1</td><td><a href="http://hl7.org/fhir/R4/bundle.html">Bundle</a></td><td/><td><div><p>The bundle transaction response containing the results of processing each entry in the input bundle.</p>
<p>Each entry in the response bundle corresponds to an entry in the input bundle and contains:</p>
<ul>
<li>The HTTP status code for the transaction</li>
<li>The location of the created/updated resource (if successful)</li>
<li>Any operation outcomes or error messages</li>
</ul>
<p>The response follows the same structure as the core FHIR Bundle transaction response.</p>
</div></td></tr></table><div><p>The CRMI publish operation processes artifact bundles atomically,
ensuring that all resources in the bundle are published together or the entire
operation fails. This maintains the integrity of artifact packages and
their dependencies.</p>
<p>The operation validates that:</p>
<ol>
<li>The bundle conforms to CRMIPublishableBundle profile</li>
<li>The first entry contains an ImplementationGuide</li>
<li>All bundle entries have proper transaction requests</li>
<li>Referenced resources within the bundle are consistent</li>
</ol>
</div></div>
  </text>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
    <valueCode value="cds"/>
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
    <valueInteger value="4">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom">
        <valueCanonical value="http://hl7.org/fhir/uv/crmi/ImplementationGuide/hl7.fhir.uv.crmi"/>
      </extension>
    </valueInteger>
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
    <valueCode value="trial-use">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom">
        <valueCanonical value="http://hl7.org/fhir/uv/crmi/ImplementationGuide/hl7.fhir.uv.crmi"/>
      </extension>
    </valueCode>
  </extension>
  <url value="http://hl7.org/fhir/uv/crmi/OperationDefinition/crmi-publish"/>
  <version value="2.0.0"/>
  <name value="CRMIPublish"/>
  <title value="CRMI Publish Operation"/>
  <status value="active"/>
  <kind value="operation"/>
  <date value="2026-05-11T04:30:28+00:00"/>
  <publisher value="HL7 International / Clinical Decision Support"/>
  <contact>
    <telecom>
      <system value="url"/>
      <value value="http://www.hl7.org/Special/committees/dss"/>
    </telecom>
  </contact>
  <description value="The CRMI publish operation processes a publishable bundle containing artifacts and their metadata.&#xA;&#xA;This operation is based on the core FHIR Bundle operation but requires that the&#xA;input Bundle conforms to the CRMIPublishableBundle profile. The bundle must be&#xA;of type 'transaction' and must contain an ImplementationGuide resource as the&#xA;first entry.&#xA;&#xA;The operation enables atomic publication of related artifacts (such as&#xA;Libraries, ActivityDefinitions, PlanDefinitions, Measures, etc.) along with&#xA;their governing ImplementationGuide, ensuring consistent deployment and proper&#xA;metadata management."/>
  <jurisdiction>
    <coding>
      <system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
      <code value="001"/>
    </coding>
  </jurisdiction>
  <affectsState value="true"/>
  <code value="publish"/>
  <comment value="The CRMI publish operation processes artifact bundles atomically,&#xA;ensuring that all resources in the bundle are published together or the entire&#xA;operation fails. This maintains the integrity of artifact packages and&#xA;their dependencies.&#xA;&#xA;The operation validates that:&#xA;1. The bundle conforms to CRMIPublishableBundle profile&#xA;2. The first entry contains an ImplementationGuide&#xA;3. All bundle entries have proper transaction requests&#xA;4. Referenced resources within the bundle are consistent&#xA;"/>
  <system value="true"/>
  <type value="false"/>
  <instance value="false"/>
  <parameter>
    <name value="bundle"/>
    <use value="in"/>
    <min value="1"/>
    <max value="1"/>
    <documentation value="The publishable bundle to be processed. The bundle must conform to the CRMIPublishableBundle profile, meaning:&#xA;- Bundle type must be 'transaction'&#xA;- First entry must contain an ImplementationGuide resource&#xA;- All entries must have proper transaction request information&#xA;&#xA;The bundle contains all related artifacts that should be published as an atomic unit."/>
    <type value="Bundle"/>
    <targetProfile value="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishable-bundle"/>
  </parameter>
  <parameter>
    <name value="return"/>
    <use value="out"/>
    <min value="1"/>
    <max value="1"/>
    <documentation value="The bundle transaction response containing the results of processing each entry in the input bundle.&#xA;&#xA;Each entry in the response bundle corresponds to an entry in the input bundle and contains:&#xA;- The HTTP status code for the transaction&#xA;- The location of the created/updated resource (if successful)&#xA;- Any operation outcomes or error messages&#xA;&#xA;The response follows the same structure as the core FHIR Bundle transaction response."/>
    <type value="Bundle"/>
  </parameter>
</OperationDefinition>