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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
################################################## PROMPT ################################################
|
| 3 |
+
# def get_prompts_emea():
|
| 4 |
+
# system_prompt = '''An entity is a person(name), age, gender, title, named organization, city, state, country, address, zipcode, dates, site_ids, subject id, email, phone number, height, weight, Race, ethnicity, smoking habits, drinking habits, non-particiant, Social Security Number, Account Number, Medical Record Number, Medical History, Health Insurance Beneficiary Number, Certificate License Number, IP Address, Website URL, Vehicle Identifier.
|
| 5 |
+
# All entities should strictly get extracted, but don't extract incorrect entities.
|
| 6 |
+
# Entity present in any part of the paragraph should be detected.
|
| 7 |
+
# Names/Person : Names of persons mentioned in the input sentence or paragraph.ile
|
| 8 |
+
# Age: Age of a person should get detected. Some examples are 12 yo, 15 years old, 11 months old, 79 years, 51 yrs, 18-year-old, > 13 Years, <14 years
|
| 9 |
+
# Date: All dates should get detected as Dates. Some examples are 10-1-2021, 23-01-2022, 27th June, June 29, 10-09-2007, 4/5/67, 7/67, 31-12-2000. start_date, end_date should get detected as Date itself.
|
| 10 |
+
# Gender: Consider instances of "Male," "Female," "male," "female," "She," "He," "women," and "man" as gender references, note don't extract other than these instances
|
| 11 |
+
# Study_day: Day 2, Day 5, day 9, day 11 of study, 3rd day of study, etc.,
|
| 12 |
+
# Height: six feet tall, 5 feet 7 inches, 8 feet 1 inch, 170 centimeters tall, 188 centimeters, 189cm, 140.73 cm, etc., should be detected as Height.
|
| 13 |
+
# Weight: some of the examples are 100 pounds, 50 pounds, 77.4 pounds, 66 kgs, 78.9 kilograms, 88 kilograms, etc.,should be detected as Weight.
|
| 14 |
+
# Race: some of the examples of Race are caucasian, Asian, Black, White, African Amercian, Hispanic descent, mixed race heritage, Native American, etc., should be detected as Race.
|
| 15 |
+
# Phone_number: persons contact number or phone number should get detected. example format of phone numbers are +91443563223, (123)456-7890, +1(123)456-7890, (555) 123-4567, +44 20 1234 5678
|
| 16 |
+
# Email: all emails from the paragraph should be detected.
|
| 17 |
+
# Site_id: Site ID #56, Site ID 87, siteid #22, siteid356, at Site Y789, at site 235 etc.,
|
| 18 |
+
# Address: Extract Address from paragraph and should detect as Address.
|
| 19 |
+
# Country: Extract Country names from paragraph.
|
| 20 |
+
# Non_participant: non-participant, observer, spectator etc., extract these type of entities
|
| 21 |
+
# Smoking_habit: never smoked, smoker, non-smoker etc., extract these type of entities
|
| 22 |
+
# Drinking_habit: never drinked, drinker, drinking, non-drinker etc., extract these type of entities
|
| 23 |
+
# BMI: Body Mass Index value should get detected.
|
| 24 |
+
# Social Security Number: Social Security Number should get detected from paragraph.
|
| 25 |
+
# Medical Record Number: All Medical Record Numbers should get detected from paragraph.
|
| 26 |
+
# If there are multiple values for same entity they should be extracted with | separation.
|
| 27 |
+
# Random text should not get detected as any of above entities.
|
| 28 |
+
# All entities from above should strictly be extracted.
|
| 29 |
+
# URLs shouldn't get detected as Location or Address.
|
| 30 |
+
# '''
|
| 31 |
+
|
| 32 |
+
# example1 = '''Essentially , Mr. Cornea is a 60 year old male who noted the onset of dark urine during early January .
|
| 33 |
+
# Answer:
|
| 34 |
+
# Name: Mr. Cornea
|
| 35 |
+
# Age: 60 year old
|
| 36 |
+
# Gender: male
|
| 37 |
+
# Date: early January
|
| 38 |
+
# End-Answer
|
| 39 |
+
# '''
|
| 40 |
+
|
| 41 |
+
# example2 = '''In the 205 subjects with post-ofatumumab HAHA results (G2 MSD ECL assay; Section 3.5), one subject (Subject 257) tested positive for HAHA on 10-1-2021, 23-01-2022, and 185 subjects had all negative post-ofatumumab HAHA results with at least one ofatumumab plasma concentration low enough (<200 µg/mL) for the negative HAHA results to be considered conclusive. Subject 257 tested positive for HAHA at the six-month follow-up visit (titer = 16); samples at all other time points were negative.
|
| 42 |
+
# 2 patients were released from the study due to inactivity.
|
| 43 |
+
# Answer:
|
| 44 |
+
# Subject_id: 257 | 257
|
| 45 |
+
# Date: 10-1-2021 | 23-01-2022
|
| 46 |
+
# Numper_of_patients: 2 | 205 | 185
|
| 47 |
+
# End-Answer
|
| 48 |
+
# '''
|
| 49 |
+
# example3 = '''Subject 169: 54 years, Female, Pneumocystis jirovecii pneumonia, 61 days after last dose, resolved. The subject(CS3A Subject 1833-2303) was hospitalized for severe bronchopneumonia. Bronchoalveolar lavage and polymerase chain reaction (PCR) for Pneumocystis were positive for Pneumocystis jiroveci. She was hospitalized on 27th June and discharged on June 29. Two patients were on the study from 10-09-2007.
|
| 50 |
+
# Answer:
|
| 51 |
+
# Subject_id: 169 | 1833-2303
|
| 52 |
+
# Age: 54 years
|
| 53 |
+
# Gender: Female | She
|
| 54 |
+
# Race: White
|
| 55 |
+
# Date: 27th June | June 29 | 10-09-2007
|
| 56 |
+
# Medical_history: Pneumocystis jirovecii pneumonia
|
| 57 |
+
# End-Answer
|
| 58 |
+
# '''
|
| 59 |
+
|
| 60 |
+
# example4 = '''Saw Dr Oakley 4/5/67 - he was happy with results of ETT at Clarkfield. To f/u 7/67. No CP's since last admit. On Day 521, the patient was discharged.
|
| 61 |
+
# Another patient died of cardio-respiratory arrest on Day 8.
|
| 62 |
+
# Answer:
|
| 63 |
+
# Name: Dr Oakley
|
| 64 |
+
# Date: 4/5/67 | 7/67
|
| 65 |
+
# Gender: he
|
| 66 |
+
# Location: Clarkfield
|
| 67 |
+
# Study_day: Day 521 | Day 8
|
| 68 |
+
# End-Answer
|
| 69 |
+
# '''
|
| 70 |
+
|
| 71 |
+
# example5 = '''Patient 12367/2134 Oseltamivir 100 mg IV q12h for 5 days S295H/Y Patient 12367/2144 was a 57 year old male enrolled on 31-12-2000, on Day 5(03-Jan-2021) the patient was admitted.
|
| 72 |
+
# Answer:
|
| 73 |
+
# Patient_id: 12367/2134 | 12367/2144
|
| 74 |
+
# Gender: male
|
| 75 |
+
# Date: 31-12-2000 | 03-Jan-2021
|
| 76 |
+
# Study_day: Day 5
|
| 77 |
+
# Age: 57 year old
|
| 78 |
+
# End-Answer'''
|
| 79 |
+
|
| 80 |
+
# example6 = '''Final Clinical Study Report - NV25118: A Randomized, Multicenter, Single Blinded, Parallel Study of the Safety of 100 mg and 200 mg Oseltamivir Administered Intravenously for the Treatment of Influenza in Patients Aged > 13 Years. Report No. 1037027. June 3, 2013
|
| 81 |
+
# Answer:
|
| 82 |
+
# Study_id: NV25118
|
| 83 |
+
# Age: 13 Years
|
| 84 |
+
# Date: June 3, 2013
|
| 85 |
+
# End-Answer'''
|
| 86 |
+
|
| 87 |
+
# # example6 = '''918 Abdominal pain 2013-02-02 (8) Y Y 918-07 Abdominal pain Gastrointestinal disorders 2013-02-03 (9) Y Grade II Medical / other treatment Not suspected Suspected Recovered/resolved.
|
| 88 |
+
# # The events resolved afterwards on Day 4 (pyrexia, vomiting) (02-Feb-2013) and Day 21 (asthenia) (19-Feb-2013).'
|
| 89 |
+
# # Answer:
|
| 90 |
+
# # Site_id: 918
|
| 91 |
+
# # Subject_id: 918-07
|
| 92 |
+
# # Study_day: Day 4 | Day 21
|
| 93 |
+
# # Date: 2013-02-02 | 2013-02-03 | 02-Feb-2013 | 19-Feb-2013
|
| 94 |
+
# # Medical_history: Abdominal pain | Gastrointestinal disorders
|
| 95 |
+
# # End-Answer'''
|
| 96 |
+
|
| 97 |
+
# example7 = '''The medical history included throat cancer beginning in 2011 and ending in 2011, a broken hip beginning in 2011 and ending in 2011, insertion of two stents in 2012, coronary artery bypass surgery on 25-Jun-2014, a right cerebrovascular accident on 25-Jun-2014, aortic valve replacement on 25-Jun-2014, bilateral cataracts on 15-Aug-2014.
|
| 98 |
+
# Answer:
|
| 99 |
+
# Medical_history: throat cancer | broken hip | insertion of two stents | coronary artery bypass surgery | right cerebrovascular accident | aortic valve replacement | bilateral cataracts.
|
| 100 |
+
# Date: 25-Jun-2014 | 25-Jun-2014 | 25-Jun-2014 | 15-Aug-2014
|
| 101 |
+
# End-Answer'''
|
| 102 |
+
|
| 103 |
+
# example8 = '''1083\nPatient [AUS02T-0215-787043] - Death\n(disseminated intravascular coagulation),\nSAE (haemorrhage intracranial,\ndisseminated intravascular coagulation) .
|
| 104 |
+
# Answer:
|
| 105 |
+
# Subject_id: [AUS02T-0215-787043]
|
| 106 |
+
# End-Answer'''
|
| 107 |
+
|
| 108 |
+
|
| 109 |
+
# example9 = '''The accident involved Vehicle ID: ABC123 and occurred on August 15, 2023.
|
| 110 |
+
# Answer:
|
| 111 |
+
# Vehicle_Identifier: ABC123
|
| 112 |
+
# Date: August 15, 2023
|
| 113 |
+
# End-Answer
|
| 114 |
+
# '''
|
| 115 |
+
# example10 = '''Sarah underwent an ECHO and endoscopy at Ingree and Ot of Weamanshy Medical Center(www.wmchospital.com) on April 28 . In one patient the SAE had a fatal\noutcome.
|
| 116 |
+
# Answer:
|
| 117 |
+
# Name: Sarah
|
| 118 |
+
# Location: Weamanshy Medical Center
|
| 119 |
+
# URL: www.wmchospital.com
|
| 120 |
+
# Date: April 28
|
| 121 |
+
# End-Answer'''
|
| 122 |
+
|
| 123 |
+
# example11 = '''The patient had never smoked and was a former drinker. The subject was accompanied by his mother. He then completed study treatment with a total of 19 doses of IV oseltamivir (10 doses standard treatment plus 9 doses of treatment extension).
|
| 124 |
+
# Answer:
|
| 125 |
+
# Smoking_habit: never smoked
|
| 126 |
+
# Drinking_habit: former drinker
|
| 127 |
+
# Gender: his | He
|
| 128 |
+
# Non_participant: mother
|
| 129 |
+
# End-Answer'''
|
| 130 |
+
|
| 131 |
+
# example12 = '''Patient ois/51317-31580/10653 was a 54-year-old Hispanic male. he doesn't have anything to inform. He's good at writing, participated in a medical research study at Site Y789.
|
| 132 |
+
# Answer:
|
| 133 |
+
# Subject_id: ois/51317-31580/10653
|
| 134 |
+
# Age: 54-year-old
|
| 135 |
+
# Race: Hispanic
|
| 136 |
+
# Gender: male | he | He's
|
| 137 |
+
# Site_id: Y789
|
| 138 |
+
# End-Answer'''
|
| 139 |
+
# example13 = '''This Task Order CPDR001F2301 (“Task Order”) shall be binding upon the undersigned upon its execution by the duly authorized representative(s) of Novartis. ', 'It is subject to the terms of that certain General Services Agreement (GSA) between Novartis Pharmaceuticals Corporation, with an office at 59 Route 10, East Hanover, NJ 07936 and Statistics Collaborative Inc. (“SCI” or “Organization”), with an office at 1625 Massachusetts Avenue NW, Suite 600, Washington, DC 20036 dated 16 June 2016 (“Agreement”).
|
| 140 |
+
# Answer:
|
| 141 |
+
# Address: 59 Route 10, East Hanover, NJ 07936 | 1625 Massachusetts Avenue NW, Suite 600, Washington, DC 20036
|
| 142 |
+
# Date: 16 June 2016
|
| 143 |
+
# End-Answer'''
|
| 144 |
+
|
| 145 |
+
# example14 = '''ATC classes are presented alphabetically; preferred terms are sorted within ATC class alphabetically. - A medication can appear with more than one ATC class. Program: CIGG013A/CIGG013A1101J/report/pgm_saf/t_cmd03.sas, 18:33 14OCT2014 Final. https://www.google.com/
|
| 146 |
+
# Study_dates: 18 Nov 2009-28 Jun 2010
|
| 147 |
+
# Answer:
|
| 148 |
+
# Program: CIGG013A/CIGG013A1101J/report/pgm_saf/t_cmd03.sas
|
| 149 |
+
# Date: 14OCT2014 | 18 Nov 2009 | 28 Jun 2010
|
| 150 |
+
# URL: https://www.google.com/
|
| 151 |
+
# End-Answer
|
| 152 |
+
# '''
|
| 153 |
+
# example15 = '''This Task Order CPDRB0081E5 (“Task Order”) shall be binding upon the undersigned upon its execution by the duly authorized representative(s) of Novartis. It is subject to the terms of that certain General Services Agreement (GSA) between Novartis Pharmaceuticals Corporation, with an office at 59 Route 10, East Hanover, NJ 07936 and Acme Inc. (“Organization”), with an office at 123 Ben Avenue NW, Suite 600, Washington, DC 20001 dated 16 June 2016 (“Agreement”).
|
| 154 |
+
# Answer:
|
| 155 |
+
# Address: 59 Route 10, East Hanover, NJ 07936 | 123 Ben Avenue NW, Suite 600, Washington, DC 20001
|
| 156 |
+
# Date: 16 June 2016
|
| 157 |
+
# End-Answer
|
| 158 |
+
# '''
|
| 159 |
+
# example16 ='''In a pre-clinical study day, Subject ID #235 with Medical Record Number 783-ABD has a BMI of 27.5. His name is John Doe, aged 35, residing at 123 Main St. He's a non-participant, non-smoker, and non-drinker. His medical history includes allergies. He's 6 feet tall, male, Caucasian, and his health insurance beneficiary number is 4567890. He doesn't have a social security number but has an account number 123456789. He drives a Toyota with license plate XYZ-123. contact him at john.doe@exam.com
|
| 160 |
+
# Answer:
|
| 161 |
+
# Subject_id: 235
|
| 162 |
+
# Medical_Record_Number: 783-ABD
|
| 163 |
+
# BMI: 27.5
|
| 164 |
+
# Name: John Doe
|
| 165 |
+
# Age: 35
|
| 166 |
+
# Address: 123 Main St.
|
| 167 |
+
# Non_participant: non-participant
|
| 168 |
+
# Smoking_habit: non-smoker
|
| 169 |
+
# Drinking_habit: non-drinker
|
| 170 |
+
# Medical_history: allergies
|
| 171 |
+
# Height: 6 feet
|
| 172 |
+
# Gender: male
|
| 173 |
+
# Race: Caucasian
|
| 174 |
+
# Health_Insurance_Beneficiary_Number: 4567890
|
| 175 |
+
# Account_Number: 123456789
|
| 176 |
+
# Vehicle_Identifier: Toyota | XYZ-123
|
| 177 |
+
# Email: john.doe@exam.com
|
| 178 |
+
# End-Answer
|
| 179 |
+
# '''
|
| 180 |
+
# example17 = '''He is a non-participant, non-smoker, and non-drinker. Anyone can reach at (555) 123-4567
|
| 181 |
+
# Answer:
|
| 182 |
+
# Gender: He
|
| 183 |
+
# Non_participant: non-participant
|
| 184 |
+
# Smoking_habit: non-smoker
|
| 185 |
+
# Drinking_habit: non-drinker
|
| 186 |
+
# Phone_number:(555) 123-4567
|
| 187 |
+
# End-Answer
|
| 188 |
+
# '''
|
| 189 |
+
# example18 = '''Dr. Sarah Miller has a valid medical license (Certificate License Number: MD12345) and practices at 789 Oak Avenue. her medical history includes allergies.
|
| 190 |
+
# Answer:
|
| 191 |
+
# Name: Dr. Sarah Miller
|
| 192 |
+
# Certificate_License_Number: MD12345
|
| 193 |
+
# Adddress: 789 Oak Avenue
|
| 194 |
+
# Gender: her
|
| 195 |
+
# Medical_history: allergies
|
| 196 |
+
# End-Answer
|
| 197 |
+
# '''
|
| 198 |
+
# example19 = '''During a pre-clinical study day at Site ID 56, Subject ID 1234, a 40-year-old Caucasian female named Amritha, her bmi with 2.65.
|
| 199 |
+
# Answer:
|
| 200 |
+
# Site_id: 56
|
| 201 |
+
# Subject_id: 1234
|
| 202 |
+
# Age: 40-year-old
|
| 203 |
+
# Race: Caucasian
|
| 204 |
+
# Gender: female | her
|
| 205 |
+
# Name: Amritha
|
| 206 |
+
# BMI: 2.65
|
| 207 |
+
# End-Answer
|
| 208 |
+
# '''
|
| 209 |
+
# example20 = '''John, a non-smoker and an occasional drinker, He importance of maintaining a healthy lifestyle. Sarah, his colleague, shares his commitment to wellness. Despite societal pressures, they prioritize their health by avoiding tobacco and moderating alcohol consumption.
|
| 210 |
+
# Answer:
|
| 211 |
+
# Name: John | Sarah
|
| 212 |
+
# Drinking_habit: occasional drinker | alcohol consumption
|
| 213 |
+
# Gender: He | his | his
|
| 214 |
+
# Smoking_habit: non-smoker | tobacco
|
| 215 |
+
# End-Answer
|
| 216 |
+
# '''
|
| 217 |
+
# example21 = '''Study Dates: First patient screened: Jan 15, 2010 Last patient visit: Sept 14, 2012
|
| 218 |
+
# Answer:
|
| 219 |
+
# Date: Jan 15, 2010 | Sept 14, 2012
|
| 220 |
+
# End-Answer
|
| 221 |
+
# '''
|
| 222 |
+
# example22 = '''Father: Hypertension, deceased at 70 (myocardial infarction) Mother: Type 2 Diabetes Mellitus, alive, age 72
|
| 223 |
+
# Answer:
|
| 224 |
+
# Medical_history: Hypertension | Diabetes Mellitus
|
| 225 |
+
# Age: 70 | 72
|
| 226 |
+
# End-Answer
|
| 227 |
+
# '''
|
| 228 |
+
|
| 229 |
+
# whole_task = '''Given the paragraph below identify list of possible entities.
|
| 230 |
+
# Paragraph:'''
|
| 231 |
+
|
| 232 |
+
# example_list = [example1,example17,example12,example11,example13,example14, example2, example9, example3, example4, example5, example6, example15, example7, example8, example9, example10,example16, example18,example19, example20, example21, example22 ]
|
| 233 |
+
|
| 234 |
+
# final_prompt = ''
|
| 235 |
+
# for ex in example_list:
|
| 236 |
+
# final_prompt = final_prompt+''+whole_task+'\n'
|
| 237 |
+
# final_prompt = final_prompt+''+ex+'\n'
|
| 238 |
+
|
| 239 |
+
# final_prompt = system_prompt+'\n'+final_prompt
|
| 240 |
+
# return final_prompt, whole_task
|
| 241 |
+
|
| 242 |
+
# def get_prompts_emea2():
|
| 243 |
+
# # system_prompt = # General entities
|
| 244 |
+
# # {"Name": "NAME", "Age": "AGE", "Gender": "GENDER", "Date": "DATE", "Location": "ADDRESS", "Country": "COUNTRY"}
|
| 245 |
+
# system_prompt2 = '''An entity is a Organization_name, Dosage Values, Drug names, Bank Account Numbers, Bank Swift Codes, Cost Values.
|
| 246 |
+
# All entities should strictly get extracted, but don't extract incorrect entities.
|
| 247 |
+
# Entity present in any part of the paragraph or sentence should be detected.
|
| 248 |
+
# Dosages: Medical Dosage values should get detected. Some examples are 500 mg, 100 mg, 1000mg, 10ml, 250mg, 20mcg, 15μg, 19μg, 21 μg, 80 μg, 800 mcg, etc.,
|
| 249 |
+
# Drug_names : Drug names should get detected. Some examples are Adelphane-Esidrex, Afinitor, Amturnide, Anafranil, Arcapta Neohaler, Brinaldix, Clozaril, Co-Diovan, EXV8111, Fabhalta, FUB5231, JDQ443, KAE609, Kisqali, KLU1563
|
| 250 |
+
# Organization_names: Extract Organization names from given paragraph or sentence.
|
| 251 |
+
# Account_Number: Bank Account Numbers should get detected.
|
| 252 |
+
# Swift_code: Bank SWIFTcodes should get detected.
|
| 253 |
+
# Costs: Only Costs Numerical monetory values like Euro(€),rupee(₹),doller($) should get detected as costs. Some examples are €10, €1200, €10,000, $100, $70,000, ₹25
|
| 254 |
+
# If there are multiple values for same entity they should be extracted with | separation.
|
| 255 |
+
# Random text should not get detected as any of above entities.
|
| 256 |
+
# All entities from above should strictly be extracted
|
| 257 |
+
# '''
|
| 258 |
+
# # Countries like China, US, France, India should always get detected as country. Countries like China, US, France, India, South Korea should always get detected as Country. A country can't be a Subject_id.
|
| 259 |
+
|
| 260 |
+
# example1 ='''The international conference registration fee is €300 for European attendees, ₹25,000 for participants from India, and $350 for delegates from other countries. Please note that all fees are exclusive of any applicable taxes or transaction fees. Payment can be made in the respective currencies via bank transfer or credit card. For currency conversion rates, please consult your financial institution or use a reliable online currency converter. Early bird discounts are available for registrations completed before the deadline. We look forward to welcoming you to the conference!
|
| 261 |
+
# Answer:
|
| 262 |
+
# Costs: €300 | ₹25,000 | $350
|
| 263 |
+
# End-Answer'''
|
| 264 |
+
# example2 = '''The project budget for the construction of the new pharmaceutical manufacturing facility has been estimated at €10 million, with additional expenses projected in Indian rupees (INR) amounting to ₹50 crore. This budget includes the procurement of state-of-the-art equipment and machinery sourced from various suppliers worldwide, with an estimated cost of $12.5 million in US dollars. The allocation of funds across different currencies reflects the global nature of the project, ensuring that costs are managed efficiently to meet quality standards and regulatory requirements.
|
| 265 |
+
# Answer:
|
| 266 |
+
# Costs: €10 | ₹50 | $12.5
|
| 267 |
+
# End-Answer'''
|
| 268 |
+
# example3 = '''She budgeted approximately $150 per night for accommodations, €50 for meals, and ₹1,500 for daily miscellaneous expenses. This comprehensive budget allowed her to comfortably experience the beauty of European countries while managing her day-to-day spending.
|
| 269 |
+
# Answer:
|
| 270 |
+
# Costs: $150 | €50 | ₹1,500
|
| 271 |
+
# End-Answer'''
|
| 272 |
+
# example4 = '''Bank Name: ABC Bank Branch: XYZ Branch Account Holder: [Your Name] Account Number: 123-456-789 SWIFT Code: XYZABCD1234 IBAN: [Your IBAN Number] Routing Number: 987654321
|
| 273 |
+
# Answer:
|
| 274 |
+
# Account_number: 123-456-789
|
| 275 |
+
# Swift_code: XYZABCD1234
|
| 276 |
+
# End-Answer'''
|
| 277 |
+
|
| 278 |
+
# example5 = '''Bank Name: DEF Bank Branch: PQR Branch Account Holder: [Your Name] Account Number: 9876543210 SWIFT Code: DEFPQR12345 IBAN: [Your IBAN Number] Routing Number: 123456789
|
| 279 |
+
# Answer:
|
| 280 |
+
# Account_number: 9876543210
|
| 281 |
+
# Swift_code: DEFPQR12345
|
| 282 |
+
# End-Answer'''
|
| 283 |
+
# example7 = '''Prescription Label: "Take 1 tablet by mouth daily with food." "Apply a thin layer of cream to the affected area twice daily." "Administer 10 mg/mL orally every 4 hours as needed for pain."Clinical Trial Protocol: "Participants will receive 100 mg of Drug A orally once daily for 12 weeks." "Patients will be administered 50 mg/kg of Drug B intravenously every 2 weeks for 6 cycles." "Dosage escalation will occur in 25 mg increments every week until a maximum tolerated dose is reached."
|
| 284 |
+
# Answer:
|
| 285 |
+
# Dosages: 1 tablet | 10 mg/ml | 100 mg | 50 mg/kg | 25 mg
|
| 286 |
+
# End-Answer'''
|
| 287 |
+
# example6 = '''Final Clinical Study Report - NV25118: A Randomized, Multicenter, Single Blinded, Parallel Study of the Safety of 100 mg and 200 mg Oseltamivir Administered Intravenously for the Treatment of Influenza in Patients Aged > 13 Years. Report No. 1037027. June 3, 2013
|
| 288 |
+
# Answer:
|
| 289 |
+
# Dosages: 100 mg | 200 mg
|
| 290 |
+
# Drug_names: Oseltamivir
|
| 291 |
+
# End-Answer'''
|
| 292 |
+
|
| 293 |
+
# example8 = '''Medication Package Insert:"Recommended dosage for adults: 500μg to 1000μg orally every 6 hours, as needed." "Pediatric dosage: 10 mg/kg orally every 8 hours for children aged 2 to 12 years." "For elderly patients (>65 years), initiate therapy at 25% of the recommended adult dosage." Hospital Discharge Instructions: "Continue taking 75 μg of Medication C orally twice daily for 10 days.""Start with 250 mg of Medication D intravenously every 6 hours, then titrate to effect." "Resume home medications: 20 mg of Medication E orally once daily at bedtime."
|
| 294 |
+
# Answer:
|
| 295 |
+
# Dosages: 500μg | 1000μg | 10 mg/kg | 75 μg | 250 mg | 20 mg
|
| 296 |
+
# End-Answer'''
|
| 297 |
+
|
| 298 |
+
# example9 = '''Acme Corporation, represented herein as Party A, hereby enters into a distribution agreement with Smith & Sons Enterprises, hereinafter referred to as Party B. Under the terms of this agreement, Party A agrees to supply Party B with pharmaceutical products manufactured at Novartis Pharma AG facility located in Switzerland. Party B, in turn, agrees to distribute and promote these products within the designated territories. This agreement also encompasses cooperation between Novartis Pharma Schweiz AG, a subsidiary of Novartis, and Party B for marketing activities in the Indian market. Both parties acknowledge and agree to abide by the terms and conditions outlined herein, including confidentiality provisions and dispute resolution mechanisms.
|
| 299 |
+
# Answer:
|
| 300 |
+
# Organization_names: Acme Corporation | Smith & Sons Enterprises| Novartis Pharma AG | Novartis Pharma Schweiz AG
|
| 301 |
+
# End-Answer'''
|
| 302 |
+
# example10 = '''This Research Collaboration Agreement ("Agreement") is entered into on [Date] by and between Novartis Institutes for BioMedical Research, Inc. ("Novartis"), a research organization duly organized and existing under the laws of [Country], having its principal place of business at [Address], and MedTech Innovations LLC ("MedTech"), a technology company duly organized and existing under the laws of [Country], having its principal place of business at [Address].
|
| 303 |
+
# Answer:
|
| 304 |
+
# Organization_names: Novartis Institutes for BioMedical Research, Inc. | MedTech Innovations LLC.
|
| 305 |
+
# End-Answer'''
|
| 306 |
+
# example11 = '''This Task Order CPDR001F2301 (“Task Order”) shall be binding upon the undersigned upon its execution by the duly authorized representative(s) of Novartis. ', 'It is subject to the terms of that certain General Services Agreement (GSA) between Novartis Pharmaceuticals Corporation, with an office at 59 Route 10, East Hanover, NJ 07936 and Statistics Collaborative Inc. (“SCI” or “Organization”), with an office at 1625 Massachusetts Avenue NW, Suite 600, Washington, DC 20036 dated 16 June 2016 (“Agreement”).\n
|
| 307 |
+
# Answer:
|
| 308 |
+
# Organization_names: Novartis Pharmaceuticals Corporation | Statistics Collaborative Inc.
|
| 309 |
+
# End-Answer'''
|
| 310 |
+
# example12 = '''Afinitor, Arcapta Neohaler, and Clozaril are among the pharmaceuticals frequently prescribed for a variety of medical conditions.
|
| 311 |
+
# Answer:
|
| 312 |
+
# Drug_names: Afinitor | Arcapta Neohaler | Clozaril
|
| 313 |
+
# End-Answer'''
|
| 314 |
+
# example13 = '''Femara functions as a protease-activated receptor-1 (PAR-1) antagonist, effectively inhibiting platelet activation and reducing the risk of thrombotic events in patients with a history of myocardial infarction or peripheral arterial disease. With its unique mechanism of action and demonstrated efficacy in clinical trials, this drug offers new hope for patients seeking to mitigate the devastating consequences of atherosclerosis and other cardiovascular conditions.
|
| 315 |
+
# Answer:
|
| 316 |
+
# Drug_names: Femara
|
| 317 |
+
# End-Answer
|
| 318 |
+
# '''
|
| 319 |
+
# example14 = '''Coartem, Kisqali, and Leqvio are among the pharmaceuticals utilized in the treatment and management of diverse medical conditions. specific dosage regimen based on the patient's weight and age. 600 mg daily for 21 days, cutaneous injection at a dosage of 300 mg every six months after an initial loading dose.
|
| 320 |
+
# Answer:
|
| 321 |
+
# Drug_names: Coartem | Kisqali | Leqvio
|
| 322 |
+
# Dosages: 600 mg | 300 mg
|
| 323 |
+
# End-Answer
|
| 324 |
+
# '''
|
| 325 |
+
# example15 = '''This Task Order CPDRB0081E5 (“Task Order”) shall be binding upon the undersigned upon its execution by the duly authorized representative(s) of Novartis. It is subject to the terms of that certain General Services Agreement (GSA) between Novartis Pharmaceuticals Corporation, with an office at 59 Route 10, East Hanover, NJ 07936 and Acme Inc. (“Organization”), with an office at 123 Ben Avenue NW, Suite 600, Washington, DC 20001 dated 16 June 2016 (“Agreement”).
|
| 326 |
+
# Answer:
|
| 327 |
+
# Orgnaization_names: Novartis Pharmaceuticals Corporation | Acme Inc
|
| 328 |
+
# End-Answer
|
| 329 |
+
# '''
|
| 330 |
+
# example16 = ''''Patient 25291/3280 Oseltamivir 100 mg IV q12h for 5 days H275H/Y Patient 25291/3280 was a 57 year old male enrolled on 16-09-2021 , 2 days after onset of influenza symptoms in the hospital. ', "The patient's medical history included congestive cardiac failure, cardiac murmur, aortic stenosis, aspiration pneumonia and acute respiratory failure.
|
| 331 |
+
# Drug_names: Oseltamivir
|
| 332 |
+
# Dosages: 100 mg
|
| 333 |
+
# End-Answer
|
| 334 |
+
# '''
|
| 335 |
+
# whole_task = '''Given the paragraph below identify list of entities that are mentioned in list [Person/Name, Dosages,].
|
| 336 |
+
# Paragraph:'''
|
| 337 |
+
|
| 338 |
+
# example_list = [example1, example5, example3,example9, example4, example6, example13, example2, example7, example8, example10, example11, example12,example15,example14,example16]
|
| 339 |
+
|
| 340 |
+
# final_prompt = ''
|
| 341 |
+
# for ex in example_list:
|
| 342 |
+
# final_prompt = final_prompt+''+whole_task+'\n'
|
| 343 |
+
# final_prompt = final_prompt+''+ex+'\n'
|
| 344 |
+
|
| 345 |
+
# final_prompt = system_prompt2+'\n'+final_prompt
|
| 346 |
+
# return final_prompt,whole_task
|
| 347 |
+
|
| 348 |
+
def get_prompts_emea_1():
|
| 349 |
+
sys_prompt ='''Extract the entities for the following labels from the given text.
|
| 350 |
+
All entities should strictly get extracted, but don't extract incorrect entities.
|
| 351 |
+
Entity present in any part of the paragraph/sentence should be detected as same.
|
| 352 |
+
If there are multiple values for same entity they should be extracted with | separation.
|
| 353 |
+
Don't give any other entities except provided labels below.
|
| 354 |
+
Random text should not get detected.
|
| 355 |
+
Accuracy and relevance in your responses are key.
|
| 356 |
+
|
| 357 |
+
Lables and their Descriptions:
|
| 358 |
+
Name : Extract person names from the paragraph/sentences.
|
| 359 |
+
Age: Age of a person should get detected. Some examples are 12 yo, 15 years old, 11 months old, 79 years, 51 yrs, 18-year-old, > 13 Years, <14 years
|
| 360 |
+
Gender: Extract Genders like Male, Female, male, female, women, man, his, him, he, He, Her, her, she, She should be detected as Gender.
|
| 361 |
+
Weight: some of the examples are 100 pounds, 50 pounds, 77.4 pounds, 66 kgs, 78.9 kilograms, 88 kilograms, etc.,should be detected as Weight.
|
| 362 |
+
Height: six feet tall, 5 feet 7 inches, 8 feet 1 inch, 170 centimeters tall, 188 centimeters, 189cm, 140.73 cm, etc., should be detected as Height.
|
| 363 |
+
BMI: Extract Body Mass Index (BMI) Value from the paragraph/Sentences.
|
| 364 |
+
Race: Some of the examples of Race are caucasian, Asian, Black, White, African Amercian, Hispanic descent, mixed race heritage, Native American, etc., should be detected as Race.
|
| 365 |
+
Ethnicity: examples of Ethnicity are Latino, Jewish, Arab, Indian, Turkish, Chinese, Italian, Vietnamese, etc., Should detect as Ethnicity
|
| 366 |
+
Country: Extract Country names from paragraph or sentence.
|
| 367 |
+
Smoking Habits: Some of the examples are never smokes, Former smoker, Heavy smoker, Non-smoker, Social smoker (Former), Light smoker, etc.,
|
| 368 |
+
Drinking Habits: Some of the examples are never drinkSocial drinker, Non-drinker, Occasional drinker, Regular drinker, etc.,
|
| 369 |
+
'''
|
| 370 |
+
example1 = '''At the local park, Lisa organized a picnic for her friends. Jack showed up with a homemade quiche, while Maria brought a colorful fruit salad. Tom, ever the musician, brought his guitar and strummed some tunes that set the perfect vibe. Meanwhile, Jenna arrived with a stack of board games, ready for some friendly competition. As they all settled on the blanket, the laughter and chatter filled the air, creating a beautiful afternoon filled with camaraderie and joy.
|
| 371 |
+
Answer:
|
| 372 |
+
Name: Lisa | Jack | Maria | Tom | Jenna
|
| 373 |
+
End-Answer
|
| 374 |
+
'''
|
| 375 |
+
example2 = '''John Smith, a 45-year-old male with a BMI of 28.5, stands at 5 feet 10 inches and weighs 180 pounds. He is a current smoker, smoking around five cigarettes a day, and drinks alcohol occasionally, typically during weekends. John identifies as Caucasian and is of Irish-American descent. He resides in the United States and is trying to adopt a healthier lifestyle by cutting down on smoking and alcohol consumption.
|
| 376 |
+
Answer:
|
| 377 |
+
Name: John Smith | John
|
| 378 |
+
Age: 45-year-old
|
| 379 |
+
Gender: male | He
|
| 380 |
+
BMI: 28.5
|
| 381 |
+
Height: 5 feet 10 inches
|
| 382 |
+
Weight: 180 pounds
|
| 383 |
+
Race: Caucasian
|
| 384 |
+
Ethnicity: Irish-American
|
| 385 |
+
Country: United States
|
| 386 |
+
Smoking_habits: current smoker | smoking around five cigarettes
|
| 387 |
+
Drinking_habits: alcohol consumption.
|
| 388 |
+
End-Answer
|
| 389 |
+
'''
|
| 390 |
+
example3 = '''Emma Davis and Rachel Green, both 34-year-old females, have similar lifestyles but differ in their health metrics. Emma has a BMI of 26.7, stands at 5 feet 5 inches, and weighs 160 pounds. She is a former smoker who quit three years ago and now drinks alcohol occasionally at social events. Rachel, on the other hand, has a BMI of 22.9, is 5 feet 7 inches, and weighs 145 pounds. She is a non-smoker but enjoys wine on the weekends. Both identify as Caucasian and are of British descent, living in England.
|
| 391 |
+
Answer:
|
| 392 |
+
Name: Emma Davis | Rachel Green | Emma | Rachel
|
| 393 |
+
Age: 34-year-old
|
| 394 |
+
Gender: females | She
|
| 395 |
+
BMI: 26.7 | 22.9
|
| 396 |
+
Height: 5 feet 5 inches | 5 feet 7 inches
|
| 397 |
+
Weight: 160 pounds | 145 pounds
|
| 398 |
+
Smoking_habits: former smoker | non-smoker
|
| 399 |
+
Drinking_habits: drinks alcohol occasionally | enjoys wine
|
| 400 |
+
Race: Caucasian
|
| 401 |
+
Ethnicity: British descent
|
| 402 |
+
Country: England
|
| 403 |
+
End-Answer
|
| 404 |
+
'''
|
| 405 |
+
example4 = '''Jessica Collins, a 39 year female, has a BMI of 23.9, stands at 5 feet 6 inches, and weighs 150 pounds. She is a former smoker, having quit three years ago, and drinks socially on weekends. Living in New Zealand, Jessica identifies as Caucasian and is of Irish descent. She currently focuses on maintaining a healthy lifestyle with regular exercise and a balanced diet. Her two best friends, Sarah Mitchell and Olivia Clark, often join her for workouts and social outings.
|
| 406 |
+
Answer:
|
| 407 |
+
Name: Jessica Collins | Jessica | Sarah Mitchell | Olivia Clark
|
| 408 |
+
Age: 39 year
|
| 409 |
+
Gender: female | She
|
| 410 |
+
Smoking_habits: former smoker
|
| 411 |
+
Drinking_habits: drinks socially
|
| 412 |
+
Country: New Zealand
|
| 413 |
+
Race: Caucasian
|
| 414 |
+
Ethnicity: Irish descent
|
| 415 |
+
End-Answer'''
|
| 416 |
+
example5='''Patient 25291/3280 was a 57 year old male enrolled on 16-09-2021 , 2 days after onset of influenza symptoms in the hospital. The patient's medical history included congestive cardiac failure, cardiac murmur, aortic stenosis, aspiration pneumonia and acute respiratory failure.
|
| 417 |
+
Answer:
|
| 418 |
+
Patient_id: 25291/3280
|
| 419 |
+
Age: 57 year old
|
| 420 |
+
Gender: male
|
| 421 |
+
'''
|
| 422 |
+
example6 = '''Final Clinical Study Report - NV25118: A Randomized, Multicenter, Single Blinded, Parallel Study of the Safety of 100 mg and 200 mg Oseltamivir Administered Intravenously for the Treatment of Influenza in Patients Aged > 13 Years. Report No. 1037027. June 3, 2013
|
| 423 |
+
Answer:
|
| 424 |
+
Age: 13 Years
|
| 425 |
+
'''
|
| 426 |
+
whole_task = '''Given the paragraph below identify list of possible entities, Random text should not get detected, Accuracy and relevance in your responses are key, don't give other than the below list.
|
| 427 |
+
["Name","Age","Gender","Somking_habits","Drinking_habits","Country","Race","Ethnicity",Height, Weight]
|
| 428 |
+
Paragraph:'''
|
| 429 |
+
example_list = [example2, example3, example4,example5,example6, example1]
|
| 430 |
+
final_prompt = ''
|
| 431 |
+
for ex in example_list:
|
| 432 |
+
final_prompt = final_prompt+''+whole_task+'\n'
|
| 433 |
+
final_prompt = final_prompt+''+ex+'\n'
|
| 434 |
+
|
| 435 |
+
final_prompt = sys_prompt+'\n'+final_prompt
|
| 436 |
+
return final_prompt,whole_task
|
| 437 |
+
|
| 438 |
+
|
| 439 |
+
|
| 440 |
+
|
| 441 |
+
def get_prompts_emea_2():
|
| 442 |
+
sys_prompt ='''Extract the entities for the following labels from the given text.
|
| 443 |
+
All entities should strictly get extracted, but don't extract incorrect entities.
|
| 444 |
+
Entity present in any part of the paragraph/sentence should be detected as same.
|
| 445 |
+
If there are multiple values for same entity they should be extracted with | separation.
|
| 446 |
+
Don't give any other entities except provided labels below.
|
| 447 |
+
Random text should not get detected.
|
| 448 |
+
Accuracy and relevance in your responses are key.
|
| 449 |
+
|
| 450 |
+
Lables and their Descriptions:
|
| 451 |
+
Study_day: Examples of study day are Day 11, Day 20, Day 1, Day 4, Day 16, Day 500, etc.,
|
| 452 |
+
Site_id: examples of Site id are NV25118, WP20727, NV25118, Site ID #56, Site ID 87, siteid #22, siteid356, at Site Y789, at site 235 etc.,
|
| 453 |
+
Date: All dates should get detected as Dates. Some examples are 10-1-2021, 23-01-2022, 27th June, June 29, 10-09-2007, 4/5/67, 7/67, 31-12-2000. start_date, end_date should get detected as Date itself.
|
| 454 |
+
Address: Extract Address from paragraph and should detect as Address.
|
| 455 |
+
Medical_history: Extract all Symptoms, all Diseases, all Adverse Events, all Severe Adverse Events from paragraph and should detect as Medical_history.
|
| 456 |
+
Email: Extract Email from paragraph
|
| 457 |
+
Phone: Extract Phone_number or Mobile number or Contact number from paragraph.
|
| 458 |
+
'''
|
| 459 |
+
example1 = '''A clinical trial for asthma treatment at Site ID NV25118 observed significant improvements by Day 10. Patients reported a reduction in symptoms such as wheezing, chest tightness, and shortness of breath. The study, initiated on 01/10/2024, aimed to assess the efficacy of a new bronchodilator. On Study Day 11, patients at WP20727 began to experience milder symptoms, particularly during nighttime episodes. For more details, contact the site coordinator via email at info@nv25118clinic.com or call +1-555-123-4567. The trial is being conducted at 123 Health Ave, Las Vegas, NV 89101.
|
| 460 |
+
Answer:
|
| 461 |
+
Site_id: NV25118 | WP20727
|
| 462 |
+
Study_day: Day 10 | Day 11
|
| 463 |
+
Medical_history: asthma | wheezing | chest | tightness | shortness of breath
|
| 464 |
+
Email: info@nv25118clinic.com
|
| 465 |
+
Phone: +1-555-123-4567
|
| 466 |
+
Address: 123 Health Ave, Las Vegas, NV 89101.
|
| 467 |
+
End-Answer
|
| 468 |
+
'''
|
| 469 |
+
example2 = '''By Study Day 11, the trial for Type 2 diabetes management at NV25118 demonstrated significant progress. Symptoms such as frequent urination, increased thirst, and fatigue were reduced in most patients. The trial began on August 5, 2024, and will continue until August 18, 2024. WP20727 observed similar results, particularly in blood glucose regulation. The site coordinator can be reached via email at contact@wp20727health.com or phone +1-702-555-6789. The clinic is located at 321 Diabetes St, Henderson, NV 89012.
|
| 470 |
+
Answer:
|
| 471 |
+
Study_day: Day 11
|
| 472 |
+
Medical_history: Type 2 diabetes | frequent urination | increased thirst | fatigue
|
| 473 |
+
Study_id: NV25118 | WP20727
|
| 474 |
+
Date: August 5, 2024 | August 18, 2024
|
| 475 |
+
Email: contact@wp20727health.com
|
| 476 |
+
Phone: +1-702-555-6789
|
| 477 |
+
Address: 321 Diabetes St, Henderson, NV 89012.
|
| 478 |
+
End-Answer
|
| 479 |
+
'''
|
| 480 |
+
example3 = '''The ongoing clinical trial at Site ID WP20727 focused on managing chronic pain began on Day 10. Patients reported improvements in symptoms such as lower back pain and muscle stiffness. The trial, running at Site ID NV25118, also monitored similar cases, with participants experiencing relief from persistent joint pain. To assist with treatment, patients were administered several medications, including carvedilol, chlorambucil, azithromycin, amikacin, and piperacillin/tazobactam, At screening, his ECG was normal and blood pressure was 110/60 mmHg. For more information, you can contact the coordinators at info@wp20727clinic.com or support@nv25118health.org. The WP20727 site is located at 456 Care Ave, San Francisco, CA 94103, while the NV25118 clinic operates from 789 Pain Relief St, Reno, NV 89502.
|
| 481 |
+
Answer:
|
| 482 |
+
Site_id: WP20727 | NV25118
|
| 483 |
+
Study_day: Day 10
|
| 484 |
+
Medical_history: chronic pain | lower back pain | muscle stiffness | joint pain
|
| 485 |
+
Email: info@wp20727clinic.com | support@nv25118health.org
|
| 486 |
+
Address: 456 Care Ave, San Francisco, CA 94103 | 789 Pain Relief St, Reno, NV 89502
|
| 487 |
+
End-Answer
|
| 488 |
+
'''
|
| 489 |
+
example4 = '''Final Clinical Study Report - NV25118: A Randomized, Multicenter, Single Blinded, Parallel Study of the Safety of 100 mg and 200 mg Oseltamivir Administered Intravenously for the Treatment of Influenza in Patients Aged > 13 Years. Report No. 1037027. June 3, 2013
|
| 490 |
+
Answer:
|
| 491 |
+
Study_id: NV25118
|
| 492 |
+
Medical_history: Influenza
|
| 493 |
+
Date: June 3, 2013
|
| 494 |
+
End-Answer'''
|
| 495 |
+
example5='''Patient 25291/3280 was a 57 year old male enrolled on 16-09-2021 , 2 days after onset of influenza symptoms in the hospital. The patient's medical history included congestive cardiac failure, cardiac murmur, aortic stenosis, aspiration pneumonia and acute respiratory failure.
|
| 496 |
+
Answer:
|
| 497 |
+
Date: 16-09-2021
|
| 498 |
+
Medical_history: influenza | congestive cardiac failure | cardiac murmur | aortic stenosis |aspiration pneumonia | acute respiratory failure.
|
| 499 |
+
End-Answer'''
|
| 500 |
+
example6 = '''On study Day 1, the patient experienced the severe AE of worsening aortic stenosis, resulting in the AE of left ventricular hypertrophy (Study Day 11), and for which he subsequently received an aortic valve replacement on Study Day 11. He also experienced the severe AE of diarrhoea on Study Day 5.
|
| 501 |
+
Answer:
|
| 502 |
+
Study_day: Day 1 | Day 11 | Day 5
|
| 503 |
+
Medical_history: aortic stenosis | ventricular hypertrophy | aortic valve | diarrhoea
|
| 504 |
+
End-Answer'''
|
| 505 |
+
example7 = '''This Task Order CPDRB0081E5 (“Task Order”) shall be binding upon the undersigned upon its execution by the duly authorized representative(s) of Novartis. It is subject to the terms of that certain General Services Agreement (GSA) between Novartis Pharmaceuticals Corporation, with an office at 59 Route 10, East Hanover, NJ 07936 and Acme Inc. (“Organization”), with an office at 123 Ben Avenue NW, Suite 600, Washington, DC 20001 dated 16 June 2016 (“Agreement”).
|
| 506 |
+
Answer:
|
| 507 |
+
Address: 59 Route 10, East Hanover, NJ 07936 | 123 Ben Avenue NW, Suite 600, Washington, DC 20001
|
| 508 |
+
Date: 16 June 2016
|
| 509 |
+
End-Answer'''
|
| 510 |
+
example8 = '''The patient, under Study ID #BR56789, arrived at Site ID WP20727 on Study Day 2 (March 1, 2024) with a medical history (MH) of hypertension, chronic bronchitis, and kidney disease. He was assessed at 456 Harmony Ln, Henderson, 89012, and follow-up was scheduled for Study Day 5 (March 4, 2024). On Study Day 10 (March 9, 2024), his symptoms worsened, prompting a transfer to Site ID NV25118 at 321 Wellness Blvd, Las Vegas, 89101. His MH also included type 2 diabetes and sleep apnea, and additional testing was conducted. The patient contacted the study coordinators through nv25118@clinic.org and info@wp20727health.com. For further inquiries, he was asked to call +1-555-987-6543 or +1-555-123-4567. On Study Day 15 (March 14, 2024), the patient returned to Site ID #56 at 789 Care St, Las Vegas, 89103, where adjustments to his treatment were made. His medical records were updated to include COPD. Follow-up consultations were conducted at Site ID #22, located at 654 Medical Dr, Reno, 89502, on Study Day 18 (March 17, 2024) and Study Day 22 (March 21, 2024). For urgent queries, he was advised to call +1-555-234-5678 or email contact@site56clinic.com. His next visit to Site ID NV25118 was confirmed for Study Day 28 (March 27, 2024).
|
| 511 |
+
Answer:
|
| 512 |
+
Study_id: #BR56789 | WP20727 | NV25118 | #56 | #22
|
| 513 |
+
Study_day: Day 2 | Day 5 | Day 10 | Day 15 | Day 18 | Day 22 | Day 28
|
| 514 |
+
Date: March 1, 2024 | March 9, 2024 | March 14, 2024 | March 17, 2024 | March 21, 2024 | March 27, 2024
|
| 515 |
+
Medical_history: hypertension | chronic bronchitis | kidney disease | type 2 diabetes | sleep apnea
|
| 516 |
+
Address: 456 Harmony Ln, Henderson, 89012 | 321 Wellness Blvd, Las Vegas, 89101 | 789 Care St, Las Vegas, 89103 | 654 Medical Dr, Reno, 89502
|
| 517 |
+
Email: nv25118@clinic.org | info@wp20727health.com | contact@site56clinic.com
|
| 518 |
+
Phone: +1-555-987-6543 | +1-555-123-4567 | +1-555-234-5678
|
| 519 |
+
End-Answer'''
|
| 520 |
+
whole_task = '''Given the paragraph below identify list of possible entities, Random text should not get detected, Accuracy and relevance in your responses are key, don't give other than the below list.
|
| 521 |
+
[Study_day, Study_id, Medical_history, Date, Email, Address, Phone]
|
| 522 |
+
Paragraph:'''
|
| 523 |
+
example_list = [example2,example8, example3, example4,example5, example1, example6, example7]
|
| 524 |
+
final_prompt = ''
|
| 525 |
+
for ex in example_list:
|
| 526 |
+
final_prompt = final_prompt+''+whole_task+'\n'
|
| 527 |
+
final_prompt = final_prompt+''+ex+'\n'
|
| 528 |
+
|
| 529 |
+
final_prompt = sys_prompt+'\n'+final_prompt
|
| 530 |
+
return final_prompt,whole_task
|
| 531 |
+
|
| 532 |
+
def get_prompts_hippa():
|
| 533 |
+
sys_prompt ='''Extract the entities for the following labels from the given text.
|
| 534 |
+
All entities should strictly get extracted, but don't extract incorrect entities.
|
| 535 |
+
Entity present in any part of the paragraph/sentence should be detected as same.
|
| 536 |
+
If there are multiple values for same entity they should be extracted with | separation.
|
| 537 |
+
Don't give any other entities except provided labels below.
|
| 538 |
+
Random text should not get detected.
|
| 539 |
+
Accuracy and relevance in your responses are key.
|
| 540 |
+
|
| 541 |
+
Lables and their Descriptions:
|
| 542 |
+
Name : Extract person names from the paragraph/sentences.
|
| 543 |
+
Age: Age of a person should get detected. Some examples are 12 yo, 15 years old, 11 months old, 79 years, 51 yrs, 18-year-old, > 13 Years, <14 years
|
| 544 |
+
Address: Extract Address from paragraph and should detect as Address.
|
| 545 |
+
Date: All dates should get detected as Dates. Some examples are 10-1-2021, 23-01-2022, 27th June, June 29, 10-09-2007, 4/5/67, 7/67, 31-12-2000. start_date, end_date should get detected as Date itself.
|
| 546 |
+
SSN: All Social Security Number Should Detect as SSN
|
| 547 |
+
HIBN: Health Insurance Benficiary Number Shuould Detect as HBIN examples like Health Plan number or Insurance Number etc.,
|
| 548 |
+
MRN: All Medical Record Numbers should get detect as MRN.
|
| 549 |
+
Vehicle_Identifiers: All Vechicle identifiers should get detected, for example Lisence Plate number, VIN number, Car Names etc.,
|
| 550 |
+
Dosages: Medical Dosage values should get detected. Some examples are 500 mg, 100 mg, 1000mg, 10ml, 250mg, 20mcg, 15μg, 19μg, 21 μg, 80 μg, 800 mcg, etc.,
|
| 551 |
+
Drug_names : Drug names should get detected. Some examples are Adelphane-Esidrex, Afinitor, Amturnide, Anafranil, Arcapta Neohaler, Brinaldix, Clozaril, CoDiovan, EXV8111, Fabhalta, FUB5231, JDQ443, KAE609, Kisqali, KLU1563
|
| 552 |
+
Organization_names: Extract Organization names from given paragraph or sentence.
|
| 553 |
+
Account_number: Bank Account Numbers should get detected.
|
| 554 |
+
Swift_code: Bank SWIFTcodes should get detected.
|
| 555 |
+
Costs: Only Costs Numerical monetory values like Euro(€),rupee(₹),doller($) should get detected as costs. Some examples are €10, €1200, €10,000, $100, $70,000, ₹25, etc.,
|
| 556 |
+
Serial_numbers: Serial_numbers Should get detect as Serial_numbers
|
| 557 |
+
'''
|
| 558 |
+
# Websiteurl, contact(phone_number,email), ipaddress should be written in rules exception costs and dosages
|
| 559 |
+
# Device attributes needs to check with vibhor
|
| 560 |
+
example1 = '''On September 15, 2023, patient John Smith, age 45, residing at 123 Elm Street, Springfield, IL, was prescribed Metformin 500 mg twice daily to manage his type 2 diabetes. His health insurance benefit number is Insurance_number 987654321, and his medical record number is 123456789. The prescription was processed through Springfield Health Clinic, where his attending physician, Dr. Emily Johnson, noted that he should also continue taking Lisinopril 10 mg once daily for hypertension. For verification purposes, John’s social security number is 123-45-6789, and the medication was issued under serial number RX456789012. Smith has an account number 942394212 with his health insurance provider, and the associated SWIFT code for transactions is SMWFT456.
|
| 561 |
+
Answer:
|
| 562 |
+
Name: John Smith | Dr. Emily Johnson | John's | Smith
|
| 563 |
+
Age: 45
|
| 564 |
+
Address: 123 Elm Street, Springfield, IL,
|
| 565 |
+
Drug_names: Metformin
|
| 566 |
+
Dosages: 500 mg | 10 mg
|
| 567 |
+
HIBN: 987654321
|
| 568 |
+
MRN: 123456789
|
| 569 |
+
SSN: 123-45-6789
|
| 570 |
+
Serial_number: RX456789012
|
| 571 |
+
Account_number: 942394212
|
| 572 |
+
Swift_code: SMWFT456
|
| 573 |
+
End-Answer'''
|
| 574 |
+
example2 = '''On October 10, 2023, patient Lisa Brown, age 32, residing at 456 Maple Avenue, Oakville, TX, was prescribed Amlodipine 5 mg once daily to manage her hypertension. Her health insurance benefit number is HIBN 123987456, and her medical record number is MRN 987654321. The prescription was processed through Oakville Family Health Center, where her attending physician, Dr. Sarah Lee, noted that she should also take Simvastatin 20 mg in the evening for cholesterol management. For verification purposes, Lisa’s social security number is 987-65-4321. Additionally, she drives a 2020 Toyota Camry, VIN 4T1B11HK5LU123456, registered under license plate XYZ7890. The medication was issued under serial number RX987654321. Lisa has an account number 456123789 with her health insurance provider, and the associated SWIFT code for transactions is HSWFT456.
|
| 575 |
+
Answer:
|
| 576 |
+
Date: October 10, 2023
|
| 577 |
+
Name: Lisa Brown | Dr. Sarah Lee | Lisa's | Lisa
|
| 578 |
+
Address: 456 Maple Avenue, Oakville, TX
|
| 579 |
+
Drug_names: Amlodipine
|
| 580 |
+
Dosages: 5 mg | 20 mg
|
| 581 |
+
HIBN: 123987456
|
| 582 |
+
MRN: 987654321
|
| 583 |
+
SSN: 987-65-4321
|
| 584 |
+
Vehicle_Identifiers: 2020 Toyota Camry | VIN 4T1B11HK5LU123456 | XYZ7890
|
| 585 |
+
Serial_number: RX987654321
|
| 586 |
+
Account_number: 456123789
|
| 587 |
+
Swift_code: HSWFT456
|
| 588 |
+
End-Answer'''
|
| 589 |
+
example3 = '''This Task Order CPDRB0081E5 (“Task Order”) shall be binding upon the undersigned upon its execution by the duly authorized representative(s) of Novartis. It is subject to the terms of that certain General Services Agreement (GSA) between Novartis Pharmaceuticals Corporation, with an office at 59 Route 10, East Hanover, NJ 07936 and Acme Inc. (“Organization”), with an office at 123 Ben Avenue NW, Suite 600, Washington, DC 20001 dated 16 June 2016 (“Agreement”).
|
| 590 |
+
Answer:
|
| 591 |
+
Organization_names: Novartis Pharmaceuticals Corporation | Acme Inc.
|
| 592 |
+
Address: 59 Route 10, East Hanover, NJ 07936 | 123 Ben Avenue NW, Suite 600, Washington, DC 20001
|
| 593 |
+
Date: 16 June 2016
|
| 594 |
+
End-Answer'''
|
| 595 |
+
example4 = '''Final Clinical Study Report - NV25118: A Randomized, Multicenter, Single Blinded, Parallel Study of the Safety of 100 mg and 200 mg Oseltamivir Administered Intravenously for the Treatment of Influenza in Patients Aged > 13 Years. Report No. 1037027. June 3, 2013
|
| 596 |
+
Answer:
|
| 597 |
+
Dosages: 100 mg | 200 mg
|
| 598 |
+
Drug_names: Oseltamivir
|
| 599 |
+
Age: 13 Years
|
| 600 |
+
Date: June3, 2013
|
| 601 |
+
End-Answer'''
|
| 602 |
+
example5 = '''This Task Order CPDRB0092F3 (“Task Order”) shall be binding upon the undersigned upon its execution by the duly authorized representative(s) of Pfizer. It is subject to the terms of that certain General Services Agreement (GSA) between Pfizer Inc., with an office at 235 East 42nd Street, New York, NY 10017, and Beta Corp. (“Organization”), with an office at 789 Pine Street, Suite 200, San Francisco, CA 94108, dated 10 July 2018 (“Agreement”).
|
| 603 |
+
Answer:
|
| 604 |
+
Organization_names: Pfizer Inc., | Beta Corp.
|
| 605 |
+
Address: 235 East 42nd Street, New York, NY 10017, | 789 Pine Street, Suite 200, San Francisco, CA 94108,
|
| 606 |
+
Date: 10 July 2018
|
| 607 |
+
End-Answer'''
|
| 608 |
+
example6 = '''The vehicle with license plate number ABC1234 is registered in California and is owned by John Doe. Classified as a sedan, this vehicle is a common choice for daily commuting. The license plate serves as an important identifier, linking the vehicle to its registered owner for legal and administrative purposes.
|
| 609 |
+
Answer:
|
| 610 |
+
Name: John Doe
|
| 611 |
+
Vehicle_Identifiers: ABC1234 | sedan
|
| 612 |
+
End-Answer
|
| 613 |
+
'''
|
| 614 |
+
example7 = '''The 2019 Ford F-150 currently has an odometer reading of 85,000 miles. It underwent its last service on August 10, 2023, ensuring that it remains in optimal working condition. Regular maintenance is essential for vehicles like this truck, which is often used for both work and recreation.
|
| 615 |
+
Answer:
|
| 616 |
+
Vehicle_Identifiers: 2019 Ford F-150
|
| 617 |
+
Date: August 10, 2023
|
| 618 |
+
End-Answer
|
| 619 |
+
'''
|
| 620 |
+
whole_task = '''Given the paragraph below identify list of possible entities. don't give other than this list.
|
| 621 |
+
["Name","Age", Date, Address, Organization_names, Drug_names, Dosages,COSTS, HIBN, MRN, SSN, Vechcle_Identifiers, Serial_numbers, Account_number, Swift_code]
|
| 622 |
+
Paragraph:'''
|
| 623 |
+
example_list = [example1, example3, example2,example4,example6, example5, example7]
|
| 624 |
+
final_prompt = ''
|
| 625 |
+
for ex in example_list:
|
| 626 |
+
final_prompt = final_prompt+''+whole_task+'\n'
|
| 627 |
+
final_prompt = final_prompt+''+ex+'\n'
|
| 628 |
+
|
| 629 |
+
final_prompt = sys_prompt+'\n'+final_prompt
|
| 630 |
+
return final_prompt,whole_task
|
| 631 |
+
|
| 632 |
+
|
| 633 |
+
|
| 634 |
+
def custom_entity_slection_prompt_personal():
|
| 635 |
+
sys_prompt = '''Extract the personal entities for the following labels from the given text.
|
| 636 |
+
All entities should strictly get extracted, but don't extract incorrect entities.
|
| 637 |
+
Entity present in any part of the paragraph should be detected as same.
|
| 638 |
+
If there are multiple values for same entity they should be extracted with | separation.
|
| 639 |
+
Don't give any other entities except provided labels below.
|
| 640 |
+
Random text should not get detected.
|
| 641 |
+
Accuracy and relevance in your responses are key.
|
| 642 |
+
|
| 643 |
+
Lables and their Descriptions:
|
| 644 |
+
Name : Extract person names from the paragraph/sentences.
|
| 645 |
+
Age: Age of a person should get detected. Some examples are 12 yo, 15 years old, 11 months old, 79 years, 51 yrs, 18-year-old, > 13 Years, <14 years
|
| 646 |
+
Gender: Extract Genders like Male, Female, male, female, women, man, his, him, he, He, Her, her, she, She should be detected as Gender.
|
| 647 |
+
Height: six feet tall, 5 feet 7 inches, 8 feet 1 inch, 170 centimeters tall, 188 centimeters, 189cm, 140.73 cm, etc., should be detected as Height.
|
| 648 |
+
Weight: some of the examples are 100 pounds, 50 pounds, 77.4 pounds, 66 kgs, 78.9 kilograms, 88 kilograms, etc.,should be detected as Weight.
|
| 649 |
+
Date: All dates should get detected as Dates. Some examples are 10-1-2021, 23-01-2022, 27th June, June 29, 10-09-2007, 4/5/67, 7/67, 31-12-2000. start_date, end_date should get detected as Date itself.
|
| 650 |
+
BMI: Extract Body Mass Index (BMI) Value from the paragraph/Sentences.
|
| 651 |
+
Race: Some of the examples of Race are caucasian, Asian, Black, White, African Amercian, mixed race heritage, Native American, etc., should be detected as Race.
|
| 652 |
+
Ethnicity: examples of Ethnicity are non-Hispanic, Latino, Jewish, Arab, Indian, Turkish, Chinese, Italian, Vietnamese, etc., Should detect as Ethnicity
|
| 653 |
+
Country: Extract Country names from paragraph or sentence.
|
| 654 |
+
Address: Extract Address from paragraph and should detect as Address.
|
| 655 |
+
Organization_name: Extract Organization names from given paragraph.
|
| 656 |
+
Serial_number: Extract Serial numbers from given paragraph.
|
| 657 |
+
Vehicle_Identifiers: All Vechicle identifiers like Lisence Plate number, VIN number, Car Names etc., Should get detected.
|
| 658 |
+
Account_number: Bank Account Number should get detected.
|
| 659 |
+
Swift_code: Bank SwiftCode Should get detected.
|
| 660 |
+
Phone_number: Phone number should get detected.
|
| 661 |
+
SSN: All Social Security Number Should Detect as SSN.
|
| 662 |
+
'''
|
| 663 |
+
# [NAME,AGE,Gender,Weight,Height,Date,BMI,Race,Ethnicity,Country,Address, Organization_name, Serial_number,Vehicle_Identifiers,Account_number,
|
| 664 |
+
# Swift_code,Phone_number]
|
| 665 |
+
example1 = '''At the community health fair on October 5, 2023, attendees like Alex Johnson, a 34-year-old male weighing 180 pounds and standing 6 feet tall, gathered to get their health metrics checked. With a BMI of 24.5, Alex, who identifies as Caucasian and has a mixed ethnicity, received insights into his overall health while representing his organization, Health First. The event took place in Springfield, USA, where community members shared their experiences and discussed wellness tips, fostering a sense of unity and health awareness.
|
| 666 |
+
Answer:
|
| 667 |
+
Name: Alex Johnson | Alex
|
| 668 |
+
Age: 34-year-old
|
| 669 |
+
Gender: male | his
|
| 670 |
+
Weight: 180 pounds
|
| 671 |
+
Height: 6 feet
|
| 672 |
+
BMI: 24.5
|
| 673 |
+
Race: Caucasian
|
| 674 |
+
Ethnicity: mixed
|
| 675 |
+
Organization_name: Health First
|
| 676 |
+
Address: Springfield, USA
|
| 677 |
+
Country: USA
|
| 678 |
+
End-Answer'''
|
| 679 |
+
example2 = '''On October 5, 2023, the community health fair in 1234 Elm Street in Springfield, IL, 62701, USA. featured participants like Maria Lopez, a 34-year-old female weighing 150 pounds and standing 5 feet 6 inches tall. She has a BMI of 24.2 and identifies as Hispanic with a mixed ethnicity. Representing Health Solutions, Inc., Maria provided her address as 456 Oak Avenue, Springfield, and her phone number as (555) 987-6543. Her account number, 123456789, and serial number, SN654321, were noted for follow-up, along with her vehicle identifiers: VIN7G8H9I0J1K2. Additionally, Maria shared her swift code, XYZWUS44, as part of her registration process, ensuring that she received personalized health insights tailored to her background.
|
| 680 |
+
Answer:
|
| 681 |
+
Date: October 5, 2023
|
| 682 |
+
Address: 1234 Elm Street in Springfield, IL, 62701 | 456 Oak Avenue, Springfield
|
| 683 |
+
Country: USA
|
| 684 |
+
Name: Maria Lopez | Maria
|
| 685 |
+
Age: 34-year-old
|
| 686 |
+
Gender female | She | her | Her
|
| 687 |
+
Weight: 150 pounds
|
| 688 |
+
Height: 5 feet 6 inches
|
| 689 |
+
BMI: 24.2
|
| 690 |
+
Race: Hispanic
|
| 691 |
+
Ethnicity: mixed
|
| 692 |
+
Organization_name: Health Solutions, Inc.
|
| 693 |
+
phone_number: (555) 987-6543
|
| 694 |
+
Account_number: 123456789
|
| 695 |
+
Serial_number: SN654321
|
| 696 |
+
Vechicle_Identifiers: VIN7G8H9I0J1K2
|
| 697 |
+
Swift_code: XYZWUS44
|
| 698 |
+
End-Answer'''
|
| 699 |
+
example3 = '''Another participant, Mark Lee, who is 45 and weighs 210 pounds, discovered that his BMI was 31.0, categorizing him as obese. Hailing from an Asian background, he was keen to improve his health metrics and mentioned his address for further consultations. Mark's phone number, (555) 987-6543, account number, 123456789, and serial number, SN987654, were recorded, along with his health metrics, ensuring that everyone left with actionable steps to enhance their well-being, On Day 28 (23-Sep-2013), this patient’s platelet count was 19×109/L. On Day 29 (24-Sep-2013) the patient was noted to have disease progression. On Day 31 (26-Sep-2013), the patient became afebrile. The events (febrile neutropenia, cytokine release syndrome–second episode, high fever) resolved on Day 32 (27-Sep-2013) with body temperature at 37.83°C (neutrophil count not reported).
|
| 700 |
+
Answer:
|
| 701 |
+
Name: Mark Lee | Mark's
|
| 702 |
+
Age: 45
|
| 703 |
+
Weight: 210 pounds
|
| 704 |
+
BMI: 31.0
|
| 705 |
+
Gender: him | he | his
|
| 706 |
+
Race: Asian
|
| 707 |
+
Phone_number: (555) 987-6543
|
| 708 |
+
Account_number: 123456789
|
| 709 |
+
Serial_number: SN987654
|
| 710 |
+
Date: 23-Sep-2013 | 24-Sep-2013 | 26-Sep-2013 | 27-Sep-2013
|
| 711 |
+
End-Answer'''
|
| 712 |
+
example4 = '''John Smith, a 45-year-old male with a BMI of 28.5, stands at 5 feet 10 inches and weighs 180 pounds. He is a current smoker, smoking around five cigarettes a day, and drinks alcohol occasionally, typically during weekends. John identifies as Caucasian and is of Irish-American descent. He resides in the United States.
|
| 713 |
+
Answer:
|
| 714 |
+
Name: John Smith | John
|
| 715 |
+
Age: 45-year-old
|
| 716 |
+
Gender: male | He
|
| 717 |
+
BMI: 28.5
|
| 718 |
+
Height: 5 feet 10 inches
|
| 719 |
+
Weight: 180 pounds
|
| 720 |
+
Race: Caucasian
|
| 721 |
+
Ethnicity: Irish-American
|
| 722 |
+
Country: United States
|
| 723 |
+
|
| 724 |
+
End-Answer
|
| 725 |
+
'''
|
| 726 |
+
example5 = '''Jessica Collins, a 39 year female, has a BMI of 23.9, stands at 5 feet 6 inches, and weighs 150 pounds. Living in New Zealand, Jessica identifies as Caucasian and is of Irish descent. She currently focuses on maintaining a healthy lifestyle with regular exercise and a balanced diet. Her two best friends, Sarah Mitchell and Olivia Clark, often join her for workouts and social outings.
|
| 727 |
+
Answer:
|
| 728 |
+
Name: Jessica Collins | Jessica | Sarah Mitchell | Olivia Clark
|
| 729 |
+
Age: 39 year
|
| 730 |
+
Gender: female | She
|
| 731 |
+
BMI: 23.9
|
| 732 |
+
Country: New Zealand
|
| 733 |
+
Race: Caucasian
|
| 734 |
+
Ethnicity: Irish descent
|
| 735 |
+
End-Answer'''
|
| 736 |
+
example6='''Patient 25291/3280 was a 57 year old male enrolled on 16-09-2021 , 2 days after onset of influenza symptoms in the hospital. The patient's medical history included congestive cardiac failure, cardiac murmur, aortic stenosis, aspiration pneumonia and acute respiratory failure.
|
| 737 |
+
Answer:
|
| 738 |
+
Age: 57 year old
|
| 739 |
+
Gender: male
|
| 740 |
+
Date: 16-09-2021
|
| 741 |
+
End-Answer'''
|
| 742 |
+
example7 = '''Final Clinical Study Report - NV25118: A Randomized, Multicenter, Single Blinded, Parallel Study of the Safety of 100 mg and 200 mg Oseltamivir Administered Intravenously for the Treatment of Influenza in Patients Aged > 13 Years. Report No. 1037027. June 3, 2013
|
| 743 |
+
Answer:
|
| 744 |
+
Age: 13 Years
|
| 745 |
+
Date: June 3, 2013
|
| 746 |
+
End-Answer'''
|
| 747 |
+
example8 = '''This Task Order CPDRB0092F3 (“Task Order”) shall be binding upon the undersigned upon its execution by the duly authorized representative(s) of Pfizer. It is subject to the terms of that certain General Services Agreement (GSA) between Pfizer Inc., with an office at 235 East 42nd Street, New York, NY 10017, and Beta Corp. (“Organization”), with an office at 789 Pine Street, Suite 200, San Francisco, CA 94108, dated 10 July 2018 (“Agreement”).
|
| 748 |
+
Answer:
|
| 749 |
+
Organization_names: Pfizer Inc., | Beta Corp.
|
| 750 |
+
Address: 235 East 42nd Street, New York, NY 10017 | 789 Pine Street, Suite 200, San Francisco, CA 94108
|
| 751 |
+
Date: 10 July 2018
|
| 752 |
+
End-Answer'''
|
| 753 |
+
example9 = '''This Novartis event, hosted at a Melbourne hotel took place on October 1, 2021 and was to be attended by 12 oncologists from the region, as well as two event facilitators from Jenkins’ team, Brad Chiles (Chiles) and Rogers. Two external attendees were proposed as event speakers: Ricky Owens (Owens) and Cassidy Williams (Williams). A review of associated documentation showed that attendees were paid CHF 800 while the two speakers, Owens and Williams would be paid CHF 1200 for their services. Owens did not attend and was not paid as a result.
|
| 754 |
+
Answer:
|
| 755 |
+
Name: Jenkins | Brad Chiles (Chiles) | Rogers | Ricky Owens (Owens) | Cassidy Williams (Williams) | Owens | Williams
|
| 756 |
+
Date: October 1, 2021
|
| 757 |
+
Location: Melbourne
|
| 758 |
+
End-Answer'''
|
| 759 |
+
example10 = '''So, on the Monday December 12, when I saw Dennis in the office kitchen, I used the opportunity to speak with him about the matter and I told him my opinion that it’s not correct that he invited this HCP for the game and that he paid for the tickets on his corporate credit card. Roughly 6 months, this is also how long I have been with the company. I am originally from France and moved countries especially for this role. We chatted and learn from HCP called Mike Brown.
|
| 760 |
+
Answer:
|
| 761 |
+
Date: December 12
|
| 762 |
+
Name: Dennis | Mike Brown
|
| 763 |
+
Country: France
|
| 764 |
+
End-Answer'''
|
| 765 |
+
example11 = '''This Task Order CPDRB0092F3 (“Task Order”) shall be binding upon the undersigned upon its execution by the duly authorized representative(s) of Google. It is subject to the terms of that certain General Services Agreement (GSA) between Google Inc., with an office at 235 East 42nd Street, New York, NY 10017, and Novatis Corporation pvt ltd. (“Organization”), with an office at 789 Pine Street, Suite 200, San Francisco, CA 94108, dated 19 July 2018 (“Agreement”).
|
| 766 |
+
Organization_names: Google Inc. | Novatis Corporation pvt ltd.
|
| 767 |
+
Address: 235 East 42nd Street, New York, NY 10017 | 789 Pine Street, Suite 200, San Francisco, CA 94108
|
| 768 |
+
Date: 19 July 2018
|
| 769 |
+
End-Answer
|
| 770 |
+
'''
|
| 771 |
+
|
| 772 |
+
whole_task = '''Given the paragraph below identify list of possible entities, Random text should not get detected, Accuracy and relevance in your responses are key, don't give other than the below list.
|
| 773 |
+
[NAME,AGE,Gender,Weight,Height,Date,BMI,Race,Ethnicity,Country,Address, Organization_name, Serial_number, Vehicle_Identifiers, Account_number, Swift_code, Phone_number]
|
| 774 |
+
Paragraph:'''
|
| 775 |
+
example_list = [example2, example3,example7, example4,example8,example5, example1,example9, example6, example10, example11]
|
| 776 |
+
final_prompt = ''
|
| 777 |
+
for ex in example_list:
|
| 778 |
+
final_prompt = final_prompt+''+whole_task+'\n'
|
| 779 |
+
final_prompt = final_prompt+''+ex+'\n'
|
| 780 |
+
|
| 781 |
+
final_prompt = sys_prompt+'\n'+final_prompt
|
| 782 |
+
return final_prompt,whole_task
|
| 783 |
+
|
| 784 |
+
|
| 785 |
+
|
| 786 |
+
|
| 787 |
+
|
| 788 |
+
|
| 789 |
+
|
| 790 |
+
|
| 791 |
+
|
| 792 |
+
# address, age, bmi, CertLisenumb, Country, Ethnicity, Height, Name, Race,SSN, Weight, Date, Device Attributes or serial_numb, Vehicle identifiers, Account numb, commpartyname, facility_name, swiftcode
|
| 793 |
+
|
| 794 |
+
|
| 795 |
+
|
| 796 |
+
def custom_entity_slection_prompt_medical():
|
| 797 |
+
sys_prompt ='''Extract the Medical entities for the following labels from the given text.
|
| 798 |
+
All entities should strictly get extracted, but don't extract incorrect entities.
|
| 799 |
+
Entity present in any part of the paragraph/sentence should be detected as same.
|
| 800 |
+
If there are multiple values for same entity they should be extracted with | separation.
|
| 801 |
+
Don't give any other entities except provided labels below.
|
| 802 |
+
Random text should not get detected.
|
| 803 |
+
Accuracy and relevance in your responses are key.
|
| 804 |
+
|
| 805 |
+
Lables and their Descriptions:
|
| 806 |
+
Study_day: Examples of study day are Day 11, Day 20, Day 1, Day 4, Day 16, Day 500, day 12, day 60 etc. only these similar should detect as Study_day
|
| 807 |
+
Site_id: Extract Study Site ids Some examples are NV25118, WP20727, NV25118, Site ID #56, Site ID 87, siteid #22, siteid356, at Site Y789, at site 235 etc., Extract only these kind on formats.
|
| 808 |
+
Subject_id: Extract all Subject ids based on the Context.
|
| 809 |
+
Patient_id: Extract all Patient_ids from the paragraph.
|
| 810 |
+
Medical_history: Extract Symptoms, Diseases, Medical_conditions, Adverse Events, Severe Adverse Events from paragraph and should detect as Medical_history.
|
| 811 |
+
Drug_names: Drug names should get detected. Some examples are Adelphane-Esidrex, Afinitor, Amturnide, Anafranil, Arcapta Neohaler, Brinaldix, Clozaril, CoDiovan, EXV8111, Fabhalta, FUB5231, JDQ443, KAE609, Kisqali, KLU1563
|
| 812 |
+
Dosages: Medical Dosage values should get detected. Some examples are 500 mg, 100 mg, 1000mg, 10ml, 250mg, 20mcg, 15μg, 19μg, 21 μg, 80 μg, 800 mcg, etc.,
|
| 813 |
+
Smoking_habit: Some of the examples are never smokes, Former smoker, Heavy smoker, Non-smoker, Social smoker (Former), Light smoker, etc.,
|
| 814 |
+
Drinking_habit: Some of the examples are never drink, Social drinker, Non-drinker, Occasional drinker, Regular drinker, etc.,
|
| 815 |
+
HIBN: Health Insurance Benficiary Number Shuould Detect as HBIN examples like Health Plan number or Insurance Number etc.,
|
| 816 |
+
MRN: All Medical Record Numbers should get detect as MRN.
|
| 817 |
+
'''
|
| 818 |
+
example1 = '''On September 15, 2023, patient John Smith, age 45, residing at 123 Elm Street, Springfield, IL, was prescribed Metformin 500 mg twice daily to manage his type 2 diabetes. His health insurance benefit number is Insurance_number 987654321, and his medical record number is 123456789. The prescription was processed through Springfield Health Clinic, where his attending physician, Dr. Emily Johnson, noted that he should also continue taking Lisinopril 10 mg once daily for hypertension. For verification purposes, John’s social security number is 123-45-6789, and the medication was issued under serial number RX456789012. Smith has an account number 942394212 with his health insurance provider, and the associated SWIFT code for transactions is SMWFT456.
|
| 819 |
+
Answer:
|
| 820 |
+
Drug_names: Metformin
|
| 821 |
+
Dosages: 500 mg | 10 mg
|
| 822 |
+
HIBN: 987654321
|
| 823 |
+
MRN: 123456789
|
| 824 |
+
End-Answer'''
|
| 825 |
+
example2 = '''On October 10, 2023, patient Lisa Brown, age 32, residing at 456 Maple Avenue, Oakville, TX, was prescribed Amlodipine 5 mg once daily to manage her hypertension. Her health insurance benefit number is HIBN 123987456, and her medical record number is MRN 987654321. The prescription was processed through Oakville Family Health Center, where her attending physician, Dr. Sarah Lee, noted that she should also take Simvastatin 20 mg in the evening for cholesterol management. For verification purposes, Lisa’s social security number is 987-65-4321. Additionally, she drives a 2020 Toyota Camry, VIN 4T1B11HK5LU123456, registered under license plate XYZ7890. The medication was issued under serial number RX987654321. Lisa has an account number 456123789 with her health insurance provider, and the associated SWIFT code for transactions is HSWFT456.
|
| 826 |
+
Answer:
|
| 827 |
+
Drug_names: Amlodipine
|
| 828 |
+
Dosages: 5 mg | 20 mg
|
| 829 |
+
HIBN: 123987456
|
| 830 |
+
MRN: 987654321
|
| 831 |
+
End-Answer'''
|
| 832 |
+
example3 = '''Final Clinical Study Report - NV25118: A Randomized, Multicenter, Single Blinded, Parallel Study of the Safety of 100 mg and 200 mg Oseltamivir Administered Intravenously for the Treatment of Influenza in Patients Aged > 13 Years. Report No. 1037027. June 3, 2013
|
| 833 |
+
Answer:
|
| 834 |
+
Study_id: NV25118
|
| 835 |
+
Dosages: 100 mg | 200 mg
|
| 836 |
+
Drug_names: Oseltamivir
|
| 837 |
+
Medical_history: Influenza
|
| 838 |
+
End-Answer'''
|
| 839 |
+
example4='''Patient 25291/3280 was a 57 year old male enrolled on 16-09-2021 , 2 days after onset of influenza symptoms in the hospital. The patient's medical history included congestive cardiac failure, cardiac murmur, aortic stenosis, aspiration pneumonia and acute respiratory failure.
|
| 840 |
+
Answer:
|
| 841 |
+
Patient_id: 25291/3280
|
| 842 |
+
Medical_history: influenza | congestive cardiac failure | cardiac murmur | aortic stenosis | aspiration pneumonia | acute respiratory failure
|
| 843 |
+
End-Answer'''
|
| 844 |
+
example5 = '''Study Day 11 of the clinical trial for the drug Codiovan was marked by the assessment of participants at Site ID #56. Researchers monitored the subjects’ responses to the medication, which was administered in a dosage of 500 mg. The study ID for this trial is NV25118, and participant interactions focused on documenting any medical history and symptoms, such as headaches and dizziness, reported by the subjects. The team also reviewed health insurance beneficiary numbers to ensure proper coverage for all participants.
|
| 845 |
+
Answer:
|
| 846 |
+
Study_day: Day 11
|
| 847 |
+
Drug_names: Codiovan
|
| 848 |
+
Site_id: #56
|
| 849 |
+
Dosages: 500 mg
|
| 850 |
+
Study_id: NV25118
|
| 851 |
+
Medical_history: headaches | dizziness
|
| 852 |
+
'''
|
| 853 |
+
example6 = '''During the clinical trial for the drug Amlodipine, under study ID NV25118, participants were monitored across various study days, including Day 11, Day 14, Day 20, and Day 40. At Site ID #56, Maria Lopez, with Subject ID 4356/6753, reported symptoms such as headaches and dizziness after receiving a dosage of 500 mg. Maria identified as a former smoker and an occasional drinker. At Site ID #87, Mark Lee, also participating in the trial, presented a medical history that included diabetes and hypertension, experiencing fatigue and shortness of breath. His medical record number was MR654321. Mark reported that he does not smoke and drinks socially. Additionally, health insurance beneficiary numbers were collected for all subjects, including numbers 987654321 and 123456789, ensuring coverage throughout the study. The researchers were particularly interested in monitoring side effects and overall effectiveness, focusing on improvements in blood pressure and other health metrics across these multiple study days.
|
| 854 |
+
Answer:
|
| 855 |
+
Drug_name: Amlodipine
|
| 856 |
+
Study_id: NV25118
|
| 857 |
+
Study_day: Day 11 | Day 14 | Day 20 | Day 40
|
| 858 |
+
Site_id: #56
|
| 859 |
+
Subject_id: 4356/6753
|
| 860 |
+
Medical_histor: headaches | dizziness | diabetes | hypertension | fatigue | shortness of breath
|
| 861 |
+
Smoking_habits: former smoker
|
| 862 |
+
Drinking_habits: occasional drinker
|
| 863 |
+
MRN: MR654321
|
| 864 |
+
HIBN: 987654321 | 123456789
|
| 865 |
+
End-Answer'''
|
| 866 |
+
example7 = '''Robert Wilson recently started a new medication, Metformin, for diabetes management, prescribed at 500 mg twice daily. He paid $40 for a month’s supply. While his blood sugar levels improved, he experienced symptoms like stomach upset and fatigue. Also for other Subject No. 45312/7890 was an 82-year-old Hispanic female enrolled in the study, receiving oseltamivir at a dosage of 75 mg intravenously every 12 hours. During her treatment, she experienced acute respiratory distress syndrome, which was classified as a serious adverse event (SAE) that led to the premature termination of oseltamivir therapy. Unfortunately, she subsequently suffered a myocardial infarction, resulting in her death.
|
| 867 |
+
Answer:
|
| 868 |
+
Drug_name: Metformin
|
| 869 |
+
Dosages: 500 mg | 75 mg
|
| 870 |
+
Medical_history: stomach upset | fatigue | acute respiratory distress syndrome | myocardial infarction
|
| 871 |
+
Drug_name: oseltamivir
|
| 872 |
+
Subject_id: 45312/7890
|
| 873 |
+
End-Answer'''
|
| 874 |
+
example8 = '''On Day 28 (23-Sep-2013), the patient’s platelet count was 19×109/L. On Day 29 (24-Sep-2013) the patient was noted to have disease progression. On Day 31 (26-Sep-2013), the patient became afebrile. The events (febrile neutropenia, cytokine release syndrome–second episode, high fever) resolved on Day 32 (27-Sep-2013) with body temperature at 37.83°C (neutrophil count not reported).
|
| 875 |
+
Answer:
|
| 876 |
+
Study_day: Day 28 | Day 29 | Day 31 | Day 32
|
| 877 |
+
Medical_history: febrile neutropenia | cytokine release syndrome–second episode | high fever
|
| 878 |
+
End-Answer'''
|
| 879 |
+
example9 = '''Final Clinical Study Report - NV76145: A Randomized, Multicenter, Single Blinded, Parallel Study of the Safety of 10 ml and 80 μg Oseltamivir Administered Intravenously for the Treatment of Immunotherapy in Patients Aged > 18 Years. Report No. 1037027. June 21, 2013
|
| 880 |
+
Answer:
|
| 881 |
+
Study_id: NV76145
|
| 882 |
+
Dosages: 10 ml | 80 μg
|
| 883 |
+
Medical_history: Immunotherapy
|
| 884 |
+
End-Answer'''
|
| 885 |
+
example10 = '''Patient 25291/3475 Oseltamivir 200 mg IV q12h for 10 days H275Y Patient 25291/3475 was a 25 year old male,hispanic enrolled on 20-07-2021 . Onset of influenza symptoms was on 21-07-2021 . The patient's medical history reported enteritis and bronchopneumonia, and he was receiving treatment with moxifloxacin, metronidazole, bromhexine, loperamide, dipyrone and indomethacin. One day before entering the study, the patient received one day of treatment with non-study oseltamivir (75 mg bid).He was accompanied by his father. He then completed study treatment with a total of 19 doses of IV oseltamivir (10 doses standard treatment plus 9 doses of treatment extension). For Subject 67890/1234, antiviral therapy was initiated promptly, along with bronchodilator therapy to help manage his asthma symptoms. Continuous monitoring of his oxygen saturation levels and respiratory status was implemented, with adjustments made to his treatment plan as needed.
|
| 886 |
+
Patient_id: 25291/3475
|
| 887 |
+
Dosages: 200 mg | 75 mg
|
| 888 |
+
Medical_history: enteritis | bronchopneumonia | asthma
|
| 889 |
+
Drug_name: oseltamivir
|
| 890 |
+
Subject_id: 67890/1234
|
| 891 |
+
End-Answer'''
|
| 892 |
+
whole_task = '''Given the paragraph below identify list of possible entities, Random text should not get detected, Accuracy and relevance in your responses are key, don't give other than the below list.
|
| 893 |
+
[Study_day, Site_id, Patient_id, Subject_id, Medical_history, Drug_names, Dosages, Smoking_habits, drinking_habits, HIBN, MRN]
|
| 894 |
+
Paragraph:'''
|
| 895 |
+
example_list = [example2, example3,example4,example10,example5, example8, example1, example6,example7,example9]
|
| 896 |
+
final_prompt = ''
|
| 897 |
+
for ex in example_list:
|
| 898 |
+
final_prompt = final_prompt+''+whole_task+'\n'
|
| 899 |
+
final_prompt = final_prompt+''+ex+'\n'
|
| 900 |
+
|
| 901 |
+
final_prompt = sys_prompt+'\n'+final_prompt
|
| 902 |
+
return final_prompt,whole_task
|
| 903 |
+
|
| 904 |
+
#Medical - Drinking Habits, Drug name, HIBN, MH, MRN, non-participant,
|
| 905 |
+
#Preclinical studyday, siteid, smokinghabits, subjid
|
| 906 |
+
#Rule - Circum, Dosages
|
| 907 |
+
|
| 908 |
+
|
| 909 |
+
|
| 910 |
+
|
| 911 |
+
|
| 912 |
+
|
| 913 |
+
|
| 914 |
+
|
| 915 |
+
|
| 916 |
+
|
| 917 |
+
|
| 918 |
+
|
| 919 |
+
|
| 920 |
+
|