# Clinical Note Execution

Note Generation/Execution

Upon recording a visit, users select the note template via dropdown. Only the template ID is sent in requests, and the server constructs the template.

Server-side actions:

1. Retrieve the template JSON from Firebase using `templateId`.
2. Access the template JSON from GCS using `templateId` or `gcsPath`.
3. Process voice-triggered templates from their GCS paths, ready to be converted to an LLMChain.

**Template: LLMChain Structure**

```json
{
  "chainId": "template.id",
  "name": "template.title",
  "execution": "parallel",
  "tasks": [...] // tasks can be LLMChain or LLMTask
}
```

**Section: LLMTask/LLMChain Structure**

```json
{
  "chainId": "section.id",
  "name": "section.title",
  "execution": "sequential",
  "tasks": [...]
}
```

A section-level LLMChain identifies which template to trigger based on voice prompts and executes necessary tasks sequentially.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sully.gitbook.io/sully.ai-docs/FEM1tMOJsSSszbLOgKLA/focused-agentic-architecture/scribe-agent/clinical-note-execution.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
