API updates and some frontend testing

The testing is incomplete, but the few API changes are essential for the admin site.
I also said this in my PR, but do you think we should separate name into its sub-fields like we did in the `Patient` class