Connecting datasources

Aside from clearinghouses, tuuthfairy allows you to connect provider payer portals, and include them as datasources.


Creating a datasource connection

mutation ConnectDatasource {
  connectDatasource(
    input: {
      websiteId: "<websiteId>"
      provider: { npi: "0123456789" }
      credentials: { username: "xxxxx", password: "xxxx" }
    }
  ) {
    result {  id, status }
    userErrors { type, message }
  }
}

Sample websiteId's to try:

  • dnoaconnect.com
  • deltadentalins.com
  • metdental.com
  • dentalofficetoolkit.com

To get a full list, query payers, and any with a website are supported

query GetPayers {
  payers {
    id  
    name
    website {
      id
      has2FA
      name
      url      
    }
  }
}

Checking connection status

connectDatasource is an asynchronous request. Using the id from your connection result, you can poll connection status

Get connection details

query GetConnection($id: ID!) {
  connection(id: $id) {
    id
    datasourceId
    status
    providers {
      providerId
      name
      npi
    }
  }
}

Get all connections

query GetConnections {
  connections {
    id
    datasourceId
    status
    providers {
      providerId
      name
      npi
    }
  }
}

Connection status

enum ConnectionStatus {
  auth_2fa_code
  auth_failed
  auth_in_progress
  connected
  disconnected
}

Re-using connections across multiple providers

Most practices will have more than one provider, and they will share payer portal logins. You can add multiple providers to a single connection.

mutation AddProviderToConnection($connectionId: ID!, $provider: ProviderInput!) {
  addProviderToConnection(connectionId: $connectionId, provider: $provider) {
    success
    userErrors {
      type
      message
      field
    }
  }
}

Eligiblity requests and datasources are linked by NPI

Eligiblity requests will lookup datasource connections based on the provider NPI. If no providers have been added to a connection, the datasource will not be utilized.

Handling 2FA

Some websites require 2FA (Two-Factor Authentication). If a connections status turns to auth_2fa_code, it will require a follow up request to confirmDatasource2FaCode.

mutation ConfirmDatasource2FaCode{
  confirmDatasource2FaCode(id:"<connectionId>", confirmCode:"<confirmationCode>") {
    result {
      id
      status
    }
  }
}

We recommend setting up webhooks.