89 lines
2.9 KiB
TypeScript
89 lines
2.9 KiB
TypeScript
/** The colours of CaCu's charts, by category. A colour names a category (never a position in a
|
|
* report, never a threshold), so the same category looks the same on every card; neutral greys
|
|
* are for what is absent or not classified. They live here, not in the shared palette, so that no
|
|
* other domain (CaMa, TEA) takes them. */
|
|
|
|
/** Not classified, or no data. */
|
|
export const NEUTRAL = '#C9CDD2';
|
|
/** Not classified, a little darker: what a report names but a card does not. */
|
|
export const NEUTRAL_DARK = '#9AA3AB';
|
|
|
|
/** The steel tones of the groups that are not results: rounds, ages, follow-up status. */
|
|
export const STEEL = '#5F7F9A';
|
|
export const STEEL_MID = '#8FA7BB';
|
|
export const STEEL_LIGHT = '#B5C5D3';
|
|
|
|
/** Cytology by Bethesda category. */
|
|
export const CYTOLOGY_COLORS: Record<string, string> = {
|
|
NILM: '#408651',
|
|
'ASC-US': '#2778B8',
|
|
LSIL: '#B19525',
|
|
'ASC-H': '#7955B1',
|
|
HSIL: '#CE4778',
|
|
CIS: '#AA394D',
|
|
no_data: NEUTRAL,
|
|
};
|
|
|
|
/** HPV by genotype; `positive` (any high-risk type) is the colour of "positive other". */
|
|
export const HPV_COLORS: Record<string, string> = {
|
|
negative: '#42A77E',
|
|
positive_16: '#DF8640',
|
|
positive_18: '#C29C42',
|
|
positive_16_18: '#C24269',
|
|
positive_other: '#A8C243',
|
|
positive_incomplete: '#9C42C2',
|
|
inconsistent: '#687786',
|
|
positive: '#A8C243',
|
|
hpv_16: '#DF8640',
|
|
hpv_18: '#C29C42',
|
|
no_data: NEUTRAL,
|
|
};
|
|
|
|
/** Biopsy by the grade it states; the levels of a PPV (that grade or worse) take its colour. */
|
|
export const BIOPSY_COLORS: Record<string, string> = {
|
|
normal: '#408651',
|
|
LSIL: '#B19525',
|
|
HSIL: '#CE4778',
|
|
CIS: '#AA394D',
|
|
carcinoma: '#8D4C79',
|
|
cin1_plus: '#B19525',
|
|
cin2_plus: '#CE4778',
|
|
no_data: NEUTRAL,
|
|
};
|
|
|
|
/** What became of the biopsy requests: high grade is the colour of LIEAG, the rest steel. */
|
|
export const REQUEST_COLORS: Record<string, string> = {
|
|
high_grade: '#CE4778',
|
|
below_high_grade: STEEL_MID,
|
|
pending: NEUTRAL,
|
|
no_grade: NEUTRAL_DARK,
|
|
};
|
|
|
|
/** Detection round: steel tones; "Sin dato" is neutral. */
|
|
export const ROUND_COLORS: Record<string, string> = {
|
|
initial: STEEL,
|
|
subsequent: STEEL_MID,
|
|
no_data: NEUTRAL,
|
|
};
|
|
|
|
/** Referral PPV groups: cytology and histology levels by the colour of their category, HPV by
|
|
* genotype. */
|
|
export const PPV_CYTOLOGY_COLORS: Record<string, string> = {
|
|
ascus_plus: CYTOLOGY_COLORS['ASC-US'],
|
|
lsil_plus: CYTOLOGY_COLORS['LSIL'],
|
|
hsil_plus: CYTOLOGY_COLORS['HSIL'],
|
|
no_data: NEUTRAL,
|
|
};
|
|
export const PPV_LEVEL_COLORS: Record<string, string> = {
|
|
cin1_plus: BIOPSY_COLORS['LSIL'],
|
|
cin2_plus: BIOPSY_COLORS['HSIL'],
|
|
carcinoma: BIOPSY_COLORS['carcinoma'],
|
|
};
|
|
|
|
/** The whole of a PPV card as a donut: the colours of its two parts. */
|
|
export const PPV_DONUT: Record<string, string> = { numerator: '#6A8000', rest: NEUTRAL };
|
|
|
|
/** Median bars of the screening route, and the marks of their quartiles. */
|
|
export const DURATION = '#42A77E';
|
|
export const QUARTILE = '#17324D';
|