Ga naar inhoud

Form Graphic

Synopsis

  • modal Dialog to show a chart with probabilities.
  • This is a bootstrap modal form.

Url/Route

None, modal form.

Data types

Type
  TSerieData = record
    Diagnose: string;
    data: Array[1..11] of Double;
  end;
  TChartSeries = record
    Series : Array[1..6] of TSerieData;
    xlabels: Array[1..11] of string;
  end;
2 parameters * selectedSymptoms Array of selected symptoms (sintomis) * Probabilities Array of TProbability.

GUI

  • Chart with 6 line series.
  • Button to close.
  • Y axis labels: -4: '-4/0.01%' -3: '-3/0.1%' -2: '-2/1%' -1: '-1/10%' 0: '0/50%' 1: '1/90%' 2: '2/99%' 3: '3/99.9%'
  • initialize 6 series.
  • on show:
    • Execute action CreateSeries to create the data.
    • Show up to SeriesCount series in chart.
    • X axis labels from xlabels[1..N].

CreateSeries

Construct series: * let symcount equal the (number of records in selectedsymptoms)+1 * Get the last 6 TProbability records from probabilities where Prob[SymCount+1]>-3 , ordered by Prob[SymCount+1]. * Let SeriesCount be the number of available series (6 or less if there were less records in the previous step) Each TProbability record forms a series: * data[1..11] is filled with the last 11 probabilities from Probabilities Prob[SymCount-10]..Prob[SymCount+1] (if symcount<=10, only use Prob[1]..Prob[symcount+1]) * xLabel[N]:=SymCount-10+N (or 1..symcount+1 if symcount<10)