---
url: /docs/api/core/functions/convertMeasurement.md
---
[**@kaiord/core**](../README.md)

***

[@kaiord/core](../README.md) / convertMeasurement

# Function: convertMeasurement()

> **convertMeasurement**(`param`, `valueRaw`, `unitRaw`): [`CanonicalMeasurement`](../type-aliases/CanonicalMeasurement.md)

Defined in: [packages/core/src/domain/lab/unit-conversion.ts:50](https://github.com/pablo-albaladejo/kaiord/blob/3eacbe62ef72342d970523967cc5155b5935bb85/packages/core/src/domain/lab/unit-conversion.ts#L50)

Convert an entered value to canonical, passing through when unresolvable.

## Parameters

### param

{ `canonicalRefHigh?`: `number`; `canonicalRefLow?`: `number`; `canonicalUnit`: `string`; `key`: `string`; `knownUnits?`: `object`\[]; `loinc?`: `string`; `panel`: `"hemogram"` | `"biochemistry"` | `"lipids"` | `"hepatic"` | `"ions"` | `"iron"` | `"thyroid"` | `"vitamins"` | `"hormones"` | `"sports"`; `refBySex?`: { `female`: { `high?`: `number`; `low?`: `number`; }; `male`: { `high?`: `number`; `low?`: `number`; }; }; } | `undefined`

### valueRaw

`number`

### unitRaw

`string`

## Returns

[`CanonicalMeasurement`](../type-aliases/CanonicalMeasurement.md)
