{
  "resourceType" : "CodeSystem",
  "id" : "identity-resolution-reason",
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: CodeSystem identity-resolution-reason</b></p><a name=\"identity-resolution-reason\"> </a><a name=\"hcidentity-resolution-reason\"> </a><p>This case-sensitive code system <code>https://projo.evoleen.com/fhir/CodeSystem/identity-resolution-reason</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\">no-match<a name=\"identity-resolution-reason-no-match\"> </a></td><td>No match</td><td>No existing identity matches the sender's phone number or BSUID. Orchestrator creates a new identity (Patient by default) and applies the triggered plan (onboarding).</td></tr><tr><td style=\"white-space:nowrap\">multiple-matches<a name=\"identity-resolution-reason-multiple-matches\"> </a></td><td>Multiple matches</td><td>More than one identity matches the sender's hints. Orchestrator refuses; marks the reverse CR entered-in-error.</td></tr><tr><td style=\"white-space:nowrap\">non-conversational-only<a name=\"identity-resolution-reason-non-conversational-only\"> </a></td><td>Non-conversational only</td><td>Matches exist but none of a conversational type. Orchestrator walks Person.link; if none, creates a new identity.</td></tr><tr><td style=\"white-space:nowrap\">no-active-cr<a name=\"identity-resolution-reason-no-active-cr\"> </a></td><td>No active CR</td><td>Identity matched but no active CommunicationRequest to attach to. Orchestrator reattaches and applies the triggered plan (default/re-engagement); skips if an active CarePlan exists.</td></tr><tr><td style=\"white-space:nowrap\">unresolved-receiver<a name=\"identity-resolution-reason-unresolved-receiver\"> </a></td><td>Unresolved receiver</td><td>Receiver Organization unknown. Orchestrator idempotently upserts a stub Organization, then creates the identity + applies the triggered plan.</td></tr></table></div>"
  },
  "url" : "https://projo.evoleen.com/fhir/CodeSystem/identity-resolution-reason",
  "version" : "0.1.0",
  "name" : "IdentityResolutionReasonCS",
  "title" : "Projo Identity Resolution Reason",
  "status" : "draft",
  "experimental" : true,
  "date" : "2024-01-01",
  "publisher" : "Projo",
  "contact" : [{
    "name" : "Projo",
    "telecom" : [{
      "system" : "url",
      "value" : "https://projo.evoleen.com"
    }]
  }],
  "description" : "Reason codes stamped on a reverse CommunicationRequest (category=identity-resolution-required) explaining why the WhatsApp sidecar could not attach an inbound message to an existing identity. The orchestrator reads this code to decide its response (see 09_identity.md).",
  "jurisdiction" : [{
    "coding" : [{
      "system" : "urn:iso:std:iso:3166",
      "code" : "CH",
      "display" : "Switzerland"
    }]
  }],
  "purpose" : "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" : "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" : true,
  "content" : "complete",
  "count" : 5,
  "concept" : [{
    "code" : "no-match",
    "display" : "No match",
    "definition" : "No existing identity matches the sender's phone number or BSUID. Orchestrator creates a new identity (Patient by default) and applies the triggered plan (onboarding)."
  },
  {
    "code" : "multiple-matches",
    "display" : "Multiple matches",
    "definition" : "More than one identity matches the sender's hints. Orchestrator refuses; marks the reverse CR entered-in-error."
  },
  {
    "code" : "non-conversational-only",
    "display" : "Non-conversational only",
    "definition" : "Matches exist but none of a conversational type. Orchestrator walks Person.link; if none, creates a new identity."
  },
  {
    "code" : "no-active-cr",
    "display" : "No active CR",
    "definition" : "Identity matched but no active CommunicationRequest to attach to. Orchestrator reattaches and applies the triggered plan (default/re-engagement); skips if an active CarePlan exists."
  },
  {
    "code" : "unresolved-receiver",
    "display" : "Unresolved receiver",
    "definition" : "Receiver Organization unknown. Orchestrator idempotently upserts a stub Organization, then creates the identity + applies the triggered plan."
  }]
}