textToSQL commited on
Commit
9ac217c
1 Parent(s): 7d80176

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -20
app.py CHANGED
@@ -40,23 +40,24 @@ def process_text(input_text):
40
 
41
  def get_completion(prompt, model='gpt-3.5-turbo'):
42
  messages = [
43
- {"role": "system", "content": """You are a world class nurse practitioner. You are provided with the transcription following a patient's visit. \
44
- Extract the following information from the transcription, replace curly brackets with relevant extracted information, and present as follows, one category per line: \
45
 
46
- Date of Visit: {}
47
- Claimant: {}
48
- Client/Employer: {}
49
- Claim #: {}
50
- DOI (Date of Injury): {}
51
- Provider: {}
52
- Diagnosis Treated: {}
53
- Subjective findings: {}
54
- Objective Findings: {}
55
- Treatment plan: {}
56
- Medications: {}
57
- RTW (Return to Work) Status: {}
58
- Restrictions: {}
59
- NOV (Next Office Visit): {}
 
60
 
61
  Only use the information from the provided transcription. Do not make up stuff. If information is not available just put "N/A" next to the relevant line.
62
  """
@@ -74,10 +75,12 @@ def get_completion(prompt, model='gpt-3.5-turbo'):
74
  with gr.Blocks() as demo:
75
 
76
  gr.Markdown("""
77
- # Chat with NP <br>
78
 
79
- This is to make life of NPs easier.
80
- Record post visit summary in natural language, press "transcribe audio", and then "prepare a report".
 
 
81
  """)
82
 
83
 
@@ -85,7 +88,8 @@ with gr.Blocks() as demo:
85
  audio = gr.Audio(source="microphone", type="filepath")
86
 
87
  b1 = gr.Button("Transcribe audio")
88
- b2 = gr.Button("Prepare a report")
 
89
 
90
 
91
  text1 = gr.Textbox(lines=5)
 
40
 
41
  def get_completion(prompt, model='gpt-3.5-turbo'):
42
  messages = [
43
+ {"role": "system", "content": """You are a world class nurse practitioner. You are provided with the transcription of a patient's recording in a non-English language prior to doctor's visit. \
44
+ Extract the following information from the transcription, replace curly brackets with relevant extracted information, and present in English as follows, one category per line: \
45
 
46
+ Demographic information: {name, age, gender, address, phone number}
47
+
48
+ Medical history: {chronic health conditions, any past surgery, any hospitalization, current medications}
49
+
50
+ Symptoms: {current symptoms, when did they start, how did they progress}
51
+
52
+ Allergies: {any known allergies, any allergic reaction to medications}
53
+
54
+ Family history: {any family members with chronic health condition, anyone in the family with a hereditary condition?}
55
+
56
+ Lifestyle factors: {typical diet, how often you exercise, smoking, drinking alcohol}
57
+
58
+ Psychosocial factors: {stress, anxiety, any mental health condition}
59
+
60
+ Review of systems: {any issues with vision or hearing, digestive issues, any problems with skin or nails, any problems with joints or muscles}
61
 
62
  Only use the information from the provided transcription. Do not make up stuff. If information is not available just put "N/A" next to the relevant line.
63
  """
 
75
  with gr.Blocks() as demo:
76
 
77
  gr.Markdown("""
78
+ # Meet your doctor <br>
79
 
80
+ This is to make life of non-English speaking patients easier.
81
+ Describe your complaints and symptoms in your native language , have it emailed to your doctor prior to your visit.
82
+ Information that is useful to include: your name, age, gender, address, phone number, medical history, symptoms, allergies, family medical history, lifestyle factors.
83
+ Have it all recorded, transcribed, and presented in a standard form.
84
  """)
85
 
86
 
 
88
  audio = gr.Audio(source="microphone", type="filepath")
89
 
90
  b1 = gr.Button("Transcribe audio")
91
+ b2 = gr.Button("Prepare a report in English")
92
+ b3 = gr.Button("Email report to your doctor")
93
 
94
 
95
  text1 = gr.Textbox(lines=5)