majweldon commited on
Commit
3ad7261
1 Parent(s): 1da195e

Upload 21 files

Browse files
.gitattributes CHANGED
@@ -32,3 +32,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
32
  *.zip filter=lfs diff=lfs merge=lfs -text
33
  *.zst filter=lfs diff=lfs merge=lfs -text
34
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
32
  *.zip filter=lfs diff=lfs merge=lfs -text
33
  *.zst filter=lfs diff=lfs merge=lfs -text
34
  *tfevents* filter=lfs diff=lfs merge=lfs -text
35
+ Audio_Files/Test_Elbow.mp3 filter=lfs diff=lfs merge=lfs -text
36
+ Audio_Files/test.wav filter=lfs diff=lfs merge=lfs -text
37
+ Audio_Files/test1.mp3 filter=lfs diff=lfs merge=lfs -text
AIScribe.ipynb ADDED
@@ -0,0 +1 @@
 
 
1
+ {"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"private_outputs":true,"provenance":[{"file_id":"13lsB13d5fSdkzTtyNTaowTtajlYdHVH1","timestamp":1677956049855}],"mount_file_id":"1XKhmEB1uzwDzHPOPIHyItHIQVqBdH8N8","authorship_tag":"ABX9TyOoDUsq4DecrpuA3fYXfGU6"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"},"gpuClass":"standard"},"cells":[{"cell_type":"markdown","source":["# **Install libraries and use private key**"],"metadata":{"id":"kLGkDM3ZaOvr"}},{"cell_type":"code","source":["!pip install openai\n","!pip install gradio\n","\n","import os\n","import openai\n","\n","# Load your API key from an environment variable or secret management service\n","# API KEY: (gmail.com, 4892) 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\n","openai.api_key = \"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\"\n"],"metadata":{"id":"kOwV20F7jMm5"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["# **Jenkins the Digital Scribe**\n"],"metadata":{"id":"ybELym_rUlYo"}},{"cell_type":"code","source":["from numpy import True_\n","import gradio as gr\n","import openai, subprocess\n","import os\n","import soundfile as sf\n","from pydub import AudioSegment\n","\n","%cd /content/drive/MyDrive/Colab_Notebooks/\n","note_transcript = \"\"\n","\n","def transcribe(audio, history_type):\n"," global note_transcript \n"," \n"," if history_type == \"Weldon\":\n"," with open(\"Format_Library/Weldon_Note_Format.txt\", \"r\") as f:\n"," role = f.read()\n"," elif history_type == \"Ortlieb\":\n"," with open(\"Format_Library/Ortlieb_Note_Format.txt\", \"r\") as f:\n"," role = f.read()\n"," elif history_type == \"Handover\":\n"," with open(\"Format_Library/Weldon_Handover_Note_Format.txt\", \"r\") as f:\n"," role = f.read()\n"," elif history_type == \"Leinweber\":\n"," with open(\"Format_Library/Leinweber_Note_Format.txt\", \"r\") as f:\n"," role = f.read()\n"," elif history_type == \"Meds Only\":\n"," with open(\"Format_Library/Medications.txt\", \"r\") as f:\n"," role = f.read()\n"," else:\n"," with open(\"Format_Library/Ortlieb_Note_Format.txt\", \"r\") as f:\n"," role = f.read()\n","\n"," messages = [{\"role\": \"system\", \"content\": role}]\n","\n"," ###### Create Dialogue Transcript from Audio Recording and Append(via Whisper)\n"," # Load the audio file (from filepath)\n"," audio_data, samplerate = sf.read(audio)\n","\n"," #### Massage .wav and save as .mp3\n"," #audio_data = audio_data.astype(\"float32\")\n"," #audio_data = (audio_data * 32767).astype(\"int16\")\n"," #audio_data = audio_data.mean(axis=1)\n"," sf.write(\"Audio_Files/test.wav\", audio_data, samplerate, subtype='PCM_16')\n"," sound = AudioSegment.from_wav(\"Audio_Files/test.wav\")\n"," sound.export(\"Audio_Files/test.mp3\", format=\"mp3\")\n","\n","\n"," #Send file to Whisper for Transcription\n"," audio_file = open(\"Audio_Files/test.mp3\", \"rb\")\n"," audio_transcript = openai.Audio.transcribe(\"whisper-1\", audio_file)\n"," print(audio_transcript)\n"," messages.append({\"role\": \"user\", \"content\": audio_transcript[\"text\"]})\n"," \n"," #Create Sample Dialogue Transcript from File (for debugging)\n"," #with open('Audio_Files/Test_Elbow.txt', 'r') as file:\n"," # audio_transcript = file.read()\n"," #messages.append({\"role\": \"user\", \"content\": audio_transcript})\n"," \n","\n"," ### Word and MB Count\n"," file_size = os.path.getsize(\"Audio_Files/test.mp3\")\n"," mp3_megabytes = file_size / (1024 * 1024)\n"," mp3_megabytes = round(mp3_megabytes, 2)\n","\n"," audio_transcript_words = audio_transcript[\"text\"].split() # Use when using mic input\n"," #audio_transcript_words = audio_transcript.split() #Use when using file\n","\n"," num_words = len(audio_transcript_words)\n","\n","\n"," #Ask OpenAI to create note transcript\n"," response = openai.ChatCompletion.create(model=\"gpt-3.5-turbo\", temperature=0, messages=messages)\n"," note_transcript = (response[\"choices\"][0][\"message\"][\"content\"])\n"," \n"," return [note_transcript, num_words,mp3_megabytes]\n","\n","#Define Gradio Interface\n","my_inputs = [\n"," gr.Audio(source=\"microphone\", type=\"filepath\"),\n"," gr.Radio([\"Weldon\",\"Ortlieb\", \"Leinweber\",\"Handover\",\"Meds Only\"], show_label=False),\n","]\n","\n","ui = gr.Interface(fn=transcribe, \n"," inputs=my_inputs, \n"," outputs=[gr.Text(label=\"Your Note\"),\n"," gr.Number(label=\"Audio Word Count\"),\n"," gr.Number(label=\".mp3 MB\")])\n","\n","\n","ui.launch(share=True, debug=True)"],"metadata":{"id":"tPpxchS_8MsT"},"execution_count":null,"outputs":[]}]}
AIScribe2.ipynb ADDED
@@ -0,0 +1 @@
 
 
1
+ {"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"private_outputs":true,"provenance":[{"file_id":"1XKhmEB1uzwDzHPOPIHyItHIQVqBdH8N8","timestamp":1680099284199},{"file_id":"13lsB13d5fSdkzTtyNTaowTtajlYdHVH1","timestamp":1677956049855}],"mount_file_id":"10RVdErSfyowDeRa7prN_drTqoGm6eNkj","authorship_tag":"ABX9TyMtiKff5tRDzYZQgJ/47XD4"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"},"gpuClass":"standard"},"cells":[{"cell_type":"markdown","source":["# Install libraries and use private key"],"metadata":{"id":"kLGkDM3ZaOvr"}},{"cell_type":"code","source":["!pip install openai\n","!pip install gradio\n","\n","import os\n","import openai\n","\n","# Load your API key from an environment variable or secret management service\n","# API KEY: (gmail.com, 4892) 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\n","openai.api_key = \"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\"\n"],"metadata":{"id":"kOwV20F7jMm5"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["# **Jeffries the Digital Scribe**\n"],"metadata":{"id":"ybELym_rUlYo"}},{"cell_type":"code","source":["from numpy import True_\n","import gradio as gr\n","import openai, subprocess\n","import os\n","import soundfile as sf\n","from pydub import AudioSegment\n","\n","%cd /content/drive/MyDrive/Colab_Notebooks/\n","note_transcript = \"\"\n","\n","def transcribe(audio, history_type):\n"," global note_transcript \n"," \n"," if history_type == \"History\":\n"," with open(\"Format_Library/Weldon_Note_Format.txt\", \"r\") as f:\n"," role = f.read()\n"," elif history_type == \"Physical\":\n"," with open(\"Format_Library/Weldon_PE_Note_Format.txt\", \"r\") as f:\n"," role = f.read()\n"," elif history_type == \"H+P\":\n"," with open(\"Format_Library/Weldon_Full_Note_Format.txt\", \"r\") as f:\n"," role = f.read()\n"," elif history_type == \"Impression/Plan\":\n"," with open(\"Format_Library/Weldon_Impression_Note_Format.txt\", \"r\") as f:\n"," role = f.read()\n"," elif history_type == \"Handover\":\n"," with open(\"Format_Library/Weldon_Handover_Note_Format.txt\", \"r\") as f:\n"," role = f.read()\n"," elif history_type == \"Meds Only\":\n"," with open(\"Format_Library/Medications.txt\", \"r\") as f:\n"," role = f.read()\n"," elif history_type == \"EMS\":\n"," with open(\"Format_Library/EMS_Handover_Note_Format.txt\", \"r\") as f:\n"," role = f.read()\n"," elif history_type == \"Triage\":\n"," with open(\"Format_Library/Triage_Note_Format.txt\", \"r\") as f:\n"," role = f.read()\n"," else:\n"," with open(\"Format_Library/Weldon_Full_Note_Format.txt\", \"r\") as f:\n"," role = f.read()\n","\n"," messages = [{\"role\": \"system\", \"content\": role}]\n","\n"," ###### Create Dialogue Transcript from Audio Recording and Append(via Whisper)\n"," # Load the audio file (from filepath)\n"," audio_data, samplerate = sf.read(audio)\n","\n"," #### Massage .wav and save as .mp3\n"," #audio_data = audio_data.astype(\"float32\")\n"," #audio_data = (audio_data * 32767).astype(\"int16\")\n"," #audio_data = audio_data.mean(axis=1)\n"," sf.write(\"Audio_Files/test.wav\", audio_data, samplerate, subtype='PCM_16')\n"," sound = AudioSegment.from_wav(\"Audio_Files/test.wav\")\n"," sound.export(\"Audio_Files/test.mp3\", format=\"mp3\")\n","\n","\n"," #Send file to Whisper for Transcription\n"," audio_file = open(\"Audio_Files/test.mp3\", \"rb\")\n"," audio_transcript = openai.Audio.transcribe(\"whisper-1\", audio_file)\n"," print(audio_transcript)\n"," messages.append({\"role\": \"user\", \"content\": audio_transcript[\"text\"]})\n"," \n"," #Create Sample Dialogue Transcript from File (for debugging)\n"," #with open('Audio_Files/Test_Elbow.txt', 'r') as file:\n"," # audio_transcript = file.read()\n"," #messages.append({\"role\": \"user\", \"content\": audio_transcript})\n"," \n","\n"," ### Word and MB Count\n"," file_size = os.path.getsize(\"Audio_Files/test.mp3\")\n"," mp3_megabytes = file_size / (1024 * 1024)\n"," mp3_megabytes = round(mp3_megabytes, 2)\n","\n"," audio_transcript_words = audio_transcript[\"text\"].split() # Use when using mic input\n"," #audio_transcript_words = audio_transcript.split() #Use when using file\n","\n"," num_words = len(audio_transcript_words)\n","\n","\n"," #Ask OpenAI to create note transcript\n"," response = openai.ChatCompletion.create(model=\"gpt-3.5-turbo\", temperature=0, messages=messages)\n"," note_transcript = (response[\"choices\"][0][\"message\"][\"content\"])\n"," \n"," return [note_transcript, num_words,mp3_megabytes]\n","\n","#Define Gradio Interface\n","my_inputs = [\n"," gr.Audio(source=\"microphone\", type=\"filepath\"),\n"," gr.Radio([\"History\",\"Physical\", \"H+P\",\"Impression/Plan\",\"Handover\",\"Meds Only\"], show_label=False),\n","]\n","\n","ui = gr.Interface(fn=transcribe, \n"," inputs=my_inputs, \n"," outputs=[gr.Text(label=\"Your Note\"),\n"," gr.Number(label=\"Audio Word Count\"),\n"," gr.Number(label=\".mp3 MB\")])\n","\n","\n","ui.launch(share=False, debug=True)"],"metadata":{"id":"tPpxchS_8MsT"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":[],"metadata":{"id":"hXNNjqQGG1UD"},"execution_count":null,"outputs":[]}]}
Audio_Files/Test_Elbow.mp3 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2a79ec54c4551e6be4ad0227fe7409b8e764e0ffa887ca693d57e45b9ecff1b4
3
+ size 2752453
Audio_Files/Test_Elbow.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Hello, my name is Dr. Weldon. You must be Sue? Yep, that's right. What brings you into the emergency department today? I've been having some issues with my elbow and I actually can't straighten it. Okay, which elbow is it? It's my left elbow. Okay, and you say you can't straighten it? Correct. Okay, how far can you get with the range of motion? Maybe, I don't know, 170 degrees? Yeah, and what about when you flex it? Can it flex all the way in? Yeah, I can't touch my shoulder. It's like 3 inches away, 4 inches away. Yeah, so just over 90 on your flexion. Yes. Okay, and how long has it been limited that way? Probably 4 years. Okay. Do you remember an injury that you may have had to the elbow? No. No, and has that progressed over the years for better or for worse? I think at one point it got like any time I lifted my arm up it would be nervy and tingly. And then later on that went away and just progressively got stiffer and stiffer. Okay, so but in terms of range of motion, did you have less and less range of motion with that stiffness or pain over the years? I think so, yes. Okay. Have you seen a physiotherapist to try to straighten things out? Yes. Okay, and what happened with that? It was not effective because they would try to work the muscles in the joints above and below. But because I got an ultrasound actually and there's a floating piece of bone in there. Oh, I see. 6 millimeters. So I don't know if that's stopping my extension. Yeah, okay. Do you have other medical problems in your history? I have diabetes. Okay. And I have high blood pressure. Okay. Are you taking any medications? No. Okay, even though you have diabetes and high blood pressure? Oh, yes. I'm taking my diabetes medication. Okay, with that metformin probably? Yes. Okay, gotcha. All right, do you have any allergies? I'm allergic to biaxin and peanuts. Okay, no problem. All right, well, I think I'll examine your elbow and we'll probably get some x-rays today and then we'll see what else we might be able to do for you in terms of referral or further follow-up.
Audio_Files/test.mp3 ADDED
Binary file (463 kB). View file
 
Audio_Files/test.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7e197a2c854b3e705c6667e43afe02d3c55e4618e38de0f825e99918967786b7
3
+ size 5550636
Audio_Files/test1.mp3 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:323cd38b2c5d2d88b7d5d804140bf07c39c8783aee7f22122f2291b2b70e9d20
3
+ size 1514349
Format_Library/Audio_to_Text.ipynb ADDED
@@ -0,0 +1 @@
 
 
1
+ {"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"private_outputs":true,"provenance":[],"mount_file_id":"13lsB13d5fSdkzTtyNTaowTtajlYdHVH1","authorship_tag":"ABX9TyNqYotpHrhbmDsnonnZqfcB"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"},"accelerator":"GPU","gpuClass":"standard"},"cells":[{"cell_type":"markdown","source":["# New Section"],"metadata":{"id":"kLGkDM3ZaOvr"}},{"cell_type":"code","source":["!pip install openai\n","!pip install gradio"],"metadata":{"id":"kOwV20F7jMm5"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["import os\n","import openai\n","\n","# Load your API key from an environment variable or secret management service\n","# API KEY: (gmail.com, 4892) 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\n","openai.api_key = \"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\"\n","\n","# API KEY (yahoo.ca, 9831) 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\n","#openai.api_key = \"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\"\n","\n","#test_response = openai.Completion.create(model=\"text-davinci-003\", prompt=\"Say this is a test\", temperature=0, max_tokens=7)\n"],"metadata":{"id":"OQmA6sAV6erI"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["audio_file = open(\"/content/drive/MyDrive/Whisper AI/Audio Files/Test_Elbow.mp3\", \"rb\")\n","#audio_file = open(\"/content/drive/MyDrive/Whisper AI/Audio Files/sagan_pbd.mp3\", \"rb\")\n","transcript = openai.Audio.transcribe(\"whisper-1\", audio_file)"],"metadata":{"id":"K0pueuLH3xZJ"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["import openai, subprocess\n","\n","messages = [{\"role\": \"system\", \"content\": \"You are a senior medical resident working in an Emergency Department. I need you to create a succinct note that summarizes a patient encounter. I would like the note to be no more than 300 words and have the following three headings: 'History of Presenting Illness', 'Past Medical History', and 'Medications'. Headings in bold with the 'Past Medical History' and 'Medications' section reported as bulleted lists. I will give you a full text transcript of the encounter in a separate prompt. The transcript is a raw audio recording of doctor and patient and does not have speaker headings.\"}]\n","\n","# Code to generate transcript of audio recording\n","#audio_file = open(\"/content/drive/MyDrive/Whisper AI/Audio Files/Test_Elbow.mp3\", \"rb\")\n","#transcript = openai.Audio.transcribe(\"whisper-1\", audio_file)\n","\n","#Sample Transcript from File\n","with open('/content/drive/MyDrive/Whisper AI/Audio Files/Test_Elbow.txt', 'r') as file:\n"," sample_text = file.read()\n"," \n","#Ask OpenAI to create note transcript\n","messages.append({\"role\": \"user\", \"content\": sample_text})\n","response = openai.ChatCompletion.create(model=\"gpt-3.5-turbo\", temperature=0, messages=messages)\n","note_transcript = response[\"choices\"][0][\"message\"][\"content\"]\n","print(note_transcript)\n"],"metadata":{"id":"I1wRNBh6UVSg"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["note_transcript"],"metadata":{"id":"JzaCvWjUnD--"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["messages = [{\"role\": \"system\", \"content\": role}]\n","messages[0][\"content\"]"],"metadata":{"id":"oShFuq5zjsZD"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["**Digital Scribe - Gradio Version**\n"],"metadata":{"id":"ybELym_rUlYo"}},{"cell_type":"code","source":["import gradio as gr\n","import openai, subprocess\n","\n","with open(\"/content/drive/MyDrive/Whisper AI/role.txt\", \"r\") as f:\n"," role = f.read()\n","messages = [{\"role\": \"system\", \"content\": role}]\n","\n","\n","\n","def transcribe(audio):\n"," global messages\n","\n"," #Create Dialogue Transcript from Audio Recording (via Whisper)\n"," #audio_file = open(audio, \"rb\")\n"," #transcript = openai.Audio.transcribe(\"whisper-1\", audio_file)\n"," #messages.append({\"role\": \"user\", \"content\": transcript[\"text\"]})\n","\n","\n"," #Create Sample Dialogue Transcript from File\n"," with open('/content/drive/MyDrive/Whisper AI/Audio Files/Test_Elbow.txt', 'r') as file:\n"," sample_text = file.read()\n"," transcript = sample_text\n"," \n","\n"," #Ask OpenAI to create note transcript\n"," messages.append({\"role\": \"user\", \"content\": sample_text})\n"," response = openai.ChatCompletion.create(model=\"gpt-3.5-turbo\", temperature=0, messages=messages)\n"," note_transcript = response[\"choices\"][0][\"message\"][\"content\"]\n","\n"," return note_transcript\n","\n","ui = gr.Interface(fn=transcribe, inputs=gr.Audio(source=\"microphone\", type=\"filepath\"), outputs=\"text\").launch()\n","ui.launch()"],"metadata":{"id":"tPpxchS_8MsT"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":[],"metadata":{"id":"MrkRuIIsjp8t"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":[],"metadata":{"id":"qDQwD7mHTVkV"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":[],"metadata":{"id":"XpdMsIc9UQJj"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":[],"metadata":{"id":"lxX6YsnCUCzL"},"execution_count":null,"outputs":[]}]}
Format_Library/EMS_Handover_Note_Format.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
0
 
 
1
+ You are a senior nurse working in an Emergency Department. I need you to create a succinct note that summarizes the handover of an EMS patient to the emergency care team in a busy trauma/resus bay. Please use the iCHAT format and section the note into four sections 1. Current Situation. 2. History 3. Assessment 4.Treatment. Limit the note to 400 words. Use only the information provided. If a section is incomplete, leave it blank.
2
+
3
+
4
 
Format_Library/HPI.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ You are a senior medical resident working in an Emergency Department. You are listening to the HPI or "History of Present Illness" portions of a doctor patient conversations and need to summarize in text form for the medical record. They need to be accurate, yet succinct. No more than 300 words. Sentences preferred to be short. You should include the main symptoms, the time course of those symptoms and pertinent negatives. If information is not provided in the text, you may omit it. For format, there should be a heading labelled "HPI" in bold, then the summary. There should be no additional text.
Format_Library/Leinweber_Note_Format.txt ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ You are a senior medical resident working in an Emergency Department. I need you to create a succinct note that summarizes a patient encounter. I would like the note to be no more than 400 words with the following format. The first line should read "History of Presenting Illness from <patient>:" Use the patient's first name if it is clear, otherwise use 'patient'. Add a blank line after this section.
2
+
3
+ Next, will be single-line summaries of previous medical history, medications, allergies, and surgical history using the respective labels, in bold, PMHx:, Medications:, Allergies:, SHx:. Below is an example:
4
+
5
+ PMHx: Type II Diabetes, migraines, ADHD, anxiety, depression
6
+ Medications: Humalog, vyvanse, rizatriptan
7
+ Allergies: penicillin
8
+ SHx: cholecystectomy
9
+
10
+ For the above section, you may use acronyms and abbreviations to keep the information compact. There should be no spacing between lines.
11
+
12
+ The next section will be an untitled paragraph detailing strictly the details of the history of present illness. You should include the main symptoms, the time course of those symptoms and pertinent negatives. Do not include or reference past medical history or medications in this paragraph.
13
+ For teaching purposes, please provide a differential diagnosis than includes the most likely diagnosis and at least three dangerous diagnoses that we must rule out. Format this as another bulleted list with the heading "Differential Diagnosis"
14
+ I will give you a full text transcript of the encounter in a separate prompt. The transcript is a raw audio recording of doctor and patient conversation.
Format_Library/MedHx.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ You are a senior medical resident working in an Emergency Department. You are listening to the Past Medical History portions of a doctor patient conversations and need to summarize in text form for the medical record, so need to be accurate. Format should be a bulleted list with the heading "Past Medical History", in bold. There should be no additional text. Each bullet should be the name of the medical problem. The occasional detail in parentheses is acceptable, for example: -Diabetes (A1c = 7.2%) or CHF (ejection fraction 35%). If something is unclear, simply omit it from the list.
Format_Library/Medications.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ You are a senior medical resident working in an Emergency Department. You are listening to the Medications portion of a doctor patient conversations and need to summarize in text form for the medical record, so need to be accurate. Format should be a bulleted list with the heading "Medications", in bold. There should be no additional text. Each bullet should be just the name of the medication, not the dose. Use generic names wherever possible. For each bullet, you may include very brief details in parentheses, for example -Furosemide (recently increased) or Rivaroxaban (half dose).
Format_Library/Ortlieb_Note_Format.txt ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ You are a senior medical resident working in an Emergency Department. I need you to create a succinct note that summarizes a patient encounter. I would like the note to be no more than 400 words with the following format. The first line should read "History obtained from <patient> and review of Netcare." Use the patient's first name if it is clear, otherwise use 'patient'. Add a blank line after this section.
2
+
3
+ Next, will be single-line summaries of past medical history, medications, surgical history, family history, and social history using the respective labels Pmedhx:, Meds:, Surghx:,Fmhx:, and Social:. Below is an example:
4
+
5
+ Pmedhx: Type II Diabetes, migraines, ADHD, anxiety, depression
6
+ Meds: Humalog, vyvanse, rizatriptan
7
+ SurgHx: breast reduction
8
+ Fmhx: Mom Type II Diabetes, HTN, Dad DM II, HTN
9
+ Social: non smoker, occ cannabis, occ ETOH
10
+
11
+ For the above section, you may use acronyms and abbreviations to keep the information compact. There should be no spacing between lines.
12
+
13
+ The next section will be an untitled paragraph detailing strictly the details of the history of present illness. You should include the main symptoms, the time course of those symptoms and pertinent negatives. Do not include or reference past medical history or medications in this paragraph.
14
+
15
+ I will give you a full text transcript of the encounter in a separate prompt. The transcript is a raw audio recording of doctor and patient conversation.
Format_Library/Triage_Note_Format.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ You are a senior nurse working in an Emergency Department. I need you to create a succinct note that summarizes an Emergency Department Triage encounter. You will be provided with a transcript of a nurse patient dialog and need to provide 1-4 sentence summary note that includes the presenting complaint with key details and a very brief, single line, past medical history. Below are some examples in quotes:
Format_Library/Weldon_Full_Note_Format.txt ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ You are a senior medical resident working in an Emergency Department. I need you to create a succinct note that summarizes a patient encounter. I would like the note to be no more than 400 words and have the following three headings: 'History of Presenting Illness', 'Past Medical History', 'Medications' and 'Key Physical Exam Findings'
2
+
3
+ For the 'History of Presenting Illness' section should be a simple paragraph comprising short sentences. You should include the main symptoms and the time course of those symptoms. Incdlude pertinent negatives if asked, for example: No fever, no neck stiffness, no sick contacts etc.
4
+
5
+ The 'Past Medical History' should be a simple, single-spaced bulleted list. Each bullet should be the name of the medical problem, but the occasional detail in parentheses is acceptable, for example: -Diabetes (A1c = 7.2%) or -CHF (ejection fraction 35%). If something is unclear, simply omit it from the list.
6
+
7
+ 'Medications' section should be written as a bulleted list with no spaces. Each bullet should be just the name of the medication, not the dose. Use generic names wherever possible. For each bullet, you may include very brief details in parentheses, for example -Furosemide (recently increased) or -Rivaroxaban (half dose).
8
+
9
+ 'Key Physical Exam Findings' will be a bulleted list. Only list findings if they are clearly stated. Examples include: -Right sided expiratory wheeze, -RUQ tenderness -Positive Murphy Sign -No focal C-Spine tenderness
10
+
11
+ For teaching purposes, please provide a differential diagnosis than includes the most likely diagnosis and at least three dangerous diagnoses that we must rule out. Format this as another bulleted list with the heading 'Differential Diagnosis'
12
+
13
+ I will give you a full text transcript of the encounter in a separate prompt. The transcript is a raw audio recording of doctor and patient conversation.
Format_Library/Weldon_Handover_Note_Format.txt ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ You are a senior medical resident working in an Emergency Department. I need you to create a succinct note that summarizes a medical handover. I would like the note to be no more than 200 words with a very brief summary of presenting complaint, main medical issues, and current state. Also inclulde a numbered list outlining the plan for the patient. Only include plan details if articulated in the conversation. Below are two examples:
2
+
3
+ William is a 93 year old male who represents to the ED with shortness of breath and confusion for several days. He was diagnosed with COVID two days ago. His current issues are hyperventilation which we think is anxiety or agitation and early delirium. He is stable on room air currently.
4
+
5
+ Plan
6
+ 1. Hospitalist Service (Doctor's Name) consulted
7
+ 2. Ativan prn for agitation and hyperventilation
8
+ 3. Discuss goals of care when family arrive
9
+
10
+ Marlene is a 71 year old female with gross hematuria and urinary retention that started this morning. History is significant for radiation cystitis as a result of treatment of endometrial cancer 10 years ago - she remains cancer free. Her hemoglobin has dropped from 90 to 79.
11
+
12
+ Plan
13
+ 1. Dr. Van Zyl (Urology) is aware and will see the patient for admission
14
+ 2. Continuous bladder irrigation underway
15
+ 3. Repeat Hemoglobin in AM.
16
+
17
+ I will give you a full text transcript of the doctor to doctor handover.
Format_Library/Weldon_Impression_Note_Format.txt ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ You are a senior medical resident working in an Emergency Department. I need you to create a succinct note that summarizes a doctor patient conversation of the impression and plan as discussed at the end of an Emergency Department visit. I will give you a full text transcript of the encounter in a separate prompt.
2
+
3
+ I would like the note divided into two sections: “ED Course” and “Impression and Plan”. The total length of this note should be no more than 200 words. The headings should be on thier own line with the note body on the next line.
4
+
5
+ For the “ED Course Section” please comment on how the patient's condition has changed with treatment, key lab findings, and any imaging results that are discussed.
6
+
7
+ For patients not being immediately discharged, the "Impression and Plan" section should only include the single line impression followed by the next steps for investigation or consultations.
8
+
9
+ For patients going home or discharged from the Emergency Department, the “Impression and Plan” section should include a single line impression followed by a bulleted list outlining the treatment plan, any follow up suggested, and reasons to return to the Emergency Department.
Format_Library/Weldon_Note_Format.txt ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ You are a senior medical resident working in an Emergency Department. I need you to create a succinct note that summarizes a patient encounter. I would like the note to be no more than 400 words and have the following three headings: 'History of Presenting Illness', 'Past Medical History', and 'Medications'.
2
+
3
+ For the 'History of Presenting Illness' section should be a simple paragraph comprising short sentences. You should include the main symptoms and the time course of those symptoms. Incdlude pertinent negatives if asked, for example: No fever, no neck stiffness, no sick contacts etc.
4
+
5
+ The 'Past Medical History' should be a simple, single-spaced bulleted list. Each bullet should be the name of the medical problem, but the occasional detail in parentheses is acceptable, for example: -Diabetes (A1c = 7.2%) or -CHF (ejection fraction 35%). If something is unclear, simply omit it from the list.
6
+
7
+ 'Medications' section should be written as a bulleted list with no spaces. Each bullet should be just the name of the medication, not the dose. Use generic names wherever possible. For each bullet, you may include very brief details in parentheses, for example -Furosemide (recently increased) or -Rivaroxaban (half dose).
8
+
9
+ For teaching purposes, please provide a differential diagnosis than includes the most likely diagnosis and at least three dangerous diagnoses that we must rule out. Format this as another bulleted list with the heading "Differential Diagnosis"
10
+
11
+ I will give you a full text transcript of the encounter in a separate prompt. The transcript is a raw audio recording of doctor and patient conversation.
Format_Library/Weldon_PE_Note_Format.txt ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ You are a senior medical resident working in an Emergency Department. I need you to create a succinct note that summarizes the findings of a physical exam for a patient. The heading of the note is 'Key Physical Exam Findings'
2
+
3
+ The content of the note will include the single line headings: General:, Respiratory:, Cardiac:, Abdomen:. Only list findings if they are clearly stated and include them in the appropriate line. Examples include: -Right sided expiratory wheeze, -RUQ tenderness -Positive Murphy Sign -No focal C-Spine tenderness. Below is an example of a normal exam. If nothing is stated you may include the next from the normal exam example.
4
+
5
+
6
+ General: GCS 15/15, Alert and Oriented, No Apparent Distress
7
+ Respiratory: Air entry is equal bilaterally. Lung fields are clear. There is no work of breathing.
8
+ Cardiac: Normal S1/S2, no murmurs.
9
+ Abdomen: Soft, non-tender, no rebound, and no guarding.
10
+
11
+
12
+ I will give you a full text transcript of the physical exam findings in a separate prompt. The transcript is a raw audio recording of doctor and patient conversation.
Format_Library/role.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ You are a senior medical resident working in an Emergency Department. I need you to create a succinct note that summarizes a patient encounter. I would like the note to be no more than 300 words and have the following three headings: 'History of Presenting Illness', 'Past Medical History', and 'Medications'. Headings in bold with the 'Past Medical History' and 'Medications' section reported as bulleted lists. I will give you a full text transcript of the encounter in a separate prompt. The transcript is a raw audio recording of doctor and patient and does not have speaker headings.