- 26 Feb 2010 -

Andy sleeping in front of computer My wife gave birth to our first son on Saturday: Benjamin Andrew Wolfe. He was a very healthy 8 pounds and 21 inches long. He has been eating and sleeping very well. Sleep is at a premium in the Wolfe household and we take it whenever we can get it. Our daughter, Eden, is 14 months old, and does her best to keep us both up all day to play with her!

I’ve been attempting to keep up with email while at home, but Andy has been fighting me for computer time!

This is in the babble, openmrs category tagged as ,

Add a comment »

We have well over 50 million rows in our obs table. Using the simple “update obs set uuid = uuid() where uuid is null” would bomb out with a “The total number of locks exceeds the lock table size” error.

I ran this for a few hours to get through all rows. (Note that it overwrites any uuids that are currently there)

Copy this into a sql script and run it with “source” in mysql at command line.

drop procedure update_uuids;
delimiter //
create procedure update_uuids() begin
set @max = (select max(obs_id) from obs);
set @x = 1;
repeat
set @y = @x + 100000;
update obs set uuid = uuid() where obs_id >=@x and obs_id <@y;
set @x = @y;
until @x > @max
end repeat;
end
//
delimiter ;
call update_uuids();

This is in the openmrs category tagged as , , ,

2 comments »

OpenMRS recently added a non-null uuid column to every table.  All of our dbunit xml files needed to be updated to insert values for this attribute.  I wrote the following shell script to loop over all xml files under the current folder and add a uuid attribute to all rows that didn’t have an attribute already.  There is a bit of logic in there to ignore certain tables because those tables didn’t actually get any uuids.

…read the rest of this entry »

This is in the openmrs category tagged as , , ,

Add a comment »

One of MySQL’s biggest annoyances is the lack of descriptive error messages. Often when dropping a table, index, foreign key you get a cryptic “errno 150 or errno152″ error message.

Well, now when you come across those simply go to the command line and type:

show engine innodb status;

Scroll up a ways and see a very helpful message about exactly which other foreign key or index is causing the blockage! Why can’t MySQL put this information into error message to begin with??

This is in the openmrs category tagged as

Add a comment »

- 12 Apr 2009 -

Darius recently removed the patient set portlet that was unused in the default header. If you have a custom template/headerFull.jsp you will need to remove the content of the “popupTray” element. This effects versions 1.5.0 dev Build 7290. The full changeset.

If you don’t remove that, the error message you get is something like this:

The following error happened somewhere on this page: javax.servlet.jsp.JspException: You must specify a fromAttribute when using the patientSet portlet

This is in the openmrs category tagged as

Add a comment »

« Previous Entries