From 084fc9a7897ee6984cbb5f660610137405ca5f95 Mon Sep 17 00:00:00 2001 From: Mike Trebilcock Date: Wed, 29 Sep 2021 16:54:53 +0100 Subject: [PATCH] feat: Add Booster Vaccine Dose --- .DS_Store | Bin 6148 -> 6148 bytes default-dummy-patient-list.csv | 3 +++ index.html | 2 +- scripts/template.form.js | 2 +- scripts/template.stickers.js | 22 ++++++++++++++++++++++ 5 files changed, 27 insertions(+), 2 deletions(-) diff --git a/.DS_Store b/.DS_Store index 472ef5fe31a6ba25f8d6260c948c06758416e979..a8166ec10e171b264133874551e0a535f1f12c73 100644 GIT binary patch delta 32 ocmZoMXfc@J&&a(oU^g=(_hufJD#pz^Y_}OFHZ0rB&heKY0H_uUqW}N^ delta 84 zcmZoMXfc@J&&azmU^g=(?`9sBDn>@J$qFo1atw|P3=Dez!2rl&V31|VV5nqBVklzB cWJsAT$70L-6DT?lrebq5>pjNJ>>Pjj0W9$x2LJ#7 diff --git a/default-dummy-patient-list.csv b/default-dummy-patient-list.csv index 0aef9eb..4a502c5 100644 --- a/default-dummy-patient-list.csv +++ b/default-dummy-patient-list.csv @@ -21,3 +21,6 @@ NhsNumber,Name,DateOfBirth,SessionDate,StartTime,RegisteredPracticeName,Address, 349888464,Test Patient,29/08/1948,20/01/2021,11:40,Test General Medical Practice,"142 Test Street, Bedford, BD12 3AD",Second 835258980,Test Patient,30/01/1924,20/01/2021,11:50,Test General Medical Practice,"143 Test Street, Bedford, BD12 3AD",Second 451757567,Test Patient,31/10/1942,20/01/2021,12:00,Test General Medical Practice,"144 Test Street, Bedford, BD12 3AD",Second +2418409899,Test Patient Booster,15/06/1972,20/01/2021,09:00,Test General Medical Practice,"144 Test Street, Bedford, BD12 3AD",Booster +5001523761,Test Patient Booster,03/11/1962,20/01/2021,10:00,Test General Medical Practice,"144 Test Street, Bedford, BD12 3AD",Booster +9391287379,Test Patient Booster,23/02/1932,20/01/2021,10:30,Test General Medical Practice,"144 Test Street, Bedford, BD12 3AD",Booster diff --git a/index.html b/index.html index f363382..a091bfe 100644 --- a/index.html +++ b/index.html @@ -31,7 +31,7 @@

COVID Vaccine QR Generator 3.12

What's New

This new release contains some changes you need to know about:

diff --git a/scripts/template.form.js b/scripts/template.form.js index f6cf7b5..a6153aa 100644 --- a/scripts/template.form.js +++ b/scripts/template.form.js @@ -35,7 +35,7 @@ function genFullPageHTML(patient, index) { ageHTML = ' (Under 18)' } firstdoseHTML = ``; - doseHTML = ` First | Second`; + doseHTML = ` First | Second | Booster`; diff --git a/scripts/template.stickers.js b/scripts/template.stickers.js index 7d38d13..e96332c 100644 --- a/scripts/template.stickers.js +++ b/scripts/template.stickers.js @@ -37,6 +37,9 @@ function genPatientStickersHTML() { } else if (csvVaccineDose == "Second") { //Second dose only doseHTML = generateSecondDoseHTML(sessiondate, sessiontime, batchNumber); + } else if (csvVaccineDose == "Booster") { + //Second dose only + doseHTML = generateBoosterDoseHTML(sessiondate, sessiontime, batchNumber); } else { //No vaccine dose in CSV file, revert to unspecified doseHTML = generateUnspecifiedDoseHTML(sessiondate, sessiontime, batchNumber); @@ -102,6 +105,25 @@ function generateSecondDoseHTML(sessiondate, sessiontime, batchNumber) { return tableheadHTML + secondDoseHTML + tablefootHTML + batchOnRecordHTML; } +function generateBoosterDoseHTML(sessiondate, sessiontime, batchNumber) { + tableheadHTML = ` + `; + tablefootHTML = `
Dose Details
`; + + if (batchNumber) { + batchHTML = `Batch: ` + batchNumber + ``; + batchOnRecordHTML = ''; + } else { + batchOnRecordHTML = `The batch details are stored in your medical record.`; + batchHTML = ''; + } + + boosterDoseHTML = `Booster:` + sessiondate + ` ` + sessiontime + `` + + batchHTML + ''; + + return tableheadHTML + boosterDoseHTML + tablefootHTML + batchOnRecordHTML; +} + function generateUnspecifiedDoseHTML(sessiondate, sessiontime, batchNumber) { return `