| Algorithm 1 New user registration |
| Input: Patient/Doctor personal information: first name, last name, date of birth, sex, user type |
| Output: Patient/Doctor address |
| Require: User address not already registered |
| 1: Generate a new address/private key using the user defined password |
| 2: if new address does not exist then |
| 3: if user is patient then |
| 4: Store patient information |
| 5: else |
| 6: Store doctor information |
| 7: Emit new user event |
| 8: return address |