Skip to content

Conversation

@mickohanlon23
Copy link
Collaborator

Module Describing Clinical Treatment of Diffuse Large B-Cell Lymphoma.
Starts from initial, and covers DLBCL symptoms, diagnosis, staging, and treatment. Chance of survival is assigned based upon diagnosed cancer stage, and alligns with 5-year DLBCL survival rates, as reported by NCI SEER. Module aligns with mCODE data elements where possible.

Primary sources for information gathering:

  1. NCI SEER: https://seer.cancer.gov/statfacts/html/dlbcl.html
  2. Lymphoma Research Foundation: https://lymphoma.org/
  3. American Cancer Society: https://www.cancer.org/cancer/non-hodgkin-lymphoma/
  4. Official Journal of the National Comprehensive Cancer Network: https://jnccn.org/
  5. Conversation with Dr. William A. Wood, UNC hematologist and oncologist with a clinical focus in blood cancers
  6. Conversation with Dr. Miguel-Angel Perales, MSKCC Chief, Adult Bone Marrow Transplant Service

The primary author of this module is Jenn Holmes ([email protected]).

mickohanlon23 and others added 30 commits September 1, 2020 15:38
…rders, adding medication ends, fixing condition status display codes
@awatson1978
Copy link
Collaborator

1. Dual Treatment Outcome Logic (Design Question)

In dlbcl_stage_i_ii_treatment_round_one.json:

The module sets Treatment_1_Outcome twice:

After immediate treatment response (90% remission, 10% worsened)

  • End PET-CT Scan Encounter → Patient is in remission after treatment → Set Remission Outcome
  • Sets Treatment_1_Outcome = "Remission"

After long-term follow-up (months later)

  • Check-ups → Check-Up → Blood tests → Patient stays in remission/Patient relapses
  • Remission or Worsened states set Treatment_1_Outcome again

This overwrites the first outcome. The main module expects Treatment_1_Outcome to determine the flow, but it will only see the final value.

Questions:

Is this intentional (modeling late relapse)?
Should there be separate attributes (Treatment_1_Immediate vs Treatment_1_Final)?
Should we remove the dual setting?

2. Potential Logic Issue in Blood Tests

The complex_transition in Blood tests depends on DLBCL_Survival:

  • If DLBCL_Survival = "No" → 100% relapse
  • If DLBCL_Survival = "Yes" → 60% remission, 40% relapse

This seems backwards medically: patients with better survival prognosis should have lower relapse rates, not 40% relapse.

@awatson1978
Copy link
Collaborator

The Stage III/IV treatment module now properly models:

✅ Initial encounter and treatment selection
✅ R-CHOP medication cycles with proper start/stop
✅ Interim restaging after 2-4 cycles
✅ Treatment continuation decisions
✅ Final restaging and outcome assessment
✅ Long-term follow-up with relapse monitoring
✅ Clinical trial pathway for 10% of patients

Major Issues Resolved

✅ Clinical trial connection fixed - "Clinical Trial" now properly transitions to "Length of clinical trial"
✅ Blood test logic corrected - Good prognosis patients now have 70% remission / 30% relapse (medically realistic)
✅ Clean state flow - All encounters properly managed
✅ No duplicate states - All state names are unique
✅ No dead code - All states are reachable

Medical Accuracy

  • Stage-appropriate treatment intensity - 6-8 cycles for advanced disease vs 3-6 for early stage
  • Realistic clinical trial enrollment - 10% for high-stage patients
  • Proper interim restaging - PET-CT after 2-4 cycles for treatment modification
  • Appropriate outcome distributions - 90% initial response, then risk-stratified long-term outcomes

Technical Review

  • Proper encounter management - All encounters opened and closed correctly
  • Consistent attribute setting - Treatment_1_Outcome set appropriately
  • Clean transitions - No orphaned or unreachable states
  • Proper reason codes - All encounters reference "DLBCL_Condition"

Clinical Pathway Modeling

  • Realistic treatment flow - Matches NCCN guidelines for advanced DLBCL
  • Risk-stratified outcomes - Uses DLBCL_Survival for appropriate prognostic stratification
  • Proper medication management - R-CHOP started and stopped correctly
  • Long-term follow-up - Models late relapse patterns accurately

@awatson1978
Copy link
Collaborator

The Stage I/II treatment module now properly models:

✅ Blood test logic corrected - Good prognosis patients now have 80% remission / 20% relapse (even better than Stage III/IV's 70/30, which is medically appropriate for early-stage disease)
✅ Missing encounter reason added - Check-Up now properly references "DLBCL_Condition"
✅ Clean state flow - All encounters properly managed
✅ Proper encounter management - All encounters opened and closed correctly

@awatson1978
Copy link
Collaborator

awatson1978 commented Jun 11, 2025

Round Two Treatments

🔴 Distribution Validation Failures

"Patients_with_intention_to_proceed_to_transplant":

  • Distributions sum to 1.005 (100.5%) instead of 1.0 (100%)
  • R-DHAP: 0.25, R-ESHAP: 0.05, R-GDP: 0.095, R-GemOx: 0.2, R-ICE: 0.4, R-MINE: 0.005
  • Fix: Adjust R-GDP to 0.090 to achieve exactly 1.0

🔴 Invalid Clinical Codes

"Check-Up After Second Line Treatment":

  • Uses SNOMED code "1234" which is not a valid clinical code
  • Display: "Encounter for check up (procedure)"
  • Fix: Replace with valid SNOMED code (e.g., 410620009 for "Well child visit")

🔴 Duplicate State Definition

"PET-CT_Scan" appears twice in the module:

  • Once with direct_transition to "Delay after Second-Line Treatment"
  • Once with direct_transition to "End PET-CT Scan Encounter"
  • Fix: Remove duplicate and ensure single, correct definition

Moderate Issues
🟡 State Flow Issues

  1. Unreachable States: Several states appear unreachable due to flow logic:
  • "Wait for PET-CT Scan"
  • "Encounter for PET-CT Scan"
  • "End PET-CT Scan Encounter"
  1. Missing Encounter Ends: Some encounter states may be missing proper EncounterEnd states

🟡 Clinical Logic Concerns

  1. Complex Transition Logic: The "Blood Tests" state has complex conditional logic based on "DLBCL_Survival" attribute that may not be properly set in all cases
  2. Inconsistent Categorization: Observation states use different categories:
  • "Patient Relapses": category "vital-signs"
  • "Second-Line Therapy Shown to be Effective": category "laboratory"
  • "Second-Line Treatment Halted Spread of Disease": category "procedure"
  • Recommendation: Standardize to "survey" or "procedure" for treatment responses

@awatson1978
Copy link
Collaborator

dlbcl_treatment_round_two

✅ Probability Distribution: Fixed - all distributions sum to exactly 1.0
✅ Encounter Classes: Fixed - all consistent as "ambulatory"
✅ SNOMED-CT Code: Fixed - now uses valid "185349003"
✅ Typos: Fixed - "Ineffective" spelling corrected
✅ Spacing: Fixed - proper spacing in state names

@awatson1978
Copy link
Collaborator

New bug found: All of the dlbcl files rely on SNOMED code 271299001: "Patient's condition worsened (finding)"

Apostrophe was blowing up the .github/workflows/ci-build-test.yml / Java 11 (pull_request) CI runner, so added a new method to handles apostrophes properly.

private String escapeFieldNameForJsonPath(String fieldName) {
    // If field name contains single quotes, use double quotes
    if (fieldName.contains("'")) {
        return "\"" + fieldName.replace("\"", "\\\"") + "\"";
    } else {
        return "'" + fieldName + "'";
    }
}

@codecov
Copy link

codecov bot commented Jun 12, 2025

Codecov Report

Attention: Patch coverage is 71.50854% with 1018 lines in your changes missing coverage. Please review.

Project coverage is 77%. Comparing base (05d2a08) to head (95f4189).
Report is 1646 commits behind head on master.

Files with missing lines Patch % Lines
...a/org/mitre/synthea/export/flexporter/Actions.java 73% 64 Missing and 44 partials ⚠️
src/main/java/RunFlexporter.java 0% 90 Missing ⚠️
...c/main/java/org/mitre/synthea/export/Exporter.java 51% 67 Missing and 21 partials ⚠️
src/main/java/App.java 0% 83 Missing ⚠️
...ain/java/org/mitre/synthea/export/CSVExporter.java 84% 43 Missing and 37 partials ⚠️
src/main/java/org/mitre/synthea/engine/State.java 80% 35 Missing and 36 partials ⚠️
.../mitre/synthea/export/flexporter/FieldWrapper.java 62% 43 Missing and 27 partials ⚠️
...ava/org/mitre/synthea/export/MetadataExporter.java 0% 66 Missing ⚠️
src/main/java/Graphviz.java 0% 54 Missing ⚠️
...a/org/mitre/synthea/export/rif/BB2RIFExporter.java 74% 45 Missing and 8 partials ⚠️
... and 25 more
Additional details and impacted files
@@            Coverage Diff             @@
##             master   #1356     +/-   ##
==========================================
- Coverage        81%     77%     -4%     
- Complexity     2687    4017   +1330     
==========================================
  Files           101     178     +77     
  Lines         16847   25210   +8363     
  Branches       2323    3601   +1278     
==========================================
+ Hits          13684   19543   +5859     
- Misses         2453    4526   +2073     
- Partials        710    1141    +431     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@awatson1978 awatson1978 marked this pull request as ready for review June 12, 2025 02:04
@awatson1978 awatson1978 requested review from dehall, eedrummer and jawalonoski and removed request for jawalonoski June 12, 2025 02:04
@awatson1978
Copy link
Collaborator

Screenshot 2025-06-11 at 7 32 39 PM Screenshot 2025-06-11 at 7 32 10 PM Screenshot 2025-06-11 at 7 31 32 PM Screenshot 2025-06-11 at 7 31 06 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.