You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: PW44_2026_GranCanaria/Projects/CastAStandardForRealTimeFrontEndIntegrationOfHealthcareApplication/README.md
3. Add a Cast client to slicer with a [AI prompt that generates the client service](https://github.com/mbellehumeur/cast/blob/main/cast-hub-ai-prompt).
@@ -155,10 +164,7 @@ Cast serves as an umbrella standard that encompasses specialized "Cast" variants
155
164
-**FHIRCast**: Specialized for FHIR resource context management and synchronization
156
165
-**DICOMCast**: Specialized for DICOM data exchange and imaging workflow synchronization
157
166
-**NAVICast**: Specialized for surgical navigation and real-time guidance systems
158
-
-**Other Variants**: The Cast framework is extensible, allowing for domain-specific variants such as:
159
-
- LabCast (laboratory workflows)
160
-
- PharmCast (pharmacy workflows)
161
-
- Any other specialized Cast implementation
167
+
-**Other Variants**: The Cast framework is extensible, allowing for domain-specific variants.
162
168
163
169
All Cast variants share the same core hub-based architecture, protocol, and infrastructure, but define specialized event types and payloads for their specific domains. This allows applications to participate in multiple Cast variants simultaneously, enabling comprehensive workflow integration across different healthcare domains.
164
170
@@ -281,277 +287,6 @@ This architecture enables flexible integration scenarios, such as:
281
287
282
288
---
283
289
284
-
## Core Concepts
285
-
286
-
### Events
287
-
288
-
**Events** are notifications that represent any occurrence of interest in a healthcare application. Events have:
289
-
290
-
-**Event Type**: A string identifier (e.g., `patient-open`, `imagingStudy-open`, `navi-pointer-updated`)
291
-
-**Timestamp**: When the event occurred
292
-
-**Source**: The application that generated the event
293
-
-**Payload**: Event-specific data (format varies by event type and use case)
294
-
295
-
Events can represent:
296
-
- User interactions (clicks, keyboard input, navigation)
297
-
- Data changes (patient records, imaging studies, documents)
298
-
- Workflow events (task assignments, status updates)
299
-
- System events (errors, notifications, state changes)
300
-
- Custom domain-specific events
301
-
302
-
### Sessions
303
-
304
-
A **Session** represents a logical grouping of applications and users working together. All applications in a session can publish and subscribe to events within that session.
305
-
306
-
Sessions enable **collaborative multi-user workflows** where the Cast Hub groups multiple users together, allowing them to share events and synchronize their applications in real-time. For example, in a tumor review board meeting, multiple radiologists and clinicians can join the same session, and when one participant navigates to a specific DICOM study or makes a measurement, all other participants' viewers are automatically synchronized to the same view and measurement.
307
-
308
-
Sessions can be:
309
-
-**Single-user sessions**: One user with multiple applications
310
-
-**Multi-user sessions**: Multiple users collaborating together, with the hub coordinating event distribution to all participants
311
-
312
-
### Subscriptions
313
-
314
-
A **Subscription** is a request from an application to receive notifications for specific event types. Subscriptions include:
315
-
316
-
-**Event Types**: Which events the application wants to receive
317
-
-**Callback URL**: Where to send notifications (for HTTP-based subscriptions)
318
-
-**Authentication**: Credentials for secure communication
319
-
320
-
---
321
-
322
-
## Protocol Specification
323
-
324
-
### Transport
325
-
326
-
Cast supports multiple transport mechanisms:
327
-
328
-
-**WebSockets**: For real-time, bidirectional communication (recommended). Unlike FHIRcast, Cast fully supports bi-directional WebSocket connections, enabling low-latency "gaming style" interactions where applications can publish and receive events simultaneously with minimal overhead. This is essential for use cases requiring immediate feedback, such as collaborative viewing, synchronized navigation, and interactive workflows.
329
-
-**HTTP/HTTPS**: For RESTful API interactions
330
-
-**Server-Sent Events (SSE)**: For unidirectional event streaming
Cast's WebSocket protocol supports **full bi-directional communication**, enabling applications to both publish and receive events over the same connection. This is a key differentiator from FHIRcast, which does not support bi-directional WebSockets. The bi-directional capability enables low-latency "gaming style" interactions where events can be exchanged with minimal delay, supporting real-time collaborative workflows.
398
-
399
-
For WebSocket connections, the protocol uses JSON messages:
400
-
401
-
**Subscribe Message:**
402
-
```json
403
-
{
404
-
"action": "subscribe",
405
-
"eventTypes": ["patient-open", "study-view"],
406
-
"sessionId": "session-12345"
407
-
}
408
-
```
409
-
410
-
**Publish Event Message (Client to Hub):**
411
-
```json
412
-
{
413
-
"action": "publish",
414
-
"eventType": "patient-open",
415
-
"timestamp": "2024-01-15T10:30:00Z",
416
-
"source": "ehr-system",
417
-
"sessionId": "session-12345",
418
-
"payload": {
419
-
"patientId": "pat-001",
420
-
"patientName": "John Doe"
421
-
}
422
-
}
423
-
```
424
-
425
-
**Event Notification Message (Hub to Client):**
426
-
```json
427
-
{
428
-
"eventType": "patient-open",
429
-
"timestamp": "2024-01-15T10:30:00Z",
430
-
"source": "ehr-system",
431
-
"sessionId": "session-12345",
432
-
"payload": {
433
-
"patientId": "pat-001",
434
-
"patientName": "John Doe"
435
-
}
436
-
}
437
-
```
438
-
439
-
Applications can simultaneously send events to the hub and receive events from other applications over the same WebSocket connection, enabling true real-time bidirectional communication with minimal latency.
440
-
441
-
---
442
-
443
-
## Event Types
444
-
445
-
Cast defines a set of standard event types, but also supports custom event types for extensibility. Unlike FHIRcast, which focuses on FHIR context events, Cast supports any type of event including user interactions, data exchanges, and workflow events.
446
-
447
-
### Standard Event Types
448
-
449
-
#### User Interaction Events
450
-
451
-
-**`user-click`**: A user clicked on an element
452
-
-**`user-navigate`**: A user navigated to a different view or page
453
-
-**`user-input`**: A user entered data in a form or field
454
-
-**`ui-state-change`**: The UI state changed (e.g., panel opened/closed, tab switched)
455
-
456
-
**Payload Example:**
457
-
```json
458
-
{
459
-
"elementId": "patient-search-button",
460
-
"elementType": "button",
461
-
"coordinates": {"x": 150, "y": 200},
462
-
"timestamp": "2024-01-15T10:30:00Z"
463
-
}
464
-
```
465
-
466
-
#### Patient Events
467
-
The exiuting FHIRcast events are:
468
-
-**`patient-open`**: A patient record has been opened
469
-
-**`patient-close`**: A patient record has been closed
470
-
471
-
472
-
**Payload Example:**
473
-
```json
474
-
{
475
-
"patientId": "pat-001",
476
-
"patientName": "John Doe",
477
-
"dateOfBirth": "1980-01-15",
478
-
"mrn": "MRN-12345",
479
-
"identifiers": [
480
-
{
481
-
"system": "http://hospital.example.com/mrn",
482
-
"value": "MRN-12345"
483
-
}
484
-
]
485
-
}
486
-
```
487
-
488
-
### Custom Event Types
489
-
490
-
Applications can define custom event types using the format:
491
-
492
-
```
493
-
{domain}:{event-name}
494
-
```
495
-
496
-
Examples:
497
-
```
498
-
radiology:worklist-update
499
-
pharmacy:medication-review
500
-
user:mouse-move
501
-
workflow:task-completed
502
-
dicom:image-annotation-added
503
-
```
504
-
505
-
The Cast Hub will attempt to provide data in the preferred format, falling back to available formats if necessary.
506
-
507
-
---
508
-
509
-
## Security
510
-
511
-
Security is paramount in healthcare applications. Cast implements multiple security measures to protect Protected Health Information (PHI).
512
-
513
-
### Authentication
514
-
515
-
Cast authentication:
516
-
517
-
1. Applications authenticate with the enterprise authentication server
518
-
2. Access tokens are required for all API calls
519
-
3. Tokens are validated on each request
520
-
4. Token refresh mechanisms are supported
521
-
522
-
### Authorization
523
-
524
-
Authorization is enforced at multiple levels:
525
-
526
-
-**Subscription Authorization**: Only authorized applications can subscribe to events
527
-
-**Event Authorization**: Applications can only publish events they are authorized to publish
528
-
529
-
### Transport Security
530
-
531
-
All communications must use:
532
-
533
-
-**HTTPS**: For HTTP-based communications (TLS 1.2 or higher)
534
-
-**WSS**: For WebSocket connections (WebSocket Secure)
535
-
-**Certificate Validation**: Proper certificate validation must be implemented
536
-
537
-
### Data Protection
538
-
539
-
-**Encryption in Transit**: All data is encrypted during transmission
540
-
-**Encryption at Rest**: Cast Hub implementations should encrypt stored data
541
-
-**Audit Logging**: All events and access attempts should be logged
542
-
-**PHI Minimization**: Only necessary data should be included in events
543
-
544
-
### Compliance
545
-
546
-
Cast implementations should comply with:
547
-
548
-
-**HIPAA**: Health Insurance Portability and Accountability Act
549
-
-**HITECH**: Health Information Technology for Economic and Clinical Health Act
550
-
-**GDPR**: General Data Protection Regulation (where applicable)
551
-
-**Local Regulations**: Applicable regional healthcare data protection laws
0 commit comments