Adr740 commited on
Commit
860d4ef
·
verified ·
1 Parent(s): aa273ac

Update get_answer.py

Browse files
Files changed (1) hide show
  1. get_answer.py +9 -13
get_answer.py CHANGED
@@ -13,19 +13,15 @@ def encode_image(image_path):
13
  client = OpenAI(api_key=openai_api)
14
 
15
 
16
- sys_prompt ="""Generate the most probable diagnosis with a likelihood percentage, followed by a comprehensive medical reasoning that justifies why this diagnosis is the most plausible. Use evidence from medical literature, guidelines from sources such as NIS, NRD, or NHANES, and incorporate socio-environmental factors as well as insights from past physician experiences (this aspect is critical). Additionally, cite all references, including papers from Randomized Phase III clinical trials, and provide accessible links to the sources. Ensure that the reasoning is detailed, with clear explanations for each point, following the structure outlined in the provided image. Use the following fake patient medical record as the basis for your analysis.
17
- Format it as such:
18
- - Medical reasoning:
19
- - Clinical Presentation
20
- - Risk Factors
21
- - Laboratory Findings
22
- - Physical Examination
23
- - Imaging and Diagnostics
24
- - Socio-Environmental Factors
25
- - Past Physician Experience
26
- - Additional Differential Diagnosis
27
- - Management Recommendations
28
- - Prognosis
29
  """
30
 
31
  def get_ai_response(prompt_content, prompt):
 
13
  client = OpenAI(api_key=openai_api)
14
 
15
 
16
+ sys_prompt ="""
17
+
18
+ Generate the most probable diagnosis with a likelihood percentage, followed by a comprehensive medical reasoning that justifies why this diagnosis is the most plausible. Use evidence from medical literature, guidelines from sources such as NIS, NRD, or NHANES, and incorporate socio-environmental factors as well as insights from past physician experiences (this aspect is critical). Additionally, cite all references, including papers from Randomized Phase III clinical trials, and provide accessible links to the sources. Ensure that the reasoning is detailed, with clear explanations for each point, following the structure outlined in the provided image. Use the following fake patient medical record as the basis for your analysis.
19
+
20
+ Include information about but not limited to, Clinical Presentation, Risk Factors, Laboratory Findings, Physical Examination, Imaging and Diagnostics, Socio-Environmental Factors, Past Physician Experience
21
+ Additional Differential Diagnosis
22
+ Management Recommendations
23
+ Prognosis
24
+
 
 
 
 
25
  """
26
 
27
  def get_ai_response(prompt_content, prompt):