Diagnosis Table - SFH-code/VigiSense GitHub Wiki

#Concept

The diagnosis table is intended to be a structure which will map groups of individual symptoms to a single unified diagnosis, by grouping symptoms it is expected that it will be possible to identify specific conditions that users may match such that more clear and informative info can be given.

implementation

Array table

The minimal viable implementation is the use of an array with the symptom list contained within the first field and diagnosis in the second. after symptoms are grouped the first column of the array can be searched until finding a matching entry at which point the diagnosis can be extracted from the second column to determine the procedure. in order for a diagnosis to be found the array must be searched until a match is located as a result this method would have a time complexity of O(n)

Hash table

utilizing a hash table the input list of symptoms can be converted into an address by a hash function at the address the diagnosis will be contained thus removing the need to search through the entire list.