A couple more small fixes for e-labs.

Conflicts:

	library/classes/Document.class.php
Fix for EMR Direct method of document storage.