Not an easy task, it takes a lot of work around but possible. Very basic input here:
Detach the 2005 express DB, AC, Codes. Get to the mdf files, move them out of default ac folder. Uninstall sql 2005 express install the version of sql you want ie 2008 r2. attach the mdfs back to sql 2008 r2. This is by far the easiest part in moving to sql 2008 r2. This part is good if you will not do any updates for quite some time. Updating part takes a bit more, so the db tuner can pickup your 2008 r2 ac,codes,meds db to go to a next version..
You will have issues on data tuning + upgrades. That I have another solution but like I said very basic input I put here, and that one would a little hectic to type.