GO
GOLANG
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
The Beacon SDK is not a public package and will require you sending us a GitHub username to be added into the repo for download. You will be required to download this SDK repository in order to submit claims.
Once downloaded you can place the Beacon folder into your project and require the local Beacon package SDK.
Require packages
import "mypackagename/beacon"
Setup binary
The GitHub repository contains a folder named lib. This folder contains sub-folders for each of our supported operating systems and cpu architectures. You will need to copy the appropriate binary for your platform to some location on your system that you can path to.
Configure your client
To authenticate with the client, you will be required to provided your private_token.
If you do not already have a private token please reach out to [email protected]
Client ArgumentsThe Beacon client must be initialized with your PRIVATE_TOKEN, OS, ARCHITECTURE, and ENVIRONMENT.
The following environments are supported.
| OS | Architecture |
|---|---|
| darwin | amd64 |
| darwin | arm64 |
| linux | amd64 |
| linux | 386 |
A
sandboxenvironment is available to Partners and can be enabled to test submissions and other endpoints for implementation activities with Beacon.
myPrivateAccessToken: "private_token"
myClient := beacon.CreateClient(
myPrivateAccessToken,
"/path/to/binary/BEACON_PARTNERS-linux-amd64",
"sandbox"
)Enable Production Submissions
By default Beacon Partner accounts will be INACTIVE. To Activate a Beacon Partner account, please reach out to [email protected]
statusResponse, err := myClient.Status()
if err != nil {
log.Fatal(err)
}
log.Printf("%+v", statusResponse)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 IDIt'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.
Preview Submission file
// (inputFile, outputFile)
// outputFile argument required
beaconClient.PreviewPharmacyClaims("PATH_TO_CLAIMS_DATA_FILE.csv", "./OUTPUT_FILE_NAME.csv")
beaconClient.PreviewMedicalClaims("PATH_TO_CLAIMS_DATA_FILE.csv", "./OUTPUT_FILE_NAME.csv")
Create Pharmacy Claims Submission
// (inputFile, outputFile)
responseMessage, err := myClient.CreatePharmacyClaims("PATH_TO_CLAIMS_DATA_FILE.csv", "./OUTPUT_FILE_NAME.csv")
log.Println(responseMessage)Create Medical Claim Submission
// (inputFile, outputFile)
responseMessage, err := myClient.CreateMedicalClaims("PATH_TO_CLAIMS_DATA_FILE.csv", "./OUTPUT_FILE_NAME.csv")
log.Println(responseMessage)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 you'll need to rely on additional methods due to golang not supporting method overloading. The Methods that support pagination will have their sister methods that has the same name except include "WithPage" at the end. For example
beaconClient.GetPharmacySubmissionturns tobeaconClient.GetPharmacySubmissionWithPage. 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 likelyhood 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:
- GetPharmacyClaimsSubmission()
- GetPharmacySubmission()
- GetMedicalClaimsSubmission()
- GetMedicalSubmission()
- GetRebates()
- GetStatements()
- GetStatementsByRange()
Example:
responseMessage, err := beaconClient.GetPharmacyClaimsSubmission("SUB-52fb8424-4fed-4465-a98e-8d124d44e0a6") fmt.Println(responseMessage.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 responseMessage, err := beaconClient.GetPharmacyClaimsSubmissionWithPage("SUB-52fb8424-4fed-4465-a98e-8d124d44e0a6", "2") fmt.Println(responseMessage.Metadata) # output to screen looks like: # Metadata: { # total_pages: 4 # page: 2 # perPage: 100 # }
Get Manufacturers
response, err := beaconClient.GetManufacturers()Get Permissions
response, err := beaconClient.GetPermissions()Get NDCs
response, err := beaconClient.GetNdcs()Get Prices
response, err := beaconClient.GetPrices()Get Pharmacy Claims
- By Date Range
response, err := beaconClient.GetPharmacySubmission("2024-01-01", "2025-03-01")- By Submission ID
response, err := beaconClient.GetPharmacyClaimsSubmission("SUB-804472d2-e6d6-4d2f-9c8d-9b075128f97b")- By Claim ID
response, err := beaconClient.GetPharmacyClaims("CLM-44c240daba75ef36adc849e489cbe2de8f1b9931f03741b8ba3a1163feb76fd2")- Get Pharmacy Submission by Submission ID
response, err := beaconClient.GetPharmacySubmissionByID("SUB-804472d2-e6d6-4d2f-9c8d-9b075128f97b")Get Medical Claims
- By Date Range
response, err := beaconClient.GetMedicalSubmission("2024-01-01", "2025-03-01")- By Submission ID
response, err := beaconClient.GetMedicalClaimsSubmission("SUB-804472d2-e6d6-4d2f-9c8d-9b075128f97b")- By Claim ID
response, err := beaconClient.GetMedicalClaims("CLM-44c240daba75ef36adc849e489cbe2de8f1b9931f03741b8ba3a1163feb76fd2")- Get Medical Submission by Submission ID
response, err := beaconClient.GetMedicalSubmissionByID("SUB-804472d2-e6d6-4d2f-9c8d-9b075128f97b")Get Rebates
- By Entity ID and Manufacturer
response, err := beaconClient.GetRebates("DSH100001", "boehringer_ingelheim")- By Rebate ID
response, err := beaconClient.GetRebatesByID("CR-0HPU0OnNAZbyVQoQx9zZpPdkHqPDOggB")Get Statements
- By Entity ID and manufacturer
response, err := beaconClient.GetStatements("DSH510022", "boehringer_ingelheim")- By Date Range
response, err := beaconClient.GetStatementsByRange("DSH510022", "boehringer_ingelheim", "2024-01-01", "2025-03-01")Get Balances
- By CEID, NDC, NPI
response, err := beaconClient.GetBalance("DSH340113", "00088221905", "1427164052")Updated 2 days ago