👤Account Creation and Authentication
This section details the different types of account creation.
Account creation is necessary in order for the application to be utilized effectively. There are two main categories of registration:
This type of account registration is targeted towards the administrative users of the application, as they have more privileged access to the API service of Elixir. Registration is done with an endpoint specifically designed for administrative registration. Requirements include a unique email address and a password.
curl -X POST
api/v1/auth/register-admin
-H 'Content-Type: application/json'
-d '{ "email": "user@example.com", "password": "password123" }'
When it comes to user registration, however, this category is further broken down into two more subcategories:
1. Medical Provider's Registration
In this category of registration, medical providers are registered in various medical departments as consultants and non-consultants.
Registration as a Consultant
To register as a consultant into a department, special endpoints are already defined in the format of api/v1/auth/registration-consultant-<department>
The required data for this form of registration includes:
email
first name
last name
telephone
address
With the use of these endpoints, the "department" data does not have to be specified.
Registration as a Non-Consultant
This form of registration is slightly different from the initial. The data on which department the doctor is being registered into, as well as hierarchy should be specified.
email
first name
last name
password
department
telephone
address
hierarchy
The endpoint for this form of registration:
api/v1/auth/register-doctor
Once a consultant is registered, a group is created in the medical department registered into. A group has a maximum of :
1 consultant
2 associate specialists
4 junior doctors, and
8 medical students
2. Patient's Registration
This class of registration is created for the administrative users. An email and a password is simply needed. This automatically creates a profile for the patients. The patient will have to fill in the needed data later on. These includes:
first name
last name
age
address
telephone
occupation
marital status.
Though these are the fields required to set up a complete patient's profile, the complete data includes:
doctor's name
doctor's telephone
doctor's email
doctor's department
email
Authentication/Authorization methods include:
Json Web Tokens
OAuth2.0 / Auth0 (for patient registration)

Password change and reset endpoints are also made available.
POST token/forgot-passwordPOST auth/change-passwordLast updated