Skip to content

Commit 69e19ab

Browse files
mbellehumeursjh26
authored andcommitted
Enhance README with images and event details
Updated README.md to include additional images and refine event descriptions.
1 parent 25e73b7 commit 69e19ab

File tree

1 file changed

+15
-280
lines changed
  • PW44_2026_GranCanaria/Projects/CastAStandardForRealTimeFrontEndIntegrationOfHealthcareApplication

1 file changed

+15
-280
lines changed

PW44_2026_GranCanaria/Projects/CastAStandardForRealTimeFrontEndIntegrationOfHealthcareApplication/README.md

Lines changed: 15 additions & 280 deletions
Original file line numberDiff line numberDiff line change
@@ -47,23 +47,32 @@ Standardize Real-Time Front-End Integration of Healthcare Application
4747
1. Add Cast hub API to Slicer Web Server with a [AI prompt that generates the hub](https://github.com/mbellehumeur/cast/blob/main/cast-hub-ai-prompt).
4848

4949

50-
<img width="273" height="208" alt="image" src="https://github.com/user-attachments/assets/9b4eff43-739f-4785-8ce1-3c0c1c3a8a53" />
50+
<img width="273" height="208" alt="image" src="https://github.com/user-attachments/assets/9b4eff43-739f-4785-8ce1-3c0c1c3a8a53" />
5151

52-
<img width="800" height="600" alt="image" src="https://github.com/user-attachments/assets/fdccb08e-754d-4c26-902d-9fa34e3a48f9" />
52+
<img width="800" height="600" alt="image" src="https://github.com/user-attachments/assets/fdccb08e-754d-4c26-902d-9fa34e3a48f9" />
5353

5454
<img width="800" height="600" alt="image" src="https://github.com/user-attachments/assets/e9f47e26-48c8-4fd5-9815-c7abdffc6ca9" />
5555

5656

5757

58-
5958
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).
60-
<img width="800" height="600" alt="image" src="https://github.com/user-attachments/assets/22d11b1b-43fa-48ea-811f-8ac1a00899ac" />
59+
<img width="618" height="317" alt="image" src="https://github.com/user-attachments/assets/e70ff9da-32c3-453c-981f-f9d9638a0b09" />
60+
61+
<img width="592" height="516" alt="image" src="https://github.com/user-attachments/assets/cc3eaa71-96a8-4e32-b34b-76731e14f55a" />
62+
63+
64+
6165

6266
4. Implement events:
6367
* patient-open/close
6468
* imagingstudy-open/close
6569
* annotation-update (measurements,markups,...)
66-
70+
71+
One user drving three applications:
72+
73+
74+
75+
6776
Three users working on the same annotation:
6877

6978
<iframe width="800" height="400" src="https://youtube.com/embed/O-M0Y9JHcoQ" >
@@ -155,10 +164,7 @@ Cast serves as an umbrella standard that encompasses specialized "Cast" variants
155164
- **FHIRCast**: Specialized for FHIR resource context management and synchronization
156165
- **DICOMCast**: Specialized for DICOM data exchange and imaging workflow synchronization
157166
- **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.
162168

163169
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.
164170

@@ -281,277 +287,6 @@ This architecture enables flexible integration scenarios, such as:
281287

282288
---
283289

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
331-
332-
### Base URL Structure
333-
334-
```
335-
https://{hub-host}/cast/{version}/
336-
```
337-
338-
Example:
339-
```
340-
https://cast.example.com/cast/v1/
341-
```
342-
343-
### API Endpoints
344-
345-
#### Subscribe to Events
346-
347-
```
348-
POST /cast/v1/subscribe
349-
```
350-
351-
**Request Body:**
352-
```json
353-
{
354-
"eventTypes": ["patient-open", "study-view"],
355-
"callbackUrl": "https://app.example.com/cast/callback",
356-
"sessionId": "session-12345"
357-
}
358-
```
359-
360-
**Response:**
361-
```json
362-
{
363-
"subscriptionId": "sub-67890",
364-
"expires": "2024-12-31T23:59:59Z"
365-
}
366-
```
367-
368-
#### Unsubscribe from Events
369-
370-
```
371-
DELETE /cast/v1/subscribe/{subscriptionId}
372-
```
373-
374-
#### Publish Event
375-
376-
```
377-
POST /cast/v1/event
378-
```
379-
380-
**Request Body:**
381-
```json
382-
{
383-
"eventType": "patient-open",
384-
"timestamp": "2024-01-15T10:30:00Z",
385-
"source": "ehr-system",
386-
"sessionId": "session-12345",
387-
"payload": {
388-
"patientId": "pat-001",
389-
"patientName": "John Doe",
390-
"mrn": "MRN-12345"
391-
}
392-
}
393-
```
394-
395-
### WebSocket Protocol
396-
397-
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
552-
553-
---
554-
555290
## References
556291

557292
### Related Standards

0 commit comments

Comments
 (0)