refactoring
This commit is contained in:
@@ -14,7 +14,8 @@ class AdverseReactionReportsChartView {
|
|||||||
this.#chart = new Chart(
|
this.#chart = new Chart(
|
||||||
this.#canvas,
|
this.#canvas,
|
||||||
{
|
{
|
||||||
type: 'doughnut',
|
// FK-TODO: use a Polar Area Chart ('polarArea') or bar chart
|
||||||
|
type: 'bar',
|
||||||
data: this.#getData(ADRDescr),
|
data: this.#getData(ADRDescr),
|
||||||
options: this.#getOptions()
|
options: this.#getOptions()
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
class BatchCodeSelectInitializer {
|
class BatchCodeSelectInitializer {
|
||||||
|
|
||||||
static initialize({batchCodeSelect, batchCodeDetails}) {
|
static initialize({batchCodeSelectElement, batchCodeDetailsElement}) {
|
||||||
batchCodeSelect.select2({ minimumInputLength: 4 });
|
batchCodeSelectElement.select2({ minimumInputLength: 4 });
|
||||||
batchCodeSelect.on(
|
batchCodeSelectElement.on(
|
||||||
'select2:select',
|
'select2:select',
|
||||||
function (event) {
|
function (event) {
|
||||||
const batchcode = event.params.data.id;
|
const batchcode = event.params.data.id;
|
||||||
new HistogramView(batchCodeDetails).displayHistogramView(batchcode);
|
new HistogramView(batchCodeDetailsElement).displayHistogramView(batchcode);
|
||||||
GoogleAnalytics.click_batchcode(batchcode);
|
GoogleAnalytics.click_batchcode(batchcode);
|
||||||
});
|
});
|
||||||
batchCodeSelect.select2('open');
|
batchCodeSelectElement.select2('open');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// FK-TODO: rename to BatchCodeDetailsView
|
||||||
class HistogramView {
|
class HistogramView {
|
||||||
|
|
||||||
#uiContainer;
|
#uiContainer;
|
||||||
|
|||||||
@@ -41,8 +41,8 @@
|
|||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
BatchCodeSelectInitializer.initialize(
|
BatchCodeSelectInitializer.initialize(
|
||||||
{
|
{
|
||||||
batchCodeSelect: $('#batchCodeSelect'),
|
batchCodeSelectElement: $('#batchCodeSelect'),
|
||||||
batchCodeDetails: document.querySelector("#batchCodeDetails")
|
batchCodeDetailsElement: document.querySelector("#batchCodeDetails")
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@@ -49762,7 +49762,7 @@
|
|||||||
<option value="Ø94F21A">Ø94F21A</option>
|
<option value="Ø94F21A">Ø94F21A</option>
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<div id="batchCodeDetails"></div>
|
<div id="batchCodeDetails" style="width: 50%"></div>
|
||||||
<p><b>Data Source:</b>
|
<p><b>Data Source:</b>
|
||||||
<a href="https://vaers.hhs.gov/data/datasets.html" target="_blank">Vaccine Adverse Event Reporting System
|
<a href="https://vaers.hhs.gov/data/datasets.html" target="_blank">Vaccine Adverse Event Reporting System
|
||||||
(VAERS)</a>
|
(VAERS)</a>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ FK-FIXME:
|
|||||||
|
|
||||||
FK-TODO:
|
FK-TODO:
|
||||||
- add google captcha to batchCodeTable.html
|
- add google captcha to batchCodeTable.html
|
||||||
|
- remove batch code combinations, use just a single batch code for symptom chart
|
||||||
|
|
||||||
anacron job:
|
anacron job:
|
||||||
sudo cp src/intensivstationen_howbadismybatch.sh /etc/cron.daily/intensivstationen_howbadismybatch
|
sudo cp src/intensivstationen_howbadismybatch.sh /etc/cron.daily/intensivstationen_howbadismybatch
|
||||||
|
|||||||
Reference in New Issue
Block a user