Ali2206 commited on
Commit
c578186
·
verified ·
1 Parent(s): 3fd8659

Update analysis.py

Browse files
Files changed (1) hide show
  1. analysis.py +3 -3
analysis.py CHANGED
@@ -1,4 +1,4 @@
1
- from config import agent, logger
2
  from datetime import datetime
3
  import asyncio
4
 
@@ -42,9 +42,9 @@ async def analyze_patient_report(patient_id, report_content, file_type, file_con
42
  }
43
  }
44
 
45
- from config import analysis_collection
46
  await analysis_collection.insert_one(analysis)
 
47
  return analysis
48
  except Exception as e:
49
- logger.error(f"Error analyzing patient report: {str(e)}")
50
  raise
 
1
+ from config import agent, logger, analysis_collection
2
  from datetime import datetime
3
  import asyncio
4
 
 
42
  }
43
  }
44
 
 
45
  await analysis_collection.insert_one(analysis)
46
+ logger.info(f"Analysis completed for patient {patient_id} at {datetime.utcnow().isoformat()}")
47
  return analysis
48
  except Exception as e:
49
+ logger.error(f"Error analyzing patient report: {str(e)} at {datetime.utcnow().isoformat()}")
50
  raise