JSON import/export for patients.

Some general clean up.
Still missing some export fields.