Synav commited on
Commit
30ed8d3
·
verified ·
1 Parent(s): 5aab057

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -4
app.py CHANGED
@@ -1496,6 +1496,15 @@ with tab_predict:
1496
  cat_cols = meta["schema"]["categorical"]
1497
 
1498
  TAB_MANAGED_FIELDS = set()
 
 
 
 
 
 
 
 
 
1499
 
1500
  # Clinical yes/no handled in Clinical tab
1501
  TAB_MANAGED_FIELDS.update([f for f in YESNO_FIELDS if f in feature_cols])
@@ -1507,7 +1516,7 @@ with tab_predict:
1507
  TAB_MANAGED_FIELDS.update([f for f in NGS_MARKERS if f in feature_cols])
1508
 
1509
  DROPDOWN_FIELDS = [f for f in DROPDOWN_FIELDS if f not in TAB_MANAGED_FIELDS]
1510
- YESNO_FIELDS = [f for f in YESNO_FIELDS if f not in TAB_MANAGED_FIELDS] # optional
1511
 
1512
  # Optional marker counts: handled automatically
1513
  if FISH_COUNT_COL in feature_cols:
@@ -1516,10 +1525,7 @@ with tab_predict:
1516
  TAB_MANAGED_FIELDS.add(NGS_COUNT_COL)
1517
 
1518
 
1519
- # Age + key dates are handled by DOB/Dx inputs, not generic UI
1520
 
1521
- if "Date of 1st CR" in feature_cols:
1522
- TAB_MANAGED_FIELDS.add("Date of 1st CR")
1523
 
1524
  # ---------------------------
1525
  # Inference Excel (optional) - store in session_state for dropdown options
 
1496
  cat_cols = meta["schema"]["categorical"]
1497
 
1498
  TAB_MANAGED_FIELDS = set()
1499
+
1500
+ # Derived/auto fields (managed by DOB/Dx/CR widgets)
1501
+ if AGE_FEATURE in feature_cols:
1502
+ TAB_MANAGED_FIELDS.add(AGE_FEATURE)
1503
+ if DX_DATE_FEATURE in feature_cols:
1504
+ TAB_MANAGED_FIELDS.add(DX_DATE_FEATURE)
1505
+ if "Date of 1st CR" in feature_cols:
1506
+ TAB_MANAGED_FIELDS.add("Date of 1st CR")
1507
+
1508
 
1509
  # Clinical yes/no handled in Clinical tab
1510
  TAB_MANAGED_FIELDS.update([f for f in YESNO_FIELDS if f in feature_cols])
 
1516
  TAB_MANAGED_FIELDS.update([f for f in NGS_MARKERS if f in feature_cols])
1517
 
1518
  DROPDOWN_FIELDS = [f for f in DROPDOWN_FIELDS if f not in TAB_MANAGED_FIELDS]
1519
+
1520
 
1521
  # Optional marker counts: handled automatically
1522
  if FISH_COUNT_COL in feature_cols:
 
1525
  TAB_MANAGED_FIELDS.add(NGS_COUNT_COL)
1526
 
1527
 
 
1528
 
 
 
1529
 
1530
  # ---------------------------
1531
  # Inference Excel (optional) - store in session_state for dropdown options