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

<CodeSystem xmlns="http://hl7.org/fhir">
  <id value="bounded-action"/>
  <text>
    <status value="generated"/><div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: CodeSystem bounded-action</b></p><a name="bounded-action"> </a><a name="hcbounded-action"> </a><p>This case-sensitive code system <code>https://projo.evoleen.com/fhir/CodeSystem/bounded-action</code> defines the following codes:</p><table class="codes"><tr><td style="white-space:nowrap"><b>Code</b></td><td><b>Display</b></td><td><b>Definition</b></td></tr><tr><td style="white-space:nowrap">enroll-plan<a name="bounded-action-enroll-plan"> </a></td><td>Enroll plan</td><td>Enroll the patient in the CarePlan produced by the router's $apply. Idempotent via routing Provenance.</td></tr><tr><td style="white-space:nowrap">supersede-plan<a name="bounded-action-supersede-plan"> </a></td><td>Supersede plan</td><td>Mark the patient's intake CarePlan as completed/cancelled before enrolling the follow-up plan. Documented in ARCHITECTURE.md supersede-then-enroll flow.</td></tr><tr><td style="white-space:nowrap">route-to-review<a name="bounded-action-route-to-review"> </a></td><td>Route to review</td><td>Raise a Flag (category=clinical, code=route-to-review) on the Patient so a human reviewer can decide enrollment. Idempotent via Flag.identifier (routing-resource system).</td></tr><tr><td style="white-space:nowrap">notify-practitioner<a name="bounded-action-notify-practitioner"> </a></td><td>Notify practitioner</td><td>(Designed, not implemented) Notify a practitioner.</td></tr><tr><td style="white-space:nowrap">raise-flag<a name="bounded-action-raise-flag"> </a></td><td>Raise flag</td><td>(Designed, not implemented) Raise an arbitrary flag.</td></tr><tr><td style="white-space:nowrap">send-message<a name="bounded-action-send-message"> </a></td><td>Send message</td><td>(Designed, not implemented) Send a message via the sidecar.</td></tr><tr><td style="white-space:nowrap">create-task<a name="bounded-action-create-task"> </a></td><td>Create task</td><td>(Designed, not implemented) Create an additional Task.</td></tr><tr><td style="white-space:nowrap">assign-careteam<a name="bounded-action-assign-careteam"> </a></td><td>Assign care team</td><td>(Designed, not implemented) Assign a care team.</td></tr></table></div>
  </text>
  <url value="https://projo.evoleen.com/fhir/CodeSystem/bounded-action"/>
  <version value="0.1.0"/>
  <name value="BoundedAction"/>
  <title value="Projo Bounded Action"/>
  <status value="draft"/>
  <experimental value="true"/>
  <date value="2024-01-01"/>
  <publisher value="Projo"/>
  <contact>
    <name value="Projo"/>
    <telecom>
      <system value="url"/>
      <value value="https://projo.evoleen.com"/>
    </telecom>
  </contact>
  <description value="Allow-listed actions that the orchestrator will execute from a router PlanDefinition $apply output (RequestGroup.action). The router (CQL Library + PlanDefinition) proposes; the orchestrator disposes (ADR 0006 — 'router proposes, projo disposes'). Implemented codes: enroll-plan, supersede-plan, route-to-review. Designed but explicitly not implemented (rejected): notify-practitioner, raise-flag, send-message, create-task, assign-careteam."/>
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166"/>
      <code value="CH"/>
      <display value="Switzerland"/>
    </coding>
  </jurisdiction>
  <purpose value="Documentation-only artifact. Projo's runtime extensions, code systems, identifier systems and search parameter are TypeScript constants and bootstrap-time resources, NOT deployed StructureDefinitions. This StructureDefinition exists to document the contract; the source of truth is src/functions/src/lib/fhir/types.ts and docs/FHIR_EXTENSIONS.md."/>
  <copyright value="Copyright (c) Projo. Licensed under CC0-1.0 (public domain dedication). FHIR(R) is the registered trademark of HL7 and is used with permission. This IG references WhatsApp(R), a trademark of Meta Platforms, Inc., for descriptive purposes only."/>
  <caseSensitive value="true"/>
  <content value="complete"/>
  <count value="8"/>
  <concept>
    <code value="enroll-plan"/>
    <display value="Enroll plan"/>
    <definition value="Enroll the patient in the CarePlan produced by the router's $apply. Idempotent via routing Provenance."/>
  </concept>
  <concept>
    <code value="supersede-plan"/>
    <display value="Supersede plan"/>
    <definition value="Mark the patient's intake CarePlan as completed/cancelled before enrolling the follow-up plan. Documented in ARCHITECTURE.md supersede-then-enroll flow."/>
  </concept>
  <concept>
    <code value="route-to-review"/>
    <display value="Route to review"/>
    <definition value="Raise a Flag (category=clinical, code=route-to-review) on the Patient so a human reviewer can decide enrollment. Idempotent via Flag.identifier (routing-resource system)."/>
  </concept>
  <concept>
    <code value="notify-practitioner"/>
    <display value="Notify practitioner"/>
    <definition value="(Designed, not implemented) Notify a practitioner."/>
  </concept>
  <concept>
    <code value="raise-flag"/>
    <display value="Raise flag"/>
    <definition value="(Designed, not implemented) Raise an arbitrary flag."/>
  </concept>
  <concept>
    <code value="send-message"/>
    <display value="Send message"/>
    <definition value="(Designed, not implemented) Send a message via the sidecar."/>
  </concept>
  <concept>
    <code value="create-task"/>
    <display value="Create task"/>
    <definition value="(Designed, not implemented) Create an additional Task."/>
  </concept>
  <concept>
    <code value="assign-careteam"/>
    <display value="Assign care team"/>
    <definition value="(Designed, not implemented) Assign a care team."/>
  </concept>
</CodeSystem>