Skip to main content

Urine analysis

Use this category for numeric urine-strip analytes. A strip can produce multiple Observation resources that share a recording time.

Support in @ovok/core​

  • Category key: urineAnalysis (urine-analysis)
  • Read: Supported through the observation mapping.
  • Save: Supported through the typed measurement save workflow.

The category key selects a measurement shape. It does not determine the patient, time range, or source device. For the shared React query and save behavior, see Measurements and health data.

Data shape​

The base measurement requires measurementTypeKey. Fields marked optional can be omitted when the source did not provide a value.

FieldTypeUnit or meaningRead and save behavior
uronumber (optional)Urobilinogen, mg/dLSaved and mapped as an analyte Observation.
bilnumber (optional)Bilirubin, mg/dLSaved and mapped as an analyte Observation.
ketnumber (optional)Ketones, mg/dLSaved and mapped as an analyte Observation.
glunumber (optional)Glucose, mg/dLSaved and mapped as an analyte Observation.
pronumber (optional)Protein, mg/dLSaved and mapped as an analyte Observation.
phnumber (optional)Urine pH, unitlessSaved and mapped as an analyte Observation.
bldnumber (optional)Hemoglobin, RBC/µLSaved and mapped as an analyte Observation.
nitnumber (optional)Nitrite; qualitative label in unit metadataThe field is numeric in the type and is written as a numeric value.
leunumber (optional)Leukocyte esterase, WBC/µLSaved and mapped as an analyte Observation.
sgnumber (optional)Specific gravity, unitlessSaved and mapped as an analyte Observation.
vcnumber (optional)Ascorbate (vitamin C), mg/dLSaved and mapped as an analyte Observation.
urineValuesArray of coded values (required)FHIR CodeableConcept plus an optional string valueRequired by the TypeScript shape. Numeric fields drive the current save output; this array is not used to create analyte observations.
recordedAtDate (optional)Strip recording timeUsed as the effective time when it is a valid Date; otherwise the current time is used.

What is written​

Each finite numeric analyte field supplied is saved as its own coded Observation. Omitted fields are not written. The exported URINE_ANALYTE_DEFINITIONS table provides the analyte keys, codes, names, and units used by the package.

Analyte codes​

These are the coded analytes used by the measurement mapping:

FieldAnalyteLOINC codeUnit
uroUrobilinogen50563-6mg/dL
bldHemoglobin50559-4RBC/µL
bilBilirubin53327-3mg/dL
ketKetones50557-8mg/dL
gluGlucose53328-1mg/dL
proProtein50561-0mg/dL
phUrine pH50560-2Unitless
nitNitrite50558-6Qualitative label
leuLeukocyte esterase60026-2WBC/µL
sgSpecific gravity53326-5Unitless
vcAscorbate (vitamin C)5768-7mg/dL

urineValues is required by the public type, so include an array even when empty. The save workflow uses the numeric fields above and does not serialize arbitrary entries from urineValues. Keep the original FHIR observations if your app needs the complete coded resource representation.

Interpretation​

The SDK transports measured values. It does not classify a strip, interpret abnormal results, or provide a diagnosis. Show source labels and units, and keep clinical interpretation in an appropriately reviewed workflow.

Read this category​

Select MeasurementTypeKey.urineAnalysis, or use the dedicated useUrineTests() hook when no patient or date filters are needed. The mapper groups analyte observations by recording time and returns available numeric fields. The hook also returns the raw observations.

Use useObservations() in a client-side component below OvokProvider. It returns mapped measurements, original observations, loading, and error. The hook reference describes its filters and state.

Save this category​

Supply numeric analyte fields in their listed units and include urineValues. Use a valid recordedAt Date to preserve the strip time. The mapper does not interpret values or derive a result from missing fields.

Pass the measurement to OvokClient.saveMeasurement() or, in React, the function returned by useSaveMeasurement(). Common request fields such as patientId and device are described in the measurement overview.

Example​

This example uses the configured OvokClient from the get started guide. Supply values in the units listed above.

import { MeasurementTypeKey } from '@ovok/core';

async function saveUrineAnalysis() {
return client.saveMeasurement({
measurement: {
measurementTypeKey: MeasurementTypeKey.urineAnalysis,
uro: 0.2,
bil: 0,
ket: 0,
glu: 0,
pro: 0,
ph: 6,
bld: 0,
nit: 0,
leu: 0,
sg: 1.015,
vc: 0,
urineValues: [],
recordedAt: new Date(),
},
});
}

When offline queueing is enabled, inspect the returned status. A queued result means the measurement is pending until the queue is flushed; it is not a completed server save.