Projo FHIR Documentation
0.1.0 - ci-build Switzerland flag

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

Logical Model: Conversational State (Stateless Projection) ( Experimental )

Official URL: https://projo.evoleen.com/fhir/StructureDefinition/conversational-state Version: 0.1.0
Draft as of 2024-01-01 Computable Name: ConversationalState

Copyright/Legal: 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.

The sidecar's stateless projection of conversational state, computed from FHIR resources on each inbound message. The sidecar has NO private database — every state view is a pure function of FHIR queries. Five projection helpers live in lib/projection/: isDuplicateInbound, compute24hWindow, currentQuestion, conversationState, lastActivityForCR. Any new sidecar state view must add a new projection here, never a cache.

Documents the stateless-projection invariant: the sidecar never stores conversational state locally. Each field is derived from a FHIR query at read time.

Usages:

  • This Logical Model is not used by any profiles in this Specification

You can also check for usages in the FHIR IG Statistics

Formal Views of Profile Content

Description of Profiles, Differentials, Snapshots and how the different presentations work.

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. conversational-state 0..* Base Conversational State (Stateless Projection)
Instances of this type can be the target of a Reference
... duplicateCheck 0..1 boolean Is this inbound message a duplicate (Communication?identifier=wamid)?
... window24h 0..1 dateTime Most recent inbound Communication timestamp within the 24h window (Communication?recipient=...&status=in-progress,completed&_sort=-sent&_count=1)
... currentQuestion 0..1 string The linkId of the next question to ask (derived from QR.item structure + Questionnaire navigation)
... lastActivity 0..1 dateTime Last activity timestamp for the CR (derived from Communications + extensions)
... activeCR 0..1 Reference(CommunicationRequest) The active CR this message should attach to (CommunicationRequest?recipient=...&status=active)

doco Documentation for this format

This structure is derived from Base

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. conversational-state 0..* Base Conversational State (Stateless Projection)
Instances of this type can be the target of a Reference
... duplicateCheck 0..1 boolean Is this inbound message a duplicate (Communication?identifier=wamid)?
... window24h 0..1 dateTime Most recent inbound Communication timestamp within the 24h window (Communication?recipient=...&status=in-progress,completed&_sort=-sent&_count=1)
... currentQuestion 0..1 string The linkId of the next question to ask (derived from QR.item structure + Questionnaire navigation)
... lastActivity 0..1 dateTime Last activity timestamp for the CR (derived from Communications + extensions)
... activeCR 0..1 Reference(CommunicationRequest) The active CR this message should attach to (CommunicationRequest?recipient=...&status=active)

doco Documentation for this format
NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. conversational-state 0..* Base Conversational State (Stateless Projection)
Instances of this type can be the target of a Reference
... duplicateCheck 0..1 boolean Is this inbound message a duplicate (Communication?identifier=wamid)?
... window24h 0..1 dateTime Most recent inbound Communication timestamp within the 24h window (Communication?recipient=...&status=in-progress,completed&_sort=-sent&_count=1)
... currentQuestion 0..1 string The linkId of the next question to ask (derived from QR.item structure + Questionnaire navigation)
... lastActivity 0..1 dateTime Last activity timestamp for the CR (derived from Communications + extensions)
... activeCR 0..1 Reference(CommunicationRequest) The active CR this message should attach to (CommunicationRequest?recipient=...&status=active)

doco Documentation for this format

This structure is derived from Base

Summary

Key Elements View

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. conversational-state 0..* Base Conversational State (Stateless Projection)
Instances of this type can be the target of a Reference
... duplicateCheck 0..1 boolean Is this inbound message a duplicate (Communication?identifier=wamid)?
... window24h 0..1 dateTime Most recent inbound Communication timestamp within the 24h window (Communication?recipient=...&status=in-progress,completed&_sort=-sent&_count=1)
... currentQuestion 0..1 string The linkId of the next question to ask (derived from QR.item structure + Questionnaire navigation)
... lastActivity 0..1 dateTime Last activity timestamp for the CR (derived from Communications + extensions)
... activeCR 0..1 Reference(CommunicationRequest) The active CR this message should attach to (CommunicationRequest?recipient=...&status=active)

doco Documentation for this format

Differential View

This structure is derived from Base

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. conversational-state 0..* Base Conversational State (Stateless Projection)
Instances of this type can be the target of a Reference
... duplicateCheck 0..1 boolean Is this inbound message a duplicate (Communication?identifier=wamid)?
... window24h 0..1 dateTime Most recent inbound Communication timestamp within the 24h window (Communication?recipient=...&status=in-progress,completed&_sort=-sent&_count=1)
... currentQuestion 0..1 string The linkId of the next question to ask (derived from QR.item structure + Questionnaire navigation)
... lastActivity 0..1 dateTime Last activity timestamp for the CR (derived from Communications + extensions)
... activeCR 0..1 Reference(CommunicationRequest) The active CR this message should attach to (CommunicationRequest?recipient=...&status=active)

doco Documentation for this format

Snapshot View

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. conversational-state 0..* Base Conversational State (Stateless Projection)
Instances of this type can be the target of a Reference
... duplicateCheck 0..1 boolean Is this inbound message a duplicate (Communication?identifier=wamid)?
... window24h 0..1 dateTime Most recent inbound Communication timestamp within the 24h window (Communication?recipient=...&status=in-progress,completed&_sort=-sent&_count=1)
... currentQuestion 0..1 string The linkId of the next question to ask (derived from QR.item structure + Questionnaire navigation)
... lastActivity 0..1 dateTime Last activity timestamp for the CR (derived from Communications + extensions)
... activeCR 0..1 Reference(CommunicationRequest) The active CR this message should attach to (CommunicationRequest?recipient=...&status=active)

doco Documentation for this format

This structure is derived from Base

Summary

 

Other representations of profile: CSV, Excel