Fix patient plan row deletion