]> Softwares of Agnibho - librevax.git/commitdiff
Show patient number in report
authorAgnibho Mondal <mondal@agnibho.com>
Fri, 22 Nov 2024 19:22:51 +0000 (00:52 +0530)
committerAgnibho Mondal <mondal@agnibho.com>
Fri, 22 Nov 2024 19:22:51 +0000 (00:52 +0530)
librevax.py
templates/report.html

index a9ce25019fcc910104957b7545d84eb217933dfb..ba2bf1c4f3b52642f35a94d52e8d919cb03a9a29 100644 (file)
@@ -832,13 +832,15 @@ def report(mid):
         (ok, center)=multicenter.read(cursor, g.mid)
         if(not ok):
             raise Exception(center)
+        individual=set()
         count={}
         for i in data:
+            individual.add(i["cid"])
             try:
                 count[i["vaccine"]]=count[i["vaccine"]]+i["dosage"]
             except KeyError:
                 count[i["vaccine"]]=i["dosage"]
-        return render_template("report.html", data=data, count=count, center=center, date=date)
+        return render_template("report.html", data=data, count=count, individual=individual, center=center, date=date)
     except Exception as e:
         raise(e)
         return render_template("error.html", data=e)
index df345b523976388420c0c9bc2057f03f7f6a60c0..cb39fe7257f2b7367f5690af525668f1418d3b7f 100644 (file)
@@ -53,6 +53,7 @@ You should have received a copy of the GNU General Public License along with Lib
     </tr>
     {% endfor %}
   </table>
+  <p>Vaccine Candidates: {{ individual|length }}</p>
   <p>Vaccine Administerd:
   {% for k,v in count.items() %}
   &emsp;{{k}} ({{v}})