reworked sorting and patient died values
added a fied to use for integer array sorting