GlucoseIQ

Interoperability

FHIR CGM IG and Open mHealth payload builders.

6 functions

Generated from the source TSDoc — every signature, parameter, and example is the real thing.

buildFHIRCGMSummary

buildFHIRCGMSummary(tir: EnhancedTIRResult, period: { … }, options?: { … }): FHIRCGMSummary

Builds a FHIR-aligned CGM summary observation from an EnhancedTIRResult.

Includes TIR percentages for each range, mean glucose, and CV if provided. The output is a plain JSON object that can be serialized and POSTed to any FHIR-capable server.

ParameterDescription
tirEnhanced TIR result from calculateEnhancedTIR()
periodTime period covered { start: ISO string, end: ISO string }
optionsOptional: meanGlucose, cv (coefficient of variation)

Returns — FHIR-aligned CGM summary observation


buildFHIRSensorReading

buildFHIRSensorReading(reading: GlucoseReading): FHIRCGMSensorReading

Converts a single GlucoseReading into a FHIR-aligned CGM sensor reading.

ParameterDescription
readingA GlucoseReading from any source (raw or normalized)

Returns — FHIR-aligned sensor reading observation


buildFHIRSensorReadings

buildFHIRSensorReadings(readings: GlucoseReading[]): FHIRCGMSensorReading[]

Converts an array of GlucoseReadings into FHIR-aligned sensor reading observations.

ParameterDescription
readingsArray of glucose readings

Returns — Array of FHIR-aligned sensor reading observations


buildOMHBloodGlucose

buildOMHBloodGlucose(reading: GlucoseReading): OMHBloodGlucose

Converts a GlucoseReading into an Open mHealth blood-glucose body.

ParameterDescription
readingA GlucoseReading from any source

Returns — OMH blood-glucose body


buildOMHBloodGlucoseList

buildOMHBloodGlucoseList(readings: GlucoseReading[]): OMHBloodGlucose[]

Converts an array of GlucoseReadings into Open mHealth blood-glucose bodies.

ParameterDescription
readingsArray of glucose readings

Returns — Array of OMH blood-glucose bodies


buildOMHDataPoint

buildOMHDataPoint(reading: GlucoseReading, id: string): OMHDataPoint<OMHBloodGlucose>

Wraps a GlucoseReading into a full Open mHealth DataPoint with header.

ParameterDescription
readingA GlucoseReading from any source
idUnique datapoint identifier (UUID recommended)

Returns — Full OMH DataPoint with header and body

On this page