diff --git a/docs/SymptomsCausedByCOVIDLots/js/PageInitializer.js b/docs/SymptomsCausedByCOVIDLots/js/PageInitializer.js index a9c5eca986e..1151815f971 100644 --- a/docs/SymptomsCausedByCOVIDLots/js/PageInitializer.js +++ b/docs/SymptomsCausedByCOVIDLots/js/PageInitializer.js @@ -26,7 +26,7 @@ class PageInitializer { { selectElement: vaccineSelectElement, onValueSelected: vaccine => prrBySymptomTableView.displayPrrBySymptomTable4Vaccine(vaccine), - minimumInputLength: 0 + minimumInputLength: 4 }); } @@ -39,7 +39,7 @@ class PageInitializer { PageInitializer.#symptomX = symptomX; PageInitializer.#symptomVsSymptomChartView.loadAndDisplayChart(PageInitializer.#symptomX, PageInitializer.#symptomY); }, - minimumInputLength: 0 + minimumInputLength: 4 }); PageInitializer.#initializeSelectElement( { @@ -48,7 +48,7 @@ class PageInitializer { PageInitializer.#symptomY = symptomY; PageInitializer.#symptomVsSymptomChartView.loadAndDisplayChart(PageInitializer.#symptomX, PageInitializer.#symptomY); }, - minimumInputLength: 0 + minimumInputLength: 4 }); PageInitializer.#symptomVsSymptomChartView.loadAndDisplayChart(PageInitializer.#symptomX, PageInitializer.#symptomY); } diff --git a/docs/SymptomsCausedByVaccines/index.html b/docs/SymptomsCausedByVaccines/index.html index 2f9f2fceaca..4daf9de4990 100644 --- a/docs/SymptomsCausedByVaccines/index.html +++ b/docs/SymptomsCausedByVaccines/index.html @@ -1,41 +1,40 @@ - - - - - - - Safety Signal - - - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + - -
-
- -
-
- - -
-
-
-
-

Safety Signal

- +
+
+
+
+
+

Worst Vaccines

+
+
+
+
+ + +
+ + + + + + + +
VaccineProportional Reporting Ratio
+ +
+
+
+
+
+
+

Strongest Symptoms

+
+
+
+
+ + +
+ + + + + + + +
SymptomProportional Reporting Ratio > 1
+ +
+
+
+
+
+
+
+
+ + + -
- - - - - - - - - - - - - - + +
+ +
+ + + + + + + + + + + + + + - \ No newline at end of file diff --git a/src/HowBadIsMyBatch.ipynb b/src/HowBadIsMyBatch.ipynb index f605ef6f23a..f36c8575313 100644 --- a/src/HowBadIsMyBatch.ipynb +++ b/src/HowBadIsMyBatch.ipynb @@ -438,7 +438,7 @@ "metadata": {}, "outputs": [], "source": [ - "from SymptomsCausedByVaccines.HtmlUpdater import updateHtmlFile\n", + "from SymptomsCausedByVaccines.HtmlUpdater import updateHtmlFile, updateHtmlFile4SymptomsCausedByCOVIDLots\n", "from SymptomsCausedByVaccines.PrrSeriesFactory import PrrSeriesFactory\n", "from SymptomsCausedByVaccines.PrrSeriesTransformer import PrrSeriesTransformer\n", "from SymptomsCausedByVaccines.ProportionalReportingRatiosPersister import saveProportionalReportingRatios\n", @@ -627,11 +627,10 @@ "metadata": {}, "outputs": [], "source": [ - "updateHtmlFile(\n", + "updateHtmlFile4SymptomsCausedByCOVIDLots(\n", " symptoms = list(prrByLotAndSymptom.columns),\n", - " vaccines = list(prrByLotAndSymptom.index),\n", - " htmlFile = \"../docs/SymptomsCausedByCOVIDLots/index.html\",\n", - " defaultSelectVaccineOptionText = 'Select Batch')" + " batches = list(prrByLotAndSymptom.index),\n", + " htmlFile = \"../docs/SymptomsCausedByCOVIDLots/index.html\")" ] }, { diff --git a/src/SymptomsCausedByVaccines/HtmlUpdater.py b/src/SymptomsCausedByVaccines/HtmlUpdater.py index 6ce0da9a17b..1747a207aaf 100644 --- a/src/SymptomsCausedByVaccines/HtmlUpdater.py +++ b/src/SymptomsCausedByVaccines/HtmlUpdater.py @@ -16,6 +16,19 @@ def updateHtmlFile(symptoms, vaccines, htmlFile, defaultSelectVaccineOptionText htmlFile = htmlFile, selectElementId = 'vaccineSelect') +def updateHtmlFile4SymptomsCausedByCOVIDLots(symptoms, batches, htmlFile): + symptomOptions = getSymptomOptions(symptoms) + for selectElementId in ['symptomSelect', 'symptomSelectX', 'symptomSelectY']: + _saveOptions( + options = symptomOptions, + htmlFile = htmlFile, + selectElementId = selectElementId) + + _saveOptions( + options = getVaccineOptions(batches, 'Select Batch'), + htmlFile = htmlFile, + selectElementId = 'vaccineSelect') + def _saveOptions(options, htmlFile, selectElementId): HtmlTransformerUtil().applySoupTransformerToFile( file=htmlFile,