Skip to content

Instantly share code, notes, and snippets.

@Kovah
Created December 4, 2024 08:15
Show Gist options
  • Save Kovah/5a8b17e33ddeca54fd8e4a402a46e158 to your computer and use it in GitHub Desktop.
Save Kovah/5a8b17e33ddeca54fd8e4a402a46e158 to your computer and use it in GitHub Desktop.
Health Dashboard: Unit Enum
<?php
namespace App\Modules\AppleHealth\Enums;
enum Unit: string
{
case COUNT = 'count';
case COUNT_PER_MIN = 'count/min';
case COUNT_PER_HOUR = 'count/hr';
case PERCENT = '%';
// Other
case MOLARITY_LITRES = 'mmol/L';
case MILLIMETRE_OF_MERCURY = 'mmHg';
case SOUND_PRESSURE = 'dBASPL';
case INTERNATIONAL_UNITS = 'IU';
case VO2_MAX = 'ml/(kg·min)';
// Speed
case METRES_PER_SECOND = 'm/s';
// Energy
case KILO_JOULE = 'kj';
// Temperature
case DEGREES_CELSIUS = 'degC';
// Masses
case MICRO_GRAMS = 'mcg';
case MILLI_GRAMS = 'mg';
case GRAMS = 'g';
case KILO_GRAMS = 'kg';
// Fluids
case MILLI_LITRES = 'mL';
case LITRES = 'l';
case LITRES_PER_MIN = 'L/min';
// Distances
case METRES = 'm';
case CENTI_METRES = 'cm';
case KILO_METRES = 'km';
case KILOMETRES_PER_HOUR = 'km/hr';
// Time
case MILLI_SECONDS = 'ms';
case SECONDS = 'sec';
case MINUTES = 'min';
case HOURS = 'hr';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment