> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nevatal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Medical Record

> Create a new medical record entry for an appointment

## Body Parameters

<ParamField body="appointmentId" type="string" required>The appointment this record belongs to</ParamField>
<ParamField body="templateId" type="string" required>The EMR template to use</ParamField>

<ParamField body="fields" type="object" required>
  Template field values (dynamic, depends on the template schema)
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.nevatal.com/api/v1/emr/medical-records" \
    -H "Authorization: Bearer nvtl_your_api_key" \
    -H "Content-Type: application/json" \
    -d '{
      "appointmentId": "apt_xyz789",
      "templateId": "tmpl_general_consult",
      "fields": {
        "chiefComplaint": "Dolor de muela",
        "diagnosis": "Caries dental",
        "treatment": "Restauración con resina",
        "notes": "Paciente presenta caries en premolar superior derecho"
      }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "id": "rec_001",
    "appointmentId": "apt_xyz789",
    "patientId": "pat_abc123",
    "templateId": "tmpl_general_consult",
    "fields": {
      "chiefComplaint": "Dolor de muela",
      "diagnosis": "Caries dental",
      "treatment": "Restauración con resina",
      "notes": "Paciente presenta caries en premolar superior derecho"
    },
    "createdBy": "usr_doctor456",
    "createdAt": "2025-04-01T09:30:00Z"
  }
  ```
</ResponseExample>
