using medical speciality data set text mining for transcrition and explore the most frequent terms for Top 100 and bottom 100 clincial transcription by doctor based on their textural presenetation.
Load necessary packages and data set
rm(list=ls())
library(tm)
library(text2vec)
library(SnowballC)
library(dplyr)
library(data.table)
library(wordcloud)
library(plotly)
med<-read.csv("/Users/heinminntun/Downloads/1.UBD_PhD in Digital Public Health/4.PhD_Learning from UBD/6.Artifical Intelligence lectures by Dr Hanif/MedicalSpecialty_NotesText_Classification_Dataset.csv", sep = ",")
head(med)## Index
## 1 0
## 2 1
## 3 2
## 4 3
## 5 4
## 6 5
## description
## 1 A 23-year-old white female presents with complaint of allergies.
## 2 Consult for laparoscopic gastric bypass.
## 3 Consult for laparoscopic gastric bypass.
## 4 2-D M-Mode. Doppler.
## 5 2-D Echocardiogram
## 6 Morbid obesity. Laparoscopic antecolic antegastric Roux-en-Y gastric bypass with EEA anastomosis. This is a 30-year-old female, who has been overweight for many years. She has tried many different diets, but is unsuccessful.
## medical_specialty sample_name
## 1 Allergy / Immunology Allergic Rhinitis
## 2 Bariatrics Laparoscopic Gastric Bypass Consult - 2
## 3 Bariatrics Laparoscopic Gastric Bypass Consult - 1
## 4 Cardiovascular / Pulmonary 2-D Echocardiogram - 1
## 5 Cardiovascular / Pulmonary 2-D Echocardiogram - 2
## 6 Bariatrics Laparoscopic Gastric Bypass
## transcription
## 1 SUBJECTIVE:, This 23-year-old white female presents with complaint of allergies. She used to have allergies when she lived in Seattle but she thinks they are worse here. In the past, she has tried Claritin, and Zyrtec. Both worked for short time but then seemed to lose effectiveness. She has used Allegra also. She used that last summer and she began using it again two weeks ago. It does not appear to be working very well. She has used over-the-counter sprays but no prescription nasal sprays. She does have asthma but doest not require daily medication for this and does not think it is flaring up.,MEDICATIONS: , Her only medication currently is Ortho Tri-Cyclen and the Allegra.,ALLERGIES: , She has no known medicine allergies.,OBJECTIVE:,Vitals: Weight was 130 pounds and blood pressure 124/78.,HEENT: Her throat was mildly erythematous without exudate. Nasal mucosa was erythematous and swollen. Only clear drainage was seen. TMs were clear.,Neck: Supple without adenopathy.,Lungs: Clear.,ASSESSMENT:, Allergic rhinitis.,PLAN:,1. She will try Zyrtec instead of Allegra again. Another option will be to use loratadine. She does not think she has prescription coverage so that might be cheaper.,2. Samples of Nasonex two sprays in each nostril given for three weeks. A prescription was written as well.
## 2 PAST MEDICAL HISTORY:, He has difficulty climbing stairs, difficulty with airline seats, tying shoes, used to public seating, and lifting objects off the floor. He exercises three times a week at home and does cardio. He has difficulty walking two blocks or five flights of stairs. Difficulty with snoring. He has muscle and joint pains including knee pain, back pain, foot and ankle pain, and swelling. He has gastroesophageal reflux disease.,PAST SURGICAL HISTORY:, Includes reconstructive surgery on his right hand 13 years ago. ,SOCIAL HISTORY:, He is currently single. He has about ten drinks a year. He had smoked significantly up until several months ago. He now smokes less than three cigarettes a day.,FAMILY HISTORY:, Heart disease in both grandfathers, grandmother with stroke, and a grandmother with diabetes. Denies obesity and hypertension in other family members.,CURRENT MEDICATIONS:, None.,ALLERGIES:, He is allergic to Penicillin.,MISCELLANEOUS/EATING HISTORY:, He has been going to support groups for seven months with Lynn Holmberg in Greenwich and he is from Eastchester, New York and he feels that we are the appropriate program. He had a poor experience with the Greenwich program. Eating history, he is not an emotional eater. Does not like sweets. He likes big portions and carbohydrates. He likes chicken and not steak. He currently weighs 312 pounds. Ideal body weight would be 170 pounds. He is 142 pounds overweight. If ,he lost 60% of his excess body weight that would be 84 pounds and he should weigh about 228.,REVIEW OF SYSTEMS: ,Negative for head, neck, heart, lungs, GI, GU, orthopedic, and skin. Specifically denies chest pain, heart attack, coronary artery disease, congestive heart failure, arrhythmia, atrial fibrillation, pacemaker, high cholesterol, pulmonary embolism, high blood pressure, CVA, venous insufficiency, thrombophlebitis, asthma, shortness of breath, COPD, emphysema, sleep apnea, diabetes, leg and foot swelling, osteoarthritis, rheumatoid arthritis, hiatal hernia, peptic ulcer disease, gallstones, infected gallbladder, pancreatitis, fatty liver, hepatitis, hemorrhoids, rectal bleeding, polyps, incontinence of stool, urinary stress incontinence, or cancer. Denies cellulitis, pseudotumor cerebri, meningitis, or encephalitis.,PHYSICAL EXAMINATION:, He is alert and oriented x 3. Cranial nerves II-XII are intact. Afebrile. Vital Signs are stable.
## 3 HISTORY OF PRESENT ILLNESS: , I have seen ABC today. He is a very pleasant gentleman who is 42 years old, 344 pounds. He is 5'9". He has a BMI of 51. He has been overweight for ten years since the age of 33, at his highest he was 358 pounds, at his lowest 260. He is pursuing surgical attempts of weight loss to feel good, get healthy, and begin to exercise again. He wants to be able to exercise and play volleyball. Physically, he is sluggish. He gets tired quickly. He does not go out often. When he loses weight he always regains it and he gains back more than he lost. His biggest weight loss is 25 pounds and it was three months before he gained it back. He did six months of not drinking alcohol and not taking in many calories. He has been on multiple commercial weight loss programs including Slim Fast for one month one year ago and Atkin's Diet for one month two years ago.,PAST MEDICAL HISTORY: , He has difficulty climbing stairs, difficulty with airline seats, tying shoes, used to public seating, difficulty walking, high cholesterol, and high blood pressure. He has asthma and difficulty walking two blocks or going eight to ten steps. He has sleep apnea and snoring. He is a diabetic, on medication. He has joint pain, knee pain, back pain, foot and ankle pain, leg and foot swelling. He has hemorrhoids.,PAST SURGICAL HISTORY: , Includes orthopedic or knee surgery.,SOCIAL HISTORY: , He is currently single. He drinks alcohol ten to twelve drinks a week, but does not drink five days a week and then will binge drink. He smokes one and a half pack a day for 15 years, but he has recently stopped smoking for the past two weeks.,FAMILY HISTORY: , Obesity, heart disease, and diabetes. Family history is negative for hypertension and stroke.,CURRENT MEDICATIONS:, Include Diovan, Crestor, and Tricor.,MISCELLANEOUS/EATING HISTORY: ,He says a couple of friends of his have had heart attacks and have had died. He used to drink everyday, but stopped two years ago. He now only drinks on weekends. He is on his second week of Chantix, which is a medication to come off smoking completely. Eating, he eats bad food. He is single. He eats things like bacon, eggs, and cheese, cheeseburgers, fast food, eats four times a day, seven in the morning, at noon, 9 p.m., and 2 a.m. He currently weighs 344 pounds and 5'9". His ideal body weight is 160 pounds. He is 184 pounds overweight. If he lost 70% of his excess body weight that would be 129 pounds and that would get him down to 215.,REVIEW OF SYSTEMS: , Negative for head, neck, heart, lungs, GI, GU, orthopedic, or skin. He also is positive for gout. He denies chest pain, heart attack, coronary artery disease, congestive heart failure, arrhythmia, atrial fibrillation, pacemaker, pulmonary embolism, or CVA. He denies venous insufficiency or thrombophlebitis. Denies shortness of breath, COPD, or emphysema. Denies thyroid problems, hip pain, osteoarthritis, rheumatoid arthritis, GERD, hiatal hernia, peptic ulcer disease, gallstones, infected gallbladder, pancreatitis, fatty liver, hepatitis, rectal bleeding, polyps, incontinence of stool, urinary stress incontinence, or cancer. He denies cellulitis, pseudotumor cerebri, meningitis, or encephalitis.,PHYSICAL EXAMINATION: ,He is alert and oriented x 3. Cranial nerves II-XII are intact. Neck is soft and supple. Lungs: He has positive wheezing bilaterally. Heart is regular rhythm and rate. His abdomen is soft. Extremities: He has 1+ pitting edema.,IMPRESSION/PLAN:, I have explained to him the risks and potential complications of laparoscopic gastric bypass in detail and these include bleeding, infection, deep venous thrombosis, pulmonary embolism, leakage from the gastrojejuno-anastomosis, jejunojejuno-anastomosis, and possible bowel obstruction among other potential complications. He understands. He wants to proceed with workup and evaluation for laparoscopic Roux-en-Y gastric bypass. He will need to get a letter of approval from Dr. XYZ. He will need to see a nutritionist and mental health worker. He will need an upper endoscopy by either Dr. XYZ. He will need to go to Dr. XYZ as he previously had a sleep study. We will need another sleep study. He will need H. pylori testing, thyroid function tests, LFTs, glycosylated hemoglobin, and fasting blood sugar. After this is performed, we will submit him for insurance approval.
## 4 2-D M-MODE: , ,1. Left atrial enlargement with left atrial diameter of 4.7 cm.,2. Normal size right and left ventricle.,3. Normal LV systolic function with left ventricular ejection fraction of 51%.,4. Normal LV diastolic function.,5. No pericardial effusion.,6. Normal morphology of aortic valve, mitral valve, tricuspid valve, and pulmonary valve.,7. PA systolic pressure is 36 mmHg.,DOPPLER: , ,1. Mild mitral and tricuspid regurgitation.,2. Trace aortic and pulmonary regurgitation.
## 5 1. The left ventricular cavity size and wall thickness appear normal. The wall motion and left ventricular systolic function appears hyperdynamic with estimated ejection fraction of 70% to 75%. There is near-cavity obliteration seen. There also appears to be increased left ventricular outflow tract gradient at the mid cavity level consistent with hyperdynamic left ventricular systolic function. There is abnormal left ventricular relaxation pattern seen as well as elevated left atrial pressures seen by Doppler examination.,2. The left atrium appears mildly dilated.,3. The right atrium and right ventricle appear normal.,4. The aortic root appears normal.,5. The aortic valve appears calcified with mild aortic valve stenosis, calculated aortic valve area is 1.3 cm square with a maximum instantaneous gradient of 34 and a mean gradient of 19 mm.,6. There is mitral annular calcification extending to leaflets and supportive structures with thickening of mitral valve leaflets with mild mitral regurgitation.,7. The tricuspid valve appears normal with trace tricuspid regurgitation with moderate pulmonary artery hypertension. Estimated pulmonary artery systolic pressure is 49 mmHg. Estimated right atrial pressure of 10 mmHg.,8. The pulmonary valve appears normal with trace pulmonary insufficiency.,9. There is no pericardial effusion or intracardiac mass seen.,10. There is a color Doppler suggestive of a patent foramen ovale with lipomatous hypertrophy of the interatrial septum.,11. The study was somewhat technically limited and hence subtle abnormalities could be missed from the study.,
## 6 PREOPERATIVE DIAGNOSIS: , Morbid obesity.,POSTOPERATIVE DIAGNOSIS: ,Morbid obesity.,PROCEDURE: , Laparoscopic antecolic antegastric Roux-en-Y gastric bypass with EEA anastomosis.,ANESTHESIA: , General with endotracheal intubation.,INDICATION FOR PROCEDURE: , This is a 30-year-old female, who has been overweight for many years. She has tried many different diets, but is unsuccessful. She has been to our Bariatric Surgery Seminar, received some handouts, and signed the consent. The risks and benefits of the procedure have been explained to the patient.,PROCEDURE IN DETAIL: ,The patient was taken to the operating room and placed supine on the operating room table. All pressure points were carefully padded. She was given general anesthesia with endotracheal intubation. SCD stockings were placed on both legs. Foley catheter was placed for bladder decompression. The abdomen was then prepped and draped in standard sterile surgical fashion. Marcaine was then injected through umbilicus. A small incision was made. A Veress needle was introduced into the abdomen. CO2 insufflation was done to a maximum pressure of 15 mmHg. A 12-mm VersaStep port was placed through the umbilicus. I then placed a 5-mm port just anterior to the midaxillary line and just subcostal on the right side. I placed another 5-mm port in the midclavicular line just subcostal on the right side, a few centimeters below and medial to that, I placed a 12-mm VersaStep port. On the left side, just anterior to the midaxillary line and just subcostal, I placed a 5-mm port. A few centimeters below and medial to that, I placed a 15-mm port. I began by lifting up the omentum and identifying the transverse colon and lifting that up and thereby identifying my ligament of Treitz. I ran the small bowel down approximately 40 cm and divided the small bowel with a white load GIA stapler. I then divided the mesentery all the way down to the base of the mesentery with a LigaSure device. I then ran the distal bowel down, approximately 100 cm, and at 100 cm, I made a hole at the antimesenteric portion of the Roux limb and a hole in the antimesenteric portion of the duodenogastric limb, and I passed a 45 white load stapler and fired a stapler creating a side-to-side anastomosis. I reapproximated the edges of the defect. I lifted it up and stapled across it with another white load stapler. I then closed the mesenteric defect with interrupted Surgidac sutures. I divided the omentum all the way down to the colon in order to create a passageway for my small bowel to go antecolic. I then put the patient in reverse Trendelenburg. I placed a liver retractor, identified, and dissected the angle of His. I then dissected on the lesser curve, approximately 2.5 cm below the gastroesophageal junction, and got into a lesser space. I fired transversely across the stomach with a 45 blue load stapler. I then used two fires of the 60 blue load with SeamGuard to go up into my angle of His, thereby creating my gastric pouch. I then made a hole at the base of the gastric pouch and had Anesthesia remove the bougie and place the OG tube connected to the anvil. I pulled the anvil into place, and I then opened up my 15-mm port site and passed my EEA stapler. I passed that in the end of my Roux limb and had the spike come out antimesenteric. I joined the spike with the anvil and fired a stapler creating an end-to-side anastomosis, then divided across the redundant portion of my Roux limb with a white load GI stapler, and removed it with an Endocatch bag. I put some additional 2-0 Vicryl sutures in the anastomosis for further security. I then placed a bowel clamp across the bowel. I went above and passed an EGD scope into the mouth down to the esophagus and into the gastric pouch. I distended gastric pouch with air. There was no air leak seen. I could pass the scope easily through the anastomosis. There was no bleeding seen through the scope. We closed the 15-mm port site with interrupted 0 Vicryl suture utilizing Carter-Thomason. I copiously irrigated out that incision with about 2 L of saline. I then closed the skin of all incisions with running Monocryl. Sponge, instrument, and needle counts were correct at the end of the case. The patient tolerated the procedure well without any complications.
## keywords
## 1 allergy / immunology, allergic rhinitis, allergies, asthma, nasal sprays, rhinitis, nasal, erythematous, allegra, sprays, allergic,
## 2 bariatrics, laparoscopic gastric bypass, weight loss programs, gastric bypass, atkin's diet, weight watcher's, body weight, laparoscopic gastric, weight loss, pounds, months, weight, laparoscopic, band, loss, diets, overweight, lost
## 3 bariatrics, laparoscopic gastric bypass, heart attacks, body weight, pulmonary embolism, potential complications, sleep study, weight loss, gastric bypass, anastomosis, loss, sleep, laparoscopic, gastric, bypass, heart, pounds, weight,
## 4 cardiovascular / pulmonary, 2-d m-mode, doppler, aortic valve, atrial enlargement, diastolic function, ejection fraction, mitral, mitral valve, pericardial effusion, pulmonary valve, regurgitation, systolic function, tricuspid, tricuspid valve, normal lv
## 5 cardiovascular / pulmonary, 2-d, doppler, echocardiogram, annular, aortic root, aortic valve, atrial, atrium, calcification, cavity, ejection fraction, mitral, obliteration, outflow, regurgitation, relaxation pattern, stenosis, systolic function, tricuspid, valve, ventricular, ventricular cavity, wall motion, pulmonary artery
## 6 bariatrics, gastric bypass, eea anastomosis, roux-en-y, antegastric, antecolic, morbid obesity, roux limb, gastric pouch, intubation, laparoscopic, bypass, roux, endotracheal, anastomosis, gastric
# The data set include 4999 observation with 6 variables, we will only foucus on patients symptoms which is varaible transcirption in the data set.Text data processing
symptoms <- as.list(med$transcription)
symptCorpus <- VCorpus(VectorSource(symptoms))
symptCorpus <- tm_map(symptCorpus, tolower)
for(j in seq(symptCorpus)){
symptCorpus[[j]] <- gsub("_", " ", symptCorpus[[j]])
}
symptCorpus<-tm_map(symptCorpus, removeWords, stopwords("english"))
symptCorpus<-tm_map(symptCorpus, removePunctuation)
#symptCorpus <- tm_map(symptCorpus, removeWords, c("will", "also"))
symptCorpus<-tm_map(symptCorpus, stripWhitespace)
symptCorpus<-tm_map(symptCorpus, PlainTextDocument)
symptCorpus<-tm_map(symptCorpus, stemDocument)
symptCorpus[[1]]$content## [1] "subject 23yearold white femal present complaint allergi use allergi live seattl think wors past tri claritin zyrtec work short time seem lose effect use allegra also use last summer began use two week ago appear work well use counter spray prescript nasal spray asthma doest requir daili medic think flare medic medic current ortho tricyclen allegraallergi known medicin allergiesobjectivevit weight 130 pound blood pressur 12478heent throat mild erythemat without exud nasal mucosa erythemat swollen clear drainag seen tms clearneck suppl without adenopathylung clearassess allerg rhinitisplan1 will tri zyrtec instead allegra anoth option will use loratadin think prescript coverag might cheaper2 sampl nasonex two spray nostril given three week prescript written well"
dtm<-DocumentTermMatrix(symptCorpus)
dtm## <<DocumentTermMatrix (documents: 4999, terms: 35230)>>
## Non-/sparse entries: 821009/175293761
## Sparsity : 100%
## Maximal term length: 52
## Weighting : term frequency (tf)
Let Subset the data into Top 100 and bottom 100 presentation
more than 35230 terms with 100% sparsity
dtm_top500<-dtm[1:500, ]
dtm_bot500<-dtm[4500:4999, ]
dtm_top500## <<DocumentTermMatrix (documents: 500, terms: 35230)>>
## Non-/sparse entries: 74921/17540079
## Sparsity : 100%
## Maximal term length: 52
## Weighting : term frequency (tf)
dtm_bot500## <<DocumentTermMatrix (documents: 500, terms: 35230)>>
## Non-/sparse entries: 86649/17528351
## Sparsity : 100%
## Maximal term length: 52
## Weighting : term frequency (tf)
35230 terms with 100% sparsity for top 500 and 99% for bottom 500 High sparsity,reduce test setting of 0.9,0.5
dtms_top500<-removeSparseTerms(dtm_top500,0.9)
dtms_bot500<-removeSparseTerms(dtm_bot500,0.9)
dtms_top500## <<DocumentTermMatrix (documents: 500, terms: 309)>>
## Non-/sparse entries: 33955/120545
## Sparsity : 78%
## Maximal term length: 14
## Weighting : term frequency (tf)
dtms_bot500## <<DocumentTermMatrix (documents: 500, terms: 379)>>
## Non-/sparse entries: 35945/153555
## Sparsity : 81%
## Maximal term length: 14
## Weighting : term frequency (tf)
dtms_top500<-removeSparseTerms(dtm_top500,0.7)
dtms_bot500<-removeSparseTerms(dtm_bot500,0.7)
dtms_top500## <<DocumentTermMatrix (documents: 500, terms: 59)>>
## Non-/sparse entries: 14012/15488
## Sparsity : 53%
## Maximal term length: 10
## Weighting : term frequency (tf)
dtms_bot500## <<DocumentTermMatrix (documents: 500, terms: 38)>>
## Non-/sparse entries: 8108/10892
## Sparsity : 57%
## Maximal term length: 8
## Weighting : term frequency (tf)
dtms_top500<-removeSparseTerms(dtm_top500,0.5)
dtms_bot500<-removeSparseTerms(dtm_bot500,0.5)
dtms_top500## <<DocumentTermMatrix (documents: 500, terms: 23)>>
## Non-/sparse entries: 7174/4326
## Sparsity : 38%
## Maximal term length: 10
## Weighting : term frequency (tf)
dtms_bot500## <<DocumentTermMatrix (documents: 500, terms: 8)>>
## Non-/sparse entries: 2336/1664
## Sparsity : 42%
## Maximal term length: 7
## Weighting : term frequency (tf)
Question on which sparsity was selected based on trial and error run and why? Depend on nature of data(containing rare term),Goal of analysis(capturing nuances of the language),computational resources(Removing more term reduce computational complexity)
Following the above statement, for clinical data set select - 0.7, to retain some rare term is selected. if we select 0.5 there are very few term to understand the transcription and if we select 0.9, there are too many terms to clearly define the theme from transcription.
On the top,instead of the initial 35230 terms, we only have 59 terms appearing in at least 52% (notice setting=0.7) of the top 500 transcription. Similarly, in the bottom, instead of the initial 35230 terms, we only have 38 terms appearing in at least 57% (notice setting=0.7) of the transcription.
Plot the data set
library(plotly)
freq1<-sort(colSums(as.matrix(dtms_top500)), decreasing=T); freq1## patient place use right left procedur incis
## 2398 1587 1488 1237 1044 878 855
## remov oper well skin posit diagnosi perform
## 821 671 662 582 563 531 518
## fashion room taken anesthesia steril preoper drape
## 513 505 470 445 418 395 393
## prep condit
## 390 291
freq2<-sort(colSums(as.matrix(dtms_bot500)), decreasing=T); freq2## patient left right histori normal chest well blood
## 2556 1740 1575 1249 891 637 501 470
wf2=data.frame(term=names(freq2), occurrences=freq2)
df.freq2 <- subset(wf2, freq2>2)
plot_ly(data=df.freq2, x=~term, y=~occurrences, type="bar") %>%
layout(title="Bottom 500 pateint presentation (Frequent Terms)")wf1=data.frame(term=names(freq1), occurrences=freq1)
df.freq1 <- subset(wf1, freq1>2)
plot_ly(data=df.freq1, x=~term, y=~occurrences, type="bar") %>%
layout(title="Top 500 patient presentation (Frequent Terms)")intersect(df.freq1$term, df.freq2$term)## [1] "patient" "right" "left" "well"
library(wordcloud)
wordcloud(names(freq1), freq1,min.freq=5, colors=brewer.pal(8, "Spectral"))wordcloud(names(freq2), freq2, min.freq=5, colors=brewer.pal(6, "Spectral"))It becomes apparent that top 500 clincial transcription tend to focus more on sugrical procedure of the patient and include frequent keywords like “procedure”, “preoper”, “suture” and “sterile”. The bottom 500 clincial transcription are more focused on history on heart disease situation with frequent keywords like “arteri”, “histori”, and “heart”.
Apply the Apriori Association Rules on the - using above data set with the following variables: “description”,“medical_specialty”
##Step 1 : exploring and preparing data
# clean list
rm(list=ls())
med<-read.csv("/Users/heinminntun/Downloads/1.UBD_PhD in Digital Public Health/4.PhD_Learning from UBD/6.Artifical Intelligence lectures by Dr Hanif/MedicalSpecialty_NotesText_Classification_Dataset.csv", sep = ",")
head(med)## Index
## 1 0
## 2 1
## 3 2
## 4 3
## 5 4
## 6 5
## description
## 1 A 23-year-old white female presents with complaint of allergies.
## 2 Consult for laparoscopic gastric bypass.
## 3 Consult for laparoscopic gastric bypass.
## 4 2-D M-Mode. Doppler.
## 5 2-D Echocardiogram
## 6 Morbid obesity. Laparoscopic antecolic antegastric Roux-en-Y gastric bypass with EEA anastomosis. This is a 30-year-old female, who has been overweight for many years. She has tried many different diets, but is unsuccessful.
## medical_specialty sample_name
## 1 Allergy / Immunology Allergic Rhinitis
## 2 Bariatrics Laparoscopic Gastric Bypass Consult - 2
## 3 Bariatrics Laparoscopic Gastric Bypass Consult - 1
## 4 Cardiovascular / Pulmonary 2-D Echocardiogram - 1
## 5 Cardiovascular / Pulmonary 2-D Echocardiogram - 2
## 6 Bariatrics Laparoscopic Gastric Bypass
## transcription
## 1 SUBJECTIVE:, This 23-year-old white female presents with complaint of allergies. She used to have allergies when she lived in Seattle but she thinks they are worse here. In the past, she has tried Claritin, and Zyrtec. Both worked for short time but then seemed to lose effectiveness. She has used Allegra also. She used that last summer and she began using it again two weeks ago. It does not appear to be working very well. She has used over-the-counter sprays but no prescription nasal sprays. She does have asthma but doest not require daily medication for this and does not think it is flaring up.,MEDICATIONS: , Her only medication currently is Ortho Tri-Cyclen and the Allegra.,ALLERGIES: , She has no known medicine allergies.,OBJECTIVE:,Vitals: Weight was 130 pounds and blood pressure 124/78.,HEENT: Her throat was mildly erythematous without exudate. Nasal mucosa was erythematous and swollen. Only clear drainage was seen. TMs were clear.,Neck: Supple without adenopathy.,Lungs: Clear.,ASSESSMENT:, Allergic rhinitis.,PLAN:,1. She will try Zyrtec instead of Allegra again. Another option will be to use loratadine. She does not think she has prescription coverage so that might be cheaper.,2. Samples of Nasonex two sprays in each nostril given for three weeks. A prescription was written as well.
## 2 PAST MEDICAL HISTORY:, He has difficulty climbing stairs, difficulty with airline seats, tying shoes, used to public seating, and lifting objects off the floor. He exercises three times a week at home and does cardio. He has difficulty walking two blocks or five flights of stairs. Difficulty with snoring. He has muscle and joint pains including knee pain, back pain, foot and ankle pain, and swelling. He has gastroesophageal reflux disease.,PAST SURGICAL HISTORY:, Includes reconstructive surgery on his right hand 13 years ago. ,SOCIAL HISTORY:, He is currently single. He has about ten drinks a year. He had smoked significantly up until several months ago. He now smokes less than three cigarettes a day.,FAMILY HISTORY:, Heart disease in both grandfathers, grandmother with stroke, and a grandmother with diabetes. Denies obesity and hypertension in other family members.,CURRENT MEDICATIONS:, None.,ALLERGIES:, He is allergic to Penicillin.,MISCELLANEOUS/EATING HISTORY:, He has been going to support groups for seven months with Lynn Holmberg in Greenwich and he is from Eastchester, New York and he feels that we are the appropriate program. He had a poor experience with the Greenwich program. Eating history, he is not an emotional eater. Does not like sweets. He likes big portions and carbohydrates. He likes chicken and not steak. He currently weighs 312 pounds. Ideal body weight would be 170 pounds. He is 142 pounds overweight. If ,he lost 60% of his excess body weight that would be 84 pounds and he should weigh about 228.,REVIEW OF SYSTEMS: ,Negative for head, neck, heart, lungs, GI, GU, orthopedic, and skin. Specifically denies chest pain, heart attack, coronary artery disease, congestive heart failure, arrhythmia, atrial fibrillation, pacemaker, high cholesterol, pulmonary embolism, high blood pressure, CVA, venous insufficiency, thrombophlebitis, asthma, shortness of breath, COPD, emphysema, sleep apnea, diabetes, leg and foot swelling, osteoarthritis, rheumatoid arthritis, hiatal hernia, peptic ulcer disease, gallstones, infected gallbladder, pancreatitis, fatty liver, hepatitis, hemorrhoids, rectal bleeding, polyps, incontinence of stool, urinary stress incontinence, or cancer. Denies cellulitis, pseudotumor cerebri, meningitis, or encephalitis.,PHYSICAL EXAMINATION:, He is alert and oriented x 3. Cranial nerves II-XII are intact. Afebrile. Vital Signs are stable.
## 3 HISTORY OF PRESENT ILLNESS: , I have seen ABC today. He is a very pleasant gentleman who is 42 years old, 344 pounds. He is 5'9". He has a BMI of 51. He has been overweight for ten years since the age of 33, at his highest he was 358 pounds, at his lowest 260. He is pursuing surgical attempts of weight loss to feel good, get healthy, and begin to exercise again. He wants to be able to exercise and play volleyball. Physically, he is sluggish. He gets tired quickly. He does not go out often. When he loses weight he always regains it and he gains back more than he lost. His biggest weight loss is 25 pounds and it was three months before he gained it back. He did six months of not drinking alcohol and not taking in many calories. He has been on multiple commercial weight loss programs including Slim Fast for one month one year ago and Atkin's Diet for one month two years ago.,PAST MEDICAL HISTORY: , He has difficulty climbing stairs, difficulty with airline seats, tying shoes, used to public seating, difficulty walking, high cholesterol, and high blood pressure. He has asthma and difficulty walking two blocks or going eight to ten steps. He has sleep apnea and snoring. He is a diabetic, on medication. He has joint pain, knee pain, back pain, foot and ankle pain, leg and foot swelling. He has hemorrhoids.,PAST SURGICAL HISTORY: , Includes orthopedic or knee surgery.,SOCIAL HISTORY: , He is currently single. He drinks alcohol ten to twelve drinks a week, but does not drink five days a week and then will binge drink. He smokes one and a half pack a day for 15 years, but he has recently stopped smoking for the past two weeks.,FAMILY HISTORY: , Obesity, heart disease, and diabetes. Family history is negative for hypertension and stroke.,CURRENT MEDICATIONS:, Include Diovan, Crestor, and Tricor.,MISCELLANEOUS/EATING HISTORY: ,He says a couple of friends of his have had heart attacks and have had died. He used to drink everyday, but stopped two years ago. He now only drinks on weekends. He is on his second week of Chantix, which is a medication to come off smoking completely. Eating, he eats bad food. He is single. He eats things like bacon, eggs, and cheese, cheeseburgers, fast food, eats four times a day, seven in the morning, at noon, 9 p.m., and 2 a.m. He currently weighs 344 pounds and 5'9". His ideal body weight is 160 pounds. He is 184 pounds overweight. If he lost 70% of his excess body weight that would be 129 pounds and that would get him down to 215.,REVIEW OF SYSTEMS: , Negative for head, neck, heart, lungs, GI, GU, orthopedic, or skin. He also is positive for gout. He denies chest pain, heart attack, coronary artery disease, congestive heart failure, arrhythmia, atrial fibrillation, pacemaker, pulmonary embolism, or CVA. He denies venous insufficiency or thrombophlebitis. Denies shortness of breath, COPD, or emphysema. Denies thyroid problems, hip pain, osteoarthritis, rheumatoid arthritis, GERD, hiatal hernia, peptic ulcer disease, gallstones, infected gallbladder, pancreatitis, fatty liver, hepatitis, rectal bleeding, polyps, incontinence of stool, urinary stress incontinence, or cancer. He denies cellulitis, pseudotumor cerebri, meningitis, or encephalitis.,PHYSICAL EXAMINATION: ,He is alert and oriented x 3. Cranial nerves II-XII are intact. Neck is soft and supple. Lungs: He has positive wheezing bilaterally. Heart is regular rhythm and rate. His abdomen is soft. Extremities: He has 1+ pitting edema.,IMPRESSION/PLAN:, I have explained to him the risks and potential complications of laparoscopic gastric bypass in detail and these include bleeding, infection, deep venous thrombosis, pulmonary embolism, leakage from the gastrojejuno-anastomosis, jejunojejuno-anastomosis, and possible bowel obstruction among other potential complications. He understands. He wants to proceed with workup and evaluation for laparoscopic Roux-en-Y gastric bypass. He will need to get a letter of approval from Dr. XYZ. He will need to see a nutritionist and mental health worker. He will need an upper endoscopy by either Dr. XYZ. He will need to go to Dr. XYZ as he previously had a sleep study. We will need another sleep study. He will need H. pylori testing, thyroid function tests, LFTs, glycosylated hemoglobin, and fasting blood sugar. After this is performed, we will submit him for insurance approval.
## 4 2-D M-MODE: , ,1. Left atrial enlargement with left atrial diameter of 4.7 cm.,2. Normal size right and left ventricle.,3. Normal LV systolic function with left ventricular ejection fraction of 51%.,4. Normal LV diastolic function.,5. No pericardial effusion.,6. Normal morphology of aortic valve, mitral valve, tricuspid valve, and pulmonary valve.,7. PA systolic pressure is 36 mmHg.,DOPPLER: , ,1. Mild mitral and tricuspid regurgitation.,2. Trace aortic and pulmonary regurgitation.
## 5 1. The left ventricular cavity size and wall thickness appear normal. The wall motion and left ventricular systolic function appears hyperdynamic with estimated ejection fraction of 70% to 75%. There is near-cavity obliteration seen. There also appears to be increased left ventricular outflow tract gradient at the mid cavity level consistent with hyperdynamic left ventricular systolic function. There is abnormal left ventricular relaxation pattern seen as well as elevated left atrial pressures seen by Doppler examination.,2. The left atrium appears mildly dilated.,3. The right atrium and right ventricle appear normal.,4. The aortic root appears normal.,5. The aortic valve appears calcified with mild aortic valve stenosis, calculated aortic valve area is 1.3 cm square with a maximum instantaneous gradient of 34 and a mean gradient of 19 mm.,6. There is mitral annular calcification extending to leaflets and supportive structures with thickening of mitral valve leaflets with mild mitral regurgitation.,7. The tricuspid valve appears normal with trace tricuspid regurgitation with moderate pulmonary artery hypertension. Estimated pulmonary artery systolic pressure is 49 mmHg. Estimated right atrial pressure of 10 mmHg.,8. The pulmonary valve appears normal with trace pulmonary insufficiency.,9. There is no pericardial effusion or intracardiac mass seen.,10. There is a color Doppler suggestive of a patent foramen ovale with lipomatous hypertrophy of the interatrial septum.,11. The study was somewhat technically limited and hence subtle abnormalities could be missed from the study.,
## 6 PREOPERATIVE DIAGNOSIS: , Morbid obesity.,POSTOPERATIVE DIAGNOSIS: ,Morbid obesity.,PROCEDURE: , Laparoscopic antecolic antegastric Roux-en-Y gastric bypass with EEA anastomosis.,ANESTHESIA: , General with endotracheal intubation.,INDICATION FOR PROCEDURE: , This is a 30-year-old female, who has been overweight for many years. She has tried many different diets, but is unsuccessful. She has been to our Bariatric Surgery Seminar, received some handouts, and signed the consent. The risks and benefits of the procedure have been explained to the patient.,PROCEDURE IN DETAIL: ,The patient was taken to the operating room and placed supine on the operating room table. All pressure points were carefully padded. She was given general anesthesia with endotracheal intubation. SCD stockings were placed on both legs. Foley catheter was placed for bladder decompression. The abdomen was then prepped and draped in standard sterile surgical fashion. Marcaine was then injected through umbilicus. A small incision was made. A Veress needle was introduced into the abdomen. CO2 insufflation was done to a maximum pressure of 15 mmHg. A 12-mm VersaStep port was placed through the umbilicus. I then placed a 5-mm port just anterior to the midaxillary line and just subcostal on the right side. I placed another 5-mm port in the midclavicular line just subcostal on the right side, a few centimeters below and medial to that, I placed a 12-mm VersaStep port. On the left side, just anterior to the midaxillary line and just subcostal, I placed a 5-mm port. A few centimeters below and medial to that, I placed a 15-mm port. I began by lifting up the omentum and identifying the transverse colon and lifting that up and thereby identifying my ligament of Treitz. I ran the small bowel down approximately 40 cm and divided the small bowel with a white load GIA stapler. I then divided the mesentery all the way down to the base of the mesentery with a LigaSure device. I then ran the distal bowel down, approximately 100 cm, and at 100 cm, I made a hole at the antimesenteric portion of the Roux limb and a hole in the antimesenteric portion of the duodenogastric limb, and I passed a 45 white load stapler and fired a stapler creating a side-to-side anastomosis. I reapproximated the edges of the defect. I lifted it up and stapled across it with another white load stapler. I then closed the mesenteric defect with interrupted Surgidac sutures. I divided the omentum all the way down to the colon in order to create a passageway for my small bowel to go antecolic. I then put the patient in reverse Trendelenburg. I placed a liver retractor, identified, and dissected the angle of His. I then dissected on the lesser curve, approximately 2.5 cm below the gastroesophageal junction, and got into a lesser space. I fired transversely across the stomach with a 45 blue load stapler. I then used two fires of the 60 blue load with SeamGuard to go up into my angle of His, thereby creating my gastric pouch. I then made a hole at the base of the gastric pouch and had Anesthesia remove the bougie and place the OG tube connected to the anvil. I pulled the anvil into place, and I then opened up my 15-mm port site and passed my EEA stapler. I passed that in the end of my Roux limb and had the spike come out antimesenteric. I joined the spike with the anvil and fired a stapler creating an end-to-side anastomosis, then divided across the redundant portion of my Roux limb with a white load GI stapler, and removed it with an Endocatch bag. I put some additional 2-0 Vicryl sutures in the anastomosis for further security. I then placed a bowel clamp across the bowel. I went above and passed an EGD scope into the mouth down to the esophagus and into the gastric pouch. I distended gastric pouch with air. There was no air leak seen. I could pass the scope easily through the anastomosis. There was no bleeding seen through the scope. We closed the 15-mm port site with interrupted 0 Vicryl suture utilizing Carter-Thomason. I copiously irrigated out that incision with about 2 L of saline. I then closed the skin of all incisions with running Monocryl. Sponge, instrument, and needle counts were correct at the end of the case. The patient tolerated the procedure well without any complications.
## keywords
## 1 allergy / immunology, allergic rhinitis, allergies, asthma, nasal sprays, rhinitis, nasal, erythematous, allegra, sprays, allergic,
## 2 bariatrics, laparoscopic gastric bypass, weight loss programs, gastric bypass, atkin's diet, weight watcher's, body weight, laparoscopic gastric, weight loss, pounds, months, weight, laparoscopic, band, loss, diets, overweight, lost
## 3 bariatrics, laparoscopic gastric bypass, heart attacks, body weight, pulmonary embolism, potential complications, sleep study, weight loss, gastric bypass, anastomosis, loss, sleep, laparoscopic, gastric, bypass, heart, pounds, weight,
## 4 cardiovascular / pulmonary, 2-d m-mode, doppler, aortic valve, atrial enlargement, diastolic function, ejection fraction, mitral, mitral valve, pericardial effusion, pulmonary valve, regurgitation, systolic function, tricuspid, tricuspid valve, normal lv
## 5 cardiovascular / pulmonary, 2-d, doppler, echocardiogram, annular, aortic root, aortic valve, atrial, atrium, calcification, cavity, ejection fraction, mitral, obliteration, outflow, regurgitation, relaxation pattern, stenosis, systolic function, tricuspid, valve, ventricular, ventricular cavity, wall motion, pulmonary artery
## 6 bariatrics, gastric bypass, eea anastomosis, roux-en-y, antegastric, antecolic, morbid obesity, roux limb, gastric pouch, intubation, laparoscopic, bypass, roux, endotracheal, anastomosis, gastric
med2<-med%>%mutate_at(vars(2:6),~as.factor(.))
summary(med2)## Index
## Min. : 0
## 1st Qu.:1250
## Median :2499
## Mean :2499
## 3rd Qu.:3748
## Max. :4998
##
## description
## An example/template for a routine normal male physical exam. : 12
## Common description of colonoscopy : 10
## Sample normal ear, nose, mouth, and throat exam. : 8
## Sample progress note - Gen Med. : 8
## : 6
## An example/template for a routine normal female physical exam.: 6
## (Other) :4949
## medical_specialty
## Surgery :1103
## Consult - History and Phy.: 516
## Cardiovascular / Pulmonary: 372
## Orthopedic : 355
## Radiology : 273
## General Medicine : 259
## (Other) :2121
## sample_name
## Lumbar Discogram : 5
## Abdominal Pain - Consult : 4
## Adrenalectomy & Umbilical Hernia Repair : 4
## Air Under Diaphragm - Consult : 4
## Bilateral Carotid Cerebral Angiogram : 4
## Blood In Toilet : 4
## (Other) :4974
## transcription
## : 33
## PREOPERATIVE DIAGNOSIS: , Low back pain.,POSTOPERATIVE DIAGNOSIS: , Low back pain.,PROCEDURE PERFORMED:,1. Lumbar discogram L2-3.,2. Lumbar discogram L3-4.,3. Lumbar discogram L4-5.,4. Lumbar discogram L5-S1.,ANESTHESIA: ,IV sedation.,PROCEDURE IN DETAIL: ,The patient was brought to the Radiology Suite and placed prone onto a radiolucent table. The C-arm was brought into the operative field and AP, left right oblique and lateral fluoroscopic images of the L1-2 through L5-S1 levels were obtained. We then proceeded to prepare the low back with a Betadine solution and draped sterile. Using an oblique approach to the spine, the L5-S1 level was addressed using an oblique projection angled C-arm in order to allow for perpendicular penetration of the disc space. A metallic marker was then placed laterally and a needle entrance point was determined. A skin wheal was raised with 1% Xylocaine and an #18-gauge needle was advanced up to the level of the disc space using AP, oblique and lateral fluoroscopic projections. A second needle, #22-gauge 6-inch needle was then introduced into the disc space and with AP and lateral fluoroscopic projections, was placed into the center of the nucleus. We then proceeded to perform a similar placement of needles at the L4-5, L3-4 and L2-3 levels.,A solution of Isovue 300 with 1 gm of Ancef was then drawn into a 10 cc syringe and without informing the patient of our injecting, we then proceeded to inject the disc spaces sequentially. : 5
## ADMISSION DIAGNOSES:,1. Seizure.,2. Hypoglycemia.,3. Anemia.,4. Hypotension.,5. Dyspnea.,6. Edema.,DISCHARGE DIAGNOSES:,1. Colon cancer, status post right hemicolectomy.,2. Anemia.,3. Hospital-acquired pneumonia.,4. Hypertension.,5. Congestive heart failure.,6. Seizure disorder.,PROCEDURES PERFORMED:,1. Colonoscopy.,2. Right hemicolectomy.,HOSPITAL COURSE: , The patient is a 59-year-old female with multiple medical problems including diabetes mellitus requiring insulin for 26 years, previous MI and coronary artery disease, history of seizure disorder, GERD, bipolar disorder, and anemia. She was admitted due to a seizure and myoclonic jerks as well as hypoglycemia and anemia. Regarding the seizure disorder, Neurology was consulted. Noncontrast CT of the head was negative. Neurology felt that the only necessary intervention at that time would be to increase her Lamictal to 150 mg in the morning and 100 mg in the evening with gradual increase of the dosage until she was on 200 mg b.i.d. Regarding the hypoglycemia, the patient has diabetic gastroparesis and was being fed on J-tube intermittent feedings throughout the night at the rate of 120 an hour. Her insulin pump had a basal rate of roughly three at night during the feedings. While in the hospital, the insulin pump rate was turned down to 1.5 and then subsequently decreased a few other times. She seemed to tolerate the insulin pump rate well throughout her hospital course. There were a few episodes of hypoglycemia as well as hyperglycemia, but the episode seem to be related to the patient's n.p.o. status and the changing rates of tube feedings throughout her hospital course.,At discharge, her endocrinologist was contacted. It was decided to change her insulin pump rate to 3 units per hour from midnight till 6 a.m., from 0.8 units per hour from 6 a.m. until 8 a.m., and then at 0.2 units per hour from 8 a.m. until 6 p.m. The insulin was to be NovoLog. Regarding the anemia, the gastroenterologists were consulted regarding her positive Hemoccult stools. A colonoscopy was performed, which found a mass at the right hepatic flexure. General Surgery was then consulted and a right hemicolectomy was performed on the patient. The patient tolerated the procedure well and tube feeds were slowly restarted following the procedure, and prior to discharge were back at her predischarge rates of 120 per hour. Regarding the cancer itself, it was found that 1 out of 53 nodes were positive for cancer. CT of the abdomen and pelvis revealed no metastasis, a CT of the chest revealed possible lung metastasis. Later in hospital course, the patient developed a septic-like picture likely secondary to hospital-acquired pneumonia. She was treated with Zosyn, Levaquin, and vancomycin, and tolerated the medications well. Her symptoms decreased and serial chest x-rays were followed, which showed some resolution of the illness. The patient was seen by the Infectious Disease specialist. The Infectious Disease specialist recommended vancomycin to cover MRSA bacteria, which was found at the J-tube site. At discharge, the patient was given three additional days of p.o. Levaquin 750 mg as well as three additional days of Bactrim DS every 12 hours. The Bactrim was used to cover the MRSA at the J-tube site. It was found that MRSA was sensitive to Bactrim. Throughout her hospital course, the patient continued to receive Coreg 12.5 mg daily and Lasix 40 mg twice a day for her congestive heart failure, which remains stable. She also received Lipitor for her high cholesterol. Her seizure disorder remained stable and she was discharged on a dose of 100 mg in the morning and 150 mg at night. The dosage increases can begin on an outpatient basis.,DISCHARGE INSTRUCTIONS/MEDICATIONS: , The patient was discharged to home. She was told to shy away from strenuous activity. Her discharge diet was to be her usual diet of isotonic fiber feeding through the J-tube at a rate of 120 per hour throughout the night. The discharge medications were as follows:,1. Coreg 12.5 mg p.o. b.i.d.,2. Lipitor 10 mg p.o. at bedtime.,3. Nitro-Dur patch 0.3 mg per hour one patch daily.,4. Phenergan syrup 6.25 mg p.o. q.4h. p.r.n.,5. Synthroid 0.175 mg p.o. daily.,6. Zyrtec 10 mg p.o. daily.,7. Lamictal 100 mg p.o. daily.,8. Lamictal 150 mg p.o. at bedtime.,9. Ferrous sulfate drops 325 mg, PEG tube b.i.d.,10. Nexium 40 mg p.o. at breakfast.,11. Neurontin 400 mg p.o. t.i.d.,12. Lasix 40 mg p.o. b.i.d.,13. Fentanyl 50 mcg patch transdermal q.72h.,14. Calcium and vitamin D combination, calcium carbonate 500 mg/vitamin D 200 units one tab p.o. t.i.d.,15. Bactrim DS 800mg/160 mg tablet one tablet q.12h. x3 days.,16. Levaquin 750 mg one tablet p.o. x3 days.,The medications listed above, one listed as p.o. are to be administered via the J-tube.,FOLLOWUP: ,The patient was instructed to see Dr. X in approximately five to seven days. She was given a lab sheet to have a CBC with diff as well as a CMP to be drawn prior to her appointment with Dr. X. She is instructed to follow up with Dr. Y if her condition changes regarding her colon cancer. She was instructed to follow up with Dr. Z, her oncologist, regarding the positive lymph nodes. We were unable to contact Dr. Z, but his telephone number was given to the patient and she was instructed to make a followup appointment. She was also instructed to follow up with her endocrinologist, Dr. A, regarding any insulin pump adjustments, which were necessary and she was also instructed to follow up with Dr. B, her gastroenterologist, regarding any issues with her J-tube.,CONDITION ON DISCHARGE: , Stable. : 4
## CHIEF COMPLAINT: ,Blood in toilet.,HISTORY: , Ms. ABC is a 77-year-old female who is brought down by way of ambulance from XYZ Nursing Home after nursing staff had noted there to be blood in the toilet after she had been sitting on the toilet. They did not note any urine or stool in the toilet and the patient had no acute complaints. The patient is unfortunately a poor historian in that she has dementia and does not recall any of the events. The patient herself has absolutely no complaints, such as abdominal pain or back pain, urinary and GI complaints. There is no other history provided by the nursing staff from XYZ. There apparently were no clots noted within there. She does not have a history of being on anticoagulants.,PAST MEDICAL HISTORY: , Actually quite limited, includes that of dementia, asthma, anemia which is chronic, hypothyroidism, schizophrenia, positive PPD in the past.,PAST SURGICAL HISTORY: ,Unknown.,SOCIAL HISTORY: , No tobacco or alcohol.,MEDICATIONS: , Listed in the medical records.,ALLERGIES:, No known drug allergies.,PHYSICAL EXAMINATION: , VITAL SIGNS: Stable.,GENERAL: This is a well-nourished, well-developed female who is alert, oriented in all spheres, pleasant, cooperative, resting comfortably, appearing otherwise healthy and well in no acute distress.,HEENT: Visually normal. Pupils are reactive. TMs, canals, nasal mucosa, and oropharynx are intact.,NECK: No lymphadenopathy or JVD.,HEART: Regular rate and rhythm. S1, S2. No murmurs, gallops, or rubs.,LUNGS: Clear to auscultation. No wheeze, rales, or rhonchi.,ABDOMEN: Benign, flat, soft, nontender, and nondistended. Bowel sounds active. No organomegaly or mass noted.,GU/RECTAL: External rectum was normal. No obvious blood internally. There is no stool noted within the vault. There is no gross amount of blood noted within the vault. Guaiac was done and was trace positive. Visual examination anteriorly during the rectal examination noted no blood within the vaginal region.,EXTREMITIES: No significant abnormalities.,WORKUP: , CT abdomen and pelvis was negative. CBC was entirely within normal limits without any signs of anemia with an H and H of 14 and 42%. CMP also within normal limits. PTT, PT, and INR were normal. Attempts at getting the patient to give A urine were unsuccessful and the patient was very noncompliant, would not allow us to do any kind of Foley catheterization.,ER COURSE:, Uneventful. I have discussed the patient in full with Dr. X who agrees that she does not require any further workup or evaluation as an inpatient. We have decided to send the patient back to XYZ with observation by the staff there. She will have a CBC done daily for the next 3 days with results to Dr. X. They are to call him if there is any recurrences of blood or worsening of symptoms and they are to do a urinalysis at XYZ for blood.,ASSESSMENT: , Questionable gastrointestinal bleeding at this time, stable without any obvious signs otherwise of significant bleed. : 4
## CHIEF COMPLAINT: , Blood in urine.,HISTORY OF PRESENT ILLNESS: ,This is a 78-year-old male who has prostate cancer with metastatic disease to his bladder and in several locations throughout the skeletal system including the spine and shoulder. The patient has had problems with hematuria in the past, but the patient noted that this episode began yesterday, and today he has been passing principally blood with very little urine. The patient states that there is no change in his chronic lower back pain and denies any incontinence of urine or stool. The patient has not had any fever. There is no abdominal pain and the patient is still able to pass urine. The patient has not had any melena or hematochezia. There is no nausea or vomiting. The patient has already completed chemotherapy and is beyond treatment for his cancer at this time. The patient is receiving radiation therapy, but it is targeted to the bones and intended to give symptomatic relief of his skeletal pain and not intended to treat and cure the cancer. The patient is not enlisted in hospice, but the principle around the patient's current treatment management is focusing on comfort care measures.,REVIEW OF SYSTEMS: , CONSTITUTIONAL: No fever or chills. The patient does report generalized fatigue and weakness over the past several days. HEENT: No headache, no neck pain, no rhinorrhea, no sore throat. CARDIOVASCULAR: No chest pain. RESPIRATIONS: No shortness of breath or cough, although the patient does get easily winded with exertion over these past few days. GASTROINTESTINAL: The patient denies any abdominal pain. No nausea or vomiting. No changes in the bowel movement. No melena or hematochezia. GENITOURINARY: A gross hematuria since yesterday as previously described. The patient is still able to pass urine without difficulty. The patient denies any groin pain. The patient denies any other changes to the genital region. MUSCULOSKELETAL: The chronic lower back pain which has not changed over these past few days. The patient does have multiple other joints, which cause him discomfort, but there have been no recent changes in these either. SKIN: No rashes or lesions. No easy bruising. NEUROLOGIC: No focal weakness or numbness. No incontinence of urine or stool. No saddle paresthesia. No dizziness, syncope or near-syncope. ENDOCRINE: No polyuria or polydipsia. No heat or cold intolerance. HEMATOLOGIC/LYMPHATIC: The patient does not have a history of easy bruising or bleeding, but the patient has had previous episodes of hematuria.,PAST MEDICAL HISTORY: , Prostate cancer with metastatic disease as previously described.,PAST SURGICAL HISTORY: , TURP.,CURRENT MEDICATIONS:, Morphine, Darvocet, Flomax, Avodart and ibuprofen.,ALLERGIES: , VICODIN.,SOCIAL HISTORY: , The patient is a nonsmoker. Denies any alcohol or illicit drug use. The patient does live with his family.,PHYSICAL EXAMINATION: , VITAL SIGNS: Temperature is 98.8 oral, blood pressure is 108/65, pulse is 109, respirations 16, oxygen saturation is 97% on room air and interpreted as normal. CONSTITUTIONAL: The patient is well nourished, well developed. The patient appears to be pale, but otherwise looks well. The patient is calm, comfortable. The patient is pleasant and cooperative. HEENT: Eyes normal with clear conjunctivae and corneas. Nose is normal without rhinorrhea or audible congestion. Mouth and oropharynx normal without any sign of infection. Mucous membranes are moist. NECK: Supple. Full range of motion. No JVD. CARDIOVASCULAR: Heart is mildly tachycardic with regular rhythm without murmur, rub or gallop. Peripheral pulses are +2. RESPIRATIONS: Clear to auscultation bilaterally. No shortness of breath. No wheezes, rales or rhonchi. Good air movement bilaterally. GASTROINTESTINAL: Abdomen is soft, nontender, nondistended. No rebound or guarding. No hepatosplenomegaly. Normal bowel sounds. No bruit. No masses or pulsatile masses. GENITOURINARY: The patient has normal male genitalia, uncircumcised. There is no active bleeding from the penis at this time. There is no swelling of the testicles. There are no masses palpated to the testicles, scrotum or the penis. There are no lesions or rashes noted. There is no inguinal lymphadenopathy. Normal male exam. MUSCULOSKELETAL: Back is normal and nontender. There are no abnormalities noted to the arms or legs. The patient has normal use of the extremities. SKIN: The patient appears to be pale, but otherwise the skin is normal. There are no rashes or lesions. NEUROLOGIC: Motor and sensory are intact to the extremities. The patient has normal speech. PSYCHIATRIC: The patient is alert and oriented x4. Normal mood and affect. HEMATOLOGIC/LYMPHATIC: There is no evidence of bruising noted to the body. No lymphadenitis is palpated.,EMERGENCY DEPARTMENT TESTING:, CBC was done, which had a hemoglobin of 7.7 and hematocrit of 22.6. Neutrophils were 81%. The RDW was 18.5, and the rest of the values were all within normal limits and unremarkable. Chemistry had a sodium of 134, a glucose of 132, calcium is 8.2, and rest of the values are unremarkable. Alkaline phosphatase was 770 and albumin was 2.4. Rest of the values all are within normal limits of the LFTs. Urinalysis was grossly bloody with a large amount of blood and greater than 50 rbc's. The patient also had greater than 300 of the protein reading, moderate leukocytes, 30-50 white blood cells, but no bacteria were seen. Coagulation profile study had a PT of 15.9, PTT of 43 and INR of 1.3.,EMERGENCY DEPARTMENT COURSE: , The patient was given normal saline 2 liters over 1 hour without any adverse effect. The patient was given multiple doses of morphine to maintain his comfort while here in the emergency room without any adverse effect. The patient was given Levaquin 500 mg by mouth as well as 2 doses of Phenergan over the course of his stay here in the emergency department. The patient did not have an adverse reaction to these medicines either. Phenergan resolved his nausea and morphine did relieve his pain and make him pain free. I spoke with Dr. X, the patient's urologist, about most appropriate step for the patient, and Dr. X said he would be happy to care for the patient in the hospital and do urologic scopes if necessary and surgery if necessary and blood transfusion. It was all a matter of what the patient wished to do given the advanced stage of his cancer. Dr. X was willing to assist in any way the patient wished him to. I spoke with the patient and his son about what he would like to do and what the options were from doing nothing from keeping him comfortable with pain medicines to admitting him to the hospital with the possibility of scopes and even surgery being done as well as the blood transfusion. The patient decided to choose a middle ground in which he would be transfused with 2 units of blood here in the emergency room and go home tonight. The patient's son felt comfortable with his father's choice. This was done. The patient was transfused 2 units of packed red blood cells after appropriately typed and match. The patient did not have any adverse reaction at any point with his transfusion. There was no fever, no shortness of breath, and at the time of disposition, the patient stated he felt a little better and felt like he had a little more strength. Over the course of the patient's several-hour stay in the emergency room, the patient did end up developing enough problems with clotted blood in his bladder that he had a urinary obstruction. Foley catheter was placed, which produced bloody urine and relieved the developing discomfort of a full bladder. The patient was given a leg bag and the Foley catheter was left in place.,DIAGNOSES,1. HEMATURIA.,2. PROSTATE CANCER WITH BONE AND BLADDER METASTATIC DISEASE.,3. SIGNIFICANT ANEMIA.,4. URINARY OBSTRUCTION.,CONDITION ON DISPOSITION: ,Fair, but improved.,DISPOSITION: , To home with his son.,PLAN: , We will have the patient follow up with Dr. X in his office in 2 days for reevaluation. The patient was given a prescription for Levaquin and Phenergan tablets to take home with him tonight. The patient was encouraged to drink extra water. The patient was given discharge instructions on hematuria and asked to return to the emergency room should he have any worsening of his condition or develop any other problems or symptoms of concern.: 4
## CHIEF COMPLAINT: , Burn, right arm.,HISTORY OF PRESENT ILLNESS: , This is a Workers' Compensation injury. This patient, a 41 year-old male, was at a coffee shop, where he works as a cook, and hot oil splashed onto his arm, burning from the elbow to the wrist on the medial aspect. He has had it cooled, and presents with his friend to the Emergency Department for care.,PAST MEDICAL HISTORY: ,Noncontributory.,MEDICATIONS: ,None.,ALLERGIES: ,None.,PHYSICAL EXAMINATION: , GENERAL: Well-developed, well-nourished 21-year-old male adult who is appropriate and cooperative. His only injury is to the right upper extremity. There are first and second degree burns on the right forearm, ranging from the elbow to the wrist. Second degree areas with blistering are scattered through the medial aspect of the forearm. There is no circumferential burn, and I see no areas of deeper burn. The patient moves his hands well. Pulses are good. Circulation to the hand is fine.,FINAL DIAGNOSIS:,1. First-degree and second-degree burns, right arm secondary to hot oil spill.,2. Workers' Compensation industrial injury.,TREATMENT: , The wound is cooled and cleansed with soaking in antiseptic solution. The patient was ordered Demerol 50 mg IM for pain, but he refused and did not want pain medication. A burn dressing is applied with Neosporin ointment. The patient is given Tylenol No. 3, tabs #4, to take home with him and take one or two every four hours p.r.n. for pain. He is to return tomorrow for a dressing change. Tetanus immunization is up to date. Preprinted instructions are given. Workers' Compensation first report and work status report are completed.,DISPOSITION: , Home. : 4
## (Other) :4945
## keywords
## :1068
## : 81
## gastroenterology : 2
## surgery : 2
## allergy / immunology, allergic rhinitis, allergies, asthma, nasal sprays, rhinitis, nasal, erythematous, allegra, sprays, allergic, : 1
## allergy / immunology, chronic glossitis, xerostomia, probable environmental inhalant allergies, probable food allergies, environmental inhalant allergies, rast allergy testing, rast, inhalant, food, allergy: 1
## (Other) :3844
##Step 2 :training a model on the data
library(arules)
med_rule<-apriori(med2[2:6], parameter=list(support=0.01, confidence=0.25, minlen=2))## Apriori
##
## Parameter specification:
## confidence minval smax arem aval originalSupport maxtime support minlen
## 0.25 0.1 1 none FALSE TRUE 5 0.01 2
## maxlen target ext
## 10 rules TRUE
##
## Algorithmic control:
## filter tree heap memopt load sort verbose
## 0.1 TRUE TRUE FALSE TRUE 2 TRUE
##
## Absolute minimum support count: 49
##
## set item appearances ...[0 item(s)] done [0.00s].
## set transactions ...[10973 item(s), 4999 transaction(s)] done [0.01s].
## sorting and recoding items ... [24 item(s)] done [0.00s].
## creating transaction tree ... done [0.00s].
## checking subsets of size 1 2 done [0.00s].
## writing ... [3 rule(s)] done [0.00s].
## creating S4 object ... done [0.00s].
med_rule## set of 3 rules
##Step 3 - evaluating model performance
summary(med_rule)## set of 3 rules
##
## rule length distribution (lhs + rhs):sizes
## 2
## 3
##
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 2 2 2 2 2 2
##
## summary of quality measures:
## support confidence coverage lift
## Min. :0.02260 Min. :0.2640 Min. :0.05181 Min. :2.042
## 1st Qu.:0.03951 1st Qu.:0.3502 1st Qu.:0.07752 1st Qu.:2.300
## Median :0.05641 Median :0.4363 Median :0.10322 Median :2.558
## Mean :0.04514 Mean :0.4156 Mean :0.12289 Mean :2.386
## 3rd Qu.:0.05641 3rd Qu.:0.4914 3rd Qu.:0.15843 3rd Qu.:2.558
## Max. :0.05641 Max. :0.5465 Max. :0.21364 Max. :2.558
## count
## Min. :113.0
## 1st Qu.:197.5
## Median :282.0
## Mean :225.7
## 3rd Qu.:282.0
## Max. :282.0
##
## mining info:
## data ntransactions support confidence
## med2[2:6] 4999 0.01 0.25
## call
## apriori(data = med2[2:6], parameter = list(support = 0.01, confidence = 0.25, minlen = 2))
inspect(med_rule[1:3])## lhs rhs support confidence coverage lift count
## [1] {medical_specialty= General Medicine} => {keywords=} 0.02260452 0.4362934 0.05181036 2.042164 113
## [2] {medical_specialty= Consult - History and Phy.} => {keywords=} 0.05641128 0.5465116 0.10322064 2.558063 282
## [3] {keywords=} => {medical_specialty= Consult - History and Phy.} 0.05641128 0.2640449 0.21364273 2.558063 282
If a patient presented with general medicine, it is likely that there is related to keywords(symptoms)patient presented
##Step 4 - sorting the set of association rules
inspect(sort(med_rule, by="lift")[1:3])## lhs rhs support confidence coverage lift count
## [1] {medical_specialty= Consult - History and Phy.} => {keywords=} 0.05641128 0.5465116 0.10322064 2.558063 282
## [2] {keywords=} => {medical_specialty= Consult - History and Phy.} 0.05641128 0.2640449 0.21364273 2.558063 282
## [3] {medical_specialty= General Medicine} => {keywords=} 0.02260452 0.4362934 0.05181036 2.042164 113
If a patient presented with Consult - History and Phy., it is likely that there is also related to keywords(symptoms)patient presented.
##Step 5 - taking subsets of association rules and graphical representation
fi_rules<-subset(med_rule, items %in% "medical_specialty= Consult - History and Phy.")
inspect(fi_rules)## lhs rhs support confidence coverage lift count
## [1] {medical_specialty= Consult - History and Phy.} => {keywords=} 0.05641128 0.5465116 0.1032206 2.558063 282
## [2] {keywords=} => {medical_specialty= Consult - History and Phy.} 0.05641128 0.2640449 0.2136427 2.558063 282
Graphical depiction of association rules
library(arulesViz)
#plot(sort(fi_rules, by="lift"), method = "graph", engine = "htmlwidget", control=list(main = list(title="medical_specialty= General Medicine")))
plot(sort(med_rule, by="lift"), method = "graph", engine = "htmlwidget",
control=list(main = list(title="medical_specialty= General Medicine")))## Available control parameters (with default values):
## itemCol = #CBD2FC
## nodeCol = c("#EE0000", "#EE0303", "#EE0606", "#EE0909", "#EE0C0C", "#EE0F0F", "#EE1212", "#EE1515", "#EE1818", "#EE1B1B", "#EE1E1E", "#EE2222", "#EE2525", "#EE2828", "#EE2B2B", "#EE2E2E", "#EE3131", "#EE3434", "#EE3737", "#EE3A3A", "#EE3D3D", "#EE4040", "#EE4444", "#EE4747", "#EE4A4A", "#EE4D4D", "#EE5050", "#EE5353", "#EE5656", "#EE5959", "#EE5C5C", "#EE5F5F", "#EE6262", "#EE6666", "#EE6969", "#EE6C6C", "#EE6F6F", "#EE7272", "#EE7575", "#EE7878", "#EE7B7B", "#EE7E7E", "#EE8181", "#EE8484", "#EE8888", "#EE8B8B", "#EE8E8E", "#EE9191", "#EE9494", "#EE9797", "#EE9999", "#EE9B9B", "#EE9D9D", "#EE9F9F", "#EEA0A0", "#EEA2A2", "#EEA4A4", "#EEA5A5", "#EEA7A7", "#EEA9A9", "#EEABAB", "#EEACAC", "#EEAEAE", "#EEB0B0", "#EEB1B1", "#EEB3B3", "#EEB5B5", "#EEB7B7", "#EEB8B8", "#EEBABA", "#EEBCBC", "#EEBDBD", "#EEBFBF", "#EEC1C1", "#EEC3C3", "#EEC4C4", "#EEC6C6", "#EEC8C8", "#EEC9C9", "#EECBCB", "#EECDCD", "#EECFCF", "#EED0D0", "#EED2D2", "#EED4D4", "#EED5D5", "#EED7D7", "#EED9D9", "#EEDBDB", "#EEDCDC", "#EEDEDE", "#EEE0E0", "#EEE1E1", "#EEE3E3", "#EEE5E5", "#EEE7E7", "#EEE8E8", "#EEEAEA", "#EEECEC", "#EEEEEE")
## precision = 3
## igraphLayout = layout_nicely
## interactive = TRUE
## engine = visNetwork
## max = 100
## selection_menu = TRUE
## degree_highlight = 1
## verbose = FALSE