## 3 Proposed Method
### Proposed Proof of Familiarity (PoF) Consensus Algorithm
#### 3.2.4 Proof of Familiarity (PoF) Algorithm
```
Input: patients, P; cured patients, C\({}_{\text{P}}\); doctors, D; insurance companies, I\({}_{\text{C}}\); // all participating entities individual decision, I\({}_{\text{d}}\); // decision of participating entities treatment experience time, T\({}_{\text{ET}}\); current condition, C\({}_{\text{C}}\); experience of disease, E\({}_{\text{D}}\) // decision judging factors of cured patients job experience time, J\({}_{\text{ET}}\); treatment success rate, T\({}_{\text{SR}}\); // decision judging factors of doctors settlement time, S\({}_{\text{T}}\); cover amount, C\({}_{\text{A}}\) // decision judging factors of insurance companies blockchain database, DB\({}_{\text{bc}}\); local database, DB\({}_{\text{loc}}\) // storing entities (local and blockchain database) Output: // individual familiarity index (IFI) of participating entities individual familiarity index of cured patient, IFL\({}_{\text{C}}\); individual familiarity index of doctor, IFI\({}_{\text{D}}\); individual familiarity index of insurance company, IFI\({}_{\text{I}}\).I\({}_{\text{C}}\) finally selected cured patient, C\({}_{\text{P,FS}}\); finally selected doctor, D\({}_{\text{PS}}\); finally selected insurance company, I\({}_{\text{c}}\).FS individual familiarity index of finally selected cured patient, IFI\({}_{\text{PS}}\).C\({}_{\text{P}}\); individual familiarity index of finally selected doctor, IFI\({}_{\text{PS}}\).D; Individual familiarity index of finally selected insurance company, IFI\({}_{\text{PS}}\).I\({}_{\text{c}}\) individual decision of finally selected cured patient, I\({}_{\text{d}}\).FS\({}_{\text{C}}\); individual decision of finally selected doctors, I\({}_{\text{d}}\).FS\({}_{\text{D}}\); individual decision of finally selected insurance company, I\({}_{\text{d}}\).FS\({}_{\text{L}}\) Begin: verification of C\({}_{\text{P}}\), D, I\({}_{\text{L}}\) from DB\({}_{\text{loc}}\) and DB\({}_{\text{bc}}\) // identity of participating entities are verified verification of I\({}_{\text{ET}}\), T\({}_{\text{SR}}\), T\({}_{\text{ET}}\), C\({}_{\text{C}}\), E\({}_{\text{D}}\), S\({}_{\text{T}}\), C\({}_{\text{A}}\) from DB\({}_{\text{loc}}\) and DB\({}_{\text{bc}}\) // decision judging factors are verified verification of I\({}_{\text{d}}\) of C\({}_{\text{P}}\), D, I\({}_{\text{L}}\) from DB\({}_{\text{loc}}\) and DB\({}_{\text{bc}}\) // individual decisions are verified for each (C\({}_{\text{P}}\), D\({}_{\text{L}}\))  IFL\({}_{\text{C}}\)\({}_{\text{P}}\) = Sum (T\({}_{\text{ET}}\), C\({}_{\text{C}}\), E\({}_{\text{D}}\)) // individual familiarity index of cured patients F\({}_{\text{D}}\) = Sum (J\({}_{\text{ET}}\), T\({}_{\text{SR}}\)) // individual familiarity index of doctors IFI\({}_{\text{L}}\) = Sum (S\({}_{\text{T}}\), C\({}_{\text{A}}\)) // individual familiarity index of insurance companies end for each (C\({}_{\text{P}}\), D, I\({}_{\text{C}}\))  C\({}_{\text{P},\text{FS}}\) = C\({}_{\text{P}}\) with max (IFI\({}_{\text{C}}\)) // finally selected cured patient is chosen with maximum IFI  D\({}_{\text{PS}}\) = D with max (IFI\({}_{\text{D}}\)) // finally selected doctor is chosen with maximum IFI  I\({}_{\text{C}}\).FS = I\({}_{\text{C}}\) with max (IFI\({}_{\text{L}}\)) // finally selected insurance company is chosen with maximum IFI  end for each (C\({}_{\text{P}}\), D, I\({}_{\text{C}}\))  I\({}_{\text{d}}\).FS\({}_{\text{C}}\) = I\({}_{\text{d}}\) with max (IFI\({}_{\text{C}}\)) // individual decision of finally selected cured patient  I\({}_{\text{d}}\).FS\({}_{\text{D}}\) = I\({}_{\text{d}}\) with max (IFI\({}_{\text{D}}\)) // individual decision of finally selected doctor  I\({}_{\text{d}}\).FS\({}_{\text{L}}\) = I\({}_{\text{d}}\) with max (IFI\({}_{\text{L}}\)) // individual decision of finally selected insurance company end for each (C\({}_{\text{P}}\), D, I\({}_{\text{L}}\))  IFIF\({}_{\text{PS}}\).C\({}_{\text{P}}\) = I\({}_{\text{d}}\) with max (IFI\({}_{\text{C}}\)) // IFI of finally selected cured patient IF\({}_{\text{PS}}\).D = I\({}_{\text{d}}\) with max (IFI\({}_{\text{D}}\)) // IFI of finally selected doctor IF\({}_{\text{PS}}\).I\({}_{\text{C}}\) = I\({}_{\text{d}}\) with max (IFI\({}_{\text{L}}\)) // IFI of finally selected insurance company end
```  
**Algorithm 1**Selection of final participating entities  
Selection of final participating entities: All participating entities (P, C\({}_{\text{P}}\), D, I\({}_{\text{C}}\)) are verified from DB\({}_{\text{loc}}\) and DB\({}_{\text{bc}}\).