I am attaching a medical Word Document template. I want to convert this into a dynamic template.
1. Find all areas where a doctor would fill in patient details, history, examination, and lab results.
2. For normal text, provide a JSON array of exact string replacements to add docxtemplater tags like {patient_name}.
3. For pre-filled data tables (like labs), do NOT use string replacements. Provide a 'table_fields' array mapping the row's label to the column index (0-indexed) where the tag belongs.
4. Provide a JSON schema of all the fields.
Respond ONLY with raw JSON in this exact structure:
{
"replacements": [
{"search": "Name: Ayansh", "replace": "Name: {patient_name}"}
],
"table_fields": [
{"row_label": "Hb", "col_index": 1, "tag": "{lab_hb}"}
],
"schema": {
"name": "My Custom Template",
"description": "Template description",
"fields": [
{"key": "patient_name", "label": "Patient Name", "type": "text"},
{"key": "lab_hb", "label": "Hb", "type": "text"}
]
}
}