There may be no current state, we have to handle it (fixes #4532).
Commit 09970a47d3528562940bb42ae7ce9b7904c44c62 introduced a more accurate way to get a Patient record status at a given date returning None if there is no state rather returning the last state not applying to the date given.
Then a current state may be None if the states are only applying in the future. So we have to handle that case.
Related issues
Bug #4532: AttributeError: 'NoneType' object has no attribute 'status'
There may be no current state, we have to handle it (fixes #4532).