.NET

(DOT NET)

Overview

The Beacon SDK provides an interface and the functionality to facilitate the submission and upload of claims data for respective Covered Entities.

In order to accomplish this, it is a requirement that we ensure PHI (Personal Health Information) is not included in submissions, this is achieved by a one way de-identification function.

All claims files will be required to pass strict formatting and validations before uploading to Beacon. Claims data files are filtered by NDCs of participating manufacturers, only matching NDC rows will selected for submission. Claims data files are also filtered by which Covered Entities have granted you the ability to submit on their behalf.


Installation

Beacon .NET SDK is not a public package and you will be required to download this SDK repository. To use the Beacon .NET SDK you will need add the package to your project in Visual Studio.

If you do not yet have the link to the GitHub repo or you have the link and do not have permissions, please contact support and provide us the username you'd like to have added.


  1. Create a local folder to hold the Beacon package. This should be outside of your repository.
  2. Right click your project and select Mange NuGet Packages...
  1. In the top right hand corner select the cog to open the package sources

  1. Add a new package source and set it to the folder containing the package (name it something like "Local")

  1. Select the package source in the manage NuGet packages page.
  1. Install the Beacon package


Configure your client

📘

Client Arguments

The Beacon client must be initialized with your PRIVATE_TOKEN, and ENVIRONMENT


A sandbox environment is available to Partners and can be enabled to test submissions and other endpoints for implementation activities with Beacon.


Direct

var client = new BeaconClient(PRIVATE_TOKEN, 'sandbox');

Dependency Injection

The client also supports dependency injection by providing an implementation when configuring services:

public void ConfigureServices(IServiceCollection services)
{
    services.AddSingleton<IBeaconClient>(new BeaconClient(PRIVATE_TOKEN, 'sandbox');
}

and using the interface in the constructor of your class

public class MyCustomClass
{
    private BeaconClient client;

    public MyCustomClass(IBeaconClient client)
    {
        this.client = client;
    }
}

Enable Production Submissions

By default Beacon Partner accounts will be INACTIVE. To Activate a Beacon Partner account, please reach out to [email protected]

var status = await client.accounts.StatusAsync("");
logger.LogInformation($"Name:{status.Name}\nStatus:{status.Status}\n";

Usage

To create and transmit a claims file you will need to provide the path location to your CSV Claim data file as well as an output file location where the results will be written.
Additionally, you can preview submission files by including an output path and input filename.

👍

Beacon ID

It's required that you specify the location you'd like to receive your output file. The Beacon SDKs will return Beacon Identifiers for each unique submitted Claim.

To create and transmit a submission you will need to provide the absolute location to the CreateSubmissionAsync method.

Preview Submission file

// (inputFile, outputFile)

await client.pharmacy_submissions.PreviewAsync("C:\\File\\Location\\PATH_TO_CLAIMS_DATA_FILE.csv", "C:\\File\\Location\\OUTPUT_FILE_NAME.csv");

Create Pharmacy Submission

// (inputFile, outputFile)

await client.pharmacy_submissions.CreateAsync("C:\\PATH_TO_CLAIMS_DATA_FILE.csv", "C:\\OUTPUT_FILE_NAME.csv");

Create Medical Submission

// (inputFile, outputFile)

await client.medical_submissions.CreateAsync("C:\\PATH_TO_CLAIMS_DATA_FILE.csv", "C:\\OUTPUT_FILE_NAME.csv");

Accessor Functions

Note - For most methods where we return a list of data, if the number of results is greater than 100, we paginate the response. In order to get the next page of data, call the same method but pass an additional argument for the page number you'd like to receive as a string. You'll know if there are multiple pages by taking a look at the response object for the fist call. If the length of items in the response is 100, there is a high likelihood there are multiple pages. Also on the response object you'll see a Metadata attribute. This contains your current page, the total number of pages, and the number of results per page. Its up to you to check for this response and continue to call the endpoint passing in each page number until you've retrieved all of the data. Example of how to do this below.

The current list of methods that return this metadata are:

  • pharmacy_claims.getBySubmission()
  • pharmacy_claims.getSubmissionsByRange()
  • medical_claims.getBySubmission()
  • medical_claims.getSubmissionsByRange()
  • rebates.getRebates()
  • statements.getStatements()
  • statements.getStatementsByRange()

Example:

var response = await client.pharmacy_claims.getBySubmission("SUB-5f14d11f-ac6a-40a8-8547-73e37e65ad81")
Console.WriteLine(response.Metadata)
# output to screen looks like:
# Metadata: {
#   total_pages: 4
#   page: 1
#   perPage: 100
# }
# Now get the next page by passing in "2" as the second arg
var response = await client.pharmacy_claims.getBySubmission("SUB-5f14d11f-ac6a-40a8-8547-73e37e65ad81", "2")
Console.WriteLine(response.Metadata)
# output to screen looks like:
# Metadata: {
#   total_pages: 4
#   page: 2
#   perPage: 100
# }

Get Manufacturers

var response = await client.manufacturers.Get()

Get Permissions

var response = await client.permissions.Get()

Get NDCs

var response = await client.ndcs.Get()

Get Prices

var response = await client.prices.Get();

Get Pharmacy Claims

  • By Date Range
var response = await client.pharmacy_claims.GetSubmissionsByRange("2024-01-01", "2025-03-01")
  • By Submission ID
var response = await client.pharmacy_claims.GetBySubmission("SUB-5f14d11f-ac6a-40a8-8547-73e37e65ad81")
  • By Claim ID
var response = await client.pharmacy_claims.Get("CLM-44c240daba75ef36adc849e489cbe2de8f1b9931f03741b8ba3a1163feb76fd2")
  • Get Pharmacy Submission by Submission ID
var response = await client.pharmacy_claims.GetSubmissionByID("SUB-44195f27-5b72-4234-a19a-1bed88627c9c")

Get Medical Claims

  • By Date Range
var response = await client.medical_claims.GetSubmissionsByRange("2024-01-01", "2025-03-01")
  • By Submission ID
var response = await client.medical_claims.GetBySubmission("SUB-7186eaf6-6d44-46d9-95fd-16df036d3881")
  • By Claim ID
var response = await client.medical_claims.Get("CLM-0c860a5dc19e9240e2f4e3b205fe70c159468f7158905d22850bf1187cc06237")
  • Get Medical Submission by Submission ID
var response = await client.medical_claims.GetSubmissionByID("SUB-b01fa53b-ef14-40c3-a951-22a30e891d43")

Get Rebates

  • By Entity ID and Manufacturer
var response = await client.rebates.GetRebates("entity_id", "manufacturer")
  • By Rebate ID
var response = await client.rebates.GetByID("CR-0HPU0OnNAZbyVQoQx9zZpPdkHqPDOggB")

Get Statements

  • By Entity ID and manufacturer
var response = await client.statements.GetStatements("entity_id", "manufacturer")
  • By Date Range
var response = await client.statements.GetStatementsByRange("entity_id", "manufacturer", "2025-02-28", "2025-03-01")

Get Balances

  • By CEID, NDC, NPI
var response = await client.balances.Get("entity_id", "ndc", "npi")

Did this page help you?