MOSAIQ: Quality Assurance report for Medical Data

Hello KNIME-rs again,

Forgive me, I am trying to learn Report Writer (BIRT)! I have no JavaScript experience at all, so simple is hard. The reason is to start to try to build quality assurance report for medical data.

I have a field called Diag_Addendum in the MEDICAL table which holds the diagnosis details. The MOSAIQ GUI software writes two sets of values into this field routinely, but it will also accept manual entries.

For breast cancer it writes in something with the format “ER+ PR+ HER2+” (the variability comes with the substitution of +, - or ? as required)., and for prostate cancer it writes in something with the format “Gleason 3+3= 6” (the variability comes with the substitution of 3, 4, 5 or ? as required).

In my report, I wish to build a highlight that will change the colour of the font and background when the value present is not something that starts with “ER”, “Gl” or is blank (it’s not a null field).

As the condition has three values, I have to resort to a JavaScript formula. I have tried many combinations and used ChatGPT to get assistance, but while these expressions are not errored, the highlighting is not correct. Here is the Highlight screen, and further down is some representative data with expected actions.

Diag_Addendum Value Action Expected
6 highlight
637 highlight
Gleason 4+5= 9
Ki67>20% highlight
7 highlight
7 highlight
7 highlight
Gleason 3+4= 7
Gleason 3+4= 7
7 highlight
empty field
9 highlight
empty field
9 highlight
CA 19.9 highlight
Ca19.9 700 highlight
CEA/Ca19.9/PSA:-ve highlight
ER+ PgR+ Her2
ER+ PgR+ Her2-
Gleason 3+4= 7
Gleason 4+3= 7

Once again, thanks for the help, I have come to value your contributions and found the posts always calm and respectful.