refactor client for single patient
add tests