2  Materials and Methods

2.1 Study Design and Setting

This retrospective observational study analyzed intradepartmental consultations conducted in a fully digital pathology laboratory operating across multiple hospital sites within a single hospital network. The study period encompassed all recorded consultations from the department’s digital consultation system. The reporting of this study follows the Strengthening the Reporting of Observational Studies in Epidemiology (STROBE) guidelines where applicable to operational research.

The laboratory operates a 100% whole slide imaging (WSI) workflow using Sectra Digital Pathology Module (DPMS) with Leica GT450 scanners — all primary diagnostic sign-outs and consultations are performed on digitized slides without a parallel glass-slide pathway. This purely digital ecosystem, free from the confounding influence of hybrid glass/digital workflows, generates comprehensive, timestamped event logs for every consultation action, providing a complete digital record of consultation activity.

The transition to digital pathology fundamentally reshapes the architecture of intradepartmental consultation. Traditional analog consultations were synchronous and proximity-based — a pathologist would physically carry glass slides to a colleague’s office, creating an ephemeral event often invisible to operational analytics unless it triggered a formal report amendment. In the fully digital environment, consultation becomes asynchronous and expertise-based: a request creates a digital status change that instantly moves the case from the requester’s worklist to the consultant’s queue, regardless of physical location. This decoupling of the pathologist from the physical laboratory enables subspecialty-optimized case routing and simultaneously generates the timestamped log data that forms the basis of this analysis.

This study focused exclusively on the operational and relational aspects of consultation — turnaround time, network topology, volume dynamics, and workload distribution. Diagnostic accuracy and concordance rates were not within the current scope, allowing focused examination of workflow efficiency and communication structure. This operational focus complements the existing literature on consultation concordance (Renshaw et al. 2002; Peck et al. 2018; Azam et al. 2021) and digital pathology validation (Hanna et al. 2020; Haghighi et al. 2021) by addressing the less-studied question of how consultation workflows function as systems.

2.2 Data Sources

The dataset was constructed by integrating three distinct data sources extracted from the laboratory information system (LIS), each serving as the authoritative source for specific variables. A process mining approach was employed to reconstruct the consultation lifecycle by threading together three core data entities: the case object (identified by accession number), the user object (pathologist identity and role), and the event object (timestamped actions and status changes). This multi-source triangulation approach, conceptually similar to the LIS-based tracking module described by Dunbar et al. (Dunbar et al. 2022) — which processed 3,049 intradepartmental consultations in its first year — was designed to enhance data validity by selecting the most reliable source for each variable.

2.2.1 Assignment Logs (Paylasilan Vakalar)

  • Primary source for: Asker (consulting pathologist) identity and organ/specimen type
  • Content: Official case assignment records documenting which pathologist initiated each consultation request
  • Rationale: Assignment logs represent the administrative record of case delegation and are considered the most authoritative source for identifying the requesting pathologist

2.2.2 Usage Logs (vaka_paylasildi)

  • Primary source for: Consultation start time
  • Content: System-generated event logs capturing the precise timestamp when a case was opened for consultation in the digital pathology viewer
  • Rationale: These logs capture automated system timestamps at the moment of case access, providing the most accurate record of consultation initiation — analogous to the “digital exhaust” described in process mining literature

2.2.3 Internal Consultation Reports (internal_consultation / Bölüm İçi)

  • Primary source for: Responder (consultant pathologist) identity, completion time, and consultation text content
  • Secondary source for: Asker identity and start time (used as fallback when assignment or usage logs are unavailable)
  • Content: Comprehensive clinical reports containing the consultation question, expert opinion, and final diagnosis
  • Rationale: These are the definitive clinical documents, containing the consultant’s response and the signed completion timestamp

2.2.4 Supplementary Data Sources

In addition to the three core consultation data sources, the study integrated the following:

  • Pathologist workload data: Monthly case volumes (biopsy sign-outs), employment periods, and leave records for each pathologist, enabling workload-adjusted analyses consistent with approaches described by Bonert et al. (Bonert et al. 2021, 2022) and Cheung et al. (Cheung et al. 2015)
  • Section-level case volumes: Monthly case counts by biopsy section (subspecialty workstation), enabling calculation of consultation rates as a proportion of total case volume, following the subspecialty-stratified approach of Parkash et al. (Parkash et al. 2018)
  • Pathologist metadata: Subspecialty designation, employment dates, and inclusion/exclusion criteria

2.3 Data Processing Pipeline

The data processing pipeline was implemented in R and follows a sequential five-step workflow. All code is version-controlled in a Git repository, and the complete analysis is embedded within a Quarto book to ensure full computational reproducibility.

2.3.1 Step 1: Preprocessing and Cleaning

  • Case ID standardization: Raw case identifiers were stripped of system-generated suffixes (e.g., ;..., [11]) to produce a canonical 12345-24 format (case number-year suffix), enabling consistent matching across the three data sources
  • Name normalization: All pathologist names underwent a two-stage normalization: (1) Unicode transliteration of Turkish characters (I with dot above to I, S-cedilla to S, C-cedilla to C, G-breve to G, U-diaeresis to U, O-diaeresis to O) followed by uppercase conversion, and (2) mapping to canonical names via a curated lookup table to resolve spelling variations, maiden/married name differences, and abbreviations
  • Timestamp parsing: Date-time fields were parsed from heterogeneous formats (Excel serial numbers, locale-specific date-time strings, and ISO 8601 formats) into standardized UTC POSIXct objects using multiple candidate format orders

2.3.2 Step 2: Source Integration and Priority Coalescence

The three data sources were merged on Case ID using a strict priority hierarchy to resolve conflicts:

Variable Priority 1 Priority 2 Priority 3
Asker Assignment logs Internal reports Usage logs
Start time Usage logs Internal reports
Responder Internal reports (sole source)
Completion time Internal reports (sole source)

Priority coalescence was implemented programmatically, with provenance tracking (source attribution flags) retained for data quality auditing. This approach resulted in fewer than 0.1% of records with missing asker attribution.

2.3.3 Step 3: Consultation Text Categorization

Free-text consultation questions and answers were classified into 13 pathology-relevant categories using a priority-ordered keyword matching system with bilingual (Turkish/English) regular expressions. Categories were defined in decreasing specificity to ensure that more specific diagnoses take precedence over general terms:

  1. Cytology/FNA
  2. Hematopathology
  3. Neuroendocrine
  4. Sarcoma/Mesenchymal
  5. Metastasis/Origin
  6. Dysplasia/Grade
  7. Staging/TNM
  8. Margin/Resection
  9. IHC/Biomarkers
  10. Inflammatory/Non-neoplastic
  11. Diagnosis/Tumor Type
  12. Second Opinion/Review
  13. Other (unmatched)

Each consultation received both a primary category (first match in priority order) and multi-label tags (all matching categories), enabling analysis of cases spanning multiple subspecialty domains. This automated approach complements the consultation reason taxonomy proposed in the literature — which distinguishes diagnostic uncertainty, quality assurance confirmation, sub-classification, reporting/wording, and discordance — by focusing on the content domain rather than the motivation for consultation. The categorization scheme reflects the subspecialty structure of contemporary surgical pathology practice (Parkash et al. 2018). It should be noted that keyword-based classification, while scalable, may misclassify cases with ambiguous or sparse text; validation against a manually annotated subset is in progress using a dedicated Shiny annotation interface (shiny_annotation/app.R).

2.3.4 Step 4: Deduplication and Filtering

The following exclusion criteria were applied sequentially:

  • Deduplication: Records were identified as unique based on the composite key Case_ID | Asker | Responder | Start_Time. Exact duplicates arising from overlapping data source coverage were removed
  • Self-consultation exclusion: Records where Asker and Responder were the same pathologist were excluded, as these typically represent self-notes, case updates, or system artifacts rather than genuine consultations
  • Excluded pathologists: Pathologists flagged in the metadata configuration (e.g., retired staff, test accounts) were removed from both the Asker and Responder roles
  • Negative TAT filter: Records where the completion timestamp preceded the start timestamp (suggesting data entry errors) were excluded
  • Incomplete records: Records with missing Responder fields (representing initiated but unaccepted consultation requests) were excluded from turnaround time analyses but documented separately as “consultations with no response”

The number of records excluded at each step is reported in the Data Quality chapter to ensure transparency in the filtering process.

2.3.5 Step 5: Enrichment and Derived Metrics

2.3.5.1 Turnaround Time Calculation

Turnaround time (TAT) was calculated as the elapsed duration between consultation initiation and completion:

\[\text{TAT} = \text{Completion\_Time} - \text{Start\_Time}\]

TAT was expressed in minutes, hours, and days for flexibility across analyses. Two distinct temporal perspectives are relevant for interpreting consultation responsiveness:

Metric Definition Significance
Gross TAT Total elapsed time (\(T_\text{completion} - T_\text{request}\)) Represents the delay experienced by the clinician and patient; used for external service-level reporting
Net Business TAT Elapsed time excluding nights, weekends, and holidays Represents internal workflow efficiency; accounts for the asynchronous work patterns of remote pathologists

In a remote digital department, pathologist availability is fluid rather than binary — a pathologist may sign out routine cases in the morning and review consultations in the evening. This asynchrony fundamentally alters the meaning of “business hours.” For example, a consultation requested at 4:55 PM on Friday and answered at 9:05 AM on Monday yields a gross TAT of approximately 64 hours but a net business TAT of only approximately 10 minutes. Gross (calendar) TAT was used as the primary metric in this study, consistent with the approach used in CAP Q-Probes studies (Volmar et al. 2015; Sharma et al. 2025), while the implications of this choice are discussed in the Limitations chapter. TAT benchmarks for surgical pathology specimens typically target 90% or greater completion within 2 business days for routine cases, with CAP Q-Probes data from 56 institutions showing a median TAT of 2.72 days (10th-90th percentile: 1.22-6.23 days) for complex specimens (Volmar et al. 2015).

Near-zero TAT imputation: Records with TAT less than 1 minute (suggesting simultaneous or pre-filled timestamps) underwent start-time imputation using the responder-specific median TAT from valid cases. This strategy preserves case-level information while correcting implausible timestamps. Imputed records were flagged for sensitivity analyses.

Extreme outlier exclusion: Records exceeding both the 99th percentile of the TAT distribution and a 30-day hard ceiling were excluded as likely representing administrative artifacts (e.g., cases reopened after extended periods) rather than active consultation workflows.

2.3.5.2 Repeat Consultation and Multi-Consultant Flagging

  • Repeat events: Within each Case ID-Asker-Responder triad, consultations were ordered chronologically and subsequent events were flagged as repeat events
  • Multi-consultant cases: Cases receiving responses from more than one distinct consultant were flagged as multi-consultant cases
  • Case-level TAT metrics: Both minimum TAT (time to first response) and overall TAT (time to final completion) were computed at the case level to capture different aspects of consultation efficiency

2.3.6 Anonymization and Privacy

All pathologist identifiers were anonymized prior to analysis. Canonical names were mapped to sequential codes (P1, P2, …, Pn) using a deterministic assignment based on order of appearance in the dataset. The anonymization lookup table is stored separately and is excluded from public outputs. All tables, figures, and statistical results in this report use anonymized identifiers exclusively. This approach follows recommended practices for protecting individual identities in quality improvement studies (Dunbar et al. 2022) while maintaining the ability to track patterns across analyses.

2.4 Statistical Analysis

2.4.1 Descriptive Statistics

Continuous variables (TAT, consultation volume) were summarized using median and interquartile range (IQR) given the typically right-skewed distribution of turnaround times. Categorical variables were reported as frequencies and percentages. Temporal trends were visualized using monthly aggregation with locally estimated scatterplot smoothing (LOESS).

2.4.2 Comparative Tests

Non-parametric tests were selected given the non-normal distribution of TAT data, as confirmed by Shapiro-Wilk testing:

  • Kruskal-Wallis test: Comparison of TAT distributions across responders, days of the week, and hours of the day
  • Dunn’s post-hoc test: Pairwise comparisons following significant Kruskal-Wallis results, with Benjamini-Hochberg correction for multiple testing
  • Adjusted Mann-Kendall trend test (trend-free prewhitening; monthly deseasonalization where appropriate): Assessment of monotonic temporal trends in consultation volume and TAT
  • Spearman rank correlation: Correlation between consultation volume and TAT, workload metrics, and other continuous variables

Effect sizes are reported alongside p-values where appropriate, as statistical significance in large datasets (n > 5,000) does not necessarily imply practical significance.

2.4.3 Network Analysis

Consultation patterns were modeled as a directed weighted network where nodes represent pathologists and edges represent Asker-to-Responder consultation flows, with edge weights proportional to consultation frequency. This social network analysis (SNA) approach characterizes the department’s intellectual structure through specific centrality metrics:

SNA Metric Operational Interpretation
In-degree centrality Identifies frequently sought experts — the department’s intellectual anchors
Out-degree centrality Identifies consultation seekers — may indicate generalists handling subspecialty material, junior pathologists, or cautious practitioners
Betweenness centrality Identifies bridging nodes connecting otherwise disjointed subspecialty clusters
Reciprocity Distinguishes collegial/peer relationships (bidirectional flow) from hierarchical/mentoring relationships (unidirectional)

Community detection algorithms were applied to identify subspecialty clusters within the consultation network. Published literature suggests that the transition from analog to digital workflows typically alters network topology: proximity-based clusters dissolve and are replaced by expertise-driven hub-and-spoke structures centered on key subspecialists (Goebel, Ettler, and Walsh 2018). A secondary objective of the network analysis was to identify potential network isolates – pathologists with low in-degree and low out-degree who may be effectively working outside the department’s quality assurance network. This approach follows methods used in physician referral network studies (Chong et al. 2019), and draws on the broader literature applying SNA to healthcare provider networks where directed, weighted graphs have been used to characterize hierarchical and functional structures of medical consultation networks (Biscione and Domingues da Silva 2024; Landon et al. 2012).

2.4.4 Quality Metrics

Process quality was assessed using statistical process control (SPC) methods, including Shewhart control charts for TAT monitoring and funnel plots for comparing pathologist-level performance (Spiegelhalter 2005; Westgard and Westgard 2016). Quality thresholds were defined as configurable constants: 24 hours (rapid response target), 48 hours (standard target), and 72 hours (extended target), with 168 hours (1 week) as an attention threshold. These thresholds were selected based on clinical relevance and institutional consensus rather than externally validated benchmarks, as no universally accepted TAT standards exist specifically for intradepartmental consultations.

2.4.5 Advanced Methods

The following advanced analytical methods were employed to address specific research questions:

  • Mixed-effects models: Hierarchical models with random intercepts for pathologist-level clustering were used to account for within-pathologist correlation in TAT data, recognizing that consultations handled by the same pathologist are not independent observations (Brown and Prescott 2021)
  • Association rule mining: Discovery of consultation pattern co-occurrences using the Apriori algorithm (Agrawal, Imieliński, and Swami 1993)
  • Change point detection: Identification of structural breaks in temporal consultation patterns using the PELT algorithm (Killick and Eckley 2014)
  • Predictive modeling: Cox proportional hazards and logistic regression models for TAT prediction, incorporating case complexity, consultation category, day of week, and responder identity as covariates

2.4.6 Software Environment

All analyses were conducted in R (version 4.x) with the following core packages: dplyr and tidyr for data manipulation, ggplot2 for visualization, lubridate for temporal data handling, igraph and tidygraph for network analysis, kableExtra for table formatting, and forecast for time series methods. Python (version 3.13) was used via reticulate for advanced time series analysis (aeon, sktime) and hypothesis generation (hypogenic). The complete analysis was implemented as a Quarto book, with all code, data processing steps, and outputs integrated into a single, version-controlled document. Session information including exact package versions is reported in the Reproducibility chapter.

2.5 Ethical Considerations

This study utilized retrospectively collected quality improvement data from routine laboratory operations. All pathologist identifiers were anonymized, and no patient-identifiable information was included in the consultation dataset (case IDs are laboratory accession numbers only). The study analyzed operational workflow patterns rather than individual diagnostic decisions, and results are reported at the aggregate level. The consultation text content was used solely for automated topic categorization and is not reproduced verbatim in outputs. As this study was based on de-identified operational quality improvement data and did not involve any patient-level clinical information, it falls under the category of quality improvement research and was conducted in accordance with institutional policies for such activities.