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

<CodeSystem xmlns="http://hl7.org/fhir">
  <id value="communication-category"/>
  <text>
    <status value="generated"/><div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: CodeSystem communication-category</b></p><a name="communication-category"> </a><a name="hccommunication-category"> </a><p>This case-sensitive code system <code>https://projo.evoleen.com/fhir/CodeSystem/communication-category</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">invitation<a name="communication-category-invitation"> </a></td><td>Invitation</td><td>Initial questionnaire invitation template sent to the patient.</td></tr><tr><td style="white-space:nowrap">question<a name="communication-category-question"> </a></td><td>Question</td><td>Next-question template sent to advance the conversation.</td></tr><tr><td style="white-space:nowrap">answer<a name="communication-category-answer"> </a></td><td>Answer</td><td>Patient's inbound reply.</td></tr><tr><td style="white-space:nowrap">reminder<a name="communication-category-reminder"> </a></td><td>Reminder</td><td>Reminder template sent because the response window is closing.</td></tr><tr><td style="white-space:nowrap">abandoned<a name="communication-category-abandoned"> </a></td><td>Abandoned</td><td>Communication marked entered-in-error because the message could not be delivered or the conversation was abandoned.</td></tr><tr><td style="white-space:nowrap">completion<a name="communication-category-completion"> </a></td><td>Completion</td><td>Closing message sent when the conversation completes.</td></tr></table></div>
  </text>
  <url value="https://projo.evoleen.com/fhir/CodeSystem/communication-category"/>
  <version value="0.1.0"/>
  <name value="CommunicationCategory"/>
  <title value="Fire Arrow Communication Category"/>
  <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="Per-Communication category stamped by the WhatsApp sidecar. Codes classify each message in the conversation audit trail: invitation (initial template), question (next-question template), answer (patient reply), reminder (reminder template), abandoned (message that could not be delivered / conversation abandoned), completion (closing message). The sidecar's sweeper also uses `reminder` as the category for reminder CommunicationRequests."/>
  <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="6"/>
  <concept>
    <code value="invitation"/>
    <display value="Invitation"/>
    <definition value="Initial questionnaire invitation template sent to the patient."/>
  </concept>
  <concept>
    <code value="question"/>
    <display value="Question"/>
    <definition value="Next-question template sent to advance the conversation."/>
  </concept>
  <concept>
    <code value="answer"/>
    <display value="Answer"/>
    <definition value="Patient's inbound reply."/>
  </concept>
  <concept>
    <code value="reminder"/>
    <display value="Reminder"/>
    <definition value="Reminder template sent because the response window is closing."/>
  </concept>
  <concept>
    <code value="abandoned"/>
    <display value="Abandoned"/>
    <definition value="Communication marked entered-in-error because the message could not be delivered or the conversation was abandoned."/>
  </concept>
  <concept>
    <code value="completion"/>
    <display value="Completion"/>
    <definition value="Closing message sent when the conversation completes."/>
  </concept>
</CodeSystem>