Overview

Templates in the Corti API specify the structure for medical document outputs generated by Corti’s foundational model from various inputs, such as conversational transcripts, facts or other medical documents. Templates are available in different languages and can be specific to your organization. Each template includes sections that set the structure (e.g., SOAP Note template consists of the four sections Subjective, Objective, Assessment and Plan); and for each section a specified writing style and formatting for documentation is defined, ensuring consistency, clarity, and control in use of AI to support medical reporting.

Key Features of Templates

  1. One Interaction, Multiple Documents: Generate multiple types of documentation for a single interaction, e.g., the clinical note and a referral letter.
  2. Customizable Formats: Use templates tailored for various medical specialties, enabling the generation of various types of clinical notes, letters, discharge summaries, and your unique use case needs.
  3. Flexible Workflows: Use pre-defined templates or cater to more dynamic workflows by selecting the desired, relevant sections.
  4. Template Management: The API lets you retrieve and review a list of available pre-configured templates and the languages those are available in. Use the query filter for organization ?org to only retrieve templates provided to you.

Requesting a New Template

To request a new template, follow these steps:

  1. Visit the Corti Help Center.
  2. Use the Chat Feature to contact our support team.
  3. Follow the Prompts to request a new documentation template.
  4. Provide Details: Include any specific formatting, language, or structural preferences required for the template.
  5. Our team will process your request and provide updates on its status.

Retrieving Available Templates

To generate a document, you must use a valid templateKey and the template must be available in the desired outputLanguage. To retrieve a list of available templates use the GET /templates request and use the ?lang= to filter for available languages. Without any language filtering, the default returned are templates in en.

request to retrieve templates available in German
POST https://api.{environment}.corti.app/v2/templates?lang=de

Using Templates to Generate Documents

The sequence diagram below refers to using the final facts list for a workflow based on live notes. You can also use the final transcript as input context, see further below for more details.

Steps to Generate a Document

  1. Review and Finalize Data: After the live session, the client can review and make final edits to the facts collected during the interaction. These finalized facts will be used to generate the document.
  2. Make a POST Request: Send a POST request to the /interactions/{id}/documents endpoint with the finalized facts and the templateKey in the request payload. The templateKey defines the format of the output document.
  3. Process the Request: The API processes the submitted data, applying the specified template to generate the structured document.
  4. Retrieve the Document: If the request is successful, the API returns a 200 OK status along with the formatted document.
  5. Optional: Mark Interaction as Completed: If this marks the end of the encounter, the client can update the interaction status by sending a PATCH request to /interactions/{id}, setting the interaction state to "completed".

Generate document from facts vs from transcript

For the typical ambient documentation workflow, summary documentation can be generated either on the basis of facts or the transcript. If your integration is centred around facts, those would typically have been generated automatically during the live stream (source: core) but you might have also created facts to pipe over relevant pre-chart information, e.g. demographics (source: system), or have given the clinician the ability to add and edit live notes (source: user). In the end, you decide which facts to use as the basis to generate a document.

Let’s look at the differences in the request payload when generating a document on the basis of facts vs the transcript.

curl --request POST \
  --url https://api.${environment}.corti.app/v2/interactions/{id}/documents \
  --header 'Authorization: Bearer ${token}' \
  --header 'Tenant-Name: ${tenantname}' \
  --header 'Content-Type: application/json' \
  --data '{
  "context": [
    {
      "type": "facts",
      "data": [
        {
          "text": "32 year-old female",
          "group": "demographics",
          "source": "system"
        },
        {
          "text": "itchy rash, started last week",
          "group": "history-of-present-illness",
          "source": "core"
        },
        {
          "text": "allergic to birch pollen since childhood",
          "group": "allergies",
          "source": "core"
        },
        {
          "text": "typical eczema appearance",
          "group": "assessment",
          "source": "core"
        },
        {
          "text": "corticosteroid treatment, follow-up in 4 weeks",
          "group": "plan",
          "source": "core"
        }        
      ]
    }
  ],
  "templateKey": "soap",
  "name": "Soap note summary: itchy rash",
  "outputLanguage": "en-US" //BCP-47 code
}'

Advanced document generation workflows

The Corti API also supports, via the /documents endpoint, advanced document generation workflows to cater to more specific needs.

Templates with more dynamic sections

If templates are difficult to predefine upfront due to the large variety in clinical documentation use cases, it might be better to approach things more flexibly.

To do so, Corti can partner with you to pre-define the relevant number of sections that could map back to relevant fields in the EHR or documentation. Then, a general template can be utilized together with the dynamically included sections to create the document.

Consider the use case where a pre-defined template is not desired for a dictated clinical note; however, the note should always include a few standardized elements that are selected based on the context of the encounter.

Corti partnered with the customer to pre-define around 50 sections and, based on the specialty and encounter type, the integration automatically selects a subset of the pre-defined sections at the time of generating the documentation.

Let’s look at the payload request in that scenario.

curl Document from transcript - static template
curl --request POST \
  --url https://api.${environment}.corti.app/v2/interactions/{id}/documents \
  --header 'Authorization: Bearer ${token}' \
  --header 'Tenant-Name: ${tenantname}' \
  --header 'Content-Type: application/json' \
  --data '{
  "context": [
    {
      "type": "string",
      "data": [
        {
          "text": "${transcript content as string}"
        }
      ]
    }
  ],
  "templateKey": "template-for-dynamic-sections",
   "template": {
        "sectionKeys": [
            "signs-and-symptoms",
            "allergies",
            "clinical-history",
            "social-history-including-smoking-and-alcohol",
            "assessment-bowel-ultrasound"
        ] 
    },
    "outputLanguage": "en", //BCP-47 code
    "name": "Test from dynamic sections"  
  }'

Working with other existing documents

Your use case might also involve already existing documents such as reports, referral letters, etc. The Corti API was designed to offer such flexibility. Some of the use cases Corti has facilitated via the /documents endpoint include:

  • summarizing an existing document
  • identifying a match of an existing document based on defined criteria
  • extracting action items for clinicians out of existing documents
If you are interested in such a use case, please contact your Corti representative
Currently, there is no endpoint to upload existing documents for automatic OTC or text parsing.