Spaces:
Sleeping
Sleeping
Update api/routes/pdf.py
Browse files- api/routes/pdf.py +1 -2
api/routes/pdf.py
CHANGED
|
@@ -12,7 +12,6 @@ from string import Template
|
|
| 12 |
import logging
|
| 13 |
import asyncio
|
| 14 |
import aiohttp
|
| 15 |
-
import json
|
| 16 |
from typing import List, Dict, Optional
|
| 17 |
from pymongo import MongoClient
|
| 18 |
from pymongo.errors import PyMongoError
|
|
@@ -197,7 +196,7 @@ $encounters
|
|
| 197 |
full_name=escape_latex_special_chars(patient.get("full_name", "") or ""),
|
| 198 |
gender=escape_latex_special_chars(patient.get("gender", "") or ""),
|
| 199 |
dob=escape_latex_special_chars(patient.get("date_of_birth", "") or ""),
|
| 200 |
-
age=escape_latex_special_chars(str(calculate_age(patient.get("date_of_birth", "")) or "N/A"),
|
| 201 |
address=escape_latex_special_chars(", ".join(filter(None, [
|
| 202 |
patient.get("address", ""),
|
| 203 |
patient.get("city", ""),
|
|
|
|
| 12 |
import logging
|
| 13 |
import asyncio
|
| 14 |
import aiohttp
|
|
|
|
| 15 |
from typing import List, Dict, Optional
|
| 16 |
from pymongo import MongoClient
|
| 17 |
from pymongo.errors import PyMongoError
|
|
|
|
| 196 |
full_name=escape_latex_special_chars(patient.get("full_name", "") or ""),
|
| 197 |
gender=escape_latex_special_chars(patient.get("gender", "") or ""),
|
| 198 |
dob=escape_latex_special_chars(patient.get("date_of_birth", "") or ""),
|
| 199 |
+
age=escape_latex_special_chars(str(calculate_age(patient.get("date_of_birth", "")) or "N/A")),
|
| 200 |
address=escape_latex_special_chars(", ".join(filter(None, [
|
| 201 |
patient.get("address", ""),
|
| 202 |
patient.get("city", ""),
|