augnitoambientsdk_test1 v1.1.52
Augnito Ambient SDK
Use this typescript 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
npm install augnitoambientsdk
Basic Usage
Import the library
import { AugnitoAmbient, AmbientConfig } from "augnitoambientsdk";
Create the configuration file and instantiate Augnito Ambient Manager
private ambientConfig: AmbientConfig = {
server: '<your server>',
subscriptionCode: '<your subscriptionCode>',
accessKey: '<your accessKey>',
userTag: '<your usertag>',
enableLogs: false, // set to true to check sdk logs in the browser console
};
const augnitoAmbient = new AugnitoAmbient(ambientConfig);
1- Get Note Parameters
Get all parameters (category and values) that are allowed fields to be passed when creating a job to generate note.
Get Region, Note Type and Gender
//Returns JSON of Region, Note Type and Gender const noteParamsJson = augnitoAmbient.getNoteParams();
Get Speciality and Visit Types
This returns list of all speciality and visit types configured by the organisation. Only those types whose IsSelected flag is set to true are applicable for the user. There can be multiple selected types but one has to be default.
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 for each item of speciality and visit type * ID: number, * ConfigID: number, * Value: string, * Description: string, * IsSelected: boolean, * IsDefault: boolean */ //Get list of specialities enabled for organisation const specialities = await augnitoAmbient.getUserConfiguration( SettingsConfigType.SPECIALITY ); //Get list of visit types enabled for organisation const visitTypes = await augnitoAmbient.getUserConfiguration( SettingsConfigType.VISIT_TYPE );
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
augnitoAmbient.toggleListening(
filetype:string,
noteparams:string,
jobName?: string,
jobId?: string,
recordedDuration?: number
);
example: augnitoAmbient.toggleListening("wav","{'Region': 1, 'Speciality': 11, 'NoteType': 1, 'VisitType':29, 'Gender': 0}")
//Toggles the Pause/Resume recording
augnitoAmbient.togglePauseResumeListening(
filetype: string,
noteparams: string,
jobName?: string,
jobId?: string,
recordedDuration?: number
);
example: augnitoAmbient.togglePauseResumeListening("wav","{'Region': 1, 'Speciality': 11, 'NoteType': 1, 'VisitType':29, 'Gender': 0}")
//#region Callbacks
//Callback to change recording buton style
public onStateChanged?: (isRecording: boolean)
example: augnitoAmbient.onStateChanged = (isRecording: boolean) => {console.log(isRecording)}
//Callback to receive the JOb Id
public onJobCreated?: (text: string)
example: augnitoAmbient.onJobCreated = (text: string) => {console.log(text)}
//Callback to receive when an error occurs within the SDK
public onError?: (errorMessage: string)
example: augnitoAmbient.onError = (errorMessage: string) => {console.log(errorMessage)}
//#endregion
3- Explicitly stop the recording
/**
* Stops the recording and cleans up resources
* This function needs to be explicitly called whenever togglePauseResumeListening() function is used
*/
augnitoAmbient.stopListening();
4- List Jobs
Get list of all Notes generated by the user
/**
* @param PageSize number of notes to fetch
* @param PageID is optional parameter, send start page id to fetch
* @returns list of notes for the user
*/
const JobList = await augnitoAmbient.getAllNotes(PageSize: number, PageID: string);
5- Fetch Job Output
Get Transcript & Note for a JobID created against a UserTag
/**
* @param JobId to retrieve output for a specific audio file
* @returns JSON object contains both Transcript and Note on sucess else fail resonse
*/
const JobOutput = augnitoAmbient.getSummarizedNote(JobId:string);
6- Send Final Note
Send the final edited Note to help increase accuracy of output in future.
/**
* @param JobId needs to pass to store the final Note for that audio
* @param NoteDate This key will store the final edited Note that user wants to send.
* @returns success response on successful submit of note else fail response
*/
augnitoAmbient.sendSummarizedNote(JobId:string, NoteDate:string);
7- Delete Notes
To delete one or more notes
/**
* @param JobIds array of job id to delete one or more notes
* @returns success response on successful delete of notes else fail response
*/
const result = await augnitoAmbient.deleteNotes(JobIds: string[])
8- Rename Note Title
To rename note title
/**
* @param JobId to rename note title
* @param NewJobName new title for the note
* @returns success response on successful rename of note else fail response
*/
const result = await augnitoAmbient.renameNoteTitle(JobId: string, NewJobName: string)
9- Download Note as PDF
To download note as PDF
/**
* @param JobId to retrieve pdf for a specific note
* @returns base64 string of the pdf output
*/
const result = await augnitoAmbient.getNotePDF(JobId: string)
10- Update Speciality and Visit type config
User specialities and visit types can be configured by selecting/deselecting applicable types. Default types can also be updated using this. The list of all specialities and visit types configured for the organisation can be obtained using Get Speciality and Visit Types APIs mentioned above
/**
* @param ConfigMap a list of userconfig settings to update selected/unselected speciality type, visit type etc
* @returns success response on successful update else fail response
*/
const result = await augnitoAmbient.updateUserConfiguration(ConfigMap: UserConfigMap[])
11- Send EOS for abruptly ended Job
List of all notes for the user returns status of each note. A JOBPAUSED status indicates that the recording of note did not complete successfully due to any reason such as refresh/shut down of browser in between recording.
The Job will be in paused status for a 5-10 min window. In this state the job can be reconnected to using toggleListening or togglePauseResumeListening and continue recording.
If there is no more recording for the note then the end of note can be sent using this API
/**
* @param JobId to end note for a paused job
* @returns success response on end of job else fail response
*/
const result = await augnitoAmbient.endPausedJob(JobId: string)
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
9 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago