Kyle->GetThoughts();
Jess versus the Fusobacterium
26 January 2009 @ 12:44 PM MST
Current Music: ...
Current Mood: Happier
Jess was released from the hospital today, and is now home. She has a projected recovery time of approximately all of February.

The thoracic surgeon was in to see her this morning to tell her she could go home. He also told her that the infection was Fusobacterium (unfortunately the Wikipedia article is somewhat lacking in information). He also said that when he saw her he felt like her odds of making it through alive were about 50/50. He's seen 4 cases of this type of progression of Fusobacterium, 2 older patients who died, one young patient who lived, and Jess. He felt that the main reason she survived was because she's still young.

You will notice on the Wikipedia page that Fusobacterium is similar to anaerobic bacteroides, which was their guess as of the 2nd surgery, so they were close. You will also notice that it lists several species of the bacteria, but (if the doctor's knew) they didn't tell us what species it was.

[This Entry] [0 Comments]
Getting out soon
24 January 2009 @ 11:21 AM MST
Current Music: Goo Goo Dolls - Real
Current Mood: Alright
They've disconnected all the tubes and drains at this point. Jess is eating solid foods again, and is able to get up and go for shorts walks a few times a day. Her white blood cell count is back to normal, so it the infection is either gone or just about gone; she is still on 3 antibiotics for now though. The latest word was that she may be able to go home either Monday or Tuesday. There hasn't been any word on what the infection actually was. We definitely want to find out though. When something puts you in the hospital for two weeks you want to know what it was, so you can at least tell people when they ask.

[This Entry] [0 Comments]
Out of ICU - round 2
21 January 2009 @ 12:24 AM MST
Current Music: None
Current Mood: Tired
Jess was moved out of the ICU today. They also took out one of her chest tubes and the last of the drains in her neck. So she is improving. It will be several more days before she is out of the hospital though.

[This Entry] [0 Comments]
ICU Update
17 January 2009 @ 09:42 PM MST
Current Music: None
Current Mood: Exhausted
They took the breathing tube out today, for which Jess was very grateful. She's improving quickly. She spent all of Friday miserable and heavily sedated. She was able to communicate with a little sign language and by writing. It was frustrating her when we couldn't figure out what she was trying to tell us. So she's glad to be able to speak again.

The two surgeons have been by and say she is recovering very quickly. It looks like things are all on the mend now. The infection hasn't quite been knocked out yet, so she still has tubes everywhere, but it is improving.

At the moment I'm exhausted so I'm going to sleep.

[This Entry] [0 Comments]
Surgery Round 2 - Update
16 January 2009 @ 12:54 AM MST
Current Music: None
Current Mood: Exhausted, worried
The surgery lasted about 5.6 hours. Dr. Gibb worked on her neck redraining the left side and draining the right side and leaving drains in. Dr. McCann (spelling?) then drained the right side of her chest and the mediastinum area. He left two tubes there for drains. He then used the videoscope to look around the left side of her chest, he didn't find any pus but they left a tube in place just in case any begins collecting.

The work done on the right side of her chest was a thoracotomy, here are some choice quotes from Wikipedia about such operations: "Thoracotomies are thought to be one of the hardest surgical incisions to deal with post-op, because they are exquisitely painful and the pain can prevent the patient from breathing effectively, leading to atelectasis or pneumonia." and "One has to realize that this procedure is a major insult to the human body and one which is only ever performed for most serious conditions."

The operation on the left side was a VATS (video assisted thoracic surgery), which the astute reader will remember is the surgery they performed on me almost 5 years ago for my collapsed lung. According to the ICU nurse it is also one of the most painful surgeries to recover from. If you recall, I received an epidural for the duration of my recovery. Jess cannot have an epidural due to the infection, so they must try to control her pain with less targeted drugs. The end result is that she is in incredible pain.

She was moved to the cardio-pulmonary wing of the ICU where she will stay for the next few days. She has more tubes coming out of her than I've ever seen before. She has a breathing tube, the tube in the nose, drains coming out of her neck, two drains on the right side of her chest, and a drain on the left side. She is the biggest mess I've ever seen. They have her as sedated as possible without overdosing her on pain medication. She can hear us and somewhat respond (hard to do because of the large quantity of things attached to her). Unfortunately, the more awake she tries to be to respond to visitors the more pain she feels. So we only visited for a few minutes tonight to let her know we where there and that her mom is flying in tomorrow.

Dr. Gibb said that the drains will help but are not a 100% guarantee that they will continue to effectively drain the abscess. So there is still the possibility of further surgery. They took a bunch more blood and are running more cultures to determine what the exact infection is. The current best guess is that it's a anaerobic bacteroides. The bad news of this diagnosis is: "In general, Bacteroides are resistant to a wide variety of antibiotics..." [wikipedia]. Hopefully the cultures will be able to pinpoint the exact infection allow a more effective selection of antibiotics to treat her with.

Now I'm going to try to get a few hours of sleep, it will probably be largely unsuccessful.

[This Entry] [1 Comment]
Surgery round 2
15 January 2009 @ 05:06 PM MST
Current Music: None
Current Mood: :-
The abscess spread to the right side of her neck and into her chest. They've rushed her back into the OR for more surgery. She gets a visit from the thoracic surgeon, and my understanding of her surgery is that she will result in scars to match mine. We don't really have much information right now. If we remember correctly the surgeon said they'll be working on her neck to drain the abscess there and then performing a thoracotomy on her right side and VATS (video assisted thoracic surgery, what I had for my lung) on her left side. Overall this is rather serious surgery. She will probably be in the hospital for several more days. Hopefully the surgeon can clean it out safely and knock out the infection to prevent further complications.

She's in surgery right now. We don't know how long it will last.

[This Entry] [1 Comment]
Urgent Care and 2 Hospitals
13 January 2009 @ 03:11 PM MST
Current Music: Bach Concertos
Current Mood: Exhausted
Jess had a sore throat since about Saturday January 3rd. On Tuesday (the 6th) I took her up to the Urgent Care clinic in Orem. They took a throat swab, said it wasn't strep, and sent her home believing it was a viral infection (as we all know, modern medicine can do basically nil for viral infections). So I brought her home and she stayed at home mostly either on the couch or in bed for the next 6 days. I spent the majority of my time there making Jell-o, pudding, milkshakes and other soft foods. Her throat began to swell up a little, getting worse over the course of the week.

On Monday she decided it hurt enough that she would go to the Urgent Care clinic again. By this time she was weak from not eating much for 9 days and throwing up a couple of times in the previous 48 hours. We got to the Urgent Care clinic and waited probably 30-45 minutes to be seen. The doctor looked at her, examined the swelling all about her neck extending from ears to collar bone and said, "That's unusual." He consulted with an ENT specialist over the phone and took some blood (after 4 tries). Her white count was through the roof so she had an infection. They decided it would be prudent to get a CT scan as well to see if she had an abscess.

So we got sent down to Orem Community hospital. We registered and got the CT scan and waited to get a call from the Urgent Care doctor. He called after discussing the results with the radiologist. He then had us wait while he called the ENT specialist. After about 30 minutes the ENT specialist calls and tells us to go down to UVRMC in Provo to the ER where Jess will be admitted for surgery. (Legally he wasn't allowed to tell me much since I'm not family and Jess hadn't given him specific authorization to speak to me, she was lying on a couch down the hall being miserable.) So I drove her down there and called some friends who could call her parents and let them know what was happening.

We got to the ER and only waited about 10 minutes in the room full (very full) of people waiting. As soon as we were through the doors the staff went to town. A nurse, technician, and doctor met us in the room and immediately began drawing more blood (trying to anyways, mostly unsuccessfully). Soon thereafter the ENT specialist (who we now learn is actually an ENT surgeon and would be performing the operation) comes in to explain the situation. She had a very large abscess ("only see one this size a few times in a career.") in her throat which could quickly become life threatening if it spread any further into her chest. As he was explaining the details we notice that the entire surgical team is waiting outside the room and the anesthesiologist squeezes his way in to ask his questions. (Before this point BJ and Tianna had arrived as well). They quickly whisked her away to the OR and sent us all to the waiting area.

The surgery was successful without complication and they moved her to the ICU for the night. We were allowed to visit despite not being immediately family mainly because none of her family members live in Utah. This morning she was moved to a regular room where she has been recovering well. We're not sure how long she'll be in here for. Before going into surgery she asked if she'd be able to go to the Symphony on Thursday (we had tickets for Vivaldi's Four Seasons), she was emphatically told that she would not be at the concert.

So that's been the fun times of the week.

[This Entry] [2 Comments]
Django 1.0 Patch for Flatpage files
11 January 2009 @ 09:01 PM MST
Current Music: None
Current Mood: Good
Django's built in Flatpages module allows you to store flatpage content into the database and then display it using the built in template system. Unfortunately this means you have to load a bunch of flatpage content into the database. I decided this would be a pain for the setup I need so I modified the Flatpage module to check the content string of a flatpage object, if that strings ends in ".html" it attempts to open a file at the location of flatpage.content. If it is successful, then it dumps that file into the page. If it is not successful it gracefully fails and will just display whatever was found in flatpage.content.

The reason I wanted this was so that the actual flatpage content could be created and edited by others then merged to the server using a version control system. Also, since the site is being developed on a development machine it would be a pain to then copy and paste all the content onto the live machine. This way it's only necessary to setup the flatpage objects that point to the actual files. Still a pain, but much less so overall.

The filename you specify should be an absolute path. Since Flatpages marks the content as "safe" upon display you are also responsible for ensuring that the HTML contained in the included file is properly escaped, etc.

Also, upon doing this work I realized that rather than patching the core files on your system you could simply copy them to your project directory, patch the copies, then make sure your project settings.py specifies the local copies instead of the core files. This may be a better option for some people, however since the project I'm working on is going to be large, I find it easier to just patch the core and not add more mess to my project directory. Mind that if you ever upgrade Django you'll probably clobber your patched files and things will break. So, it's probably a bit safer to do the local copies if you intend to upgrade Django, however, you can always copy the altered core files to the project directory and update settings.py later down the road.

So, without further ado. Here's the patch. It is quite small, just a few lines.
django_flatpages_files.patch

See my previous post for instructions on how to apply the patch.

[This Entry]
Django patch to use emails, not usernames
8 January 2009 @ 10:47 PM MST
Current Music: None
Current Mood: Alright
Oh, this patch was created for Django 1.0, it may need to be tweaked for older/newer versions.

I've been working with Django recently. For my project I would prefer to use only email addresses and not separate usernames. There are a couple of patches to try and attach this functionality, but most of them seem to just hack in a way to use either for logging in, but don't make provisions for uniqueness or adjustments to the admin interface.

I decided to just create a patch that alters the default installation to use only email addresses, usernames are removed.

There are two patches. One for the django.contrib.admin package and one for the django.contrib.auth package.
django_admin_email.patch
django_auth_email.patch

** UPDATE 1/10/09 **
Thanks to BJ's suggestion I looked into using __getattr__. With some finagling and guess and check I have been able to make User.username an alias of User.email. So you can read User.username and set User.username and you only really see or change User.email. That should make sure that compatibility with other modules still holds.
** END UPDATE 1/10/09 **

Just copy them into the django/contrib directory (you'll need root access) and then run:
# sudo patch -p0 < django_admin_email.patch
# sudo patch -p0 < django_auth_email.patch

(Or you can just run them from whatever location so long as after the '<' you have '/path/to/patch')

On Ubuntu 8.10 the django/contrib directory you want is located at:
/usr/share/python-support/python-django/django/contrib

I've never created a patch before, but I used The Ten Minute Guide to diff and patch . So if you need more help on how to use these patches I'd recommend trying there, I used their guide to create them.

The changes affect the admin interface and allow you to follow the Django Tutorial fully (at least as it stands as of this writing).

If you'd like any more information on this feel free to contact me either by leaving a comment here or by emailing me. My email address is kyle (dot) dickerson _at_ gmail =dot= com.

[This Entry]