Architecture \ Patient Data Workflow - lundeen-bryan/EZLogger_SLN GitHub Wiki
Data Flow: Patient Info to Document Properties
This document describes how patient information is retrieved from the SQLite database and written into Word document custom properties within the EZLogger VSTO application.
Overview
The data flow is driven by event handlers or ribbon button clicks. The flow begins with retrieving data from the database using PatientDatabaseHandler
, and ends with writing that data into Word custom document properties using DocumentPropertyHelper
.
Step-by-Step Flow
- Patient Number Input: The user enters or selects a patient number.
- Data Retrieval:
PatientDatabaseHandler.GetPatientByNumber
is called, which queries the SQLite database (EZL table) to get patient information. A JOIN may include data from theEZL_IST
table, such asearly_ninety_day
. - Data Returned: A
PatientCls
object is returned (or a dictionary, depending on refactoring). - Property Writing: The returned data is passed to
DocumentPropertyHelper.WriteDataToDocProperties
, which writes each field as a custom document property.
Mermaid Diagram
flowchart TD
A[User Input: Patient Number] --> B[Call PatientDatabaseHandler.GetPatientByNumber]
B --> C[Query EZL and EZL_IST tables in SQLite]
C --> D["Return Patient Data eg, PatientCls"]
D --> E[Call DocumentPropertyHelper.WriteDataToDocProperties]
E --> F[Write Custom Document Properties in Word]
Example Tables Involved
EZL
: Core patient dataEZL_IST
: Report tracking, includingearly_ninety_day
Next Steps
- Refactor to support direct dictionaries or anonymous objects instead of PatientCls.
- Expand the data flow to include UI elements that consume document property data.
Document version: 2025-04-12