The Conversation object

The Conversation object is used so that a patient can communicate with one or several providers.

NameTypeDescription
idUUIDA unique identifier.
titlestring?A title describing this conversation.
patientPatient(id: UUID, username: string?, first_name: string?, last_name: string?, locale: "fr" | "en", email: string?, phone: string?, sex: "MALE" | "FEMALE" | "OTHER"?, updated_at: DateTime, created_at: DateTime, external_id: string?, metadata: JSON?)The patient that is associated to this conversation.
providersProviders(id: UUID, gender: "MALE" | "FEMALE"?, first_name: string, last_name: string, phone: string?, email: string?, prefix: string?, title: string?, timezone: string?, roles: "ADMINISTRATOR" | "PRACTITIONER" | "REVIEWER"[], self_login_enabled: boolean)[]The list of providers participating in this conversation.
assigned_providerAssignedProvider(id: UUID, gender: "MALE" | "FEMALE"?, first_name: string, last_name: string, phone: string?, email: string?, prefix: string?, title: string?, timezone: string?, roles: "ADMINISTRATOR" | "PRACTITIONER" | "REVIEWER"[], self_login_enabled: boolean)?The provider assigned to this conversation.
tagsTags(id: UUID, type: Type(id: UUID, name: string, created_at: DateTime, color: string, ml_predictable: boolean), status: "VALID" | "SUGGESTED" | "DISMISSED", created_at: DateTime, model: Model(id: UUID, status: "PENDING" | "TRAINING" | "READY" | "DELETED" | "ERROR", created_at: DateTime, updated_at: DateTime?)?)[]The list of tags associated with this conversation.
console_urlstringThe URL pointing to this conversation in the Nabla Console.
unread_by_patient_messages_countintegerThe number of providers' messages that haven't been read by the patient yet.
unread_by_providers_messages_countintegerThe number of patient's messages that haven't been read by any of the providers yet.
metadataJSON?You can use this parameter to attach key-value data to the object. All values must be of type string.

Example

{
  "id": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
  "title": "Urinary infection",
  "patient": {
    "id": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
    "username": "johndoe",
    "first_name": "John",
    "last_name": "Doe",
    "locale": "fr",
    "email": "[email protected]",
    "phone": "33612356789",
    "sex": "MALE",
    "updated_at": "2022-03-10T19:16:23.456Z",
    "created_at": "2022-03-10T19:16:23.456Z",
    "external_id": "example_string",
    "metadata": {
      "example_key": "example_string"
    }
  },
  "providers": [
    {
      "id": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
      "gender": "FEMALE",
      "first_name": "Jane",
      "last_name": "Doe",
      "phone": "33612356789",
      "email": "example_string",
      "prefix": "Pr",
      "title": "Professor",
      "timezone": "Europe/Paris",
      "roles": [
        "ADMINISTRATOR"
      ],
      "self_login_enabled": true
    }
  ],
  "assigned_provider": {
    "id": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
    "gender": "FEMALE",
    "first_name": "Jane",
    "last_name": "Doe",
    "phone": "33612356789",
    "email": "example_string",
    "prefix": "Pr",
    "title": "Professor",
    "timezone": "Europe/Paris",
    "roles": [
      "ADMINISTRATOR"
    ],
    "self_login_enabled": true
  },
  "tags": [
    {
      "id": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
      "type": {
        "id": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
        "name": "DERMATOLOGY",
        "created_at": "2022-03-10T19:16:23.456Z",
        "color": "#aabbcc",
        "ml_predictable": true
      },
      "status": "VALID",
      "created_at": "2022-03-10T19:16:23.456Z",
      "model": {
        "id": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
        "status": "READY",
        "created_at": "2022-03-10T19:16:23.456Z",
        "updated_at": "2020-01-01T12:00:00Z"
      }
    }
  ],
  "console_url": "https://pro.nabla.com/conversations/07839A27-39EC-4C24-87A3-8CF0A9F3451A",
  "unread_by_patient_messages_count": 3,
  "unread_by_providers_messages_count": 1,
  "metadata": {
    "example_key": "example_string"
  }
}