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