Overview

In the Corti API, Templates define the structure for document that are generated by Corti Ensemble and Corti Symphony foundation models 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 a writing style and documentation format is defined for each section. This ensures consistency, clarity, and control in use of AI to support medical reporting.

This page explains advanced workflows for dynamic document generation.

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 following use case:

  • 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 for use in the documentation workflow
  • Based on the specialty and encounter type, a subset of the pre-defined sections are automatically selected at the time of generating the document.

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

Document from transcript - dynamic 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": "<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

Let’s look at the payload request in a scenario:

Summary document based on historical notes
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": "<contents of documents or notes as string>"
    }
  ],
  "templateKey": "summary-of-notes",
    "outputLanguage": "en", # BCP-47 code
    "name": "Test summary of past notes"
  }'
The template used here is for demonstration purposes and will need tailoring for your specific use case. If you are interested in such a use case, please contact your Corti representative