import sys; sys.path.insert(0,"/app")
from scripts.fix_lab_formatting import repair_units, tabulate_panels
S = ("Initial laboratory studies include the following: Complete blood cell count, within normal limits; "
     "Sodium, 139 mEq/L (139 mmol/L); Potassium, 3.5 mEq/L (3.5 mmol/L); "
     "White blood cell count, 3,500/µL (3.5 x 109/L); Hemoglobin, 13.5 g/dL (135 g/L); "
     "Chloride, 105 inEq/L (105 mrnol/L); Phosphorus, 1.8 mg/dL (0.58 mmol/dL). "
     "Of the following, you are MOST likely to recommend")
t, fired = repair_units(S)
print("FIRED:", fired)
print(t)
print("---- table ----")
out, n = tabulate_panels(t)
print("panels:", n)
print(out)
print("---- idempotent ----")
out2, n2 = tabulate_panels(out)
print("second pass panels:", n2, "same:", out2 == out)
