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: ConversationalState - Detailed Descriptions

Draft as of 2024-01-01

Definitions for the conversational-state logical model.

Guidance on how to interpret the contents of this table can be foundhere

0. conversational-state
Definition

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.

ShortConversational State (Stateless Projection)
Control0..*
Is Modifierfalse
Logical ModelInstances of this logical model are not marked to be the target of a Reference
2. conversational-state.duplicateCheck
Definition

Is this inbound message a duplicate (Communication?identifier=wamid)?

ShortIs this inbound message a duplicate (Communication?identifier=wamid)?
Control0..1
Typeboolean
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
4. conversational-state.window24h
Definition

Most recent inbound Communication timestamp within the 24h window (Communication?recipient=...&status=in-progress,completed&_sort=-sent&_count=1)

ShortMost recent inbound Communication timestamp within the 24h window (Communication?recipient=...&status=in-progress,completed&_sort=-sent&_count=1)
Control0..1
TypedateTime
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
6. conversational-state.currentQuestion
Definition

The linkId of the next question to ask (derived from QR.item structure + Questionnaire navigation)

ShortThe linkId of the next question to ask (derived from QR.item structure + Questionnaire navigation)
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
8. conversational-state.conversationState
Definition

in-progress | completed (derived from QR.status)

Shortin-progress | completed (derived from QR.status)
Control0..1
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
10. conversational-state.lastActivity
Definition

Last activity timestamp for the CR (derived from Communications + extensions)

ShortLast activity timestamp for the CR (derived from Communications + extensions)
Control0..1
TypedateTime
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
12. conversational-state.activeCR
Definition

The active CR this message should attach to (CommunicationRequest?recipient=...&status=active)

ShortThe active CR this message should attach to (CommunicationRequest?recipient=...&status=active)
Control0..1
TypeReference(CommunicationRequest)

Guidance on how to interpret the contents of this table can be foundhere

0. conversational-state
Definition

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.

ShortConversational State (Stateless Projection)
Logical ModelInstances of this logical model are not marked to be the target of a Reference
2. conversational-state.duplicateCheck
Definition

Is this inbound message a duplicate (Communication?identifier=wamid)?

ShortIs this inbound message a duplicate (Communication?identifier=wamid)?
Control0..1
Typeboolean
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
4. conversational-state.window24h
Definition

Most recent inbound Communication timestamp within the 24h window (Communication?recipient=...&status=in-progress,completed&_sort=-sent&_count=1)

ShortMost recent inbound Communication timestamp within the 24h window (Communication?recipient=...&status=in-progress,completed&_sort=-sent&_count=1)
Control0..1
TypedateTime
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
6. conversational-state.currentQuestion
Definition

The linkId of the next question to ask (derived from QR.item structure + Questionnaire navigation)

ShortThe linkId of the next question to ask (derived from QR.item structure + Questionnaire navigation)
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
8. conversational-state.conversationState
Definition

in-progress | completed (derived from QR.status)

Shortin-progress | completed (derived from QR.status)
Control0..1
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
10. conversational-state.lastActivity
Definition

Last activity timestamp for the CR (derived from Communications + extensions)

ShortLast activity timestamp for the CR (derived from Communications + extensions)
Control0..1
TypedateTime
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
12. conversational-state.activeCR
Definition

The active CR this message should attach to (CommunicationRequest?recipient=...&status=active)

ShortThe active CR this message should attach to (CommunicationRequest?recipient=...&status=active)
Control0..1
TypeReference(CommunicationRequest)

Guidance on how to interpret the contents of this table can be foundhere

0. conversational-state
Definition

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.

ShortConversational State (Stateless Projection)
Control0..*
Is Modifierfalse
Logical ModelInstances of this logical model are not marked to be the target of a Reference
2. conversational-state.duplicateCheck
Definition

Is this inbound message a duplicate (Communication?identifier=wamid)?

ShortIs this inbound message a duplicate (Communication?identifier=wamid)?
Control0..1
Typeboolean
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
4. conversational-state.window24h
Definition

Most recent inbound Communication timestamp within the 24h window (Communication?recipient=...&status=in-progress,completed&_sort=-sent&_count=1)

ShortMost recent inbound Communication timestamp within the 24h window (Communication?recipient=...&status=in-progress,completed&_sort=-sent&_count=1)
Control0..1
TypedateTime
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
6. conversational-state.currentQuestion
Definition

The linkId of the next question to ask (derived from QR.item structure + Questionnaire navigation)

ShortThe linkId of the next question to ask (derived from QR.item structure + Questionnaire navigation)
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
8. conversational-state.conversationState
Definition

in-progress | completed (derived from QR.status)

Shortin-progress | completed (derived from QR.status)
Control0..1
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
10. conversational-state.lastActivity
Definition

Last activity timestamp for the CR (derived from Communications + extensions)

ShortLast activity timestamp for the CR (derived from Communications + extensions)
Control0..1
TypedateTime
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
12. conversational-state.activeCR
Definition

The active CR this message should attach to (CommunicationRequest?recipient=...&status=active)

ShortThe active CR this message should attach to (CommunicationRequest?recipient=...&status=active)
Control0..1
TypeReference(CommunicationRequest)