Generates a clinical note by intelligently filling a structured template with information extracted from a raw text (stt, vtt, plain-text,…) transcription.
Below we will describe the entire process that allows the successful completion of note generation.
Authorization: We'll pass the token obtained during the authentication process. You can reuse the generated tokens, as they have a 2-hour lifespan. Review this page: Credentials
To set the API version on a specific request, you can add a specific header named X-Invox-Medical-Api-Version with the value of the version you are targeting:
type GenerateReportPayloadType = {
template: IAPITemplate; // Template usded to generate the report
transcription: string; // Transcription used as input to the report
};
export interface IAPITemplate {
id: string;
template_name: string;
template_description: string;
template_language: string;
fields: APITemplateField[];
}
export interface APITemplateField {
id: string;
name: string;
description: string;
type: "string" | "number" | "array" | "boolean" | "enum";
enumerableOptions?: string[];
context?: string;
history?: IFormattedField[];
value: string | string[] | number | boolean;
}
type GenerateReportPayloadType = {
template: IAPITemplate; // Template usded to generate the report
transcription: string; // Transcription used as input to the report
consultationSessionId?: string; // Optional consultation session ID to provide context for the identification of a clinical notes and assets related to the same consultation
};
export interface IAPITemplate {
id: string;
template_name: string;
template_description: string;
template_language: string;
fields: APITemplateField[];
}
export interface APITemplateField {
id: string;
name: string;
description: string;
type: "string" | "number" | "array" | "boolean" | "enum";
enumerableOptions?: string[];
context?: string;
history?: IFormattedField[];
value: string | string[] | number | boolean;
}
type GenerateReportPayloadType = {
template: IAPITemplate; // Template used to generate the report
transcription: string; // Transcription used as input to the report
consultationSessionId?: string; // Optional consultation session ID to provide context for the identification of a clinical notes and assets related to the same consultation
};
export interface IAPITemplate {
id: string;
template_name: string;
template_description: string;
template_language: string;
fields: APITemplateField[];
}
export interface APITemplateField {
id: string;
name: string;
description: string;
type: "string" | "number" | "array" | "boolean" | "enum";
enumerableOptions?: string[];
context?: string;
history?: IFormattedField[];
value: string | string[] | number | boolean;
}
For more details related to the template structure, using the following link: JSON Schema
type GenerateReportResponseType = {
isSuccessRequest: boolean;
templateFields: ReportField[];
generationMetadata: GenerationMetadata;
};
type ReportField = {
id: string;
value: string | string[] | number | boolean;
name: string;
type: "string" | "number" | "array" | "boolean" | "enum";
};
type GenerationMetadata = {
partial: boolean; // true if the report was generated with some fields failed
partialFailureCount: number; // number of fields that failed
failedFields: FieldGenerationFailure[]; // details for each failed field
statusByField: Record<string, "SUCCESS" | "DEFAULTED">; // status for each field
recommendation: "NONE" | "RETRY_RECOMMENDED"; // guidance for the client
};
type FieldGenerationFailure = {
fieldKey: string; // format: "<id>__<name>"
reasonCode:
| "REQUEST_TIMEOUT"
| "FIELD_PROCESSING_ERROR"
| "VALIDATION_FAILED"
| "UNKNOWN";
retryable: boolean; // whether a retry can recover the field
};