Query scan results
Once patients complete their scans, you can retrieve the results programmatically to display in your own app, sync to a health record, or trigger follow-up workflows.
Integration steps
Section titled “Integration steps”-
List recent scans
Section titled “List recent scans”Fetch the most recent scans across all patients. The response includes a
meta.totalCountfield for pagination.const { data: scans, meta } =await client.v1.vitals.scans.list({ limit: 20 })console.log(`${meta.totalCount} total scans`)for (const scan of scans) {console.log(scan.id, scan.status, scan.createdAt)}Scans have one of these statuses:
PENDING,STARTED,SUCCEEDED,FAILED, orABORTED. -
Retrieve a single scan
Section titled “Retrieve a single scan”Fetch the full details of a scan by its ID:
const { data: scan } =await client.v1.vitals.scans.retrieve('scan-id') -
Read the vitals metrics
Section titled “Read the vitals metrics”Completed scans (
SUCCEEDED) include aresultsobject with the measured vitals:if (scan.status === 'SUCCEEDED' && scan.results) {const { metrics } = scan.resultsconsole.log(metrics.heartRate)console.log(metrics.bloodPressureSystolic)console.log(metrics.bloodPressureDiastolic)console.log(metrics.breathingRate)console.log(metrics.stressIndex)console.log(metrics.wellnessScore)}The metrics included in results depend on the scan template configuration. Common metrics include
heartRate,heartRateVariability,breathingRate,stressIndex,bloodPressureSystolic,bloodPressureDiastolic,wellnessScore,vascularAge,bodyFatPercentage, andbasalMetabolicRate. Any metric not measured in a scan will benull.