--- title: "Write a Medical Note" description: "Create clinical medical notes on patient records using Leyr templates and the Medical Notes API." canonical_url: "http://localhost/api/quickstart/write-medical-note" --- # Write a Medical Note > Create clinical medical notes on patient records using Leyr templates and the Medical Notes API. Learn how to create medical notes for patient records. Medical notes are clinical documentation written by healthcare providers during or after consultations. ## Flow Overview ![Write Medical Note Flow](http://localhost/images/quickstart/write-medical-note.png) ## Understanding Medical Notes - **Medical Notes**: Clinical documentation written by healthcare providers (e.g., doctor's notes, consultation summaries) - **vs Documents**: Medical notes are text-based clinical records; documents are files (PDFs, images) - **Unsigned Status**: Notes are created unsigned and must be signed by a doctor later in the EHR ## Structured vs Unstructured Notes Different EHR systems handle medical notes differently: - **Structured Notes**: Some EHRs use templates with specific fields (e.g., Chief Complaint, History, Assessment, Plan) - **Unstructured Notes**: Others only support a single free-text field **Good news**: You don't need to worry about these differences. Send your note content to Leyr in a consistent format, and we'll automatically convert it to match each EHR's requirements. Whether the target EHR uses structured templates or a single text field, your integration code stays the same. This example uses the simplest template, `LeyrUnstructured` (`leyr_unstructured`), with one free-text `unstructured` content field. ## Code Example ### Shared setup #### 1. Prepare the medical note payload #### 2. Create the medical note #### 3. Read key values from the response ## patient_id usage Use `patient_id` in path parameters with one of these formats: - `abc_12345` (treated as `emr_id`) - `emr_id:abc_12345` - `se_personal_number:191212121212` (when supported by the EHR) Use [Find or Get Patient](http://localhost/api/quickstart/find-patient) to discover identifiers and [Patient IDs](http://localhost/api/guides/patient-id) for full format support. ## Retrieving Medical Notes #### 1. Get all medical notes for a patient #### 2. Get one medical note ## Best Practices - **Be Specific**: Include relevant clinical details - **Structure Content**: Use clear sections (Symptoms, Assessment, Plan) - **Sign Notes**: Remember that notes are created unsigned and must be signed in the EHR ## Next steps Upload files such as lab results or consent forms to a patient record. Understand patient identifier formats. ## API Reference For detailed API documentation, see: - [Medical Notes API](https://api.leyr.io/docs#tag/Medical-Notes) ## Sitemap See the full [sitemap](http://localhost/sitemap.md) for all pages.