AugnitoAmbientSDK 1.0.1

dotnet add package AugnitoAmbientSDK --version 1.0.1
                    
NuGet\Install-Package AugnitoAmbientSDK -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AugnitoAmbientSDK" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AugnitoAmbientSDK" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="AugnitoAmbientSDK" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AugnitoAmbientSDK --version 1.0.1
                    
#r "nuget: AugnitoAmbientSDK, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=AugnitoAmbientSDK&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=AugnitoAmbientSDK&version=1.0.1
                    
Install as a Cake Tool

Augnito Ambient SDK

Use this .Net SDK to integrate Augnito’s Ambient Tech within your EMR. To get access credentials or know more about how Augnito Ambient can benefit you, please visit our website and connect with our sales team: https://augnito.ai/

Installation

Install the library in your project Using nuget package manager Search AugnitoAmbientSDK click on install Using Package manager console
Install-Package AugnitoAmbientSDK

Basic Usage

Import the library

using AugnitoAmbientSDK;
using AugnitoAmbientSDK.Config;
using AugnitoAmbientSDK.Utils;

Create the configuration file and instantiate Augnito Ambient Client

AmbientConfig _configParams = new AmbientConfig()
    {
        accessKey = "<your server>",
        enableLogs = "false",// set to true to check sdk logs in the output window
        server = "<your server>",
        subscriptionCode = "<your subscription code>",
        userTag = "<your usertag>"
    };
AugnitoAmbient _augnitoAmbientClient = new AugnitoAmbient(_configParams, HeavyDataOperation);

For the provided subscription code, accesskey and usertag, any authentication failure will be returned in onError callback for all the APIs provided below

Error Code Error Message Suggestive UI Message to display Description
AUTH01 Subscription is not valid. Authentication failed. Please contact IT support team for help. Received when Augnito Omni subscription is not into active-state OR SubscriptionCode value is incorrect
AUTH01 invalid request. Please make sure AccessKey, SubscriptionCode and UserTag is sent along with the request Authentication failed. Please contact IT support team for help. Received when either of the details is not passed to the API
AUTH02 Active seat is not available for user You don't have access to ambient capability. Please contact IT support team for help. Received when all the seats within the augnito-subscription are consumed and no seat is available.

1- Get Note Parameters

  • Get Region, Note Type and Gender

    Get all possible note-parameters (applicable categories and possible values) that are expected to be passed when creating a job (when doctor-patient consultation is started). These details are used to provide consultation SOAP notes with higher accuracy.

    //Returns JSON string of Region, Note Type and Gender
    try
    {
      var noteParamsJson = await _augnitoAmbientClient.GetNoteParams();
    }
    catch(Exception ex)
    {
      if(ex is HttpCodeException error)
      {
          Console.Writeline(error.ErrorCode, error.ErrorMessage)
      }
    }
    
  • Get Speciality and Visit Types

    Augnito allows the speciality-type and visit-types for the doctor-patient consultation mapped at the hospital organization level. This method returns the list of speciality-type or visit-type (based on the value of ConfigTypeId parameter) mapped for the user in the hospital-organization.

    All supported specialty-types and visit-types for the hospital-organization can be specified to Augnito team at the start of integration or as and when needed.

    At the start of recording it is necessary to pass the ConfigID of applicable (user can select one or default value to be sent) Speciality and VisitType in the noteparams string.

    /** Response JSON string for each item of speciality and visit type
    * ID: number,
    * ConfigID: number,
    * Value: string,
    * Description: string,
    * IsSelected: boolean,
    * IsDefault: boolean
    */
    
    try
    {
          //Get list of specialities enabled for organisation
          var specialities = await _augnitoAmbientClient.getUserConfiguration(SettingsConfigType.SPECIALITY);
    
          //Get list of visit types enabled for organisation
          var visitTypes = await _augnitoAmbientClient.getUserConfiguration(SettingsConfigType.VISIT_TYPE); 
    }
    catch(Exception ex)
    {
          if(ex is HttpCodeException error)
          {
              Console.Writeline(error.ErrorCode, error.ErrorMessage)
          }
    }
    

2- Toggle the client

Now all you have to do is toggle the status when you want to start/stop or pause/resume recording!

/**
 * @param filetype Type of file being uploaded, wav, mp3, etc. Ex: “filetype=wav“
 * @param noteparams Qualifiers to determine the type of clinical note to be generated for that audio file. Region, NoteType and Gender values to be passed from response for getNoteParams(). Speciality and Visit Type can be set to the ConfigID returned by getUserConfiguration()
 * @param jobName, optional, a title for the note generated
 * @param jobId, optional, to be set if reconnecting to paused job id to continue recording the note
 * @param recordedDuration, optional, set recorded duration of previous paused job id if reconnecting to it
 */

// Toggles the start/stop recording
AugnitoAmbientClient.ToggleListening(
    string filetype, 
    string noteparams, 
    string jobName = null, 
    string jobId = null, 
    int recordedDuration = 0)

example: _augnitoAmbientClient.ToggleListening("wav","{'Region': 1, 'Speciality': 11, 'NoteType': 1, 'VisitType':29, 'Gender': 0}");

//Toggles the Pause/Resume recording
augnitoAmbient.TogglePauseResumeListening(string filetype, string noteparams, string jobName = null, string jobId = null, int recordedDuration = 0)

example: augnitoAmbient.togglePauseResumeListening("wav","{'Region': 1, 'Speciality': 11, 'NoteType': 1, 'VisitType':29, 'Gender': 0}")
//#region Callbacks

//Callback to change recording button style
_augnitoAmbientClient.OnStateChanged = OnStateChangedCallback;
private void OnStateChangedCallback(RecordingStatusType recordingStatus)
{
    Console.Writeline(recordingStatus.ToString());
}

//Callback to receive the Job Id
_augnitoAmbientClient.OnJobCreated = OnJobCreatedCallback;
private void OnJobCreatedCallback(string jobId)
{
    Console.Writeline(jobId);    
}

//Callback to receive when an error occurs within the SDK
_augnitoAmbientClient.OnError = onErrorCallback;
private void onErrorCallback(ErrorInfo error)
{
    Console.Writeline(error);
}

//Callback to receive when SDK send logs this will be only there when EnableLog is true in config file
_augnitoAmbientClient.OnShowLog = OnShowLogCallback;
private void OnShowLogCallback(string logMessage)
{
    Console.Writeline(logMessage);
}

//#endregion

Below Errors with Error Code will be returned via onError callback for toggleListening/togglePauseResumeListening

Error Code Error Message Suggestive UI Message to display Description
WSAUTH03 Invalid user details, please check again Authentication failed. Please contact technical support team for help. Received if SubscriptionCode/AccessKey is invalid
WSAUTH04 Unable to fetch account details, please try again. One or more mandatory parameter is invalid. Please contact technical support team for help Received when Noteparams is invalid
WSJOB01 Unable to fetch job details, please try again. One or more mandatory parameter is invalid. Please contact technical support team for help. Received when passed JobId is not valid
WSJOB02 Job not reconnectable This recording can not be reconnected. Please contact technical support team for help. Received when the job-status is any other than paused
WSACC01 Rate Limit Exceeded, Please try again in sometime! Too many requests for processing consultation recording. Please wait for few minutes to submit your recording. Contact technical support team if this persists. Received when concurrency limit for number of records being processed at a time is reached
WSAUD01 Audio Signal is power very LOW, Mic might be muted No audio detected. Please ensure the following. Please restart the conversation if required. <br><br>- The microphone is unmuted<br>- The microphone is properly plugged in and not loose<br>- System input volume is set to maximum<br>- The correct microphone is selected in your audio settings Received while recording is in-progress and the service detects that microphone volume is lower than 40%

3- Explicitly stop the recording

/**
 * Stops the recording and cleans up resources
 * This function needs to be explicitly called whenever togglePauseResumeListening() function is used
 */
_augnitoAmbientClient.stopListening();

4- List Jobs

Get all Jobs (SOAP notes and other clinical notes) created within the doctor (user’s) account with respect to the given usertag along with meta data. These notes are sorted by timestamp of creation and support pagination.

/**
 * @param PageSize a number, to fetch specified number of notes as a page for each request
 * @param PageID is optional parameter, a string value, When PageID is not given, first set of notes is retrieved according to the specified PageSize. To fetch next set of notes send the PageIDNext received as part of response from the previous getAllNotes call
 * @returns list of notes for the user on success else fail response
 */
 try
 {
    string jobsString = await _augnitoAmbientClient.FetchAllJob(PageSize,PageID);
 }
 catch(Exception ex)
 {
    if(ex is HttpCodeException error)
    {
        Console.Writeline(error.ErrorCode, error.ErrorMessage)
    }
 }

HttpCodeException returned by List job API

Error Code Error Message Suggestive UI Message to display Description
401 invalid or expired user details Authentication failed. Please contact technical support team for help. Received if SubscriptionCode/AccessKey is invalid

5- Fetch Job Output

Retrieve a particular SOAP note or any other clinical note for the given JobId and with respect to the given UserTag (doctor).

/**
 * @param JobId string, to retrieve output for a specific audio file
 * @returns JSON string contains Transcript, Note, FormattedSoap, Codes, NoteParams and SystemEOS on success else fail response
 */
 try
 {
    var jobResponse = await _augnitoAmbientClient.FetchJob(jobId);
 }
 catch(Exception ex)
 {
    if(ex is HttpCodeException error)
    {
        Console.Writeline(error.ErrorCode, error.ErrorMessage)
    }
 }

HttpCodeException returned by Fetch Job API

Error Code Error Message Suggestive UI Message to display Description
417 Job not processed, please check status and try again. Recording is still being processed to generate Note. Please try again later. Received when Job is still being processed and fetch job is called
500 Unable to extract job data. Please try again. Failed to complete the operation. Please try again later. Received when SOAP note data can not be retrieved

6- Delete Notes

Allows you to build a capability for the user (doctor) to delete one or more notes generated under his/her UserTag.

/**
 * @param JobIds array of jobid string values, to delete one or more notes
 * @returns success response on successful delete of notes else fail response
 */
try
{
    var responseStr = await _augnitoAmbientClient.DeleteNotes(JobIds);
}
catch(Exception ex)
{
    if(ex is HttpCodeException error)
    {
        Console.Writeline(error.ErrorCode, error.ErrorMessage)
    }
}

HttpCodeException returned by Delete Notes API

Error Code Error Message Suggestive UI Message to display Description
417 All jobs couldn't be deleted Recording/Note can not be deleted. Please try again later. Received when delete job operation is not successful

Note

Other errors that the SDK may return in OnError callback are as below

Error Code Error Message Suggestive UI Message to display Description
SDK01 Job Id is empty One or more mandatory parameter is missing. Please contact technical support team for help. Received when JobId parameter is passed as empty in the respective API call
SDK02 Page Size is undefined One or more mandatory parameter is missing. Please contact technical support team for help. Received when PageSize is not provided for List job action
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Framework net472 is compatible.  net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 137 6/2/2025
1.0.0 151 12/23/2024