## 3 Proposed Method
### Proposed Proof of Familiarity (PoF) Consensus Algorithm
#### 3.2.4 Proof of Familiarity (PoF) Algorithm
**Input**:  
finally selected cured patient, C\({}_{\rm p,PS}\); finally selected doctor, D\({}_{\rm PS}\); finally selected insurance company, I\({}_{\rm c,PS}\)  
individual familiarity index of finally selected cured patient, IIFIs\({}_{\rm C}\)\({}_{\rm P}\); individual familiarity index of finally selected doctor, IFIIs\({}_{\rm D}\); individual familiarity index of finally selected insurance company, IIFIs\({}_{\rm L}\)  
individual decision of finally selected cured patient, I\({}_{\rm d\_FS,C}\); individual decision of finally selected doctors, I\({}_{\rm d\_FS,D}\); individual decision of finally selected insurance company, I\({}_{\rm d\_FS,L}\)  
blockchain database, DB\({}_{\rm bc}\); local database, DB\({}_{\rm bc}\) // storing entities (local and blockchain database)  
**Output**:  
final collaborative medical decision, C\({}_{\rm d}\)  
**Begin**:  
C\({}_{\rm p,PS}\), D\({}_{\rm PS}\), I\({}_{\rm c,PS}\) broadcast I\({}_{\rm d\_FS,C}\), I\({}_{\rm d\_FS,D}\), I\({}_{\rm d\_FS,L}\) to Cp, D, Ic //decision broadcast for consensus  
C\({}_{\rm d}\) = combination of (I\({}_{\rm d\_FS,C}\), I\({}_{\rm d\_FS,D}\), I\({}_{\rm d\_FS,L}\)) //aggregation of individual decision in medical decision  
C\({}_{\rm d}\) stores in DB\({}_{\rm bc}\) // final collaborative medical decision is stored in blockchain  
C\({}_{\rm p,PS}\); I\({}_{\rm c,PS}\) stores in DB\({}_{\rm bc}\) // finally selected entities' identities are stored in local database  
Hash of locally stored C\({}_{\rm p,PS}\), DFS, I\({}_{\rm c,PS}\) from DB\({}_{\rm loc}\) stores in DB\({}_{\rm bc}\) // hash are stored in blockchain  
IFIs\({}_{\rm C}\)\({}_{\rm P}\), IFIIs\({}_{\rm D}\), IFIIs\({}_{\rm L}\) stores in DB\({}_{\rm bc}\) // IFI of finally selected participants are stored in blockchain  
J\({}_{\rm ET}\), T\({}_{\rm SR}\), T\({}_{\rm ET}\), C\({}_{\rm C}\), E\({}_{\rm D}\), S\({}_{\rm T}\), C\({}_{\rm A}\) of C\({}_{\rm P,SPE}\), D\({}_{\rm SPE}\), I\({}_{\rm c,SPE}\) is updated in DB\({}_{\rm bc}\) and DB\({}_{\rm loc}\)  
**End**  
Selecting and storing of final collaborative medical decision: Finally selected participating entities (C\({}_{\rm p,FS}\), D\({}_{\rm FS}\), I\({}_{\rm c,FS}\)) broadcast individual decisions (I\({}_{\rm d\_FS,C}\), I\({}_{\rm d\_FS,D}\), I\({}_{\rm d\_FS,I\rm c}\)) to all other C\({}_{\rm p}\), D, I\({}_{\rm c}\) for consensus gathering. Afterwards, final collaborative medical decision (C\({}_{\rm d}\)) is made by combining individual decisions (I\({}_{\rm d\_FS,C}\), I\({}_{\rm d\_FS,D}\), I\({}_{\rm d\_FS,I\rm c}\)) followed by storing in DB\({}_{\rm bc}\). Identities of selected participating entities (C\({}_{\rm p,FS}\), D\({}_{\rm FS}\), I\({}_{\rm c,FS}\)) are stored in their individual DB\({}_{\rm loc}\). Hash of locally stored identities (C\({}_{\rm p,FS}\); D\({}_{\rm FS}\); I\({}_{\rm c,PS}\)) is also stored in DB\({}_{\rm bc}\). Finally, individual decision judging factors (J\({}_{\rm ET}\), T\({}_{\rm SR}\), T\({}_{\rm ET}\), C\({}_{\rm C}\), E\({}_{\rm D}\), S\({}_{\rm T}\), C\({}_{\rm A}\)) of successful entities (C\({}_{\rm P,SPE}\), D\({}_{\rm SPE}\), I\({}_{\rm c,SPE}\)) are updated for future use.