PHP code example of nickcheek / brightree

1. Go to this page and download the library: Download nickcheek/brightree library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

nickcheek / brightree example snippets


CMNFormFetchAll($query);
NonTaxReasonFetchAll($query);
PriceCreateItem($query);
PriceCreateStandard($query);
PriceDetailCreate($query);
PriceDetailFetchByBrightreeDetailID($query);
PriceDetailUpdate($query);
PriceFetch($query);
PriceOptionLetterTypeFetchAll($query);
PriceTableFetchAll($query);

UserFetchByBrightreeID($query);
UserSearch($query);
UserUpdate($query);
UserGroupCreate($query);
UserGroupUpdate($query);
UserGroupFetchByBrightreeID($query);
UserGroupFetchAll($query);
UserGroupPermissionsFetchByUserGroupBrightreeID($query);
UserGroupPermissionsUpdate($query);

InvoiceCreatePrintActivity($brightreeID);
InvoiceFetchByBrightreeID($brightreeID);
InvoiceFetchByInvoiceID($invoiceID);
InvoiceItemUpdate($query);
InvoiceUpdate($query);
OpenInvoiceAgedBalanceFetchByPatient($id);
OpenInvoiceBalanceFetchByPatient($id);
Resubmitinvoices($query);
 php
$bt = new Brightree($username,$password);
$note = $bt->Patient()->GetNoteByKey('141508');
return $note;
 php
$bt = new Brightree($username,$password);
$note = $bt->Patient()->GetNoteByKey(141508);
return $note;
 php
$bt = new Brightree($username,$password);
$document = $bt->Document()->DocumentTypesFetchAll();
return $document;
 php
DocumentTypesFetchAll();
DocumentBatchCreate($batch);
DocumentBatchSearch($search);
DocumentSearch($search);
DocumentPropertyUpdate($query);
FetchDocumentContent($key);
GenerateDocumentID($query);
StoreDocument($document);

 php
$bt = new Brightree($username,$password);
//If you need to return the inactive records, pass the number 1 as the second variable
$cf = $bt->CustomField()->CustomFieldFetchAllByCategory('Patient',1);
return $cf;
 php
CustomFieldFetchAllByCategory($category,$treeID,$category);
CustomFieldValueSaveMultiple($query);

 php
$bt = new Brightree($username,$password);
$doctor = $bt->Doctor()->DoctorFetchByBrightreeID(123);
return $doctor;
 php
$bt = new Brightree($username,$password);
$insurance = $bt->Insurance()->InsuranceFetchByBrightreeID(['BrightreeID'=>123]);
return $insurance;
 php
$bt = new Brightree($username,$password);
$inventory = $bt->Inventory()->ClaimNoteTypeFetchAll();
return $inventory;
 php
$bt = new Brightree($username,$password);
$params = array(
    'searchParams'=> array(
        'Branch'=> array(
            'ID' => '102'
        )
    ),
    'sortParams' => '',
    'pageSize' => '100',
    'page' => 1
);
$puex = $bt->Pickup()->PickupExchangeSearch($params);
return $puex;
 php
$bt = new Brightree($username,$password);
$reference = $bt->Reference()->AccountGroupFetchAll();
return $reference;
 php
$bt = new Brightree($username,$password);
$salesorder = $bt->SalesOrder()->BrightSHIPSalesOrderAck(['soKey'=> 12345]);
return $salesorder;
 php
$bt = new Brightree($username,$password);
$documentation = $bt->Documentation()->CMNFetchByBrightreeID(['BrightreeID'=>12345]);
return $documentation;
 php
$bt = new Brightree($username,$password);
$pricing = $bt->Pricing()->NonTaxReasonFetchAll($query);
return $pricing;
 php
$bt = new Brightree($username,$password);
$security = $bt->Security()->UserFetchByBrightreeID($query);
return $security;
 php
$bt = new Brightree($username,$password);
$security = $bt->Security()->UserFetchByBrightreeID($query);
return $security;
 php
$bt = new Brightree($username,$password);
$patient = $bt->Patient()->Custom('PatientFetchByPatientID', array('PatientID' => $id));
return $patient;