refactoring
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
|||||||
{"columns":["VAX_LOT","Total Number of Adverse Reaction Reports","Deaths","Disabilities","Life Threatening Illnesses","Severe reports (%)"],"data":[["UNKNOWN",58,1,4,2,12.0689655172]]}
|
{"columns":["Batch","Total Number of Adverse Reaction Reports","Deaths","Disabilities","Life Threatening Illnesses","Severe reports (%)"],"data":[["3002188",1,0,0,1,null],["EX2405",1,0,1,0,null],["FL350",1,0,1,0,null],["FF3438",1,0,1,0,null],["FE8163",2,0,2,0,null],["FF4222",1,0,1,0,null],["EP2163 SERIAL 1",1,1,0,0,null],["FF4206",2,0,1,0,null],["NO BATCH NUMBER",33,4,0,0,null],["UNKNOWN",58,1,4,2,null],["FA7338",1,0,0,0,null],["FE3712",1,0,0,0,null],["ER7449",1,0,0,0,null],["3006325",1,0,0,0,null],["FG1657",1,0,0,0,null],["FG3712",1,0,0,0,null],["FG7372",1,0,0,0,null],["FH3219",1,0,0,0,null],["EJ8516",1,0,0,0,null],["FL3560",1,0,0,0,null],["FN0565",1,0,0,0,null],["UNSURE",1,0,0,0,null]]}
|
||||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -14,7 +14,7 @@
|
|||||||
<script>
|
<script>
|
||||||
function createEmptyBatchCodeTable() {
|
function createEmptyBatchCodeTable() {
|
||||||
const columnIndex = {
|
const columnIndex = {
|
||||||
'VAX_LOT': 0,
|
'Batch': 0,
|
||||||
'Total Number of Adverse Reaction Reports': 1,
|
'Total Number of Adverse Reaction Reports': 1,
|
||||||
'Deaths': 2,
|
'Deaths': 2,
|
||||||
'Disabilities': 3,
|
'Disabilities': 3,
|
||||||
@@ -48,10 +48,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
render: (data, type, row) => {
|
render: (data, type, row) => {
|
||||||
const lethality = parseFloat(data);
|
const severeReports = parseFloat(data);
|
||||||
return !isNaN(lethality) ? lethality.toFixed(2) + " %" : '';
|
return !isNaN(severeReports) ? severeReports.toFixed(2) + " %" : '';
|
||||||
},
|
},
|
||||||
targets: [columnIndex['Lethality']]
|
targets: [columnIndex['Severe reports (%)']]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
<table class="display" id="batchCodeTable">
|
<table class="display" id="batchCodeTable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>VAX_LOT</th>
|
<th>Batch</th>
|
||||||
<th>Total Number of Adverse Reaction Reports</th>
|
<th>Total Number of Adverse Reaction Reports</th>
|
||||||
<th>Deaths</th>
|
<th>Deaths</th>
|
||||||
<th>Disabilities</th>
|
<th>Disabilities</th>
|
||||||
|
|||||||
@@ -1352,15 +1352,17 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"def createAndSaveAndDisplayBatchCodeTableByCountry(nonDomesticVaers, country):\n",
|
"def createAndSaveAndDisplayBatchCodeTableByCountry(nonDomesticVaers, country, minADRsForLethality = None):\n",
|
||||||
" batchCodeTable = InternationalLotTableFactory.createBatchCodeTableByCountry(nonDomesticVaers, country)\n",
|
" batchCodeTable = InternationalLotTableFactory.createBatchCodeTableByCountry(nonDomesticVaers, country)\n",
|
||||||
" batchCodeTable = batchCodeTable[batchCodeTable['Total Number of Adverse Reaction Reports'] > 50]\n",
|
" batchCodeTable.index.set_names(\"Batch\", inplace = True)\n",
|
||||||
|
" if minADRsForLethality is not None:\n",
|
||||||
|
" batchCodeTable.loc[batchCodeTable['Total Number of Adverse Reaction Reports'] < minADRsForLethality, 'Severe reports (%)'] = np.nan\n",
|
||||||
" IOUtils.saveDataFrame(batchCodeTable, '../data/' + country)\n",
|
" IOUtils.saveDataFrame(batchCodeTable, '../data/' + country)\n",
|
||||||
" display(country + \":\", batchCodeTable)\n",
|
" display(country + \":\", batchCodeTable)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"def createAndSaveAndDisplayBatchCodeTablesByCountry(nonDomesticVaers, countries):\n",
|
"def createAndSaveAndDisplayBatchCodeTablesByCountry(nonDomesticVaers, countries, minADRsForLethality = None):\n",
|
||||||
" for country in countries:\n",
|
" for country in countries:\n",
|
||||||
" createAndSaveAndDisplayBatchCodeTableByCountry(nonDomesticVaers, country)"
|
" createAndSaveAndDisplayBatchCodeTableByCountry(nonDomesticVaers, country, minADRsForLethality)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1385,7 +1387,8 @@
|
|||||||
" 'Sweden',\n",
|
" 'Sweden',\n",
|
||||||
" 'Portugal',\n",
|
" 'Portugal',\n",
|
||||||
" 'Australia'\n",
|
" 'Australia'\n",
|
||||||
" ])"
|
" ],\n",
|
||||||
|
" minADRsForLethality = 100)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user