## 2 Results and Discussion
### Patients' Similarity Measure  
Patient similarity is actionable by the CDSS because the most similar patient's evolution is used for prognosis. The selection of the most similar case can be supervised by the professional. In that case, most relevant categories of k patients are shown to the professional. By default, relevant categories are ICF _core set_ categories [17]. ICF _core sets_ are subsets of ICF that can be formed according to functioning, pathology or rehabilitation process [18]. _Core sets_ are useful because, in daily practice, clinicians and other professionals need only a fraction of the categories found in ICF.  
To compute cases' similarity, the _k-nearest neighbor_ (k-NN) algorithm is used. Similarity between patients can be calculated through \(\mathrm{Sim}\left(X,Y\right)=\sum_{i=\,1}^{j}\mathrm{w_{i}Sim}(X_{i},Y_{i})\) (2), in which X and Y are two patients, \(\mathrm{Sim}(X_{i},Y_{i})\) is the similarity on the \(i^{\mathrm{th}}\) attribute with weight \(w_{i}\). ICF core sets and ICF taxonomy are used for weight assignment. The weight given to level-4 and level-3 _core set_ categories is 2 and 1, respectively. Therefore _core set_ categories which are more specific in the ICF taxonomy (level 4 _core set_ categories) carry more weight in the similarity calculation.  
Diseases terms are encoded to ICD-10 following the Centers for Medicare and Medicaid Services (CMS) and the National Center for Health and Statistics (NCHS) (2012) [19] methodology. Problems have been found in the use of ICD-10 for similarity calculation between diseases and have been solved as follows:  
* Disease terms are not encoded to a single ICD-10 category. In this case, the most representative ICD-10 category is chosen.  
Figure 2: Taxonomy of the symbols used to encode changes in international classification of functioning, disability and health (ICF) values.  
* Disease terms are encoded to the same ICD-10 category. In this case, both concepts cannot be distinguished if ICD-10 is not extended.
* ICD-10 contains catch-all categories. In this case, only categories that cannot be encoded to an ICD-10 category are encoded to \"Other disease of type X\".
* ICD-10 contains scattered exclusions. In this case, the most representative ICD-10 category is chosen.
* Diseases terms are complications of other diseases. In this case, the most representative ICD-10 category is chosen.  
The similarity function between diseases used in the physical rehabilitation domain is [14]:  
\[\textit{cosine}\left(i_{1},i_{2}\right)=sim\left(t(i_{1}),t(i_{2})\right)= \frac{\left|\left(\upsilon_{d_{\text{eff}}(i_{1})}\left(\textit{super}(d_{i}, \textit{CN})\right)\right)\cap\left(\upsilon_{d_{\text{eff}}(i_{2})}\left( \textit{super}(d_{i},\textit{CN})\right)\right|\right|}{\left|\left(\upsilon_{d _{\text{eff}}(i_{1})}\left(\textit{super}(d_{i},\textit{CN})\right)\right) \right|\right|} \tag{3}\]  
where \(i_{1}\) and \(i_{2}\) are the diseases, \(\textit{CN}\) is the set of all concepts in the current knowledge base, \(\textit{super}(c;\textit{C})\) is the subset of concepts in \(\textit{C}\) which are super concepts of \(c\), and \(t(i)\) is the set of individual \(i\) concepts.