getParameterFromDataType static method
Implementation
static AppleHealthParameterType getParameterFromDataType(
HealthDataType dataType) {
switch (dataType) {
case (HealthDataType.ACTIVE_ENERGY_BURNED):
return AppleHealthParameterType.activeCalories;
case (HealthDataType.BASAL_ENERGY_BURNED):
return AppleHealthParameterType.basalCalories;
case (HealthDataType.BLOOD_GLUCOSE):
return AppleHealthParameterType.bloodGlucose;
case (HealthDataType.BLOOD_OXYGEN):
return AppleHealthParameterType.bloodOxygen;
case (HealthDataType.BLOOD_PRESSURE_SYSTOLIC):
return AppleHealthParameterType.bloodPressureSystloc;
case (HealthDataType.BLOOD_PRESSURE_DIASTOLIC):
return AppleHealthParameterType.bloodPressureDiastolic;
case (HealthDataType.BODY_FAT_PERCENTAGE):
return AppleHealthParameterType.bodyFatPercentage;
case (HealthDataType.BODY_MASS_INDEX):
return AppleHealthParameterType.bmi;
case (HealthDataType.BODY_TEMPERATURE):
return AppleHealthParameterType.bodyTemperature;
case (HealthDataType.HEART_RATE):
return AppleHealthParameterType.heartRate;
case (HealthDataType.HEIGHT):
return AppleHealthParameterType.height;
case (HealthDataType.RESTING_HEART_RATE):
return AppleHealthParameterType.restingHeartRate;
case (HealthDataType.RESPIRATORY_RATE):
return AppleHealthParameterType.respiratoryRate;
case (HealthDataType.STEPS):
return AppleHealthParameterType.steps;
case (HealthDataType.WEIGHT):
return AppleHealthParameterType.weight;
case (HealthDataType.FLIGHTS_CLIMBED):
return AppleHealthParameterType.flightsClimbed;
case (HealthDataType.SLEEP_ASLEEP):
return AppleHealthParameterType.totalSleepDuration;
case (HealthDataType.SLEEP_DEEP):
return AppleHealthParameterType.deepSleepDuration;
case (HealthDataType.SLEEP_REM):
return AppleHealthParameterType.remSleepDuration;
case (HealthDataType.SLEEP_IN_BED):
return AppleHealthParameterType.sleepInBedDuration;
case (HealthDataType.WATER):
return AppleHealthParameterType.water;
case (HealthDataType.ELECTRODERMAL_ACTIVITY):
return AppleHealthParameterType.electrodermalActivity;
case (HealthDataType.PERIPHERAL_PERFUSION_INDEX):
return AppleHealthParameterType.peripheralPerfusionIndex;
case (HealthDataType.WAIST_CIRCUMFERENCE):
return AppleHealthParameterType.waistCircumference;
case (HealthDataType.WALKING_HEART_RATE):
return AppleHealthParameterType.walkingHeartRate;
case (HealthDataType.DISTANCE_WALKING_RUNNING):
return AppleHealthParameterType.distance;
case (HealthDataType.MINDFULNESS):
return AppleHealthParameterType.mindfulness;
case (HealthDataType.EXERCISE_TIME):
return AppleHealthParameterType.activityTime;
case (HealthDataType.HEADACHE_NOT_PRESENT):
return AppleHealthParameterType.headacheNotPresent;
case (HealthDataType.HEADACHE_MILD):
return AppleHealthParameterType.headacheMild;
case (HealthDataType.HEADACHE_MODERATE):
return AppleHealthParameterType.headacheModerate;
case (HealthDataType.HEADACHE_SEVERE):
return AppleHealthParameterType.headacheSevere;
case (HealthDataType.HEADACHE_UNSPECIFIED):
return AppleHealthParameterType.headacheUnspecified;
case (HealthDataType.NUTRITION):
return AppleHealthParameterType.nutrition;
default:
return AppleHealthParameterType.steps;
}
}