Patient Self Registration

BioT allows registering new patients using its APIs as well as through the Organization Portal. To register a new patient using the Organization Portal, you first have to create a caregiver and assign them that patient. To register a patient through the API, the user ID of a caregiver should be used.

In some use cases, patients should be able to register themselves without a caregiver adding them to the service. In order to achieve that, we need to deploy a BioT plugin to streamline the process, where in the end, the patient gets an invitation email to the platform that allows them to set their initial password.

In the following example, the patient registers through a 3rd party mobile app, which passes the patient's information to a plugin that performs the actual registration.

Organization Selection

When creating a new patient, they must be added to one of the organizations defined in the system. One way is for the mobile app to hold the organization ID and provide it to the API during the registration process. If you want to allow the patient to choose their organization, query BioT for the available organizations using the Search Organizations API that returns a list of available organizations and their IDs.

Self-registering a Patient

To enable patients to register themselves, a BioT plugin needs to be deployed.

Plugin Preparation

The plugin needs to have the following information:

  • The organization ID
  • The Patient template ID
  • Caregiver user ID
  • Set password URL

The patient template ID can be obtained by searching the available templates.
The template ID can be saved as an environment variable of the plugin, as it will not change.

The plugin needs to have a caregiver ID for each organization that can be registered by it.
These IDs need to be saved in the plugin and be used when a patient asks to be registered to a specific organization. You may want to create these caregivers manually, through the organization portal, and save the IDs as environment variables of the plugin. The caregiver ID can be obtained using the search caregiver API.

The plugin needs to supply BioT with a URL that will later be embedded into the invitation email in the set password button.
The URL should lead to a set password webpage that allows the user to set their initial password.
The plugin may use the default URL used by the platform. To obtain it, please contact BioT support.

Registration

The plugin will receive the following details from the app:

  • Patient first name
  • Patient last name
  • Patient email address
  • Patient organization ID

The plugin will use the information to register the patient by calling the Create a new Patient API with the following body:

{
  "_ownerOrganization": {
    "id": "e58ff35c-1928-43bf-b2b0-0473cf4c644e"
  },
  "_caregiver": {
    "id": "4dff5961-84d2-4e91-a5a1-42a09d11d15d"
  },
  "_name": {
    "firstName": "John",
    "lastName": "Doe"
  },
  "_email": "[email protected]",
  "_templateId": "404ee5a7-f2d4-4f2e-b4af-0698d4c3e46b"
}

Note that the set password URL needs to be passed in the API call header and not the body. For example:

email-confirmation-landing-page: https://organization.app.dev.example.biot-med.com/auth/invitation?lang=en-us

Once executed, the patient receives an email invitation to set their initial password and complete the registration.