Convert a lab value between units
convert_lab_valueConvert a blood-chemistry result between conventional and SI units by analyte name or English/Russian synonym; auto-selects the target unit when only two units exist.
Instructions
Convert a single blood-chemistry result between conventional and SI units (e.g. glucose mg/dL <-> mmol/L, HbA1c % <-> mmol/mol). The analyte can be given by name or a common synonym in English or Russian. If to_unit is omitted and the analyte has exactly two units, it converts to the other one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | Numeric value to convert. | |
| analyte | Yes | Analyte name or synonym, e.g. "glucose", "HbA1c", "глюкоза". | |
| to_unit | No | Target unit. Optional when the analyte has only two units. | |
| from_unit | Yes | Unit the value is currently in, e.g. "mg/dL". |