diff --git a/kotlin-schema-sdk/bin/main/org/openmhealth/schema/configuration/JacksonConfiguration.kt b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/configuration/JacksonConfiguration.kt new file mode 100644 index 00000000..78edd4e3 --- /dev/null +++ b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/configuration/JacksonConfiguration.kt @@ -0,0 +1,38 @@ +package org.openmhealth.schema.configuration + +import com.fasterxml.jackson.annotation.JsonInclude.Include +import com.fasterxml.jackson.databind.DeserializationFeature +import com.fasterxml.jackson.databind.ObjectMapper +import com.fasterxml.jackson.databind.PropertyNamingStrategies +import com.fasterxml.jackson.databind.SerializationFeature +import com.fasterxml.jackson.databind.node.JsonNodeFactory +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule +import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper + +object JacksonConfiguration { + + val objectMapper: ObjectMapper by lazy { + val objectMapper = jacksonObjectMapper() + + // use snake case for names + objectMapper.propertyNamingStrategy = PropertyNamingStrategies.SNAKE_CASE + + // serialize dates, date times, and times as strings, not numbers + objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) + + // don't serialize nulls + objectMapper.setSerializationInclusion(Include.NON_NULL) + + // deserialize JSON numbers to Java BigDecimals + objectMapper.nodeFactory = JsonNodeFactory.withExactBigDecimals(true); + objectMapper.enable(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS) + + // preserve time zone offsets when deserializing + objectMapper.disable(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE) + + // we default to the ISO8601 format for JSR-310 + objectMapper.registerModule(JavaTimeModule()) + + objectMapper + } +} diff --git a/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/SchemaEnumValue.kt b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/SchemaEnumValue.kt new file mode 100644 index 00000000..1d85753a --- /dev/null +++ b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/SchemaEnumValue.kt @@ -0,0 +1,22 @@ +package org.openmhealth.schema.domain + +import com.fasterxml.jackson.annotation.JsonValue + +/** + * An interface implemented by Kotlin enumerations that represent schema enumerations. + * + * @author Emerson Farrugia + */ +interface SchemaEnumValue { + /** + * The schema enumeration value. + */ + @get:JsonValue + val schemaValue: String +} + +inline fun findBySchemaValue(schemaValue: String): E? + where E : SchemaEnumValue, + E : Enum = + enumValues() + .firstOrNull { it.schemaValue == schemaValue } diff --git a/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/SchemaId.kt b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/SchemaId.kt new file mode 100644 index 00000000..65fbd755 --- /dev/null +++ b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/SchemaId.kt @@ -0,0 +1,49 @@ +package org.openmhealth.schema.domain + +import java.util.regex.Pattern + +/** + * A schema identifier. It consists of a namespace, a name, and a version. A schema identifier unambiguously identifies + * a single, immutable schema. The namespace is used to avoid naming collisions in schemas written by different groups + * or organisations. + * + * @author Emerson Farrugia + * @version 1.0 + * @see [schema-id](https://www.openmhealth.org/documentation/#/schema-docs/schema-library/schemas/omh_schema-id) + */ +data class SchemaId( + val namespace: SchemaNamespace = OMH_NAMESPACE, + val name: SchemaName, + val version: SchemaVersion +) : Comparable { + + constructor(namespace: String, name: String, version: String) : this( + namespace = SchemaNamespace(namespace), + name = SchemaName(name), + version = SchemaVersion.fromString(version) + ) + + companion object { + val PATTERN: Pattern = Pattern.compile("([^:]+):([^:]+):([^:]+)") + + fun fromString(id: String): SchemaId { + val matcher = PATTERN.matcher(id) + require(matcher.matches()) { "A malformed schema ID has been specified." } + + return SchemaId( + namespace = matcher.group(1), + name = matcher.group(2), + version = matcher.group(3) + ) + } + + private val comparator = compareBy { it.namespace } + .thenBy { it.name } + .thenBy { it.version } + } + + override fun toString(): String = "$namespace:$name:$version" + + override fun compareTo(other: SchemaId): Int = + comparator.compare(this, other) +} diff --git a/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/SchemaName.kt b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/SchemaName.kt new file mode 100644 index 00000000..2f338f2c --- /dev/null +++ b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/SchemaName.kt @@ -0,0 +1,33 @@ +package org.openmhealth.schema.domain + +import java.util.regex.Pattern + +/** + * A schema name, which uniquely [identifies][SchemaId] a schema when combined with a [SchemaNamespace] and [SchemaVersion]. + * + * @author Emerson Farrugia + */ +@JvmInline +value class SchemaName( + val value: String +) : Comparable { + + init { + require(isValid(value)) { "A malformed name has been specified." } + } + + companion object { + private const val PATTERN_STRING = "[a-zA-Z0-9-]+" + private val PATTERN: Pattern = Pattern.compile(PATTERN_STRING) + + fun isValid(string: String?): Boolean = + string + ?.let { PATTERN.matcher(it).matches() } + ?: true + } + + override fun toString(): String = value + + override fun compareTo(other: SchemaName): Int = + value.compareTo(other.value) +} diff --git a/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/SchemaNamespace.kt b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/SchemaNamespace.kt new file mode 100644 index 00000000..3c167588 --- /dev/null +++ b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/SchemaNamespace.kt @@ -0,0 +1,36 @@ +package org.openmhealth.schema.domain + +import java.util.regex.Pattern + +val IEEE_NAMESPACE = SchemaNamespace("ieee") +val OMH_NAMESPACE = SchemaNamespace("omh") + +/** + * A schema namespace, denoting a group or organisation that creates schemas. + * + * @author Emerson Farrugia + */ +@JvmInline +value class SchemaNamespace( + val value: String +) : Comparable { + + init { + require(isValid(value)) { "A malformed namespace has been specified." } + } + + companion object { + private const val PATTERN_STRING = "[a-zA-Z0-9.-]+" + private val PATTERN: Pattern = Pattern.compile(PATTERN_STRING) + + fun isValid(string: String?): Boolean = + string + ?.let { PATTERN.matcher(it).matches() } + ?: true + } + + override fun toString(): String = value + + override fun compareTo(other: SchemaNamespace): Int = + value.compareTo(other.value) +} diff --git a/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/SchemaSupport.kt b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/SchemaSupport.kt new file mode 100644 index 00000000..b5a4ade9 --- /dev/null +++ b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/SchemaSupport.kt @@ -0,0 +1,17 @@ +package org.openmhealth.schema.domain + +import com.fasterxml.jackson.annotation.JsonIgnore + +/** + * An interface for schema classes. + * + * @author Emerson Farrugia + */ +interface SchemaSupport { + + /** + * @return the schema this class corresponds to + */ + @get:JsonIgnore + val schemaId: SchemaId +} diff --git a/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/SchemaVersion.kt b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/SchemaVersion.kt new file mode 100644 index 00000000..0c97e9fb --- /dev/null +++ b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/SchemaVersion.kt @@ -0,0 +1,55 @@ +package org.openmhealth.schema.domain + +import java.util.regex.Pattern + +/** + * A semantic schema version, consisting of a major number, minor number, and an optional qualifier. + * + * @author Emerson Farrugia + */ +data class SchemaVersion( + val major: Int = 1, + val minor: Int = 0, + val qualifier: String? = null +) : Comparable { + + init { + require(major >= 0) { "A negative major version has been specified." } + require(minor >= 0) { "A negative minor version has been specified." } + require(qualifier == null || QUALIFIER_PATTERN.matcher(qualifier).matches()) { + "A malformed qualifier has been specified." + } + } + + companion object { + private const val QUALIFIER_PATTERN_STRING = "[a-zA-Z0-9]+" + private const val PATTERN_STRING = "(\\d+)\\.(\\d+)(?:\\.($QUALIFIER_PATTERN_STRING))?" + + val QUALIFIER_PATTERN: Pattern = Pattern.compile(QUALIFIER_PATTERN_STRING) + private val PATTERN: Pattern = Pattern.compile(PATTERN_STRING) + + fun fromString(version: String): SchemaVersion { + val matcher = PATTERN.matcher(version) + require(matcher.matches()) { "A malformed version has been specified." } + + return SchemaVersion( + major = Integer.valueOf(matcher.group(1)), + minor = Integer.valueOf(matcher.group(2)), + qualifier = matcher.group(3) + ) + } + + val comparator = compareBy { it.major } + .thenBy { it.minor } + .thenBy { it.qualifier } + } + + override fun toString(): String = + "$major.$minor" + + (qualifier + ?.let { ".$it" } + ?: "") + + override fun compareTo(other: SchemaVersion): Int = + comparator.compare(this, other) +} diff --git a/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/TypedUnitValue.kt b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/TypedUnitValue.kt new file mode 100644 index 00000000..cb99b33e --- /dev/null +++ b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/TypedUnitValue.kt @@ -0,0 +1,11 @@ +package org.openmhealth.schema.domain + +import java.math.BigDecimal + +data class TypedUnitValue( + val unit: T, + val value: BigDecimal +) { + constructor(unit: T, value: Double) : this(unit, BigDecimal.valueOf(value)) + constructor(unit: T, value: Long) : this(unit, BigDecimal.valueOf(value)) +} diff --git a/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/Unit.kt b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/Unit.kt new file mode 100644 index 00000000..841015e3 --- /dev/null +++ b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/Unit.kt @@ -0,0 +1,10 @@ +package org.openmhealth.schema.domain + +import org.openmhealth.schema.domain.SchemaEnumValue + +/** + * A marker interface for units of measure. + * + * @author Emerson Farrugia + */ +interface Unit : SchemaEnumValue diff --git a/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/ieee/DateTime.kt b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/ieee/DateTime.kt new file mode 100644 index 00000000..7589fe3d --- /dev/null +++ b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/ieee/DateTime.kt @@ -0,0 +1,12 @@ +package org.openmhealth.schema.domain.ieee + +import java.time.OffsetDateTime + +/** + * A point in time. + * + * @author Emerson Farrugia + * @version 1.0 + * @see [date-time][https://w3id.org/ieee/ieee-1752-schema/date-time.json] + */ +typealias DateTime = OffsetDateTime diff --git a/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/ieee/DescriptiveStatistic.kt b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/ieee/DescriptiveStatistic.kt new file mode 100644 index 00000000..271311d9 --- /dev/null +++ b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/ieee/DescriptiveStatistic.kt @@ -0,0 +1,45 @@ +package org.openmhealth.schema.domain.ieee + +import org.openmhealth.schema.domain.IEEE_NAMESPACE +import org.openmhealth.schema.domain.SchemaEnumValue +import org.openmhealth.schema.domain.SchemaId +import org.openmhealth.schema.domain.SchemaSupport + +/** + * The descriptive statistic of a set of measurements. A measurement value can be the result of combining + * various measurements and calculating descriptive statistics like average, maximum, minimum, etc. Additional + * descriptive statistics will be added as the need arises. A measurement value without a descriptive statistic + * is interpreted as being the result of an individual measurement. + * + * @author Emerson Farrugia + * @version 1.0 + * @see [descriptive-statistic][https://w3id.org/ieee/ieee-1752-schema/descriptive-statistic.json] + */ +enum class DescriptiveStatistic( + private val customSchemaValue: String? = null +) : SchemaEnumValue, SchemaSupport { + + AVERAGE, + COUNT, + MAXIMUM, + MEDIAN, + MINIMUM, + STANDARD_DEVIATION, + SUM, + VARIANCE, + TWENTIETH_PERCENTILE("20th percentile"), + EIGHTIETH_PERCENTILE("80th percentile"), + LOWER_QUARTILE, + UPPER_QUARTILE, + QUARTILE_DEVIATION, + FIRST_QUINTILE("1st quintile"), + SECOND_QUINTILE("2nd quintile"), + THIRD_QUINTILE("3rd quintile"), + FOURTH_QUINTILE("4th quintile"); + + override val schemaValue: String + get() = customSchemaValue ?: name.lowercase().replace("_", " ") + + override val schemaId: SchemaId + get() = SchemaId(IEEE_NAMESPACE.value, "descriptive-statistic", "1.0") +} diff --git a/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/ieee/DurationUnit.kt b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/ieee/DurationUnit.kt new file mode 100644 index 00000000..fea36830 --- /dev/null +++ b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/ieee/DurationUnit.kt @@ -0,0 +1,29 @@ +package org.openmhealth.schema.domain.ieee + +import org.openmhealth.schema.domain.TypedUnitValue +import org.openmhealth.schema.domain.Unit + +/** + * A unit of duration or length of time. + * + * @author Emerson Farrugia + * @version 1.0 + * @see [duration-unit][https://w3id.org/ieee/ieee-1752-schema/duration-unit-value.json] + */ +enum class DurationUnit( + override val schemaValue: String +) : Unit { + PICOSECOND("ps"), + NANOSECOND("ns"), + MICROSECOND("us"), + MILLISECOND("ms"), + SECOND("sec"), + MINUTE("min"), + HOUR("h"), + DAY("d"), + WEEK("wk"), + MONTH("Mo"), + YEAR("yr"); +} + +typealias DurationUnitValue = TypedUnitValue diff --git a/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/ieee/TimeFrame.kt b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/ieee/TimeFrame.kt new file mode 100644 index 00000000..4db74227 --- /dev/null +++ b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/ieee/TimeFrame.kt @@ -0,0 +1,30 @@ +package org.openmhealth.schema.domain.ieee + +import com.fasterxml.jackson.annotation.JsonTypeInfo +import com.fasterxml.jackson.annotation.JsonTypeInfo.Id + +/** + * A time frame, which is either a point in time or a time interval. + * + * @author Emerson Farrugia + * @version 1.0 + * @see [time-frame][https://w3id.org/ieee/ieee-1752-schema/time-frame.json] + */ +@JsonTypeInfo(use = Id.DEDUCTION) +sealed class TimeFrame + +data class DateTimeTimeFrame( + val dateTime: DateTime +) : TimeFrame() { + companion object { + + fun parse(text: String) = + DateTimeTimeFrame(DateTime.parse(text)) + } +} + +data class TimeIntervalTimeFrame( + val timeInterval: TimeInterval +) : TimeFrame() + + diff --git a/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/ieee/TimeInterval.kt b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/ieee/TimeInterval.kt new file mode 100644 index 00000000..1a43ecfb --- /dev/null +++ b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/ieee/TimeInterval.kt @@ -0,0 +1,40 @@ +package org.openmhealth.schema.domain.ieee + +import com.fasterxml.jackson.annotation.JsonTypeInfo +import com.fasterxml.jackson.annotation.JsonTypeInfo.Id +import org.openmhealth.schema.domain.IEEE_NAMESPACE +import org.openmhealth.schema.domain.SchemaId +import org.openmhealth.schema.domain.SchemaSupport + +/** + * A time interval. No commitments are made whether the start or end time point itself is included in the + * interval (i.e., whether the defined interval includes the boundary point(s) or not). + * + * @author Emerson Farrugia + * @version 1.0 + * @see [time-interval][https://w3id.org/ieee/ieee-1752-schema/time-interval.json] + */ +@JsonTypeInfo(use = Id.DEDUCTION) +sealed class TimeInterval : SchemaSupport { + override val schemaId: SchemaId + get() = SchemaId(IEEE_NAMESPACE.value, "time-interval", "1.0") +} + +data class StartEndTimeInterval( + val startDateTime: DateTime, + val endDateTime: DateTime, +) : TimeInterval() { + init { + require(!startDateTime.isAfter(endDateTime)) { "The specified start and end date times are reversed." } + } +} + +data class StartDurationTimeInterval( + val startDateTime: DateTime, + val duration: DurationUnitValue +) : TimeInterval() + +data class EndDurationTimeInterval( + val endDateTime: DateTime, + val duration: DurationUnitValue +) : TimeInterval() diff --git a/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/ieee/UnitValue.kt b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/ieee/UnitValue.kt new file mode 100644 index 00000000..bf35ba2d --- /dev/null +++ b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/ieee/UnitValue.kt @@ -0,0 +1,30 @@ +package org.openmhealth.schema.domain.ieee + +import org.openmhealth.schema.domain.IEEE_NAMESPACE +import org.openmhealth.schema.domain.SchemaId +import org.openmhealth.schema.domain.SchemaSupport +import java.math.BigDecimal + + +/** + * A numerical value with a unit of measure. + * + * @author Emerson Farrugia + * @version 1.0 + * @see [unit-value][https://w3id.org/ieee/ieee-1752-schema/unit-value.json] + */ +data class UnitValue( + val unit: String, + val value: BigDecimal, +) : SchemaSupport { + + constructor(unit: String, value: Double) : this(unit, BigDecimal.valueOf(value)) + constructor(unit: String, value: Long) : this(unit, BigDecimal.valueOf(value)) + + init { + require(unit.isNotEmpty()) { "An empty unit has been specified." } + } + + override val schemaId: SchemaId + get() = SchemaId(IEEE_NAMESPACE.value, "unit-value", "1.0") +} diff --git a/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/omh/AreaUnit.kt b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/omh/AreaUnit.kt new file mode 100644 index 00000000..a826dc3b --- /dev/null +++ b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/omh/AreaUnit.kt @@ -0,0 +1,24 @@ +package org.openmhealth.schema.domain.omh + +import org.openmhealth.schema.domain.Unit + + +/** + * A unit of area, or a measure of a surface. + * + * @author Emerson Farrugia + * @version 1.0 + * @see [area-unit-value](http://www.openmhealth.org/documentation/#/schema-docs/schema-library/schemas/omh_area-unit-value) + */ +enum class AreaUnit( + override val schemaValue: String +) : Unit { + SQUARE_MILLIMETER("mm^2"), + SQUARE_CENTIMETER("cm^2"), + SQUARE_METER("m^2"), + SQUARE_KILOMETER("km^2"), + SQUARE_INCH("in^2"), + SQUARE_FOOT("ft^2"), + SQUARE_YARD("yd^2"), + SQUARE_MILE("mi^2"); +} diff --git a/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/omh/AreaUnitValue.kt b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/omh/AreaUnitValue.kt new file mode 100644 index 00000000..5f2b6bf0 --- /dev/null +++ b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/omh/AreaUnitValue.kt @@ -0,0 +1,24 @@ +package org.openmhealth.schema.domain.omh + +import org.openmhealth.schema.domain.OMH_NAMESPACE +import org.openmhealth.schema.domain.SchemaId +import org.openmhealth.schema.domain.SchemaSupport +import java.math.BigDecimal + +/** + * An area. + * + * @author Emerson Farrugia + * @version 1.0 + * @see [area-unit-value](http://www.openmhealth.org/documentation/#/schema-docs/schema-library/schemas/omh_area-unit-value) + */ +data class AreaUnitValue( + val unit: AreaUnit, + val value: BigDecimal +) : SchemaSupport { + + constructor(unit: AreaUnit, value: Double) : this(unit, BigDecimal.valueOf(value)) + + override val schemaId: SchemaId + get() = SchemaId(OMH_NAMESPACE.value, "area-unit-value", "1.0") +} diff --git a/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/omh/HeartRate.kt b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/omh/HeartRate.kt new file mode 100644 index 00000000..f0e3eb32 --- /dev/null +++ b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/omh/HeartRate.kt @@ -0,0 +1,26 @@ +package org.openmhealth.schema.domain.omh + +import org.openmhealth.schema.domain.OMH_NAMESPACE +import org.openmhealth.schema.domain.SchemaId +import org.openmhealth.schema.domain.SchemaSupport +import org.openmhealth.schema.domain.ieee.DescriptiveStatistic +import org.openmhealth.schema.domain.ieee.TimeFrame + +/** + * A person's heart rate. + * + * @author Emerson Farrugia + * @version 1.0 + * @see [heart-rate](http://www.openmhealth.org/documentation/#/schema-docs/schema-library/schemas/omh_heart-rate) + */ +data class HeartRate( + val heartRate: HeartRateUnitValue, + val effectiveTimeFrame: TimeFrame, + val temporalRelationshipToPhysicalActivity: TemporalRelationshipToPhysicalActivity? = null, + val temporalRelationshipToSleep: TemporalRelationshipToSleep? = null, + val descriptiveStatistic: DescriptiveStatistic? = null +) : SchemaSupport { + + override val schemaId: SchemaId + get() = SchemaId(OMH_NAMESPACE.value, "heart-rate", "2.0") +} diff --git a/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/omh/HeartRateUnit.kt b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/omh/HeartRateUnit.kt new file mode 100644 index 00000000..0cad3c78 --- /dev/null +++ b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/omh/HeartRateUnit.kt @@ -0,0 +1,22 @@ +package org.openmhealth.schema.domain.omh + +import org.openmhealth.schema.domain.TypedUnitValue +import org.openmhealth.schema.domain.Unit + + +/** + * A unit of heart rate. + * + * @author Emerson Farrugia + * @version 1.0 + * @see [heart-rate](http://www.openmhealth.org/documentation/#/schema-docs/schema-library/schemas/omh_heart-rate) + */ +enum class HeartRateUnit( + override val schemaValue: String +) : Unit { + BEATS_PER_MINUTE("beats/min"); +} + +typealias HeartRateUnitValue = TypedUnitValue + +fun HeartRateUnit.toUnitValue(value: Double) = HeartRateUnitValue(this, value) diff --git a/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/omh/TemporalRelationshipToPhysicalActivity.kt b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/omh/TemporalRelationshipToPhysicalActivity.kt new file mode 100644 index 00000000..61b9d068 --- /dev/null +++ b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/omh/TemporalRelationshipToPhysicalActivity.kt @@ -0,0 +1,31 @@ +package org.openmhealth.schema.domain.omh + +import org.openmhealth.schema.domain.OMH_NAMESPACE +import org.openmhealth.schema.domain.SchemaEnumValue +import org.openmhealth.schema.domain.SchemaId +import org.openmhealth.schema.domain.SchemaSupport + +/** + * The temporal relationship of a clinical measure or assessment to physical activity. + * + * @author Emerson Farrugia + * @version 1.0 + * @see [temporal + * -relationship-to-physical-activity](https://www.openmhealth.org/documentation/#/schema-docs/schema-library/schemas/omh_temporal-relationship-to-physical-activity) + */ +enum class TemporalRelationshipToPhysicalActivity : SchemaEnumValue, SchemaSupport { + + AT_REST, + ACTIVE, + BEFORE_EXERCISE, + AFTER_EXERCISE, + DURING_EXERCISE; + + override val schemaValue: String + get() = name.lowercase().replace("_", " ") + + override val schemaId: SchemaId + get() = SchemaId(OMH_NAMESPACE.value, "temporal-relationship-to-physical-activity", "1.0") +} + + diff --git a/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/omh/TemporalRelationshipToSleep.kt b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/omh/TemporalRelationshipToSleep.kt new file mode 100644 index 00000000..fe098020 --- /dev/null +++ b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/omh/TemporalRelationshipToSleep.kt @@ -0,0 +1,27 @@ +package org.openmhealth.schema.domain.omh + +import org.openmhealth.schema.domain.OMH_NAMESPACE +import org.openmhealth.schema.domain.SchemaEnumValue +import org.openmhealth.schema.domain.SchemaId +import org.openmhealth.schema.domain.SchemaSupport + +/** + * The temporal relationship of a clinical measure or assessment to sleep. + * + * @author Emerson Farrugia + * @version 1.0 + * @see [temporal-relationship + * -to-sleep](http://www.openmhealth.org/documentation/./schema-docs/schema-library/schemas/omh_temporal-relationship-to-sleep) + */ +enum class TemporalRelationshipToSleep : SchemaEnumValue, SchemaSupport { + + BEFORE_SLEEPING, + DURING_SLEEP, + ON_WAKING; + + override val schemaValue: String + get() = name.lowercase().replace("_", " ") + + override val schemaId: SchemaId + get() = SchemaId(OMH_NAMESPACE.value, "temporal-relationship-to-sleep", "1.0") +} diff --git a/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/omh/UnitValue.kt b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/omh/UnitValue.kt new file mode 100644 index 00000000..a8c3efa4 --- /dev/null +++ b/kotlin-schema-sdk/bin/main/org/openmhealth/schema/domain/omh/UnitValue.kt @@ -0,0 +1,30 @@ +package org.openmhealth.schema.domain.omh + +import org.openmhealth.schema.domain.OMH_NAMESPACE +import org.openmhealth.schema.domain.SchemaId +import org.openmhealth.schema.domain.SchemaSupport +import java.math.BigDecimal + + +/** + * A numerical value with a unit of measure. + * + * @author Emerson Farrugia + * @version 1.0 + * @see [unit-value](https://www.openmhealth.org/documentation/#/schema-docs/schema-library/schemas/omh_unit-value) + */ +data class UnitValue( + val unit: String, + val value: BigDecimal, +) : SchemaSupport { + + constructor(unit: String, value: Double) : this(unit, BigDecimal.valueOf(value)) + constructor(unit: String, value: Long) : this(unit, BigDecimal.valueOf(value)) + + init { + require(unit.isNotEmpty()) { "An empty unit has been specified." } + } + + override val schemaId: SchemaId + get() = SchemaId(OMH_NAMESPACE.value, "unit-value", "1.0") +} diff --git a/kotlin-schema-sdk/bin/test/org/openmhealth/schema/domain/ieee/TimeFrameTests.kt b/kotlin-schema-sdk/bin/test/org/openmhealth/schema/domain/ieee/TimeFrameTests.kt new file mode 100644 index 00000000..766d1f3b --- /dev/null +++ b/kotlin-schema-sdk/bin/test/org/openmhealth/schema/domain/ieee/TimeFrameTests.kt @@ -0,0 +1,37 @@ +package org.openmhealth.schema.domain.omh + +import com.fasterxml.jackson.databind.JsonNode +import org.junit.jupiter.params.ParameterizedTest +import org.openmhealth.schema.domain.ieee.* +import org.openmhealth.schema.domain.ieee.DurationUnit.DAY +import org.openmhealth.schema.support.DataFileSource +import java.time.OffsetDateTime + + +class TimeFrameTests : MappingTests() { + + @ParameterizedTest + @DataFileSource(schemaId = "ieee:time-frame:1.0", filename = "date-time.json") + fun `date-time`(json: JsonNode) { + + val value = DateTimeTimeFrame( + dateTime = DateTime.parse("2013-02-05T07:25:00.123Z"), + ) + + assertThatMappingWorks(value, json) + } + + @ParameterizedTest + @DataFileSource(schemaId = "ieee:time-frame:1.0", filename = "time-interval.json") + fun `time-interval`(json: JsonNode) { + + val value = TimeIntervalTimeFrame( + timeInterval = EndDurationTimeInterval( + endDateTime = OffsetDateTime.parse("2013-02-05T07:35:00Z"), + duration = DurationUnitValue(DAY, 7.6) + ) + ) + + assertThatMappingWorks(value, json) + } +} diff --git a/kotlin-schema-sdk/bin/test/org/openmhealth/schema/domain/ieee/TimeIntervalTests.kt b/kotlin-schema-sdk/bin/test/org/openmhealth/schema/domain/ieee/TimeIntervalTests.kt new file mode 100644 index 00000000..1b50c72f --- /dev/null +++ b/kotlin-schema-sdk/bin/test/org/openmhealth/schema/domain/ieee/TimeIntervalTests.kt @@ -0,0 +1,48 @@ +package org.openmhealth.schema.domain.omh + +import com.fasterxml.jackson.databind.JsonNode +import org.junit.jupiter.params.ParameterizedTest +import org.openmhealth.schema.domain.ieee.* +import org.openmhealth.schema.domain.ieee.DurationUnit.DAY +import org.openmhealth.schema.support.DataFileSource +import java.time.OffsetDateTime + + +class TimeIntervalTests : MappingTests() { + + @ParameterizedTest + @DataFileSource(schemaId = "ieee:time-interval:1.0", filename = "start-time-end-time.json") + fun `start-time-end-time`(json: JsonNode) { + + val value = StartEndTimeInterval( + startDateTime = DateTime.parse("2013-02-05T07:25:00Z"), + endDateTime = DateTime.parse("2013-02-05T07:35:00Z") + ) + + assertThatMappingWorks(value, json) + } + + @ParameterizedTest + @DataFileSource(schemaId = "ieee:time-interval:1.0", filename = "start-time-duration.json") + fun `start-time-duration`(json: JsonNode) { + + val value = StartDurationTimeInterval( + startDateTime = DateTime.parse("2013-02-05T07:25:00Z"), + duration = DurationUnitValue(DAY, 10.2) + ) + + assertThatMappingWorks(value, json) + } + + @ParameterizedTest + @DataFileSource(schemaId = "ieee:time-interval:1.0", filename = "end-time-duration.json") + fun `end-time-duration`(json: JsonNode) { + + val value = EndDurationTimeInterval( + endDateTime = DateTime.parse("2013-02-05T07:35:00Z"), + duration = DurationUnitValue(DAY, 10.9) + ) + + assertThatMappingWorks(value, json) + } +} diff --git a/kotlin-schema-sdk/bin/test/org/openmhealth/schema/domain/omh/AreaUnitValueTests.kt b/kotlin-schema-sdk/bin/test/org/openmhealth/schema/domain/omh/AreaUnitValueTests.kt new file mode 100644 index 00000000..34fba553 --- /dev/null +++ b/kotlin-schema-sdk/bin/test/org/openmhealth/schema/domain/omh/AreaUnitValueTests.kt @@ -0,0 +1,27 @@ +package org.openmhealth.schema.domain.omh + +import com.fasterxml.jackson.databind.JsonNode +import org.junit.jupiter.params.ParameterizedTest +import org.openmhealth.schema.domain.omh.AreaUnit.SQUARE_INCH +import org.openmhealth.schema.domain.omh.AreaUnit.SQUARE_METER +import org.openmhealth.schema.support.DataFileSource + + +class AreaUnitValueTests : MappingTests() { + + @ParameterizedTest + @DataFileSource(schemaId = "omh:area-unit-value:1.0", filename = "positive-value.json") + fun `positive-value`(json: JsonNode) { + val value = AreaUnitValue(SQUARE_METER, 7.6) + + assertThatMappingWorks(value, json) + } + + @ParameterizedTest + @DataFileSource(schemaId = "omh:area-unit-value:1.0", filename = "zero-value.json") + fun `zero-value`(json: JsonNode) { + val value = AreaUnitValue(SQUARE_INCH, 0.0) + + assertThatMappingWorks(value, json) + } +} diff --git a/kotlin-schema-sdk/bin/test/org/openmhealth/schema/domain/omh/HeartRateTests.kt b/kotlin-schema-sdk/bin/test/org/openmhealth/schema/domain/omh/HeartRateTests.kt new file mode 100644 index 00000000..97d61ad9 --- /dev/null +++ b/kotlin-schema-sdk/bin/test/org/openmhealth/schema/domain/omh/HeartRateTests.kt @@ -0,0 +1,44 @@ +package org.openmhealth.schema.domain.omh + +import com.fasterxml.jackson.databind.JsonNode +import org.junit.jupiter.params.ParameterizedTest +import org.openmhealth.schema.domain.ieee.* +import org.openmhealth.schema.domain.ieee.DescriptiveStatistic.MINIMUM +import org.openmhealth.schema.domain.omh.HeartRateUnit.BEATS_PER_MINUTE +import org.openmhealth.schema.domain.omh.TemporalRelationshipToSleep.ON_WAKING +import org.openmhealth.schema.support.DataFileSource + + +class HeartRateTests : MappingTests() { + + @ParameterizedTest + @DataFileSource(schemaId = "omh:heart-rate:2.0", filename = "with-temporal-relationship-to-sleep.json") + fun `with-temporal-relationship-to-sleep`(json: JsonNode) { + + val value = HeartRate( + heartRate = BEATS_PER_MINUTE.toUnitValue(67.5), + effectiveTimeFrame = DateTimeTimeFrame.parse("2020-02-05T07:25:00-08:00"), + temporalRelationshipToSleep = ON_WAKING + ) + + assertThatMappingWorks(value, json) + } + + @ParameterizedTest + @DataFileSource(schemaId = "omh:heart-rate:2.0", filename = "with-descriptive-statistic.json") + fun `with-descriptive-statistic`(json: JsonNode) { + + val value = HeartRate( + heartRate = BEATS_PER_MINUTE.toUnitValue(50.0), + effectiveTimeFrame = TimeIntervalTimeFrame( + StartEndTimeInterval( + startDateTime = DateTime.parse("2020-02-05T06:00:00+01:00"), + endDateTime = DateTime.parse("2020-02-06T06:00:00+01:00") + ) + ), + descriptiveStatistic = MINIMUM + ) + + assertThatMappingWorks(value, json) + } +} diff --git a/kotlin-schema-sdk/bin/test/org/openmhealth/schema/domain/omh/MappingTests.kt b/kotlin-schema-sdk/bin/test/org/openmhealth/schema/domain/omh/MappingTests.kt new file mode 100644 index 00000000..32132fcd --- /dev/null +++ b/kotlin-schema-sdk/bin/test/org/openmhealth/schema/domain/omh/MappingTests.kt @@ -0,0 +1,26 @@ +package org.openmhealth.schema.domain.omh + +import com.fasterxml.jackson.databind.JsonNode +import org.assertj.core.api.Assertions.assertThat +import org.openmhealth.schema.configuration.JacksonConfiguration.objectMapper +import com.fasterxml.jackson.module.kotlin.readValue + +open class MappingTests { + + inline fun assertThatMappingWorks(value: T, json: JsonNode) { + assertThatSerializationWorks(actualValue = value, expectedJson = json) + assertThatDeserializationWorks(actualJson = json, expectedValue = value) + } + + fun assertThatSerializationWorks(actualValue: T, expectedJson: JsonNode) { + val actualValueAsJsonNode: JsonNode = objectMapper.valueToTree(actualValue) + + assertThat(actualValueAsJsonNode).isEqualTo(expectedJson) + } + + inline fun assertThatDeserializationWorks(actualJson: JsonNode, expectedValue: T) { + val actualValue: T = objectMapper.treeToValue(actualJson, T::class.java) + + assertThat(actualValue).isEqualTo(expectedValue) + } +} diff --git a/kotlin-schema-sdk/bin/test/org/openmhealth/schema/support/DataFileSource.kt b/kotlin-schema-sdk/bin/test/org/openmhealth/schema/support/DataFileSource.kt new file mode 100644 index 00000000..bd511d46 --- /dev/null +++ b/kotlin-schema-sdk/bin/test/org/openmhealth/schema/support/DataFileSource.kt @@ -0,0 +1,57 @@ +package org.openmhealth.schema.support + +import org.junit.jupiter.api.extension.ExtensionContext +import org.junit.jupiter.params.provider.Arguments +import org.junit.jupiter.params.provider.ArgumentsProvider +import org.junit.jupiter.params.provider.ArgumentsSource +import org.junit.jupiter.params.support.AnnotationConsumer +import org.junit.platform.commons.JUnitException +import org.openmhealth.schema.configuration.JacksonConfiguration.objectMapper +import org.openmhealth.schema.domain.SchemaId +import java.io.IOException +import java.util.stream.Stream +import kotlin.annotation.AnnotationRetention.RUNTIME +import kotlin.annotation.AnnotationTarget.FUNCTION +import kotlin.io.path.Path + + +@Target(FUNCTION) +@Retention(RUNTIME) +@ArgumentsSource(DataFileArgumentsProvider::class) +annotation class DataFileSource( + val baseDirectory: String = "../test-data", + val schemaId: String, + val filename: String, +) + +class DataFileArgumentsProvider : ArgumentsProvider, AnnotationConsumer { + + private lateinit var path: String + + override fun accept(annotation: DataFileSource) { + val schemaId = SchemaId.fromString(annotation.schemaId) + + path = listOf( + schemaId.namespace, + schemaId.name, + schemaId.version, + "shouldPass", + annotation.filename + ) + .joinToString(separator = "/", prefix = annotation.baseDirectory + "/") + } + + override fun provideArguments(context: ExtensionContext): Stream { + + val file = Path(path).toFile() + val jsonNode = try { + objectMapper.readTree(file) + } catch (e: IOException) { + throw JUnitException("File [$path] could not be read", e) + } + + return listOf(jsonNode) + .stream() + .map { Arguments.of(it) } + } +} diff --git a/ord_schemas/__init__.py b/ord_schemas/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/ord_schemas/schema/__init__.py b/ord_schemas/schema/__init__.py new file mode 100644 index 00000000..126aad7f --- /dev/null +++ b/ord_schemas/schema/__init__.py @@ -0,0 +1,134 @@ +import json +import importlib.resources as pkg_resources + +PACKAGE_NAME = __package__ + +def list_domains(): + """Return top-level schema domains (subfolders in schema/).""" + package_dir = pkg_resources.files(PACKAGE_NAME) + return [p.name for p in package_dir.iterdir() if p.is_dir() and p.name != "__pycache"] + + +def _format_tree(path, prefix = ''): + """ + Helper function to recursively format the directory structure as a string tree, + using only built-in string characters. + """ + + tree_lines = [] + + items = sorted([ + item + for item in path.iterdir() + if item.is_dir() and item.name != "__pycache__" + ], key = lambda p : p.name) + + count = len(items) + for i, item in enumerate(items): + is_last = (i == count -1) + + connector = "└── " if is_last else "├── " + tree_lines.append(f"{prefix}{connector}{item.name}") + + childPrefix = prefix + (' ' * 4 if is_last else "|" + ' ' * 3) + tree_lines.extend(_format_tree(item, childPrefix)) + + return tree_lines + + +def get_tree_structure(): + """ + Loads the entire folder structure (domain subfolders and nested subfolders) + of the package as a nested dictionary, excluding files and __pycache__. + """ + package_dir = pkg_resources.files(PACKAGE_NAME) + + tree_lines = _format_tree(package_dir) + root_name = PACKAGE_NAME.split('.')[-1] if '.' in PACKAGE_NAME else PACKAGE_NAME + + return f"{root_name}/\n" + "\n".join(tree_lines) + + + +def list_schemas(domain=None, subfolder=None, with_path = False): + """ + List all JSON schema files, recursively, optionally filtered by domain and/or subfolder. + If with_path=True, returns the full path relative to the package root. + Otherwise, returns paths relative to the domain folder, OR relative to the subfolder + if both domain and subfolder are provided. + """ + schemas = [] + package_dir = pkg_resources.files(PACKAGE_NAME) + + if subfolder is not None and domain is None: + raise ValueError("Cannot filter by 'subfolder' without specifying a 'domain'.") + + start_index = 0 + if domain is not None: + start_index = 1 + if subfolder is not None: + start_index = 2 + + for path in package_dir.rglob("*.json"): + relative_path = path.relative_to(package_dir) + + if domain is not None and relative_path.parts[0] != domain: + continue + + if subfolder is not None: + if len(relative_path.parts) < 2 or relative_path.parts[1] != subfolder: + continue + + if with_path: + schemas.append(relative_path.as_posix()) + else: + relative_path_parts = relative_path.parts[start_index:] + relative_schema_path = "/".join(relative_path_parts) + schemas.append(relative_schema_path) + + return schemas + + +def load_schema(folder, schema_name): + """ + Load a JSON schema by domain and relative path (supports nested folders). + Example: load_schema("ros4hc/metadata", "meta1.json") + """ + schema_file = f"{folder}/{schema_name}" + package_dir = pkg_resources.files(PACKAGE_NAME) + with package_dir.joinpath(schema_file).open("r") as f: + return json.load(f) + + +def load_schema_from_path(schema_path): + """ + Load a JSON schema by its full path relative to the package root. + Example: load_schema_from_path("ros4hc/metadata/meta1.json") + """ + package_dir = pkg_resources.files(PACKAGE_NAME) + + try: + schema_file = package_dir.joinpath(schema_path) + with schema_file.open("r") as f: + content = f.read().strip() + + if not content: + return {} + else: + return json.loads(content) + + except FileNotFoundError: + raise FileNotFoundError(f"Schema not found at path: {schema_path} relative to package {PACKAGE_NAME}") + except json.JSONDecodeError as e: + raise ValueError(f"File at {schema_path} contains invalid JSON.") from e + + +def load_schema(folder, schema_name): + """ + Load a JSON schema by specifying the folder path and the schema file name. + Example: load_schema("ros4hc/metadata", "meta1.json") + + This function acts as a wrapper for load_schema_from_path. + """ + schema_path = f"{folder}/{schema_name}" + return load_schema_from_path(schema_path) \ No newline at end of file diff --git a/schema/granola/hk-blood-type-1.0.json b/ord_schemas/schema/granola/hk-blood-type-1.0.json similarity index 100% rename from schema/granola/hk-blood-type-1.0.json rename to ord_schemas/schema/granola/hk-blood-type-1.0.json diff --git a/schema/granola/hk-blood-type-1.x.json b/ord_schemas/schema/granola/hk-blood-type-1.x.json similarity index 100% rename from schema/granola/hk-blood-type-1.x.json rename to ord_schemas/schema/granola/hk-blood-type-1.x.json diff --git a/schema/granola/hk-category-sample-1.0.json b/ord_schemas/schema/granola/hk-category-sample-1.0.json similarity index 100% rename from schema/granola/hk-category-sample-1.0.json rename to ord_schemas/schema/granola/hk-category-sample-1.0.json diff --git a/schema/granola/hk-category-sample-1.x.json b/ord_schemas/schema/granola/hk-category-sample-1.x.json similarity index 100% rename from schema/granola/hk-category-sample-1.x.json rename to ord_schemas/schema/granola/hk-category-sample-1.x.json diff --git a/schema/granola/hk-category-type-1.0.json b/ord_schemas/schema/granola/hk-category-type-1.0.json similarity index 100% rename from schema/granola/hk-category-type-1.0.json rename to ord_schemas/schema/granola/hk-category-type-1.0.json diff --git a/schema/granola/hk-category-type-1.1.json b/ord_schemas/schema/granola/hk-category-type-1.1.json similarity index 100% rename from schema/granola/hk-category-type-1.1.json rename to ord_schemas/schema/granola/hk-category-type-1.1.json diff --git a/schema/granola/hk-category-type-1.x.json b/ord_schemas/schema/granola/hk-category-type-1.x.json similarity index 100% rename from schema/granola/hk-category-type-1.x.json rename to ord_schemas/schema/granola/hk-category-type-1.x.json diff --git a/schema/granola/hk-correlation-1.0.json b/ord_schemas/schema/granola/hk-correlation-1.0.json similarity index 100% rename from schema/granola/hk-correlation-1.0.json rename to ord_schemas/schema/granola/hk-correlation-1.0.json diff --git a/schema/granola/hk-correlation-1.x.json b/ord_schemas/schema/granola/hk-correlation-1.x.json similarity index 100% rename from schema/granola/hk-correlation-1.x.json rename to ord_schemas/schema/granola/hk-correlation-1.x.json diff --git a/schema/granola/hk-correlation-type-1.0.json b/ord_schemas/schema/granola/hk-correlation-type-1.0.json similarity index 100% rename from schema/granola/hk-correlation-type-1.0.json rename to ord_schemas/schema/granola/hk-correlation-type-1.0.json diff --git a/schema/granola/hk-correlation-type-1.x.json b/ord_schemas/schema/granola/hk-correlation-type-1.x.json similarity index 100% rename from schema/granola/hk-correlation-type-1.x.json rename to ord_schemas/schema/granola/hk-correlation-type-1.x.json diff --git a/schema/granola/hk-metadata-1.0.json b/ord_schemas/schema/granola/hk-metadata-1.0.json similarity index 100% rename from schema/granola/hk-metadata-1.0.json rename to ord_schemas/schema/granola/hk-metadata-1.0.json diff --git a/schema/granola/hk-metadata-1.x.json b/ord_schemas/schema/granola/hk-metadata-1.x.json similarity index 100% rename from schema/granola/hk-metadata-1.x.json rename to ord_schemas/schema/granola/hk-metadata-1.x.json diff --git a/schema/granola/hk-quantity-sample-1.0.json b/ord_schemas/schema/granola/hk-quantity-sample-1.0.json similarity index 100% rename from schema/granola/hk-quantity-sample-1.0.json rename to ord_schemas/schema/granola/hk-quantity-sample-1.0.json diff --git a/schema/granola/hk-quantity-sample-1.x.json b/ord_schemas/schema/granola/hk-quantity-sample-1.x.json similarity index 100% rename from schema/granola/hk-quantity-sample-1.x.json rename to ord_schemas/schema/granola/hk-quantity-sample-1.x.json diff --git a/schema/granola/hk-quantity-type-1.0.json b/ord_schemas/schema/granola/hk-quantity-type-1.0.json similarity index 100% rename from schema/granola/hk-quantity-type-1.0.json rename to ord_schemas/schema/granola/hk-quantity-type-1.0.json diff --git a/schema/granola/hk-quantity-type-1.1.json b/ord_schemas/schema/granola/hk-quantity-type-1.1.json similarity index 100% rename from schema/granola/hk-quantity-type-1.1.json rename to ord_schemas/schema/granola/hk-quantity-type-1.1.json diff --git a/schema/granola/hk-quantity-type-1.x.json b/ord_schemas/schema/granola/hk-quantity-type-1.x.json similarity index 100% rename from schema/granola/hk-quantity-type-1.x.json rename to ord_schemas/schema/granola/hk-quantity-type-1.x.json diff --git a/schema/granola/hk-workout-1.0.json b/ord_schemas/schema/granola/hk-workout-1.0.json similarity index 100% rename from schema/granola/hk-workout-1.0.json rename to ord_schemas/schema/granola/hk-workout-1.0.json diff --git a/schema/granola/hk-workout-1.x.json b/ord_schemas/schema/granola/hk-workout-1.x.json similarity index 100% rename from schema/granola/hk-workout-1.x.json rename to ord_schemas/schema/granola/hk-workout-1.x.json diff --git a/schema/omh/acceleration-1.0.json b/ord_schemas/schema/omh/acceleration-1.0.json similarity index 100% rename from schema/omh/acceleration-1.0.json rename to ord_schemas/schema/omh/acceleration-1.0.json diff --git a/schema/omh/acceleration-1.x.json b/ord_schemas/schema/omh/acceleration-1.x.json similarity index 100% rename from schema/omh/acceleration-1.x.json rename to ord_schemas/schema/omh/acceleration-1.x.json diff --git a/schema/omh/acceleration-2.0.json b/ord_schemas/schema/omh/acceleration-2.0.json similarity index 100% rename from schema/omh/acceleration-2.0.json rename to ord_schemas/schema/omh/acceleration-2.0.json diff --git a/schema/omh/acceleration-2.x.json b/ord_schemas/schema/omh/acceleration-2.x.json similarity index 100% rename from schema/omh/acceleration-2.x.json rename to ord_schemas/schema/omh/acceleration-2.x.json diff --git a/schema/omh/acceleration-unit-value-1.0.json b/ord_schemas/schema/omh/acceleration-unit-value-1.0.json similarity index 100% rename from schema/omh/acceleration-unit-value-1.0.json rename to ord_schemas/schema/omh/acceleration-unit-value-1.0.json diff --git a/schema/omh/acceleration-unit-value-1.1.json b/ord_schemas/schema/omh/acceleration-unit-value-1.1.json similarity index 100% rename from schema/omh/acceleration-unit-value-1.1.json rename to ord_schemas/schema/omh/acceleration-unit-value-1.1.json diff --git a/schema/omh/acceleration-unit-value-1.x.json b/ord_schemas/schema/omh/acceleration-unit-value-1.x.json similarity index 100% rename from schema/omh/acceleration-unit-value-1.x.json rename to ord_schemas/schema/omh/acceleration-unit-value-1.x.json diff --git a/schema/omh/activity-name-1.0.json b/ord_schemas/schema/omh/activity-name-1.0.json similarity index 100% rename from schema/omh/activity-name-1.0.json rename to ord_schemas/schema/omh/activity-name-1.0.json diff --git a/schema/omh/activity-name-1.x.json b/ord_schemas/schema/omh/activity-name-1.x.json similarity index 100% rename from schema/omh/activity-name-1.x.json rename to ord_schemas/schema/omh/activity-name-1.x.json diff --git a/schema/omh/ambient-temperature-1.0.json b/ord_schemas/schema/omh/ambient-temperature-1.0.json similarity index 100% rename from schema/omh/ambient-temperature-1.0.json rename to ord_schemas/schema/omh/ambient-temperature-1.0.json diff --git a/schema/omh/ambient-temperature-1.x.json b/ord_schemas/schema/omh/ambient-temperature-1.x.json similarity index 100% rename from schema/omh/ambient-temperature-1.x.json rename to ord_schemas/schema/omh/ambient-temperature-1.x.json diff --git a/schema/omh/angular-velocity-unit-value-1.0.json b/ord_schemas/schema/omh/angular-velocity-unit-value-1.0.json similarity index 100% rename from schema/omh/angular-velocity-unit-value-1.0.json rename to ord_schemas/schema/omh/angular-velocity-unit-value-1.0.json diff --git a/schema/omh/angular-velocity-unit-value-1.1.json b/ord_schemas/schema/omh/angular-velocity-unit-value-1.1.json similarity index 100% rename from schema/omh/angular-velocity-unit-value-1.1.json rename to ord_schemas/schema/omh/angular-velocity-unit-value-1.1.json diff --git a/schema/omh/angular-velocity-unit-value-1.x.json b/ord_schemas/schema/omh/angular-velocity-unit-value-1.x.json similarity index 100% rename from schema/omh/angular-velocity-unit-value-1.x.json rename to ord_schemas/schema/omh/angular-velocity-unit-value-1.x.json diff --git a/schema/omh/area-unit-value-1.0.json b/ord_schemas/schema/omh/area-unit-value-1.0.json similarity index 100% rename from schema/omh/area-unit-value-1.0.json rename to ord_schemas/schema/omh/area-unit-value-1.0.json diff --git a/schema/omh/area-unit-value-1.1.json b/ord_schemas/schema/omh/area-unit-value-1.1.json similarity index 100% rename from schema/omh/area-unit-value-1.1.json rename to ord_schemas/schema/omh/area-unit-value-1.1.json diff --git a/schema/omh/area-unit-value-1.x.json b/ord_schemas/schema/omh/area-unit-value-1.x.json similarity index 100% rename from schema/omh/area-unit-value-1.x.json rename to ord_schemas/schema/omh/area-unit-value-1.x.json diff --git a/schema/omh/blood-glucose-1.0.json b/ord_schemas/schema/omh/blood-glucose-1.0.json similarity index 100% rename from schema/omh/blood-glucose-1.0.json rename to ord_schemas/schema/omh/blood-glucose-1.0.json diff --git a/schema/omh/blood-glucose-1.x.json b/ord_schemas/schema/omh/blood-glucose-1.x.json similarity index 100% rename from schema/omh/blood-glucose-1.x.json rename to ord_schemas/schema/omh/blood-glucose-1.x.json diff --git a/schema/omh/blood-glucose-2.0.json b/ord_schemas/schema/omh/blood-glucose-2.0.json similarity index 100% rename from schema/omh/blood-glucose-2.0.json rename to ord_schemas/schema/omh/blood-glucose-2.0.json diff --git a/schema/omh/blood-glucose-2.x.json b/ord_schemas/schema/omh/blood-glucose-2.x.json similarity index 100% rename from schema/omh/blood-glucose-2.x.json rename to ord_schemas/schema/omh/blood-glucose-2.x.json diff --git a/schema/omh/blood-glucose-3.0.json b/ord_schemas/schema/omh/blood-glucose-3.0.json similarity index 100% rename from schema/omh/blood-glucose-3.0.json rename to ord_schemas/schema/omh/blood-glucose-3.0.json diff --git a/schema/omh/blood-glucose-3.x.json b/ord_schemas/schema/omh/blood-glucose-3.x.json similarity index 100% rename from schema/omh/blood-glucose-3.x.json rename to ord_schemas/schema/omh/blood-glucose-3.x.json diff --git a/schema/omh/blood-glucose-4.0.json b/ord_schemas/schema/omh/blood-glucose-4.0.json similarity index 100% rename from schema/omh/blood-glucose-4.0.json rename to ord_schemas/schema/omh/blood-glucose-4.0.json diff --git a/schema/omh/blood-glucose-4.x.json b/ord_schemas/schema/omh/blood-glucose-4.x.json similarity index 100% rename from schema/omh/blood-glucose-4.x.json rename to ord_schemas/schema/omh/blood-glucose-4.x.json diff --git a/schema/omh/blood-pressure-1.0.json b/ord_schemas/schema/omh/blood-pressure-1.0.json similarity index 100% rename from schema/omh/blood-pressure-1.0.json rename to ord_schemas/schema/omh/blood-pressure-1.0.json diff --git a/schema/omh/blood-pressure-1.x.json b/ord_schemas/schema/omh/blood-pressure-1.x.json similarity index 100% rename from schema/omh/blood-pressure-1.x.json rename to ord_schemas/schema/omh/blood-pressure-1.x.json diff --git a/schema/omh/blood-pressure-2.0.json b/ord_schemas/schema/omh/blood-pressure-2.0.json similarity index 100% rename from schema/omh/blood-pressure-2.0.json rename to ord_schemas/schema/omh/blood-pressure-2.0.json diff --git a/schema/omh/blood-pressure-2.x.json b/ord_schemas/schema/omh/blood-pressure-2.x.json similarity index 100% rename from schema/omh/blood-pressure-2.x.json rename to ord_schemas/schema/omh/blood-pressure-2.x.json diff --git a/schema/omh/blood-pressure-3.0.json b/ord_schemas/schema/omh/blood-pressure-3.0.json similarity index 100% rename from schema/omh/blood-pressure-3.0.json rename to ord_schemas/schema/omh/blood-pressure-3.0.json diff --git a/schema/omh/blood-pressure-3.1.json b/ord_schemas/schema/omh/blood-pressure-3.1.json similarity index 100% rename from schema/omh/blood-pressure-3.1.json rename to ord_schemas/schema/omh/blood-pressure-3.1.json diff --git a/schema/omh/blood-pressure-3.x.json b/ord_schemas/schema/omh/blood-pressure-3.x.json similarity index 100% rename from schema/omh/blood-pressure-3.x.json rename to ord_schemas/schema/omh/blood-pressure-3.x.json diff --git a/schema/omh/blood-pressure-4.0.json b/ord_schemas/schema/omh/blood-pressure-4.0.json similarity index 100% rename from schema/omh/blood-pressure-4.0.json rename to ord_schemas/schema/omh/blood-pressure-4.0.json diff --git a/schema/omh/blood-pressure-4.x.json b/ord_schemas/schema/omh/blood-pressure-4.x.json similarity index 100% rename from schema/omh/blood-pressure-4.x.json rename to ord_schemas/schema/omh/blood-pressure-4.x.json diff --git a/schema/omh/blood-specimen-type-1.0.json b/ord_schemas/schema/omh/blood-specimen-type-1.0.json similarity index 100% rename from schema/omh/blood-specimen-type-1.0.json rename to ord_schemas/schema/omh/blood-specimen-type-1.0.json diff --git a/schema/omh/blood-specimen-type-1.x.json b/ord_schemas/schema/omh/blood-specimen-type-1.x.json similarity index 100% rename from schema/omh/blood-specimen-type-1.x.json rename to ord_schemas/schema/omh/blood-specimen-type-1.x.json diff --git a/schema/omh/body-fat-percentage-1.0.json b/ord_schemas/schema/omh/body-fat-percentage-1.0.json similarity index 100% rename from schema/omh/body-fat-percentage-1.0.json rename to ord_schemas/schema/omh/body-fat-percentage-1.0.json diff --git a/schema/omh/body-fat-percentage-1.x.json b/ord_schemas/schema/omh/body-fat-percentage-1.x.json similarity index 100% rename from schema/omh/body-fat-percentage-1.x.json rename to ord_schemas/schema/omh/body-fat-percentage-1.x.json diff --git a/schema/omh/body-fat-percentage-2.0.json b/ord_schemas/schema/omh/body-fat-percentage-2.0.json similarity index 100% rename from schema/omh/body-fat-percentage-2.0.json rename to ord_schemas/schema/omh/body-fat-percentage-2.0.json diff --git a/schema/omh/body-fat-percentage-2.x.json b/ord_schemas/schema/omh/body-fat-percentage-2.x.json similarity index 100% rename from schema/omh/body-fat-percentage-2.x.json rename to ord_schemas/schema/omh/body-fat-percentage-2.x.json diff --git a/schema/omh/body-height-1.0.json b/ord_schemas/schema/omh/body-height-1.0.json similarity index 100% rename from schema/omh/body-height-1.0.json rename to ord_schemas/schema/omh/body-height-1.0.json diff --git a/schema/omh/body-height-1.x.json b/ord_schemas/schema/omh/body-height-1.x.json similarity index 100% rename from schema/omh/body-height-1.x.json rename to ord_schemas/schema/omh/body-height-1.x.json diff --git a/schema/omh/body-height-2.0.json b/ord_schemas/schema/omh/body-height-2.0.json similarity index 100% rename from schema/omh/body-height-2.0.json rename to ord_schemas/schema/omh/body-height-2.0.json diff --git a/schema/omh/body-height-2.x.json b/ord_schemas/schema/omh/body-height-2.x.json similarity index 100% rename from schema/omh/body-height-2.x.json rename to ord_schemas/schema/omh/body-height-2.x.json diff --git a/schema/omh/body-location-1.0.json b/ord_schemas/schema/omh/body-location-1.0.json similarity index 100% rename from schema/omh/body-location-1.0.json rename to ord_schemas/schema/omh/body-location-1.0.json diff --git a/schema/omh/body-location-1.1.json b/ord_schemas/schema/omh/body-location-1.1.json similarity index 100% rename from schema/omh/body-location-1.1.json rename to ord_schemas/schema/omh/body-location-1.1.json diff --git a/schema/omh/body-location-1.x.json b/ord_schemas/schema/omh/body-location-1.x.json similarity index 100% rename from schema/omh/body-location-1.x.json rename to ord_schemas/schema/omh/body-location-1.x.json diff --git a/schema/omh/body-mass-index-1.0.json b/ord_schemas/schema/omh/body-mass-index-1.0.json similarity index 100% rename from schema/omh/body-mass-index-1.0.json rename to ord_schemas/schema/omh/body-mass-index-1.0.json diff --git a/schema/omh/body-mass-index-1.x.json b/ord_schemas/schema/omh/body-mass-index-1.x.json similarity index 100% rename from schema/omh/body-mass-index-1.x.json rename to ord_schemas/schema/omh/body-mass-index-1.x.json diff --git a/schema/omh/body-mass-index-2.0.json b/ord_schemas/schema/omh/body-mass-index-2.0.json similarity index 100% rename from schema/omh/body-mass-index-2.0.json rename to ord_schemas/schema/omh/body-mass-index-2.0.json diff --git a/schema/omh/body-mass-index-2.x.json b/ord_schemas/schema/omh/body-mass-index-2.x.json similarity index 100% rename from schema/omh/body-mass-index-2.x.json rename to ord_schemas/schema/omh/body-mass-index-2.x.json diff --git a/schema/omh/body-mass-index-3.0.json b/ord_schemas/schema/omh/body-mass-index-3.0.json similarity index 100% rename from schema/omh/body-mass-index-3.0.json rename to ord_schemas/schema/omh/body-mass-index-3.0.json diff --git a/schema/omh/body-mass-index-3.x.json b/ord_schemas/schema/omh/body-mass-index-3.x.json similarity index 100% rename from schema/omh/body-mass-index-3.x.json rename to ord_schemas/schema/omh/body-mass-index-3.x.json diff --git a/schema/omh/body-posture-1.0.json b/ord_schemas/schema/omh/body-posture-1.0.json similarity index 100% rename from schema/omh/body-posture-1.0.json rename to ord_schemas/schema/omh/body-posture-1.0.json diff --git a/schema/omh/body-posture-1.x.json b/ord_schemas/schema/omh/body-posture-1.x.json similarity index 100% rename from schema/omh/body-posture-1.x.json rename to ord_schemas/schema/omh/body-posture-1.x.json diff --git a/schema/omh/body-temperature-1.0.json b/ord_schemas/schema/omh/body-temperature-1.0.json similarity index 100% rename from schema/omh/body-temperature-1.0.json rename to ord_schemas/schema/omh/body-temperature-1.0.json diff --git a/schema/omh/body-temperature-1.x.json b/ord_schemas/schema/omh/body-temperature-1.x.json similarity index 100% rename from schema/omh/body-temperature-1.x.json rename to ord_schemas/schema/omh/body-temperature-1.x.json diff --git a/schema/omh/body-temperature-2.0.json b/ord_schemas/schema/omh/body-temperature-2.0.json similarity index 100% rename from schema/omh/body-temperature-2.0.json rename to ord_schemas/schema/omh/body-temperature-2.0.json diff --git a/schema/omh/body-temperature-2.x.json b/ord_schemas/schema/omh/body-temperature-2.x.json similarity index 100% rename from schema/omh/body-temperature-2.x.json rename to ord_schemas/schema/omh/body-temperature-2.x.json diff --git a/schema/omh/body-temperature-3.0.json b/ord_schemas/schema/omh/body-temperature-3.0.json similarity index 100% rename from schema/omh/body-temperature-3.0.json rename to ord_schemas/schema/omh/body-temperature-3.0.json diff --git a/schema/omh/body-temperature-3.x.json b/ord_schemas/schema/omh/body-temperature-3.x.json similarity index 100% rename from schema/omh/body-temperature-3.x.json rename to ord_schemas/schema/omh/body-temperature-3.x.json diff --git a/schema/omh/body-temperature-4.0.json b/ord_schemas/schema/omh/body-temperature-4.0.json similarity index 100% rename from schema/omh/body-temperature-4.0.json rename to ord_schemas/schema/omh/body-temperature-4.0.json diff --git a/schema/omh/body-temperature-4.x.json b/ord_schemas/schema/omh/body-temperature-4.x.json similarity index 100% rename from schema/omh/body-temperature-4.x.json rename to ord_schemas/schema/omh/body-temperature-4.x.json diff --git a/schema/omh/body-weight-1.0.json b/ord_schemas/schema/omh/body-weight-1.0.json similarity index 100% rename from schema/omh/body-weight-1.0.json rename to ord_schemas/schema/omh/body-weight-1.0.json diff --git a/schema/omh/body-weight-1.x.json b/ord_schemas/schema/omh/body-weight-1.x.json similarity index 100% rename from schema/omh/body-weight-1.x.json rename to ord_schemas/schema/omh/body-weight-1.x.json diff --git a/schema/omh/body-weight-2.0.json b/ord_schemas/schema/omh/body-weight-2.0.json similarity index 100% rename from schema/omh/body-weight-2.0.json rename to ord_schemas/schema/omh/body-weight-2.0.json diff --git a/schema/omh/body-weight-2.x.json b/ord_schemas/schema/omh/body-weight-2.x.json similarity index 100% rename from schema/omh/body-weight-2.x.json rename to ord_schemas/schema/omh/body-weight-2.x.json diff --git a/schema/omh/body-weight-3.0.json b/ord_schemas/schema/omh/body-weight-3.0.json similarity index 100% rename from schema/omh/body-weight-3.0.json rename to ord_schemas/schema/omh/body-weight-3.0.json diff --git a/schema/omh/body-weight-3.x.json b/ord_schemas/schema/omh/body-weight-3.x.json similarity index 100% rename from schema/omh/body-weight-3.x.json rename to ord_schemas/schema/omh/body-weight-3.x.json diff --git a/schema/omh/breath-carbon-monoxide-1.0.json b/ord_schemas/schema/omh/breath-carbon-monoxide-1.0.json similarity index 100% rename from schema/omh/breath-carbon-monoxide-1.0.json rename to ord_schemas/schema/omh/breath-carbon-monoxide-1.0.json diff --git a/schema/omh/breath-carbon-monoxide-1.x.json b/ord_schemas/schema/omh/breath-carbon-monoxide-1.x.json similarity index 100% rename from schema/omh/breath-carbon-monoxide-1.x.json rename to ord_schemas/schema/omh/breath-carbon-monoxide-1.x.json diff --git a/schema/omh/calories-burned-1.0.json b/ord_schemas/schema/omh/calories-burned-1.0.json similarity index 100% rename from schema/omh/calories-burned-1.0.json rename to ord_schemas/schema/omh/calories-burned-1.0.json diff --git a/schema/omh/calories-burned-1.x.json b/ord_schemas/schema/omh/calories-burned-1.x.json similarity index 100% rename from schema/omh/calories-burned-1.x.json rename to ord_schemas/schema/omh/calories-burned-1.x.json diff --git a/schema/omh/calories-burned-2.0.json b/ord_schemas/schema/omh/calories-burned-2.0.json similarity index 100% rename from schema/omh/calories-burned-2.0.json rename to ord_schemas/schema/omh/calories-burned-2.0.json diff --git a/schema/omh/calories-burned-2.x.json b/ord_schemas/schema/omh/calories-burned-2.x.json similarity index 100% rename from schema/omh/calories-burned-2.x.json rename to ord_schemas/schema/omh/calories-burned-2.x.json diff --git a/schema/omh/data-point-1.0.json b/ord_schemas/schema/omh/data-point-1.0.json similarity index 100% rename from schema/omh/data-point-1.0.json rename to ord_schemas/schema/omh/data-point-1.0.json diff --git a/schema/omh/data-point-1.x.json b/ord_schemas/schema/omh/data-point-1.x.json similarity index 100% rename from schema/omh/data-point-1.x.json rename to ord_schemas/schema/omh/data-point-1.x.json diff --git a/schema/omh/date-time-1.0.json b/ord_schemas/schema/omh/date-time-1.0.json similarity index 100% rename from schema/omh/date-time-1.0.json rename to ord_schemas/schema/omh/date-time-1.0.json diff --git a/schema/omh/date-time-1.x.json b/ord_schemas/schema/omh/date-time-1.x.json similarity index 100% rename from schema/omh/date-time-1.x.json rename to ord_schemas/schema/omh/date-time-1.x.json diff --git a/schema/omh/day-of-week-1.0.json b/ord_schemas/schema/omh/day-of-week-1.0.json similarity index 100% rename from schema/omh/day-of-week-1.0.json rename to ord_schemas/schema/omh/day-of-week-1.0.json diff --git a/schema/omh/day-of-week-1.x.json b/ord_schemas/schema/omh/day-of-week-1.x.json similarity index 100% rename from schema/omh/day-of-week-1.x.json rename to ord_schemas/schema/omh/day-of-week-1.x.json diff --git a/schema/omh/descriptive-statistic-1.0.json b/ord_schemas/schema/omh/descriptive-statistic-1.0.json similarity index 100% rename from schema/omh/descriptive-statistic-1.0.json rename to ord_schemas/schema/omh/descriptive-statistic-1.0.json diff --git a/schema/omh/descriptive-statistic-1.1.json b/ord_schemas/schema/omh/descriptive-statistic-1.1.json similarity index 100% rename from schema/omh/descriptive-statistic-1.1.json rename to ord_schemas/schema/omh/descriptive-statistic-1.1.json diff --git a/schema/omh/descriptive-statistic-1.2.json b/ord_schemas/schema/omh/descriptive-statistic-1.2.json similarity index 100% rename from schema/omh/descriptive-statistic-1.2.json rename to ord_schemas/schema/omh/descriptive-statistic-1.2.json diff --git a/schema/omh/descriptive-statistic-1.x.json b/ord_schemas/schema/omh/descriptive-statistic-1.x.json similarity index 100% rename from schema/omh/descriptive-statistic-1.x.json rename to ord_schemas/schema/omh/descriptive-statistic-1.x.json diff --git a/schema/omh/descriptive-statistic-denominator-1.0.json b/ord_schemas/schema/omh/descriptive-statistic-denominator-1.0.json similarity index 100% rename from schema/omh/descriptive-statistic-denominator-1.0.json rename to ord_schemas/schema/omh/descriptive-statistic-denominator-1.0.json diff --git a/schema/omh/descriptive-statistic-denominator-1.1.json b/ord_schemas/schema/omh/descriptive-statistic-denominator-1.1.json similarity index 100% rename from schema/omh/descriptive-statistic-denominator-1.1.json rename to ord_schemas/schema/omh/descriptive-statistic-denominator-1.1.json diff --git a/schema/omh/descriptive-statistic-denominator-1.x.json b/ord_schemas/schema/omh/descriptive-statistic-denominator-1.x.json similarity index 100% rename from schema/omh/descriptive-statistic-denominator-1.x.json rename to ord_schemas/schema/omh/descriptive-statistic-denominator-1.x.json diff --git a/schema/omh/diastolic-blood-pressure-1.0.json b/ord_schemas/schema/omh/diastolic-blood-pressure-1.0.json similarity index 100% rename from schema/omh/diastolic-blood-pressure-1.0.json rename to ord_schemas/schema/omh/diastolic-blood-pressure-1.0.json diff --git a/schema/omh/diastolic-blood-pressure-1.1.json b/ord_schemas/schema/omh/diastolic-blood-pressure-1.1.json similarity index 100% rename from schema/omh/diastolic-blood-pressure-1.1.json rename to ord_schemas/schema/omh/diastolic-blood-pressure-1.1.json diff --git a/schema/omh/diastolic-blood-pressure-1.x.json b/ord_schemas/schema/omh/diastolic-blood-pressure-1.x.json similarity index 100% rename from schema/omh/diastolic-blood-pressure-1.x.json rename to ord_schemas/schema/omh/diastolic-blood-pressure-1.x.json diff --git a/schema/omh/duration-unit-value-1.0.json b/ord_schemas/schema/omh/duration-unit-value-1.0.json similarity index 100% rename from schema/omh/duration-unit-value-1.0.json rename to ord_schemas/schema/omh/duration-unit-value-1.0.json diff --git a/schema/omh/duration-unit-value-1.x.json b/ord_schemas/schema/omh/duration-unit-value-1.x.json similarity index 100% rename from schema/omh/duration-unit-value-1.x.json rename to ord_schemas/schema/omh/duration-unit-value-1.x.json diff --git a/schema/omh/duration-unit-value-range-1.0.json b/ord_schemas/schema/omh/duration-unit-value-range-1.0.json similarity index 100% rename from schema/omh/duration-unit-value-range-1.0.json rename to ord_schemas/schema/omh/duration-unit-value-range-1.0.json diff --git a/schema/omh/duration-unit-value-range-1.x.json b/ord_schemas/schema/omh/duration-unit-value-range-1.x.json similarity index 100% rename from schema/omh/duration-unit-value-range-1.x.json rename to ord_schemas/schema/omh/duration-unit-value-range-1.x.json diff --git a/schema/omh/expiratory-time-1.0.json b/ord_schemas/schema/omh/expiratory-time-1.0.json similarity index 100% rename from schema/omh/expiratory-time-1.0.json rename to ord_schemas/schema/omh/expiratory-time-1.0.json diff --git a/schema/omh/expiratory-time-1.x.json b/ord_schemas/schema/omh/expiratory-time-1.x.json similarity index 100% rename from schema/omh/expiratory-time-1.x.json rename to ord_schemas/schema/omh/expiratory-time-1.x.json diff --git a/schema/omh/frequency-unit-value-1.0.json b/ord_schemas/schema/omh/frequency-unit-value-1.0.json similarity index 100% rename from schema/omh/frequency-unit-value-1.0.json rename to ord_schemas/schema/omh/frequency-unit-value-1.0.json diff --git a/schema/omh/frequency-unit-value-1.x.json b/ord_schemas/schema/omh/frequency-unit-value-1.x.json similarity index 100% rename from schema/omh/frequency-unit-value-1.x.json rename to ord_schemas/schema/omh/frequency-unit-value-1.x.json diff --git a/schema/omh/full-date-1.0.json b/ord_schemas/schema/omh/full-date-1.0.json similarity index 100% rename from schema/omh/full-date-1.0.json rename to ord_schemas/schema/omh/full-date-1.0.json diff --git a/schema/omh/full-date-1.x.json b/ord_schemas/schema/omh/full-date-1.x.json similarity index 100% rename from schema/omh/full-date-1.x.json rename to ord_schemas/schema/omh/full-date-1.x.json diff --git a/schema/omh/geoposition-1.0.json b/ord_schemas/schema/omh/geoposition-1.0.json similarity index 100% rename from schema/omh/geoposition-1.0.json rename to ord_schemas/schema/omh/geoposition-1.0.json diff --git a/schema/omh/geoposition-1.x.json b/ord_schemas/schema/omh/geoposition-1.x.json similarity index 100% rename from schema/omh/geoposition-1.x.json rename to ord_schemas/schema/omh/geoposition-1.x.json diff --git a/schema/omh/header-1.0.json b/ord_schemas/schema/omh/header-1.0.json similarity index 100% rename from schema/omh/header-1.0.json rename to ord_schemas/schema/omh/header-1.0.json diff --git a/schema/omh/header-1.1.json b/ord_schemas/schema/omh/header-1.1.json similarity index 100% rename from schema/omh/header-1.1.json rename to ord_schemas/schema/omh/header-1.1.json diff --git a/schema/omh/header-1.2.json b/ord_schemas/schema/omh/header-1.2.json similarity index 100% rename from schema/omh/header-1.2.json rename to ord_schemas/schema/omh/header-1.2.json diff --git a/schema/omh/header-1.x.json b/ord_schemas/schema/omh/header-1.x.json similarity index 100% rename from schema/omh/header-1.x.json rename to ord_schemas/schema/omh/header-1.x.json diff --git a/schema/omh/heart-rate-1.0.json b/ord_schemas/schema/omh/heart-rate-1.0.json similarity index 100% rename from schema/omh/heart-rate-1.0.json rename to ord_schemas/schema/omh/heart-rate-1.0.json diff --git a/schema/omh/heart-rate-1.1.json b/ord_schemas/schema/omh/heart-rate-1.1.json similarity index 100% rename from schema/omh/heart-rate-1.1.json rename to ord_schemas/schema/omh/heart-rate-1.1.json diff --git a/schema/omh/heart-rate-1.x.json b/ord_schemas/schema/omh/heart-rate-1.x.json similarity index 100% rename from schema/omh/heart-rate-1.x.json rename to ord_schemas/schema/omh/heart-rate-1.x.json diff --git a/schema/omh/heart-rate-2.0.json b/ord_schemas/schema/omh/heart-rate-2.0.json similarity index 100% rename from schema/omh/heart-rate-2.0.json rename to ord_schemas/schema/omh/heart-rate-2.0.json diff --git a/schema/omh/heart-rate-2.x.json b/ord_schemas/schema/omh/heart-rate-2.x.json similarity index 100% rename from schema/omh/heart-rate-2.x.json rename to ord_schemas/schema/omh/heart-rate-2.x.json diff --git a/schema/omh/inspiratory-time-1.0.json b/ord_schemas/schema/omh/inspiratory-time-1.0.json similarity index 100% rename from schema/omh/inspiratory-time-1.0.json rename to ord_schemas/schema/omh/inspiratory-time-1.0.json diff --git a/schema/omh/inspiratory-time-1.x.json b/ord_schemas/schema/omh/inspiratory-time-1.x.json similarity index 100% rename from schema/omh/inspiratory-time-1.x.json rename to ord_schemas/schema/omh/inspiratory-time-1.x.json diff --git a/schema/omh/intervention-administration-route-1.0.json b/ord_schemas/schema/omh/intervention-administration-route-1.0.json similarity index 100% rename from schema/omh/intervention-administration-route-1.0.json rename to ord_schemas/schema/omh/intervention-administration-route-1.0.json diff --git a/schema/omh/intervention-administration-route-1.x.json b/ord_schemas/schema/omh/intervention-administration-route-1.x.json similarity index 100% rename from schema/omh/intervention-administration-route-1.x.json rename to ord_schemas/schema/omh/intervention-administration-route-1.x.json diff --git a/schema/omh/intervention-administration-route-2.0.json b/ord_schemas/schema/omh/intervention-administration-route-2.0.json similarity index 100% rename from schema/omh/intervention-administration-route-2.0.json rename to ord_schemas/schema/omh/intervention-administration-route-2.0.json diff --git a/schema/omh/intervention-administration-route-2.x.json b/ord_schemas/schema/omh/intervention-administration-route-2.x.json similarity index 100% rename from schema/omh/intervention-administration-route-2.x.json rename to ord_schemas/schema/omh/intervention-administration-route-2.x.json diff --git a/schema/omh/kcal-unit-value-1.0.json b/ord_schemas/schema/omh/kcal-unit-value-1.0.json similarity index 100% rename from schema/omh/kcal-unit-value-1.0.json rename to ord_schemas/schema/omh/kcal-unit-value-1.0.json diff --git a/schema/omh/kcal-unit-value-1.x.json b/ord_schemas/schema/omh/kcal-unit-value-1.x.json similarity index 100% rename from schema/omh/kcal-unit-value-1.x.json rename to ord_schemas/schema/omh/kcal-unit-value-1.x.json diff --git a/schema/omh/length-unit-value-1.0.json b/ord_schemas/schema/omh/length-unit-value-1.0.json similarity index 100% rename from schema/omh/length-unit-value-1.0.json rename to ord_schemas/schema/omh/length-unit-value-1.0.json diff --git a/schema/omh/length-unit-value-1.x.json b/ord_schemas/schema/omh/length-unit-value-1.x.json similarity index 100% rename from schema/omh/length-unit-value-1.x.json rename to ord_schemas/schema/omh/length-unit-value-1.x.json diff --git a/schema/omh/local-time-1.0.json b/ord_schemas/schema/omh/local-time-1.0.json similarity index 100% rename from schema/omh/local-time-1.0.json rename to ord_schemas/schema/omh/local-time-1.0.json diff --git a/schema/omh/local-time-1.x.json b/ord_schemas/schema/omh/local-time-1.x.json similarity index 100% rename from schema/omh/local-time-1.x.json rename to ord_schemas/schema/omh/local-time-1.x.json diff --git a/schema/omh/magnetic-flux-density-unit-value-1.0.json b/ord_schemas/schema/omh/magnetic-flux-density-unit-value-1.0.json similarity index 100% rename from schema/omh/magnetic-flux-density-unit-value-1.0.json rename to ord_schemas/schema/omh/magnetic-flux-density-unit-value-1.0.json diff --git a/schema/omh/magnetic-flux-density-unit-value-1.1.json b/ord_schemas/schema/omh/magnetic-flux-density-unit-value-1.1.json similarity index 100% rename from schema/omh/magnetic-flux-density-unit-value-1.1.json rename to ord_schemas/schema/omh/magnetic-flux-density-unit-value-1.1.json diff --git a/schema/omh/magnetic-flux-density-unit-value-1.x.json b/ord_schemas/schema/omh/magnetic-flux-density-unit-value-1.x.json similarity index 100% rename from schema/omh/magnetic-flux-density-unit-value-1.x.json rename to ord_schemas/schema/omh/magnetic-flux-density-unit-value-1.x.json diff --git a/schema/omh/magnetic-force-1.0.json b/ord_schemas/schema/omh/magnetic-force-1.0.json similarity index 100% rename from schema/omh/magnetic-force-1.0.json rename to ord_schemas/schema/omh/magnetic-force-1.0.json diff --git a/schema/omh/magnetic-force-1.x.json b/ord_schemas/schema/omh/magnetic-force-1.x.json similarity index 100% rename from schema/omh/magnetic-force-1.x.json rename to ord_schemas/schema/omh/magnetic-force-1.x.json diff --git a/schema/omh/mass-unit-value-1.0.json b/ord_schemas/schema/omh/mass-unit-value-1.0.json similarity index 100% rename from schema/omh/mass-unit-value-1.0.json rename to ord_schemas/schema/omh/mass-unit-value-1.0.json diff --git a/schema/omh/mass-unit-value-1.1.json b/ord_schemas/schema/omh/mass-unit-value-1.1.json similarity index 100% rename from schema/omh/mass-unit-value-1.1.json rename to ord_schemas/schema/omh/mass-unit-value-1.1.json diff --git a/schema/omh/mass-unit-value-1.x.json b/ord_schemas/schema/omh/mass-unit-value-1.x.json similarity index 100% rename from schema/omh/mass-unit-value-1.x.json rename to ord_schemas/schema/omh/mass-unit-value-1.x.json diff --git a/schema/omh/medication-1.0.json b/ord_schemas/schema/omh/medication-1.0.json similarity index 100% rename from schema/omh/medication-1.0.json rename to ord_schemas/schema/omh/medication-1.0.json diff --git a/schema/omh/medication-1.x.json b/ord_schemas/schema/omh/medication-1.x.json similarity index 100% rename from schema/omh/medication-1.x.json rename to ord_schemas/schema/omh/medication-1.x.json diff --git a/schema/omh/medication-adherence-percent-1.0.json b/ord_schemas/schema/omh/medication-adherence-percent-1.0.json similarity index 100% rename from schema/omh/medication-adherence-percent-1.0.json rename to ord_schemas/schema/omh/medication-adherence-percent-1.0.json diff --git a/schema/omh/medication-adherence-percent-1.x.json b/ord_schemas/schema/omh/medication-adherence-percent-1.x.json similarity index 100% rename from schema/omh/medication-adherence-percent-1.x.json rename to ord_schemas/schema/omh/medication-adherence-percent-1.x.json diff --git a/schema/omh/medication-adherence-percent-2.0.json b/ord_schemas/schema/omh/medication-adherence-percent-2.0.json similarity index 100% rename from schema/omh/medication-adherence-percent-2.0.json rename to ord_schemas/schema/omh/medication-adherence-percent-2.0.json diff --git a/schema/omh/medication-adherence-percent-2.x.json b/ord_schemas/schema/omh/medication-adherence-percent-2.x.json similarity index 100% rename from schema/omh/medication-adherence-percent-2.x.json rename to ord_schemas/schema/omh/medication-adherence-percent-2.x.json diff --git a/schema/omh/medication-dose-unit-1.0.json b/ord_schemas/schema/omh/medication-dose-unit-1.0.json similarity index 100% rename from schema/omh/medication-dose-unit-1.0.json rename to ord_schemas/schema/omh/medication-dose-unit-1.0.json diff --git a/schema/omh/medication-dose-unit-1.x.json b/ord_schemas/schema/omh/medication-dose-unit-1.x.json similarity index 100% rename from schema/omh/medication-dose-unit-1.x.json rename to ord_schemas/schema/omh/medication-dose-unit-1.x.json diff --git a/schema/omh/medication-dose-unit-value-1.0.json b/ord_schemas/schema/omh/medication-dose-unit-value-1.0.json similarity index 100% rename from schema/omh/medication-dose-unit-value-1.0.json rename to ord_schemas/schema/omh/medication-dose-unit-value-1.0.json diff --git a/schema/omh/medication-dose-unit-value-1.1.json b/ord_schemas/schema/omh/medication-dose-unit-value-1.1.json similarity index 100% rename from schema/omh/medication-dose-unit-value-1.1.json rename to ord_schemas/schema/omh/medication-dose-unit-value-1.1.json diff --git a/schema/omh/medication-dose-unit-value-1.x.json b/ord_schemas/schema/omh/medication-dose-unit-value-1.x.json similarity index 100% rename from schema/omh/medication-dose-unit-value-1.x.json rename to ord_schemas/schema/omh/medication-dose-unit-value-1.x.json diff --git a/schema/omh/medication-dose-unit-value-range-1.0.json b/ord_schemas/schema/omh/medication-dose-unit-value-range-1.0.json similarity index 100% rename from schema/omh/medication-dose-unit-value-range-1.0.json rename to ord_schemas/schema/omh/medication-dose-unit-value-range-1.0.json diff --git a/schema/omh/medication-dose-unit-value-range-1.1.json b/ord_schemas/schema/omh/medication-dose-unit-value-range-1.1.json similarity index 100% rename from schema/omh/medication-dose-unit-value-range-1.1.json rename to ord_schemas/schema/omh/medication-dose-unit-value-range-1.1.json diff --git a/schema/omh/medication-dose-unit-value-range-1.x.json b/ord_schemas/schema/omh/medication-dose-unit-value-range-1.x.json similarity index 100% rename from schema/omh/medication-dose-unit-value-range-1.x.json rename to ord_schemas/schema/omh/medication-dose-unit-value-range-1.x.json diff --git a/schema/omh/medication-prescription-1.0.json b/ord_schemas/schema/omh/medication-prescription-1.0.json similarity index 100% rename from schema/omh/medication-prescription-1.0.json rename to ord_schemas/schema/omh/medication-prescription-1.0.json diff --git a/schema/omh/medication-prescription-1.x.json b/ord_schemas/schema/omh/medication-prescription-1.x.json similarity index 100% rename from schema/omh/medication-prescription-1.x.json rename to ord_schemas/schema/omh/medication-prescription-1.x.json diff --git a/schema/omh/medication-prescription-2.0.json b/ord_schemas/schema/omh/medication-prescription-2.0.json similarity index 100% rename from schema/omh/medication-prescription-2.0.json rename to ord_schemas/schema/omh/medication-prescription-2.0.json diff --git a/schema/omh/medication-prescription-2.x.json b/ord_schemas/schema/omh/medication-prescription-2.x.json similarity index 100% rename from schema/omh/medication-prescription-2.x.json rename to ord_schemas/schema/omh/medication-prescription-2.x.json diff --git a/schema/omh/minute-volume-1.0.json b/ord_schemas/schema/omh/minute-volume-1.0.json similarity index 100% rename from schema/omh/minute-volume-1.0.json rename to ord_schemas/schema/omh/minute-volume-1.0.json diff --git a/schema/omh/minute-volume-1.x.json b/ord_schemas/schema/omh/minute-volume-1.x.json similarity index 100% rename from schema/omh/minute-volume-1.x.json rename to ord_schemas/schema/omh/minute-volume-1.x.json diff --git a/schema/omh/minutes-moderate-activity-1.0.json b/ord_schemas/schema/omh/minutes-moderate-activity-1.0.json similarity index 100% rename from schema/omh/minutes-moderate-activity-1.0.json rename to ord_schemas/schema/omh/minutes-moderate-activity-1.0.json diff --git a/schema/omh/minutes-moderate-activity-1.x.json b/ord_schemas/schema/omh/minutes-moderate-activity-1.x.json similarity index 100% rename from schema/omh/minutes-moderate-activity-1.x.json rename to ord_schemas/schema/omh/minutes-moderate-activity-1.x.json diff --git a/schema/omh/orientation-1.0.json b/ord_schemas/schema/omh/orientation-1.0.json similarity index 100% rename from schema/omh/orientation-1.0.json rename to ord_schemas/schema/omh/orientation-1.0.json diff --git a/schema/omh/orientation-1.x.json b/ord_schemas/schema/omh/orientation-1.x.json similarity index 100% rename from schema/omh/orientation-1.x.json rename to ord_schemas/schema/omh/orientation-1.x.json diff --git a/schema/omh/oxygen-saturation-1.0.json b/ord_schemas/schema/omh/oxygen-saturation-1.0.json similarity index 100% rename from schema/omh/oxygen-saturation-1.0.json rename to ord_schemas/schema/omh/oxygen-saturation-1.0.json diff --git a/schema/omh/oxygen-saturation-1.x.json b/ord_schemas/schema/omh/oxygen-saturation-1.x.json similarity index 100% rename from schema/omh/oxygen-saturation-1.x.json rename to ord_schemas/schema/omh/oxygen-saturation-1.x.json diff --git a/schema/omh/oxygen-saturation-2.0.json b/ord_schemas/schema/omh/oxygen-saturation-2.0.json similarity index 100% rename from schema/omh/oxygen-saturation-2.0.json rename to ord_schemas/schema/omh/oxygen-saturation-2.0.json diff --git a/schema/omh/oxygen-saturation-2.x.json b/ord_schemas/schema/omh/oxygen-saturation-2.x.json similarity index 100% rename from schema/omh/oxygen-saturation-2.x.json rename to ord_schemas/schema/omh/oxygen-saturation-2.x.json diff --git a/schema/omh/pace-1.0.json b/ord_schemas/schema/omh/pace-1.0.json similarity index 100% rename from schema/omh/pace-1.0.json rename to ord_schemas/schema/omh/pace-1.0.json diff --git a/schema/omh/pace-1.x.json b/ord_schemas/schema/omh/pace-1.x.json similarity index 100% rename from schema/omh/pace-1.x.json rename to ord_schemas/schema/omh/pace-1.x.json diff --git a/schema/omh/pace-unit-value-1.0.json b/ord_schemas/schema/omh/pace-unit-value-1.0.json similarity index 100% rename from schema/omh/pace-unit-value-1.0.json rename to ord_schemas/schema/omh/pace-unit-value-1.0.json diff --git a/schema/omh/pace-unit-value-1.1.json b/ord_schemas/schema/omh/pace-unit-value-1.1.json similarity index 100% rename from schema/omh/pace-unit-value-1.1.json rename to ord_schemas/schema/omh/pace-unit-value-1.1.json diff --git a/schema/omh/pace-unit-value-1.x.json b/ord_schemas/schema/omh/pace-unit-value-1.x.json similarity index 100% rename from schema/omh/pace-unit-value-1.x.json rename to ord_schemas/schema/omh/pace-unit-value-1.x.json diff --git a/schema/omh/part-of-day-1.0.json b/ord_schemas/schema/omh/part-of-day-1.0.json similarity index 100% rename from schema/omh/part-of-day-1.0.json rename to ord_schemas/schema/omh/part-of-day-1.0.json diff --git a/schema/omh/part-of-day-1.x.json b/ord_schemas/schema/omh/part-of-day-1.x.json similarity index 100% rename from schema/omh/part-of-day-1.x.json rename to ord_schemas/schema/omh/part-of-day-1.x.json diff --git a/schema/omh/patient-medication-schedule-1.0.json b/ord_schemas/schema/omh/patient-medication-schedule-1.0.json similarity index 100% rename from schema/omh/patient-medication-schedule-1.0.json rename to ord_schemas/schema/omh/patient-medication-schedule-1.0.json diff --git a/schema/omh/patient-medication-schedule-1.x.json b/ord_schemas/schema/omh/patient-medication-schedule-1.x.json similarity index 100% rename from schema/omh/patient-medication-schedule-1.x.json rename to ord_schemas/schema/omh/patient-medication-schedule-1.x.json diff --git a/schema/omh/patient-medication-schedule-2.0.json b/ord_schemas/schema/omh/patient-medication-schedule-2.0.json similarity index 100% rename from schema/omh/patient-medication-schedule-2.0.json rename to ord_schemas/schema/omh/patient-medication-schedule-2.0.json diff --git a/schema/omh/patient-medication-schedule-2.x.json b/ord_schemas/schema/omh/patient-medication-schedule-2.x.json similarity index 100% rename from schema/omh/patient-medication-schedule-2.x.json rename to ord_schemas/schema/omh/patient-medication-schedule-2.x.json diff --git a/schema/omh/pharmacy-medication-dispensing-1.0.json b/ord_schemas/schema/omh/pharmacy-medication-dispensing-1.0.json similarity index 100% rename from schema/omh/pharmacy-medication-dispensing-1.0.json rename to ord_schemas/schema/omh/pharmacy-medication-dispensing-1.0.json diff --git a/schema/omh/pharmacy-medication-dispensing-1.x.json b/ord_schemas/schema/omh/pharmacy-medication-dispensing-1.x.json similarity index 100% rename from schema/omh/pharmacy-medication-dispensing-1.x.json rename to ord_schemas/schema/omh/pharmacy-medication-dispensing-1.x.json diff --git a/schema/omh/pharmacy-medication-dispensing-2.0.json b/ord_schemas/schema/omh/pharmacy-medication-dispensing-2.0.json similarity index 100% rename from schema/omh/pharmacy-medication-dispensing-2.0.json rename to ord_schemas/schema/omh/pharmacy-medication-dispensing-2.0.json diff --git a/schema/omh/pharmacy-medication-dispensing-2.x.json b/ord_schemas/schema/omh/pharmacy-medication-dispensing-2.x.json similarity index 100% rename from schema/omh/pharmacy-medication-dispensing-2.x.json rename to ord_schemas/schema/omh/pharmacy-medication-dispensing-2.x.json diff --git a/schema/omh/physical-activity-1.0.json b/ord_schemas/schema/omh/physical-activity-1.0.json similarity index 100% rename from schema/omh/physical-activity-1.0.json rename to ord_schemas/schema/omh/physical-activity-1.0.json diff --git a/schema/omh/physical-activity-1.1.json b/ord_schemas/schema/omh/physical-activity-1.1.json similarity index 100% rename from schema/omh/physical-activity-1.1.json rename to ord_schemas/schema/omh/physical-activity-1.1.json diff --git a/schema/omh/physical-activity-1.2.json b/ord_schemas/schema/omh/physical-activity-1.2.json similarity index 100% rename from schema/omh/physical-activity-1.2.json rename to ord_schemas/schema/omh/physical-activity-1.2.json diff --git a/schema/omh/physical-activity-1.x.json b/ord_schemas/schema/omh/physical-activity-1.x.json similarity index 100% rename from schema/omh/physical-activity-1.x.json rename to ord_schemas/schema/omh/physical-activity-1.x.json diff --git a/schema/omh/plane-angle-unit-value-1.0.json b/ord_schemas/schema/omh/plane-angle-unit-value-1.0.json similarity index 100% rename from schema/omh/plane-angle-unit-value-1.0.json rename to ord_schemas/schema/omh/plane-angle-unit-value-1.0.json diff --git a/schema/omh/plane-angle-unit-value-1.1.json b/ord_schemas/schema/omh/plane-angle-unit-value-1.1.json similarity index 100% rename from schema/omh/plane-angle-unit-value-1.1.json rename to ord_schemas/schema/omh/plane-angle-unit-value-1.1.json diff --git a/schema/omh/plane-angle-unit-value-1.x.json b/ord_schemas/schema/omh/plane-angle-unit-value-1.x.json similarity index 100% rename from schema/omh/plane-angle-unit-value-1.x.json rename to ord_schemas/schema/omh/plane-angle-unit-value-1.x.json diff --git a/schema/omh/position-during-measurement-1.0.json b/ord_schemas/schema/omh/position-during-measurement-1.0.json similarity index 100% rename from schema/omh/position-during-measurement-1.0.json rename to ord_schemas/schema/omh/position-during-measurement-1.0.json diff --git a/schema/omh/position-during-measurement-1.x.json b/ord_schemas/schema/omh/position-during-measurement-1.x.json similarity index 100% rename from schema/omh/position-during-measurement-1.x.json rename to ord_schemas/schema/omh/position-during-measurement-1.x.json diff --git a/schema/omh/reason-single-medication-dose-not-taken-1.0.json b/ord_schemas/schema/omh/reason-single-medication-dose-not-taken-1.0.json similarity index 100% rename from schema/omh/reason-single-medication-dose-not-taken-1.0.json rename to ord_schemas/schema/omh/reason-single-medication-dose-not-taken-1.0.json diff --git a/schema/omh/reason-single-medication-dose-not-taken-1.x.json b/ord_schemas/schema/omh/reason-single-medication-dose-not-taken-1.x.json similarity index 100% rename from schema/omh/reason-single-medication-dose-not-taken-1.x.json rename to ord_schemas/schema/omh/reason-single-medication-dose-not-taken-1.x.json diff --git a/schema/omh/respiratory-rate-1.0.json b/ord_schemas/schema/omh/respiratory-rate-1.0.json similarity index 100% rename from schema/omh/respiratory-rate-1.0.json rename to ord_schemas/schema/omh/respiratory-rate-1.0.json diff --git a/schema/omh/respiratory-rate-1.x.json b/ord_schemas/schema/omh/respiratory-rate-1.x.json similarity index 100% rename from schema/omh/respiratory-rate-1.x.json rename to ord_schemas/schema/omh/respiratory-rate-1.x.json diff --git a/schema/omh/respiratory-rate-2.0.json b/ord_schemas/schema/omh/respiratory-rate-2.0.json similarity index 100% rename from schema/omh/respiratory-rate-2.0.json rename to ord_schemas/schema/omh/respiratory-rate-2.0.json diff --git a/schema/omh/respiratory-rate-2.x.json b/ord_schemas/schema/omh/respiratory-rate-2.x.json similarity index 100% rename from schema/omh/respiratory-rate-2.x.json rename to ord_schemas/schema/omh/respiratory-rate-2.x.json diff --git a/schema/omh/rr-interval-1.0.json b/ord_schemas/schema/omh/rr-interval-1.0.json similarity index 100% rename from schema/omh/rr-interval-1.0.json rename to ord_schemas/schema/omh/rr-interval-1.0.json diff --git a/schema/omh/rr-interval-1.x.json b/ord_schemas/schema/omh/rr-interval-1.x.json similarity index 100% rename from schema/omh/rr-interval-1.x.json rename to ord_schemas/schema/omh/rr-interval-1.x.json diff --git a/schema/omh/schema-id-1.0.json b/ord_schemas/schema/omh/schema-id-1.0.json similarity index 100% rename from schema/omh/schema-id-1.0.json rename to ord_schemas/schema/omh/schema-id-1.0.json diff --git a/schema/omh/schema-id-1.1.json b/ord_schemas/schema/omh/schema-id-1.1.json similarity index 100% rename from schema/omh/schema-id-1.1.json rename to ord_schemas/schema/omh/schema-id-1.1.json diff --git a/schema/omh/schema-id-1.x.json b/ord_schemas/schema/omh/schema-id-1.x.json similarity index 100% rename from schema/omh/schema-id-1.x.json rename to ord_schemas/schema/omh/schema-id-1.x.json diff --git a/schema/omh/single-medication-dose-taken-1.0.json b/ord_schemas/schema/omh/single-medication-dose-taken-1.0.json similarity index 100% rename from schema/omh/single-medication-dose-taken-1.0.json rename to ord_schemas/schema/omh/single-medication-dose-taken-1.0.json diff --git a/schema/omh/single-medication-dose-taken-1.x.json b/ord_schemas/schema/omh/single-medication-dose-taken-1.x.json similarity index 100% rename from schema/omh/single-medication-dose-taken-1.x.json rename to ord_schemas/schema/omh/single-medication-dose-taken-1.x.json diff --git a/schema/omh/sleep-duration-1.0.json b/ord_schemas/schema/omh/sleep-duration-1.0.json similarity index 100% rename from schema/omh/sleep-duration-1.0.json rename to ord_schemas/schema/omh/sleep-duration-1.0.json diff --git a/schema/omh/sleep-duration-1.x.json b/ord_schemas/schema/omh/sleep-duration-1.x.json similarity index 100% rename from schema/omh/sleep-duration-1.x.json rename to ord_schemas/schema/omh/sleep-duration-1.x.json diff --git a/schema/omh/sleep-duration-2.0.json b/ord_schemas/schema/omh/sleep-duration-2.0.json similarity index 100% rename from schema/omh/sleep-duration-2.0.json rename to ord_schemas/schema/omh/sleep-duration-2.0.json diff --git a/schema/omh/sleep-duration-2.x.json b/ord_schemas/schema/omh/sleep-duration-2.x.json similarity index 100% rename from schema/omh/sleep-duration-2.x.json rename to ord_schemas/schema/omh/sleep-duration-2.x.json diff --git a/schema/omh/sleep-episode-1.0.json b/ord_schemas/schema/omh/sleep-episode-1.0.json similarity index 100% rename from schema/omh/sleep-episode-1.0.json rename to ord_schemas/schema/omh/sleep-episode-1.0.json diff --git a/schema/omh/sleep-episode-1.1.json b/ord_schemas/schema/omh/sleep-episode-1.1.json similarity index 100% rename from schema/omh/sleep-episode-1.1.json rename to ord_schemas/schema/omh/sleep-episode-1.1.json diff --git a/schema/omh/sleep-episode-1.x.json b/ord_schemas/schema/omh/sleep-episode-1.x.json similarity index 100% rename from schema/omh/sleep-episode-1.x.json rename to ord_schemas/schema/omh/sleep-episode-1.x.json diff --git a/schema/omh/specimen-source-1.0.json b/ord_schemas/schema/omh/specimen-source-1.0.json similarity index 100% rename from schema/omh/specimen-source-1.0.json rename to ord_schemas/schema/omh/specimen-source-1.0.json diff --git a/schema/omh/specimen-source-1.x.json b/ord_schemas/schema/omh/specimen-source-1.x.json similarity index 100% rename from schema/omh/specimen-source-1.x.json rename to ord_schemas/schema/omh/specimen-source-1.x.json diff --git a/schema/omh/specimen-source-2.0.json b/ord_schemas/schema/omh/specimen-source-2.0.json similarity index 100% rename from schema/omh/specimen-source-2.0.json rename to ord_schemas/schema/omh/specimen-source-2.0.json diff --git a/schema/omh/specimen-source-2.1.json b/ord_schemas/schema/omh/specimen-source-2.1.json similarity index 100% rename from schema/omh/specimen-source-2.1.json rename to ord_schemas/schema/omh/specimen-source-2.1.json diff --git a/schema/omh/specimen-source-2.x.json b/ord_schemas/schema/omh/specimen-source-2.x.json similarity index 100% rename from schema/omh/specimen-source-2.x.json rename to ord_schemas/schema/omh/specimen-source-2.x.json diff --git a/schema/omh/speed-1.0.json b/ord_schemas/schema/omh/speed-1.0.json similarity index 100% rename from schema/omh/speed-1.0.json rename to ord_schemas/schema/omh/speed-1.0.json diff --git a/schema/omh/speed-1.x.json b/ord_schemas/schema/omh/speed-1.x.json similarity index 100% rename from schema/omh/speed-1.x.json rename to ord_schemas/schema/omh/speed-1.x.json diff --git a/schema/omh/speed-unit-value-1.0.json b/ord_schemas/schema/omh/speed-unit-value-1.0.json similarity index 100% rename from schema/omh/speed-unit-value-1.0.json rename to ord_schemas/schema/omh/speed-unit-value-1.0.json diff --git a/schema/omh/speed-unit-value-1.x.json b/ord_schemas/schema/omh/speed-unit-value-1.x.json similarity index 100% rename from schema/omh/speed-unit-value-1.x.json rename to ord_schemas/schema/omh/speed-unit-value-1.x.json diff --git a/schema/omh/step-count-1.0.json b/ord_schemas/schema/omh/step-count-1.0.json similarity index 100% rename from schema/omh/step-count-1.0.json rename to ord_schemas/schema/omh/step-count-1.0.json diff --git a/schema/omh/step-count-1.x.json b/ord_schemas/schema/omh/step-count-1.x.json similarity index 100% rename from schema/omh/step-count-1.x.json rename to ord_schemas/schema/omh/step-count-1.x.json diff --git a/schema/omh/step-count-2.0.json b/ord_schemas/schema/omh/step-count-2.0.json similarity index 100% rename from schema/omh/step-count-2.0.json rename to ord_schemas/schema/omh/step-count-2.0.json diff --git a/schema/omh/step-count-2.x.json b/ord_schemas/schema/omh/step-count-2.x.json similarity index 100% rename from schema/omh/step-count-2.x.json rename to ord_schemas/schema/omh/step-count-2.x.json diff --git a/schema/omh/step-count-3.0.json b/ord_schemas/schema/omh/step-count-3.0.json similarity index 100% rename from schema/omh/step-count-3.0.json rename to ord_schemas/schema/omh/step-count-3.0.json diff --git a/schema/omh/step-count-3.x.json b/ord_schemas/schema/omh/step-count-3.x.json similarity index 100% rename from schema/omh/step-count-3.x.json rename to ord_schemas/schema/omh/step-count-3.x.json diff --git a/schema/omh/systolic-blood-pressure-1.0.json b/ord_schemas/schema/omh/systolic-blood-pressure-1.0.json similarity index 100% rename from schema/omh/systolic-blood-pressure-1.0.json rename to ord_schemas/schema/omh/systolic-blood-pressure-1.0.json diff --git a/schema/omh/systolic-blood-pressure-1.1.json b/ord_schemas/schema/omh/systolic-blood-pressure-1.1.json similarity index 100% rename from schema/omh/systolic-blood-pressure-1.1.json rename to ord_schemas/schema/omh/systolic-blood-pressure-1.1.json diff --git a/schema/omh/systolic-blood-pressure-1.x.json b/ord_schemas/schema/omh/systolic-blood-pressure-1.x.json similarity index 100% rename from schema/omh/systolic-blood-pressure-1.x.json rename to ord_schemas/schema/omh/systolic-blood-pressure-1.x.json diff --git a/schema/omh/temperature-unit-value-1.0.json b/ord_schemas/schema/omh/temperature-unit-value-1.0.json similarity index 100% rename from schema/omh/temperature-unit-value-1.0.json rename to ord_schemas/schema/omh/temperature-unit-value-1.0.json diff --git a/schema/omh/temperature-unit-value-1.x.json b/ord_schemas/schema/omh/temperature-unit-value-1.x.json similarity index 100% rename from schema/omh/temperature-unit-value-1.x.json rename to ord_schemas/schema/omh/temperature-unit-value-1.x.json diff --git a/schema/omh/temporal-relationship-to-meal-1.0.json b/ord_schemas/schema/omh/temporal-relationship-to-meal-1.0.json similarity index 100% rename from schema/omh/temporal-relationship-to-meal-1.0.json rename to ord_schemas/schema/omh/temporal-relationship-to-meal-1.0.json diff --git a/schema/omh/temporal-relationship-to-meal-1.1.json b/ord_schemas/schema/omh/temporal-relationship-to-meal-1.1.json similarity index 100% rename from schema/omh/temporal-relationship-to-meal-1.1.json rename to ord_schemas/schema/omh/temporal-relationship-to-meal-1.1.json diff --git a/schema/omh/temporal-relationship-to-meal-1.2.json b/ord_schemas/schema/omh/temporal-relationship-to-meal-1.2.json similarity index 100% rename from schema/omh/temporal-relationship-to-meal-1.2.json rename to ord_schemas/schema/omh/temporal-relationship-to-meal-1.2.json diff --git a/schema/omh/temporal-relationship-to-meal-1.x.json b/ord_schemas/schema/omh/temporal-relationship-to-meal-1.x.json similarity index 100% rename from schema/omh/temporal-relationship-to-meal-1.x.json rename to ord_schemas/schema/omh/temporal-relationship-to-meal-1.x.json diff --git a/schema/omh/temporal-relationship-to-physical-activity-1.0.json b/ord_schemas/schema/omh/temporal-relationship-to-physical-activity-1.0.json similarity index 100% rename from schema/omh/temporal-relationship-to-physical-activity-1.0.json rename to ord_schemas/schema/omh/temporal-relationship-to-physical-activity-1.0.json diff --git a/schema/omh/temporal-relationship-to-physical-activity-1.x.json b/ord_schemas/schema/omh/temporal-relationship-to-physical-activity-1.x.json similarity index 100% rename from schema/omh/temporal-relationship-to-physical-activity-1.x.json rename to ord_schemas/schema/omh/temporal-relationship-to-physical-activity-1.x.json diff --git a/schema/omh/temporal-relationship-to-sleep-1.0.json b/ord_schemas/schema/omh/temporal-relationship-to-sleep-1.0.json similarity index 100% rename from schema/omh/temporal-relationship-to-sleep-1.0.json rename to ord_schemas/schema/omh/temporal-relationship-to-sleep-1.0.json diff --git a/schema/omh/temporal-relationship-to-sleep-1.x.json b/ord_schemas/schema/omh/temporal-relationship-to-sleep-1.x.json similarity index 100% rename from schema/omh/temporal-relationship-to-sleep-1.x.json rename to ord_schemas/schema/omh/temporal-relationship-to-sleep-1.x.json diff --git a/schema/omh/time-frame-1.0.json b/ord_schemas/schema/omh/time-frame-1.0.json similarity index 100% rename from schema/omh/time-frame-1.0.json rename to ord_schemas/schema/omh/time-frame-1.0.json diff --git a/schema/omh/time-frame-1.x.json b/ord_schemas/schema/omh/time-frame-1.x.json similarity index 100% rename from schema/omh/time-frame-1.x.json rename to ord_schemas/schema/omh/time-frame-1.x.json diff --git a/schema/omh/time-interval-1.0.json b/ord_schemas/schema/omh/time-interval-1.0.json similarity index 100% rename from schema/omh/time-interval-1.0.json rename to ord_schemas/schema/omh/time-interval-1.0.json diff --git a/schema/omh/time-interval-1.x.json b/ord_schemas/schema/omh/time-interval-1.x.json similarity index 100% rename from schema/omh/time-interval-1.x.json rename to ord_schemas/schema/omh/time-interval-1.x.json diff --git a/schema/omh/total-sleep-time-1.0.json b/ord_schemas/schema/omh/total-sleep-time-1.0.json similarity index 100% rename from schema/omh/total-sleep-time-1.0.json rename to ord_schemas/schema/omh/total-sleep-time-1.0.json diff --git a/schema/omh/total-sleep-time-1.x.json b/ord_schemas/schema/omh/total-sleep-time-1.x.json similarity index 100% rename from schema/omh/total-sleep-time-1.x.json rename to ord_schemas/schema/omh/total-sleep-time-1.x.json diff --git a/schema/omh/unit-value-1.0.json b/ord_schemas/schema/omh/unit-value-1.0.json similarity index 100% rename from schema/omh/unit-value-1.0.json rename to ord_schemas/schema/omh/unit-value-1.0.json diff --git a/schema/omh/unit-value-1.x.json b/ord_schemas/schema/omh/unit-value-1.x.json similarity index 100% rename from schema/omh/unit-value-1.x.json rename to ord_schemas/schema/omh/unit-value-1.x.json diff --git a/schema/omh/unit-value-range-1.0.json b/ord_schemas/schema/omh/unit-value-range-1.0.json similarity index 100% rename from schema/omh/unit-value-range-1.0.json rename to ord_schemas/schema/omh/unit-value-range-1.0.json diff --git a/schema/omh/unit-value-range-1.x.json b/ord_schemas/schema/omh/unit-value-range-1.x.json similarity index 100% rename from schema/omh/unit-value-range-1.x.json rename to ord_schemas/schema/omh/unit-value-range-1.x.json diff --git a/schema/omh/ventilation-cycle-time-1.0.json b/ord_schemas/schema/omh/ventilation-cycle-time-1.0.json similarity index 100% rename from schema/omh/ventilation-cycle-time-1.0.json rename to ord_schemas/schema/omh/ventilation-cycle-time-1.0.json diff --git a/schema/omh/ventilation-cycle-time-1.x.json b/ord_schemas/schema/omh/ventilation-cycle-time-1.x.json similarity index 100% rename from schema/omh/ventilation-cycle-time-1.x.json rename to ord_schemas/schema/omh/ventilation-cycle-time-1.x.json diff --git a/schema/omh/volume-unit-value-1.0.json b/ord_schemas/schema/omh/volume-unit-value-1.0.json similarity index 100% rename from schema/omh/volume-unit-value-1.0.json rename to ord_schemas/schema/omh/volume-unit-value-1.0.json diff --git a/schema/omh/volume-unit-value-1.1.json b/ord_schemas/schema/omh/volume-unit-value-1.1.json similarity index 100% rename from schema/omh/volume-unit-value-1.1.json rename to ord_schemas/schema/omh/volume-unit-value-1.1.json diff --git a/schema/omh/volume-unit-value-1.x.json b/ord_schemas/schema/omh/volume-unit-value-1.x.json similarity index 100% rename from schema/omh/volume-unit-value-1.x.json rename to ord_schemas/schema/omh/volume-unit-value-1.x.json diff --git a/ord_schemas/schema/ros4hc/Notes.txt b/ord_schemas/schema/ros4hc/Notes.txt new file mode 100644 index 00000000..dcb57050 --- /dev/null +++ b/ord_schemas/schema/ros4hc/Notes.txt @@ -0,0 +1,4 @@ +What is required in signal Info? e.g. Sensor configuration, lightning configuration etc. +How to know from ros messages which signal is coming from? Is there something like a tag?v -> Id in ros are message name + +EOG_Info.msg stilll has Units as field -> should be in deviceInfo \ No newline at end of file diff --git a/schema/ros4hc/bcg-1.x.json b/ord_schemas/schema/ros4hc/bcg-1.x.json similarity index 60% rename from schema/ros4hc/bcg-1.x.json rename to ord_schemas/schema/ros4hc/bcg-1.x.json index eab58720..42ec11d6 100644 --- a/schema/ros4hc/bcg-1.x.json +++ b/ord_schemas/schema/ros4hc/bcg-1.x.json @@ -14,37 +14,41 @@ }, "properties": { - "bcg_sensor_readings": { - "description": "BCG waveform segments", + "session_id": { + "description": "match BCGInfo's session_id (if used)", + "type": "string" + }, + + "sample_size": { + "type": "integer" + }, + + "bcg": { + "description": "Raw or filtered BCG values", "type": "array", "items": { "type": "number" } }, - "unit": { - "type": "string", - "enum": ["mV", "uV", "V"] - }, - "error_message": { - "type": "string" + + "signal_quality": { + "description": "From 0 (poor) to 1 [%]", + "type": "array", + "items": { + "type": "number", + "maximum": 1, + "minimum": 0 + } }, + "effective_time_frame": { "description": "The time interval at which, or time interval during which the measurement is asserted as being valid.", - "allOf": [ - { - "$ref": "#/definitions/time_frame" - }, - { - "required": [ - "time_interval" - ] - } - ] + "$ref": "#/definitions/time_frame" } }, "required": [ - "bcg_sensor_readings", - "unit", + "session_id", + "bcg", "effective_time_frame" ] } \ No newline at end of file diff --git a/ord_schemas/schema/ros4hc/bcg-info-1.x.json b/ord_schemas/schema/ros4hc/bcg-info-1.x.json new file mode 100644 index 00000000..5182c8e3 --- /dev/null +++ b/ord_schemas/schema/ros4hc/bcg-info-1.x.json @@ -0,0 +1,62 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + + "title": "BCG Data Series", + "type": "object", + "description": "This schema represents a bcg data series, i.e., an array of measures that share the same header.", + + "definitions": { + "sensor_device_header": { + "$ref": "sensor-device-header-1.x.json" + } + }, + + "allOf": [ + {"$ref": "#/definitions/sensor_device_header"}, + { + "type": "object", + "properties": { + "sensor_configuration": { + "type": "object", + "properties": { + + "sensor_placement": { + "description": "Sensor Placements", + "type": "string", + "enum": [ + "Unknown", "Chest", "Back", "Mattress", "Chair", "Feet", "Wrist", "Arm", "Desk", "Clothing", "Custom" + ] + }, + + "sensing_direction": { + "description": "Axis along which BCG is measured", + "type": "string", + "enum": [ + "Dorso Ventral", "Longitudinal", "Medio Lateral", "Unknown" + ] + }, + + "sensing_modality": { + "description": "Type of Sensor used", + "type": "string", + "enum": [ + "Piezoelectric Film", "Forceplate", "Accelerometer", "Piezoelectric crystal", "Unknown" + ] + }, + + "measurement_system": { + "description": "System Type", + "type": "string", + "enum": [ + "Starr", "Nickerson", "Dock", "Other", "Unknown" + ] + } + }, + "required": [ + "sensor_placement" + ] + } + } + } + ] +} diff --git a/schema/ros4hc/ecg-lead-1.x.json b/ord_schemas/schema/ros4hc/ecg-1.x.json similarity index 54% rename from schema/ros4hc/ecg-lead-1.x.json rename to ord_schemas/schema/ros4hc/ecg-1.x.json index d868318f..ce2891b5 100644 --- a/schema/ros4hc/ecg-lead-1.x.json +++ b/ord_schemas/schema/ros4hc/ecg-1.x.json @@ -14,8 +14,21 @@ }, "properties": { - "ecg_lead_data": { - "description": "EDA signal amplitude", + "session_id": { + "description": "match ECGInfo's session_id (if used)", + "type": "string" + }, + + "channel_size": { + "type": "integer" + }, + + "sample_size": { + "type": "integer" + }, + + "ecg": { + "description": "Raw or filtered ECG values", "type": "array", "items": { "type": "number" @@ -23,36 +36,24 @@ }, "signal_quality": { - "description": "Signal quality score (0-1)", - "type:": "array", + "description": "From 0 (poor) to 1 [%]", + "type": "array", "items": { "type": "number", - "minimum": 0, - "maximum": 1 + "maximum": 1, + "minimum": 0 } }, - - "unit": { - "type": "string", - "enum": ["µV", "mV"] - }, "effective_time_frame": { - "allOf": [ - { - "$ref": "#/definitions/time_frame" - }, - { - "required": ["time_interval"] - } - ] + "description": "The time interval at which, or time interval during which the measurement is asserted as being valid.", + "$ref": "#/definitions/time_frame" } }, "required": [ - "ecg_lead_data", + "ecg", "signal_quality", - "unit", "effective_time_frame" ] } diff --git a/ord_schemas/schema/ros4hc/ecg-info-1.x.json b/ord_schemas/schema/ros4hc/ecg-info-1.x.json new file mode 100644 index 00000000..c17b9c58 --- /dev/null +++ b/ord_schemas/schema/ros4hc/ecg-info-1.x.json @@ -0,0 +1,55 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + + "title": "ECG Data Series", + "type": "object", + "description": "This schema represents a ecg data series, i.e., an array of measures that share the same header.", + + "definitions": { + "sensor_device_header": { + "$ref": "sensor-device-header-1.x.json" + } + }, + + + "allOf": [ + {"$ref": "#/definitions/sensor_device_header"}, + { + "type": "object", + "properties": { + "electrode_configuration": { + "type": "object", + "properties": { + + "electrode_placement": { + "description": "Support multiple electrode placements", + "type": "array", + "items": { + "type": "string", + "enum": [ + "Unknown", "Placement Limb", "Wrist Ankle", "Chest", "Torso", "Abdomen", "Back", "Ear", "Neck", "Left Arm", "Right Arm", "Left Leg", "Right Leg", "Custom" + ] + } + }, + + "lead_type": { + "description": "Standard ECG lead names according to clinical conventions (12-lead and extended leads).", + "url": "https://en.wikipedia.org/wiki/Electrocardiography#12-lead_ECG", + "type": "string", + "enum": [ + "I", "II", "III", + "aVR", "aVL", "aVF", + "V1", "V2", "V3", "V4", "V5", "V6", + "Unknown", "Custom" + ] + } + }, + + "required": [ + "electrode_placement" + ] + } + } + } + ] +} diff --git a/ord_schemas/schema/ros4hc/eda-1.x.json b/ord_schemas/schema/ros4hc/eda-1.x.json new file mode 100644 index 00000000..7c4bc061 --- /dev/null +++ b/ord_schemas/schema/ros4hc/eda-1.x.json @@ -0,0 +1,72 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "EDA Data", + "description": "This schema represents eda waveform data", + "type": "object", + + "definitions": { + "time_frame": { + "$ref": "time-frame-1.0.json" + }, + "time_interval": { + "$ref": "time-interval-1.0.json" + } + }, + + "properties": { + "session_id": { + "description": "match EdaInfo's session_id (if used)", + "type": "string" + }, + + "sample_size": { + "type": "integer" + }, + + "scl": { + "description": "Skin Conductance Level (tonic)", + "type": "array", + "items": { + "type": "number" + } + }, + + "scr": { + "description": "Skin Conductance Response (phasic)", + "type": "array", + "items": { + "type": "number" + } + }, + + "eda": { + "description": "Sum of signals (scl + scr)", + "type": "array", + "items": { + "type": "number" + } + }, + + "signal_quality": { + "description": "From 0 (poor) to 1 [%]", + "type": "array", + "items": { + "type": "number", + "maximum": 1, + "minimum": 0 + } + }, + + "effective_time_frame": { + "description": "The time interval at which, or time interval during which the measurement is asserted as being valid.", + "$ref": "#/definitions/time_frame" + } + }, + "required": [ + "scl", + "scr", + "eda", + "signal_quality", + "effective_time_frame" + ] +} \ No newline at end of file diff --git a/ord_schemas/schema/ros4hc/eda-info-1.x.json b/ord_schemas/schema/ros4hc/eda-info-1.x.json new file mode 100644 index 00000000..425aad5d --- /dev/null +++ b/ord_schemas/schema/ros4hc/eda-info-1.x.json @@ -0,0 +1,58 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + + "title": "EdaInfo Data Series", + "type": "object", + "description": "This schema represents a eda data series, i.e., an array of measures that share the same header.", + + "definitions": { + "sensor_device_header": { + "$ref": "sensor-device-header-1.x.json" + } + }, + + + "allOf": [ + {"$ref": "#/definitions/sensor_device_header"}, + { + "type": "object", + "properties": { + "electrode_configuration": { + "type": "object", + "properties": { + "electrode_placement": { + "description": "Support multiple electrode placements", + "type": "array", + "items": { + "type": "string", + "enum": [ + "Unknown", "Palm", "Fingertip", "Wrist", "Forearm", "Sole", "Shoulder", "Custom" + ] + } + }, + + "electrode_type": { + "type": "string", + "enum": ["Unknown", "Surface", "Intracutaneous", "Custom"] + }, + + "measuring_technique": { + "type": "string", + "enum": ["Unknown", "Endosomatic", "Exosomatic", "Custom"] + }, + + "current_form": { + "type": "string", + "enum": ["Unknown", "DC", "AC"] + } + }, + + "required": [ + "electrode_placement" + ] + } + } + } + ] + +} diff --git a/ord_schemas/schema/ros4hc/eeg-1.x.json b/ord_schemas/schema/ros4hc/eeg-1.x.json new file mode 100644 index 00000000..5885a0a2 --- /dev/null +++ b/ord_schemas/schema/ros4hc/eeg-1.x.json @@ -0,0 +1,59 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "EEG Data", + "description": "This schema represents EEG waveform segments with associated signal quality and recording timestamps.", + "type": "object", + + "definitions": { + "time_frame": { + "$ref": "time-frame-1.0.json" + }, + "time_interval": { + "$ref": "time-interval-1.0.json" + } + }, + + "properties": { + "session_id": { + "description": "match EEGInfo's session_id (if used)", + "type": "string" + }, + + "channel_size": { + "type": "integer" + }, + + "sample_size": { + "type": "integer" + }, + + "eeg": { + "description": "Raw or filtered EEG values", + "type": "array", + "items": { + "type": "number" + } + }, + + "signal_quality": { + "description": "From 0 (poor) to 1 [%]", + "type": "array", + "items": { + "type": "number", + "maximum": 1, + "minimum": 0 + } + }, + + "effective_time_frame": { + "description": "The time interval at which, or time interval during which the measurement is asserted as being valid.", + "$ref": "#/definitions/time_frame" + } + }, + + "required": [ + "eeg", + "signal_quality", + "effective_time_frame" + ] +} diff --git a/ord_schemas/schema/ros4hc/eeg-info-1.x.json b/ord_schemas/schema/ros4hc/eeg-info-1.x.json new file mode 100644 index 00000000..125c8d9e --- /dev/null +++ b/ord_schemas/schema/ros4hc/eeg-info-1.x.json @@ -0,0 +1,59 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + + "title": "EEGInfo Data Series", + "type": "object", + "description": "This schema represents a eeg data series, i.e., an array of measures that share the same header.", + + "definitions": { + "sensor_device_header": { + "$ref": "sensor-device-header-1.x.json" + } + }, + + + "allOf": [ + {"$ref": "#/definitions/sensor_device_header"}, + + { + "type": "object", + "properties": { + "electrode_configuration": { + "type": "object", + "properties": { + + "electrode_placement": { + "description": "Support multiple electrode placements", + "type": "array", + "items": { + "type": "string", + "enum": [ + "Unknown", "Method 1020", "Method 1010", "Method 105", "Custom" + ] + } + }, + + "electrode_site": { + "type": "string", + "enum": ["Unknown", "FP1", "FP2", "F3", "F4", "C3", "C4", "P3", "P4", "O1", "O2", "F7", "F8", "T3", "T4", "T5", "T6", "FZ", "CZ", "PZ", "OZ", "Custom"] + }, + + "electrode_physical_type": { + "type": "string", + "enum": ["Unknown", "AgCl", "Gold Cup", "Dry", "Wet", "Hydrogel", "Microneedle", "Custom"] + }, + + "signal_mode": { + "type": "string", + "enum": ["Unknown", "Surface", "Intracranial", "Custom"] + } + }, + + "required": [ + "electrode_placement" + ] + } + } + } + ] +} diff --git a/ord_schemas/schema/ros4hc/emg-1.x.json b/ord_schemas/schema/ros4hc/emg-1.x.json new file mode 100644 index 00000000..0309328e --- /dev/null +++ b/ord_schemas/schema/ros4hc/emg-1.x.json @@ -0,0 +1,59 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "EMG Data", + "description": "This schema represents EMG waveform segments with associated signal quality and recording timestamps.", + "type": "object", + + "definitions": { + "time_frame": { + "$ref": "time-frame-1.0.json" + }, + "time_interval": { + "$ref": "time-interval-1.0.json" + } + }, + + "properties": { + "session_id": { + "description": "match EMGInfo's session_id (if used)", + "type": "string" + }, + + "channel_size": { + "type": "integer" + }, + + "sample_size": { + "type": "integer" + }, + + "emg": { + "description": "Raw or filtered EMG values", + "type": "array", + "items": { + "type": "number" + } + }, + + "signal_quality": { + "description": "From 0 (poor) to 1 [%]", + "type": "array", + "items": { + "type": "number", + "maximum": 1, + "minimum": 0 + } + }, + + "effective_time_frame": { + "description": "The time interval at which, or time interval during which the measurement is asserted as being valid.", + "$ref": "#/definitions/time_frame" + } + }, + + "required": [ + "emg", + "signal_quality", + "effective_time_frame" + ] +} diff --git a/ord_schemas/schema/ros4hc/emg-info-1.x.json b/ord_schemas/schema/ros4hc/emg-info-1.x.json new file mode 100644 index 00000000..157a92f5 --- /dev/null +++ b/ord_schemas/schema/ros4hc/emg-info-1.x.json @@ -0,0 +1,57 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + + "title": "EMGInfo Data Series", + "type": "object", + "description": "This schema represents a emg data series, i.e., an array of measures that share the same header.", + + "definitions": { + "sensor_device_header": { + "$ref": "sensor-device-header-1.x.json" + } + }, + + + "allOf": [ + {"$ref": "#/definitions/sensor_device_header"}, + + { + "type": "object", + "properties": { + "electrode_configuration": { + "type": "object", + "properties": { + + "electrode_placement": { + "description": "Support multiple electrode placements", + "type": "array", + "items": { + "type": "string", + "enum": ["Unknown", "Biceps", "Triceps", "Forearm", "Calf", "Back", "Abdomen", "Quadriceps", "Hamstring", "Face", "Neck", "Custom"] + } + }, + + "electrode_type": { + "type": "string", + "enum": ["Unknown", "Surface", "Needle", "Wire", "Interferential", "Custom"] + }, + + "external_device": { + "type": "string", + "enum": ["Unknown", "TENS", "FES", "EMG Trigger", "Custom"] + }, + + "signal_mode": { + "type": "string", + "enum": ["Unknown", "Surface", "Intramuscular", "Custom"] + } + }, + + "required": [ + "electrode_placement" + ] + } + } + } + ] +} diff --git a/ord_schemas/schema/ros4hc/eog-1.x.json b/ord_schemas/schema/ros4hc/eog-1.x.json new file mode 100644 index 00000000..d5c643fa --- /dev/null +++ b/ord_schemas/schema/ros4hc/eog-1.x.json @@ -0,0 +1,59 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "EOG Data", + "description": "This schema represents EOG waveform segments with associated signal quality and recording timestamps.", + "type": "object", + + "definitions": { + "time_frame": { + "$ref": "time-frame-1.0.json" + }, + "time_interval": { + "$ref": "time-interval-1.0.json" + } + }, + + "properties": { + "session_id": { + "description": "match EOGInfo's session_id (if used)", + "type": "string" + }, + + "channel_size": { + "type": "integer" + }, + + "sample_size": { + "type": "integer" + }, + + "eog": { + "description": "Raw or filtered EOG values", + "type": "array", + "items": { + "type": "number" + } + }, + + "signal_quality": { + "description": "From 0 (poor) to 1 [%]", + "type": "array", + "items": { + "type": "number", + "maximum": 1, + "minimum": 0 + } + }, + + "effective_time_frame": { + "description": "The time interval at which, or time interval during which the measurement is asserted as being valid.", + "$ref": "#/definitions/time_frame" + } + }, + + "required": [ + "eog", + "signal_quality", + "effective_time_frame" + ] +} diff --git a/ord_schemas/schema/ros4hc/eog-info-1.x.json b/ord_schemas/schema/ros4hc/eog-info-1.x.json new file mode 100644 index 00000000..e4e7ec49 --- /dev/null +++ b/ord_schemas/schema/ros4hc/eog-info-1.x.json @@ -0,0 +1,91 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + + "title": "EOGInfo Data Series", + "type": "object", + "description": "This schema represents a eog data series, i.e., an array of measures that share the same header.", + + "definitions": { + "sensor_device_header": { + "$ref": "sensor-device-header-1.x.json" + }, + "unit_value": { + "$ref": "unit-value-1.0.json" + } + }, + + + "allOf": [ + {"$ref": "#/definitions/sensor_device_header"}, + + { + "type": "object", + "properties": { + "electrode_configuration": { + "type": "object", + "properties": { + + "electrode_placement": { + "description": "Support multiple electrode placements", + "type": "array", + "items": { + "type": "string", + "enum": ["Unknown", "Left Eye", "Right Eye", "Forehead", "Temple Left", "Temple Right", "Above Eye", "Below Eye", "Custom"] + } + }, + + "lead_type": { + "type": "string", + "enum": ["Unknown", "Bipolar Horizontal", "Bipolar Vertical", "Unipolar", "Corneal Retinal", "Custom"] + }, + + "signal_mode": { + "type": "string", + "enum": ["Unknown", "Surface", "Bipolar", "Unipolar", "Corneal Retinal", "Intracular", "Derived", "Custom"] + } + }, + "required": [ + "electrode_placement" + ] + }, + "lightning_condition":{ + "type": "object", + "properties": { + "lightsource": { + "type": "string", + "enum": ["Unknown", "Tungsten", "Halogen", "LED", "Fluorescent", "Sunlight", "Custom"] + }, + + "gazefield": { + "allOf": [ + { + "$ref": "#/definitions/unit_value" + }, + { + "type": "object", + "properties": { + "unit": { + "enum": [ + "cd/m^2" + ] + } + } + } + ] + }, + + "light_dark_phase" : { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "lightsource" + ] + } + } + } + ] +} diff --git a/ord_schemas/schema/ros4hc/healthcare-filterbase-1.x.json b/ord_schemas/schema/ros4hc/healthcare-filterbase-1.x.json new file mode 100644 index 00000000..e69de29b diff --git a/ord_schemas/schema/ros4hc/icg-1.x.json b/ord_schemas/schema/ros4hc/icg-1.x.json new file mode 100644 index 00000000..245035f8 --- /dev/null +++ b/ord_schemas/schema/ros4hc/icg-1.x.json @@ -0,0 +1,54 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ICG Data", + "description": "This schema represents ICG waveform data from a specific lead with signal quality and temporal context", + "type": "object", + + "definitions": { + "time_frame": { + "$ref": "time-frame-1.0.json" + }, + "time_interval": { + "$ref": "time-interval-1.0.json" + } + }, + + "properties": { + "session_id": { + "description": "match ICGInfo's session_id (if used)", + "type": "string" + }, + + "sample_size": { + "type": "integer" + }, + + "icg": { + "description": "Raw or filtered ICG values", + "type": "array", + "items": { + "type": "number" + } + }, + + "signal_quality": { + "description": "From 0 (poor) to 1 [%]", + "type": "array", + "items": { + "type": "number", + "maximum": 1, + "minimum": 0 + } + }, + + "effective_time_frame": { + "description": "The time interval at which, or time interval during which the measurement is asserted as being valid.", + "$ref": "#/definitions/time_frame" + } + }, + "required": [ + "icg", + "signal_quality", + "effective_time_frame" + ] +} \ No newline at end of file diff --git a/ord_schemas/schema/ros4hc/icg-info-1.x.json b/ord_schemas/schema/ros4hc/icg-info-1.x.json new file mode 100644 index 00000000..24ba152a --- /dev/null +++ b/ord_schemas/schema/ros4hc/icg-info-1.x.json @@ -0,0 +1,52 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + + "title": "ICGInfo Data Series", + "type": "object", + "description": "This schema represents a icg data series, i.e., an array of measures that share the same header.", + + "definitions": { + "sensor_device_header": { + "$ref": "sensor-device-header-1.x.json" + } + }, + + + "allOf": [ + {"$ref": "#/definitions/sensor_device_header"}, + + { + "type": "object", + "properties": { + "electrode_configuration": { + "type": "object", + "properties": { + + "electrode_placement": { + "description": "Support multiple electrode placements", + "type": "array", + "items": { + "type": "string", + "enum": ["Unknown", "Chest", "Back", "Left Arm", "Right Arm", "Left Leg", "Right Leg", "Neck", "Abdomen", "Custom"] + } + }, + + "lead_type": { + "type": "string", + "enum": ["Unknown", "Transthoracic", "Four Electrode", "Six Electrode", "Spot", "Custom"] + }, + + "technique": { + "type": "string", + "enum": ["Unknown", "Tetrapolar", "Octapolar", "Custom"] + } + }, + + "required": [ + "electrode_placement" + ] + } + } + } + ] +} diff --git a/ord_schemas/schema/ros4hc/metadata/device-identity-1.x.json b/ord_schemas/schema/ros4hc/metadata/device-identity-1.x.json new file mode 100644 index 00000000..097f0a6e --- /dev/null +++ b/ord_schemas/schema/ros4hc/metadata/device-identity-1.x.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://w3id.org/ieee/ros4hc-schema/device_identity.json", + "title": "Device Identity Metadata", + "description": "This schema represents the metadata of an device", + "type": "object", + "properties": { + "device_manufacturer": { + "type": "string" + }, + "device_name": { + "type": "string" + }, + "device_type": { + "type": "string" + }, + "device_serial_number": { + "type": "string" + } + }, + "required": [ + "device_serial_number" + ] +} diff --git a/ord_schemas/schema/ros4hc/metadata/measurement-specification-1.x.json b/ord_schemas/schema/ros4hc/metadata/measurement-specification-1.x.json new file mode 100644 index 00000000..dbd7556a --- /dev/null +++ b/ord_schemas/schema/ros4hc/metadata/measurement-specification-1.x.json @@ -0,0 +1,31 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://w3id.org/ieee/ros4hc-schema/measurement_specification.json", + "title": "Metadata of a specific measurement from an device", + "description": "This schema represents the metadata of an device and its specific measurement", + "type": "object", + "definitions": { + "min_max_value": { + "$ref": "min-max-unit-value-1.x.json" + } + }, + "properties": { + "accuracy": { + "type": "number" + }, + "measuring_value_range":{ + "$ref": "#/definitions/min_max_value" + }, + "gain": { + "type": "number" + }, + "adc_resolution": { + "type": "integer" + }, + "resolution": { + "type": "number" + } + }, + "required": [ + ] +} diff --git a/ord_schemas/schema/ros4hc/metadata/operating-environment-1.x.json b/ord_schemas/schema/ros4hc/metadata/operating-environment-1.x.json new file mode 100644 index 00000000..66c6e379 --- /dev/null +++ b/ord_schemas/schema/ros4hc/metadata/operating-environment-1.x.json @@ -0,0 +1,73 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://w3id.org/ieee/ros4hc-schema/operating_environment.json", + "title": "Operating environment of an device Metadata", + "description": "This schema represents the metadata of an device and its operating environment", + "type": "object", + "definitions": { + "unit_value": { + "$ref": "unit-value-1.x.json" + }, + "min_max_value": { + "$ref": "min-max-unit-value-1.x.json" + } + }, + "properties": { + "battery_level": { + "allOf": [ + { + "$ref": "#/definitions/unit_value" + }, + { + "type": "object", + "properties": { + "unit": { + "enum": [ + "%" + ] + } + } + } + ] + }, + "operation_temperature": { + "$ref": "#/definitions/min_max_value" + }, + "maximal_relative_humidity": { + "allOf": [ + { + "$ref": "#/definitions/unit_value" + }, + { + "type": "object", + "properties": { + "unit": { + "enum": [ + "%" + ] + } + } + } + ] + }, + "atmospheric_pressure": { + "allOf": [ + { + "$ref": "#/definitions/min_max_value" + }, + { + "type": "object", + "properties": { + "unit": { + "enum": [ + "atm" + ] + } + } + } + ] + } + }, + "required": [ + ] +} diff --git a/ord_schemas/schema/ros4hc/metadata/ord-default-header-1.x.json b/ord_schemas/schema/ros4hc/metadata/ord-default-header-1.x.json new file mode 100644 index 00000000..bb3f03a5 --- /dev/null +++ b/ord_schemas/schema/ros4hc/metadata/ord-default-header-1.x.json @@ -0,0 +1,77 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://w3id.org/ieee/ieee-1752-schema/header.json", + "title": "Header", + "description": "This schema represents the header of a data point or data series.", + "type": "object", + "definitions": { + "date_time": { + "$ref": "date-time-1.0.json" + }, + "schema_id": { + "$ref": "schema-id-1.0.json" + }, + "frequency_unit_value": { + "$ref": "frequency-unit-value-1.0.json" + } + }, + "properties": { + "uuid": { + "description": "The identifier of this data point: a globally unique value, generated using RFC 4122 approach.", + "references": [ + { + "description": "A Universally Unique IDentifier (UUID) URN Namespace", + "url": "https://tools.ietf.org/html/rfc4122" + } + ], + "type": "string", + "format": "uuid" + }, + "schema_id": { + "description": "The schema identifier of the body of the data point or data series.", + "$ref": "#/definitions/schema_id" + }, + "source_creation_date_time": { + "description": "The date time (timestamp) when this datapoint or data series was created at the original source. If the datapoint or data series is aggregated later, the date does not change. If the datapoint or data series is recalculated later (e.g., using a different algorithm), a new datapoint or data series is created with a different id and creation date.", + "$ref": "#/definitions/date_time" + }, + "modality": { + "description": "The modality whereby the measure is obtained, e.g., sensed or self-reported", + "type": "string", + "enum": [ + "sensed", + "self-reported" + ] + }, + "acquisition_rate": { + "description": "The rate at which measures are acquired.", + "$ref": "#/definitions/frequency_unit_value" + }, + "external_datasheets": { + "description": "Reference(s) to external documentation regarding the component(s) relevant to describe the collection, computation, use, etc. of this datapoint or data series, e.g., software, algorithm, study protocol, etc.", + "type": "array", + "items": { + "type": "object", + "properties": { + "datasheet_type": { + "description": "The type of component described or documented by the referenced datasheet, e.g., software, hardware, study.", + "type": "string" + }, + "datasheet_reference": { + "description": "International Resource Identifier (IRI) of applicable datasheet(s). The expectation is that the IRI will convey resolvable location and access information for the resource identified resource.", + "type": "string", + "format": "iri" + } + }, + "required": [ + "datasheet_reference" + ] + } + } + }, + "required": [ + "uuid", + "schema_id", + "source_creation_date_time" + ] +} diff --git a/ord_schemas/schema/ros4hc/metadata/sensor-device-header-1.x.json b/ord_schemas/schema/ros4hc/metadata/sensor-device-header-1.x.json new file mode 100644 index 00000000..83b07b70 --- /dev/null +++ b/ord_schemas/schema/ros4hc/metadata/sensor-device-header-1.x.json @@ -0,0 +1,66 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "Sensor device header with metadata about the device and environmental requirements.", + "type": "object", + "title": "Sensor Device Metadata", + + "definitions": { + "default-header": { + "$ref": "ord-default-header-1.x.json" + }, + "filter": { + "$ref": "healthcare-filterbase-1.x.json" + }, + "device_identity": { + "$ref": "device-identity-1.x.json" + }, + "operating_environment": { + "$ref": "operating-environment-1.x.json" + }, + "measurement_specification": { + "$ref": "measurement-specification-1.x.json" + } + }, + + "allOf": [ + {"$ref": "#/definitions/default-header"}, + { + "type": "object", + "properties": { + "device_identity": { + "$ref": "#/definitions/device_identity" + }, + "operating_environment":{ + "$ref": "#/definitions/operating_environment" + }, + "measurement_specification": { + "$ref": "#/definitions/measurement_specification" + }, + "session_id": { + "type": "string" + }, + "data_size": { + "type": "object", + "properties": { + "window_size_samples": { + "type": "number" + }, + "quality_window_size_samples": { + "type": "number" + } + }, + "required": ["window_size_samples"] + } + }, + "required": [ + "session_id", + "data_size" + ] + }, + {"$ref": "#/definitions/filter"} + ], + + "required": [ + + ] +} diff --git a/ord_schemas/schema/ros4hc/min-max-unit-value-1.x.json b/ord_schemas/schema/ros4hc/min-max-unit-value-1.x.json new file mode 100644 index 00000000..ebed72bf --- /dev/null +++ b/ord_schemas/schema/ros4hc/min-max-unit-value-1.x.json @@ -0,0 +1,36 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://w3id.org/ieee/ieee-1752-schema/min-max-unit-value.json", + "title": "The maximum and minimum value of an specific unit", + "description": "This schema represents the minimum and the maximum value for a given unit.", + "type": "object", + "properties": { + "min_value": { + "description": "The minimum value.", + "type": "number" + }, + "max_value": { + "description": "The maximum value.", + "type": "number" + }, + "unit": { + "description": "The unit of measure of the element. Allowed values are drawn from the Common synonyms (non-UCUM) column of [subset of] UCUM, SI and English units. ", + "references": [ + { + "description": "The Common synonyms (non-UCUM) column of [subset of] UCUM.", + "url": "http://download.hl7.de/documents/ucum/ucumdata.html" + }, + { + "description": "The Unified Code for Units of Measure (UCUM).", + "url": "http://unitsofmeasure.org/ucum.html" + } + ], + "type": "string" + } + }, + "required": [ + "min_value", + "max_value", + "unit" + ] +} diff --git a/ord_schemas/schema/ros4hc/ppg-1.x.json b/ord_schemas/schema/ros4hc/ppg-1.x.json new file mode 100644 index 00000000..b0d29e72 --- /dev/null +++ b/ord_schemas/schema/ros4hc/ppg-1.x.json @@ -0,0 +1,68 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PPG Data", + "description": "This schema represents PPG waveform data from a specific lead with signal quality and temporal context", + "type": "object", + + "definitions": { + "time_frame": { + "$ref": "time-frame-1.0.json" + }, + "time_interval": { + "$ref": "time-interval-1.0.json" + } + }, + + "properties": { + "session_id": { + "description": "match PPGInfo's session_id (if used)", + "type": "string" + }, + + "sample_size": { + "type": "integer" + }, + + "wavelength_size": { + "type": "integer" + }, + + "ac_component": { + "description": "# [samples]×[wavelengths]", + "type": "number" + }, + + "dc_component" : { + "description": "# [samples]×[wavelengths]", + "type": "number" + }, + + "ppg": { + "description": "Raw or filtered PPF values", + "type": "array", + "items": { + "type": "number" + } + }, + + "signal_quality": { + "description": "From 0 (poor) to 1 [%]", + "type": "array", + "items": { + "type": "number", + "maximum": 1, + "minimum": 0 + } + }, + + "effective_time_frame": { + "description": "The time interval at which, or time interval during which the measurement is asserted as being valid.", + "$ref": "#/definitions/time_frame" + } + }, + "required": [ + "ppg", + "signal_quality", + "effective_time_frame" + ] +} \ No newline at end of file diff --git a/ord_schemas/schema/ros4hc/ppg-info-1.x.json b/ord_schemas/schema/ros4hc/ppg-info-1.x.json new file mode 100644 index 00000000..c964088d --- /dev/null +++ b/ord_schemas/schema/ros4hc/ppg-info-1.x.json @@ -0,0 +1,64 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + + "title": "PPGInfo Data Series", + "type": "object", + "description": "This schema represents a ppg data series, i.e., an array of measures that share the same header.", + + "definitions": { + "sensor_device_header": { + "$ref": "sensor-device-header-1.x.json" + } + }, + + + "allOf": [ + {"$ref": "#/definitions/sensor_device_header"}, + + { + "type": "object", + "properties": { + "sensor_configuration": { + "type": "object", + "properties": { + + "sensor_placement": { + "type": "string", + "enum": ["Unknown", "Finger", "Wrist", "Earlobe", "Forehead", "Toe", "Arm", "Chest", "Ankle", "Nose", "Palm", "Sole", "Custom"] + }, + + "measuring_mode": { + "type": "string", + "enum": ["Unknown", "Transmissive Absorption", "Reflective", "Custom"] + } + }, + + "required": [ + "sensor_placement" + ] + }, + + "waveform_configuration":{ + "type": "object", + "properties": { + "wavelengths_mm": { + "description": "Nanometer value for each channel, may be [660, 880, 940]", + "type": "array", + "items": { + "type": "integer" + } + }, + "wavelengths_labels": { + "description": "Wavelength Label for each channel (optional)", + "type": "string", + "enum": ["Unknown", "Green", "Red", "IR", "Blue", "Yellow", "Custom"] + } + }, + "required": [ + "wavelengths_mm" + ] + } + } + } + ] +} diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..b6de483a --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,18 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "ord-schemas" +version = "0.1.0" +description = "Open Reaction Database JSON OMH schemas" +authors = [{ name = "OMH Community & SCAI-Lab" }] +readme = "README.md" +requires-python = ">=3.8" + +[tool.setuptools] +packages = ["ord_schemas", "ord_schemas.schema"] +include-package-data = true + +[tool.setuptools.package-data] +"ord_schemas.schema" = ["**/*.json"] diff --git a/schema/ros4hc/bcg-info-1.x.json b/schema/ros4hc/bcg-info-1.x.json deleted file mode 100644 index 8d8c2b32..00000000 --- a/schema/ros4hc/bcg-info-1.x.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - - "title": "BCG Data Series", - "type": "object", - "description": "This schema represents a bcg data series, i.e., an array of measures that share the same header.", - - "definitions": { - "header": { - "$ref": "sensor-device-header-1.x.json" - }, - - "bcg_body": { - "$ref": "bcg-1.x.json" - } - }, - - - "properties": { - "header": { - "description": "The header of the data point.", - "type":"object", - "allOf": [ - {"$ref": "#/definitions/header"}, - { - "type": "object", - "properties": { - "bcg_info": { - "type": "object", - "properties": { - "number_of_sensors": { - "type": "number" - }, - - "sensor_locations": { - "type": "array", - "items": { - "type": "string" - } - }, - - "sensing_direction": { - "type": "string" - }, - - "sensing_modality": { - "type": "string" - }, - - "measurement_system": { - "type": "string" - } - } - } - } - } - ] - }, - "body": { - "$ref": "#/definitions/bcg_body" - } - }, - - "required": [ - "header", - "body" - ] -} diff --git a/schema/ros4hc/ecg-info-1.x.json b/schema/ros4hc/ecg-info-1.x.json deleted file mode 100644 index 1f552a9b..00000000 --- a/schema/ros4hc/ecg-info-1.x.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - - "title": "ECG Data Series", - "type": "object", - "description": "This schema represents a ecg data series, i.e., an array of measures that share the same header.", - - "definitions": { - "header": { - "$ref": "sensor-device-header-1.x.json" - }, - - "ecg_body": { - "$ref": "ecg-lead-1.x.json" - }, - - "lead_location_enum": { - "$ref": "lead-location-1.x.json" - } - }, - - - "properties": { - "header": { - "description": "The header of the data point.", - "type":"object", - "allOf": [ - {"$ref": "#/definitions/header"}, - { - "type": "object", - "properties": { - "ecg_info": { - "type": "object", - "properties": { - "lead_number": { - "type": "number" - }, - - "location_lead": { - "$ref": "#/definitions/lead_location_enum" - } - } - } - } - } - ] - }, - - "body": { - "$ref": "#/definitions/ecg_body" - } - }, - - "required": [ - "header", - "body" - ] -} diff --git a/schema/ros4hc/lead-location-1.x.json b/schema/ros4hc/lead-location-1.x.json deleted file mode 100644 index e65f02bc..00000000 --- a/schema/ros4hc/lead-location-1.x.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - - "description": "This schema represents a standard ECG lead location.", - "type": "string", - - "references": [ - { - "description": "Standard ECG lead names according to clinical conventions (12-lead and extended leads).", - "url": "https://en.wikipedia.org/wiki/Electrocardiography#12-lead_ECG" - } - ], - - "enum": [ - "I", "II", "III", - "aVR", "aVL", "aVF", - "V1", "V2", "V3", "V4", "V5", "V6", - "V1R", "V2R", "V3R", "V4R", "V5R", "V6R" - ] -} diff --git a/schema/ros4hc/sensor-device-header-1.x.json b/schema/ros4hc/sensor-device-header-1.x.json deleted file mode 100644 index 4f5a36e1..00000000 --- a/schema/ros4hc/sensor-device-header-1.x.json +++ /dev/null @@ -1,240 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "description": "Senso device header with metadata about the device and environmental requirements.", - "type": "object", - "title": "Sensor Device Metadata", - - "definitions": { - "date_time": { - "$ref": "date-time-1.0.json" - }, - "schema_id": { - "$ref": "schema-id-1.0.json" - }, - "frequency_unit_value": { - "$ref": "frequency-unit-value-1.0.json" - }, - "unit_value": { - "$ref": "unit-value-1.0.json" - } - }, - - "properties": { - "uuid": { - "description": "The identifier of this data point: a globally unique value, generated using RFC 4122 approach.", - "references": [ - { - "description": "A Universally Unique IDentifier (UUID) URN Namespace", - "url": "https://tools.ietf.org/html/rfc4122" - } - ], - "type": "string", - "format": "uuid" - }, - "schema_id": { - "description": "The schema identifier of the body of the data point or data series.", - "$ref": "#/definitions/schema_id" - }, - "source_creation_date_time": { - "description": "The date time (timestamp) when this datapoint or data series was created at the original source. If the datapoint or data series is aggregated later, the date does not change. If the datapoint or data series is recalculated later (e.g., using a different algorithm), a new datapoint or data series is created with a different id and creation date.", - "$ref": "#/definitions/date_time" - }, - - "modality": { - "description": "The modality whereby the measure is obtained, e.g., sensed or self-reported", - "type": "string", - "enum": [ - "sensed", - "self-reported" - ] - }, - - "acquisition_rate": { - "description": "The rate at which measures are acquired.", - "$ref": "#/definitions/frequency_unit_value" - }, - - "external_datasheets": { - "description": "Reference(s) to external documentation regarding the component(s) relevant to describe the collection, computation, use, etc. of this datapoint or data series, e.g., software, algorithm, study protocol, etc.", - "type": "array", - "items": { - "type": "object", - "properties": { - "datasheet_type": { - "description": "The type of component described or documented by the referenced datasheet, e.g., software, hardware, study.", - "type": "string" - }, - "datasheet_reference": { - "description": "International Resource Identifier (IRI) of applicable datasheet(s). The expectation is that the IRI will convey resolvable location and access information for the resource identified resource.", - "type": "string", - "format": "iri" - } - }, - "required": [ - "datasheet_reference" - ] - } - }, - - "device_identity": { - "type": "object", - "properties": { - "device_manufacturer": { - "type": "string" - }, - - "device_name": { - "type": "string" - }, - - "device_type": { - "type": "string" - }, - "device_serial_number": { - "type": "string" - } - } - }, - - "environmental_requirements": { - "type": "object", - "properties": { - "battery_level": { - "allOf": [ - { - "$ref": "#/definitions/unit_value" - }, - { - "type": "object", - "properties": { - "unit": { - "enum": [ - "%" - ] - } - } - } - ] - }, - "minimal_operation_temperature": { - "allOf": [ - { - "$ref": "#/definitions/unit_value" - }, - { - "type": "object", - "properties": { - "unit": { - "enum": [ - "°C" - ] - } - } - } - ] - }, - "maximal_operation_temperature": { - "allOf": [ - { - "$ref": "#/definitions/unit_value" - }, - { - "type": "object", - "properties": { - "unit": { - "enum": [ - "°C" - ] - } - } - } - ] - }, - "maximal_relative_humidity": { - "allOf": [ - { - "$ref": "#/definitions/unit_value" - }, - { - "type": "object", - "properties": { - "unit": { - "enum": [ - "%" - ] - } - } - } - ] - }, - "minimal_atmospheric_pressure": { - "allOf": [ - { - "$ref": "#/definitions/unit_value" - }, - { - "type": "object", - "properties": { - "unit": { - "enum": [ - "atm" - ] - } - } - } - ] - }, - "maximal_atmospheric_pressure": { - "allOf": [ - { - "$ref": "#/definitions/unit_value" - }, - { - "type": "object", - "properties": { - "unit": { - "enum": [ - "atm" - ] - } - } - } - ] - } - } - }, - - "measurement_specs": { - "type": "object", - "properties": { - "measuring_unit": { - "type": "string" - }, - "sampling_frequency_hz": { - "type": "integer" - }, - "resolution": { - "type": "number" - }, - "accuracy": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "max_range": { - "type": "number" - }, - "min_range": { - "type": "number" - } - } - } - }, - - "required": [ - "uuid", - "schema_id", - "source_creation_date_time" - - ] -} diff --git a/schema/ros4hc/toChange/eda-1.x.json b/schema/ros4hc/toChange/eda-1.x.json deleted file mode 100644 index 804b68bf..00000000 --- a/schema/ros4hc/toChange/eda-1.x.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "EDA Data", - "description": "This schema represents EDA waveform segments with associated signal quality and recording timestamps.", - "type": "object", - - "definitions": { - "time_frame": { - "$ref": "time-frame-1.0.json" - } - }, - - "properties": { - "eda_episodes": { - "description": "EDA waveform samples", - "type": "array", - "items": { - "type": "object", - "properties": { - "eda_value": { - "type": "number", - "description": "EDA signal amplitude" - }, - "unit": { - "type": "string", - "enum": ["uS"] - }, - "signal_quality": { - "type": "number", - "minimum": 0, - "maximum": 1, - "description": "Signal quality score (0-1)" - }, - "eda_time_frame":{ - "description": "Timestamp when this sample was recorded", - "allOf": [ - { - "$ref": "#/definitions/time_frame" - }, - { - "required": [ - "date_time" - ] - } - ] - } - }, - "required": ["eda_value", "signal_quality", "unit", "eda_time_frame"] - } - }, - "effective_time_frame": { - "allOf": [ - { - "$ref": "#/definitions/time_frame" - }, - { - "required": ["time_interval"] - } - ] - } - }, - - "required": ["eda_episodes", "effective_time_frame"] -} diff --git a/schema/ros4hc/toChange/emg-1.x.json b/schema/ros4hc/toChange/emg-1.x.json deleted file mode 100644 index a07cb5a5..00000000 --- a/schema/ros4hc/toChange/emg-1.x.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "EMG Data", - "description": "This schema represents EMG waveform segments with associated signal quality and recording timestamps.", - "type": "object", - - "definitions": { - "time_frame": { - "$ref": "time-frame-1.0.json" - } - }, - - "properties": { - "emg_episodes": { - "description": "EMG waveform samples", - "type": "array", - "items": { - "type": "object", - "properties": { - "emg_value": { - "type": "number", - "description": "EMG signal amplitude" - }, - "unit": { - "type": "string", - "enum": ["µV", "mV"] - }, - "signal_quality": { - "type": "number", - "minimum": 0, - "maximum": 1, - "description": "Signal quality score (0-1)" - }, - "emg_time_frame":{ - "description": "Timestamp when this sample was recorded", - "allOf": [ - { - "$ref": "#/definitions/time_frame" - }, - { - "required": [ - "date_time" - ] - } - ] - } - }, - "required": ["emg_value", "signal_quality", "unit", "emg_time_frame"] - } - }, - "effective_time_frame": { - "allOf": [ - { - "$ref": "#/definitions/time_frame" - }, - { - "required": ["time_interval"] - } - ] - } - }, - - "required": ["emg_episodes", "effective_time_frame"] -} diff --git a/schema/ros4hc/toChange/eog-1.x.json b/schema/ros4hc/toChange/eog-1.x.json deleted file mode 100644 index 85c59f2a..00000000 --- a/schema/ros4hc/toChange/eog-1.x.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "EOG Data", - "description": "This schema represents EOG waveform segments with associated signal quality and recording timestamps.", - "type": "object", - - "definitions": { - "time_frame": { - "$ref": "time-frame-1.0.json" - } - }, - - "properties": { - "eog_episodes": { - "description": "EOG waveform samples", - "type": "array", - "items": { - "type": "object", - "properties": { - "eog_value": { - "type": "number", - "description": "EOG signal amplitude" - }, - "unit": { - "type": "string", - "enum": ["µV", "mV"] - }, - "signal_quality": { - "type": "number", - "minimum": 0, - "maximum": 1, - "description": "Signal quality score (0-1)" - }, - "eog_time_frame":{ - "description": "Timestamp when this sample was recorded", - "allOf": [ - { - "$ref": "#/definitions/time_frame" - }, - { - "required": [ - "date_time" - ] - } - ] - } - }, - "required": ["eog_value", "signal_quality", "unit", "eog_time_frame"] - } - }, - "effective_time_frame": { - "allOf": [ - { - "$ref": "#/definitions/time_frame" - }, - { - "required": ["time_interval"] - } - ] - } - }, - - "required": ["eog_episodes", "effective_time_frame"] -} diff --git a/schema/ros4hc/unfinished-ideas/ecg-leads-1.x.json b/schema/ros4hc/unfinished-ideas/ecg-leads-1.x.json deleted file mode 100644 index 92299244..00000000 --- a/schema/ros4hc/unfinished-ideas/ecg-leads-1.x.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ECG Leads", - "description": "This schema represents ECG Leads with each associated signal quality and recording timestamps.", - "type": "object", - - "definitions": { - "time_frame": { - "$ref": "time-frame-1.0.json" - }, - "time_interval": { - "$ref": "time-interval-1.0.json" - }, - "ecg_lead": { - "$ref": "ecg-lead-1.x.json" - } - - }, - - "properties": { - "ecg_leads_data": { - "description": "Array of ECG lead measurements", - "type": "object" - }, - - "effective_time_frame": { - "allOf": [ - { - "$ref": "#/definitions/time_frame" - }, - { - "required": ["time_interval"] - } - ] - } - }, - - "required": [ - "ecg_leads_data", - "effective_time_frame" - ] -} diff --git a/test-data/ros4hc/full-sample-data/bcg-full-sample-data.json b/test-data/ros4hc/deprecated/bcg-full-sample-data.json similarity index 100% rename from test-data/ros4hc/full-sample-data/bcg-full-sample-data.json rename to test-data/ros4hc/deprecated/bcg-full-sample-data.json diff --git a/test-data/ros4hc/bcg-sample-body-data.json b/test-data/ros4hc/deprecated/bcg-sample-body-data.json similarity index 100% rename from test-data/ros4hc/bcg-sample-body-data.json rename to test-data/ros4hc/deprecated/bcg-sample-body-data.json diff --git a/test-data/ros4hc/deprecated/ecg-full-sample-data.json b/test-data/ros4hc/deprecated/ecg-full-sample-data.json new file mode 100644 index 00000000..afd4703f --- /dev/null +++ b/test-data/ros4hc/deprecated/ecg-full-sample-data.json @@ -0,0 +1,77 @@ +{ + "header": { + "uuid": "123e4567-e89b-12d3-a456-426614174000-LLMGenerated", + "schema_id": "ecg-lead-1.x", + "source_creation_date_time": "2025-06-21T14:30:00Z", + "modality": "sensed", + "acquisition_rate": { + "value": 250, + "unit": "Hz" + }, + "external_datasheets": [ + { + "datasheet_type": "hardware", + "datasheet_reference": "https://example.com/devices/ecg-sensor-3000" + } + ], + "device_identity": { + "device_manufacturer": "HealthTech Inc.", + "device_name": "ECG Sensor 3000", + "device_type": "wearable", + "device_serial_number": "HTI-ECG-987654" + }, + "environmental_requirements": { + "battery_level": { + "value": 85, + "unit": "%" + }, + "minimal_operation_temperature": { + "value": -5, + "unit": "°C" + }, + "maximal_operation_temperature": { + "value": 45, + "unit": "°C" + }, + "maximal_relative_humidity": { + "value": 95, + "unit": "%" + }, + "minimal_atmospheric_pressure": { + "value": 0.8, + "unit": "atm" + }, + "maximal_atmospheric_pressure": { + "value": 1.2, + "unit": "atm" + } + }, + "measurement_specs": { + "measuring_unit": "µV", + "sampling_frequency_hz": 250, + "resolution": 0.1, + "accuracy": 0.98, + "max_range": 5000, + "min_range": -5000 + }, + "ecg_info": { + "lead_number": 1, + "location_lead": "II" + } + }, + + "body": { + "ecg_lead_data": [ + 120.4, 118.9, 119.7, 122.1, 121.0, 120.8 + ], + "signal_quality": [ + 1.0, 0.99, 0.98, 1.0, 0.97, 1.0 + ], + "effective_time_frame": { + "time_interval": { + "start_date_time": "2025-06-21T14:30:00Z", + "end_date_time": "2025-06-21T14:30:02Z" + } + } + } +} diff --git a/test-data/ros4hc/eda-sample-data.json b/test-data/ros4hc/deprecated/eda-sample-data.json similarity index 100% rename from test-data/ros4hc/eda-sample-data.json rename to test-data/ros4hc/deprecated/eda-sample-data.json diff --git a/test-data/ros4hc/sensor-device-header-data.json b/test-data/ros4hc/deprecated/sensor-device-header-data.json similarity index 100% rename from test-data/ros4hc/sensor-device-header-data.json rename to test-data/ros4hc/deprecated/sensor-device-header-data.json diff --git a/test-data/ros4hc/full-sample-data/bcg-full-sample-data-1.x.json b/test-data/ros4hc/full-sample-data/bcg-full-sample-data-1.x.json new file mode 100644 index 00000000..bfedb1c0 --- /dev/null +++ b/test-data/ros4hc/full-sample-data/bcg-full-sample-data-1.x.json @@ -0,0 +1,91 @@ +{ + "header": { + "uuid": "d4c10ef2-babc-4f2d-b7f5-b05a3c6151a7", + "schema_id": { + "namespace": "org.example.health", + "name": "bcg", + "version": "1.0" + }, + "source_creation_date_time": "2025-07-04T12:00:00Z", + "modality": "sensed", + "acquisition_rate": { + "value": 100, + "unit": "Hz" + }, + "device_identity": { + "device_manufacturer": "BioSensor Inc.", + "device_name": "BCG-Monitor 2000", + "device_type": "BedSensor", + "device_serial_number": "BS2000-XYZ123" + }, + "environmental_requirements": { + "battery_level": { + "value": 85, + "unit": "%" + }, + "minimal_operation_temperature": { + "value": 10, + "unit": "°C" + }, + "maximal_operation_temperature": { + "value": 40, + "unit": "°C" + }, + "maximal_relative_humidity": { + "value": 90, + "unit": "%" + }, + "minimal_atmospheric_pressure": { + "value": 0.8, + "unit": "atm" + }, + "maximal_atmospheric_pressure": { + "value": 1.2, + "unit": "atm" + } + }, + "measurement_specs": { + "measuring_unit": "mV", + "sampling_frequency_hz": 100, + "resolution": 0.01, + "accuracy": 0.95, + "max_range": 5, + "min_range": -5 + }, + "bcg_info": { + "session_id": "bcg-session-20250704-001", + "sampling_frequency": { + "value": 100, + "unit": "Hz" + }, + "window_size_samples": 10, + "quality_window_size_samples": 10, + "units": "mV", + "gain": 2.0, + "adc_resolution": 16, + "number_of_sensors": 3, + "sensor_placements": "Mattress", + "sensing_direction": "Dorso Ventral", + "sensing_modality": "Piezoelectric Film", + "measurement_system": "Starr" + } + }, + "body": { + "session_id": "bcg-session-20250704-001", + "sample_size": 10, + "bcg": [ + 0.023, 0.045, 0.030, 0.025, 0.050, + 0.055, 0.048, 0.052, 0.049, 0.051 + ], + "signal_quality": [ + 0.95, 0.96, 0.93, 0.94, 0.97, + 0.96, 0.92, 0.94, 0.95, 0.96 + ], + "effective_time_frame": { + "time_interval": { + "start_date_time": "2025-07-04T12:00:00Z", + "end_date_time": "2025-07-04T12:00:01Z" + } + } + } +} diff --git a/test-data/ros4hc/full-sample-data/ecg-full-sample-data.json b/test-data/ros4hc/full-sample-data/ecg-full-sample-data.json index be2d6d2c..f051cc9d 100644 --- a/test-data/ros4hc/full-sample-data/ecg-full-sample-data.json +++ b/test-data/ros4hc/full-sample-data/ecg-full-sample-data.json @@ -1,24 +1,28 @@ { "header": { - "uuid": "123e4567-e89b-12d3-a456-426614174000-LLMGenerated", - "schema_id": "ecg-lead-1.x", - "source_creation_date_time": "2025-06-21T14:30:00Z", + "uuid": "123e4567-e89b-12d3-a456-426614174000", + "schema_id": { + "namespace": "org.example.ecg", + "name": "ecg-lead", + "version": "1.0" + }, + "source_creation_date_time": "2025-07-04T13:45:00Z", "modality": "sensed", "acquisition_rate": { "value": 250, "unit": "Hz" }, "external_datasheets": [ - { - "datasheet_type": "hardware", - "datasheet_reference": "https://example.com/devices/ecg-sensor-3000" - } + { + "datasheet_type": "hardware", + "datasheet_reference": "https://example.org/device/datasheet" + } ], "device_identity": { - "device_manufacturer": "HealthTech Inc.", - "device_name": "ECG Sensor 3000", + "device_manufacturer": "CardioTech Inc.", + "device_name": "ECG-SensorX", "device_type": "wearable", - "device_serial_number": "HTI-ECG-987654" + "device_serial_number": "CT-ECG-00123" }, "environmental_requirements": { "battery_level": { @@ -34,7 +38,7 @@ "unit": "°C" }, "maximal_relative_humidity": { - "value": 95, + "value": 90, "unit": "%" }, "minimal_atmospheric_pressure": { @@ -49,29 +53,44 @@ "measurement_specs": { "measuring_unit": "µV", "sampling_frequency_hz": 250, - "resolution": 0.1, + "resolution": 0.5, "accuracy": 0.98, "max_range": 5000, "min_range": -5000 }, "ecg_info": { - "lead_number": 1, - "location_lead": "II" + "sampling_frequency": { + "value": 250, + "unit": "Hz" + }, + "window_size_samples": 1000, + "quality_window_size_samples": 100, + "units": "µV", + "gain": 0.01, + "adc_resolution": 16, + "electrode_placement": [ + "Chest", + "Left Arm", + "Right Arm" + ], + "lead_type": "II" } }, - "body": { - "ecg_lead_data": [ - 120.4, 118.9, 119.7, 122.1, 121.0, 120.8 - ], + "session_id": "session-ecg-20250704-001", + "channel_size": 1, + "sample_size": 1000, + "ecg": [ + 0.5, 0.7, 0.6, 0.4, 0.2, -0.1, -0.4, -0.6, -0.7, -0.5, + 0.1, 0.6, 0.8, 0.9, 1.0, 0.8, 0.5, 0.2, 0.0, -0.2 + ], "signal_quality": [ - 1.0, 0.99, 0.98, 1.0, 0.97, 1.0 - ], - "unit": "µV", + 0.98, 0.98, 0.97, 0.96, 0.95, 0.95, 0.94, 0.94, 0.93, 0.93 + ], "effective_time_frame": { "time_interval": { - "start_date_time": "2025-06-21T14:30:00Z", - "end_date_time": "2025-06-21T14:30:02Z" + "start_date_time": "2025-07-04T13:45:00Z", + "end_date_time": "2025-07-04T13:45:04Z" } } } diff --git a/test-data/ros4hc/full-sample-data/eda-full-sample-data.json b/test-data/ros4hc/full-sample-data/eda-full-sample-data.json new file mode 100644 index 00000000..982ab4c3 --- /dev/null +++ b/test-data/ros4hc/full-sample-data/eda-full-sample-data.json @@ -0,0 +1,99 @@ +{ + "header": { + "uuid": "8fbc23da-6a9f-4d9d-b9ad-fb3410f7a8cb", + "schema_id": { + "namespace": "org.example.eda", + "name": "eda-lead", + "version": "1.0" + }, + "source_creation_date_time": "2025-07-04T13:50:00Z", + "modality": "sensed", + "acquisition_rate": { + "value": 4, + "unit": "Hz" + }, + "device_identity": { + "device_manufacturer": "BioSense Ltd.", + "device_name": "GSR-WristBand-X", + "device_type": "wearable", + "device_serial_number": "BS-EDA-00042" + }, + "environmental_requirements": { + "battery_level": { + "value": 78, + "unit": "%" + }, + "minimal_operation_temperature": { + "value": -10, + "unit": "°C" + }, + "maximal_operation_temperature": { + "value": 50, + "unit": "°C" + }, + "maximal_relative_humidity": { + "value": 95, + "unit": "%" + }, + "minimal_atmospheric_pressure": { + "value": 0.8, + "unit": "atm" + }, + "maximal_atmospheric_pressure": { + "value": 1.2, + "unit": "atm" + } + }, + "measurement_specs": { + "measuring_unit": "Micro Siemens", + "sampling_frequency_hz": 4, + "resolution": 0.1, + "accuracy": 0.95, + "max_range": 100, + "min_range": 0 + }, + "ecg_info": { + "sampling_frequency": { + "value": 4, + "unit": "Hz" + }, + "window_size_samples": 60, + "quality_window_size_samples": 15, + "units": "Micro Siemens", + "gain": 1.0, + "adc_resolution": 12, + "electrode_placement": [ + "Wrist" + ], + "electrode_type": "Surface", + "measuring_technique": "Exosomatic", + "current_form": "DC" + } + }, + "body": { + "session_id": "session-eda-20250704-001", + "sample_size": 60, + "scl": [ + 2.1, 2.2, 2.25, 2.3, 2.35, 2.4, 2.45, 2.5, 2.55, 2.6, + 2.62, 2.63, 2.65, 2.68, 2.7, 2.73, 2.76, 2.78, 2.8, 2.82 + ], + "scr": [ + 0.2, 0.18, 0.22, 0.15, 0.1, 0.08, 0.05, 0.03, 0.01, 0.0, + 0.01, 0.02, 0.04, 0.05, 0.07, 0.1, 0.12, 0.13, 0.14, 0.15 + ], + "eda": [ + 2.3, 2.38, 2.47, 2.45, 2.45, 2.48, 2.5, 2.53, 2.56, 2.6, + 2.63, 2.65, 2.69, 2.73, 2.77, 2.83, 2.88, 2.91, 2.94, 2.97 + ], + "signal_quality": [ + 1, 0.98, 0.97, 0.99, 0.96, 0.95, 0.94, 0.93, 0.92, 0.91, + 0.92, 0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.98, 0.99, 1.0 + ], + "effective_time_frame": { + "time_interval": { + "start_date_time": "2025-07-04T13:50:00Z", + "end_date_time": "2025-07-04T13:50:15Z" + } + } + } +} diff --git a/test-data/ros4hc/full-sample-data/eeg-full-sample-data.json b/test-data/ros4hc/full-sample-data/eeg-full-sample-data.json new file mode 100644 index 00000000..6ef82478 --- /dev/null +++ b/test-data/ros4hc/full-sample-data/eeg-full-sample-data.json @@ -0,0 +1,68 @@ +{ + "header": { + "uuid": "123e4567-e89b-12d3-a456-426614174000", + "schema_id": { + "namespace": "org.example.eeg", + "name": "eeg-data", + "version": "1.0" + }, + "source_creation_date_time": "2025-07-04T12:00:00Z", + "modality": "sensed", + "acquisition_rate": { + "value": 256, + "unit": "Hz" + }, + "device_identity": { + "device_manufacturer": "NeuroScan Inc.", + "device_name": "EEGCap Pro X", + "device_type": "wearable", + "device_serial_number": "NS-EEG-20250704-001" + }, + "eeg_info": { + "sampling_frequency": { + "value": 256, + "unit": "Hz" + }, + "window_size_samples": 64, + "quality_window_size_samples": 64, + "units": "uV", + "gain": 1.0, + "adc_resolution": 16, + "electrode_placement": ["Method 1020"], + "electrode_site": "C3", + "electrode_physical_type": "AgCl", + "signal_mode": "Surface" + } + }, + "body": { + "session_id": "session-20250704-abc123", + "channel_size": 1, + "sample_size": 64, + "eeg": [ + 10.2, 10.1, 10.3, 10.0, 10.2, 10.5, 10.6, 10.4, + 10.7, 10.8, 10.9, 11.0, 11.1, 11.3, 11.2, 11.0, + 10.9, 10.7, 10.5, 10.3, 10.2, 10.0, 9.8, 9.7, + 9.6, 9.5, 9.4, 9.2, 9.1, 9.0, 8.9, 8.8, + 8.9, 9.0, 9.1, 9.3, 9.5, 9.6, 9.7, 9.9, + 10.0, 10.1, 10.2, 10.3, 10.5, 10.6, 10.7, 10.8, + 10.9, 11.0, 11.1, 11.2, 11.3, 11.4, 11.5, 11.6, + 11.7, 11.6, 11.5, 11.3, 11.1, 11.0, 10.8, 10.6 + ], + "signal_quality": [ + 1.0, 0.98, 0.97, 0.96, 0.94, 0.92, 0.90, 0.88, + 0.87, 0.85, 0.84, 0.83, 0.82, 0.81, 0.80, 0.79, + 0.78, 0.77, 0.76, 0.75, 0.76, 0.77, 0.78, 0.79, + 0.80, 0.81, 0.82, 0.83, 0.84, 0.85, 0.86, 0.87, + 0.88, 0.89, 0.90, 0.91, 0.92, 0.93, 0.94, 0.95, + 0.96, 0.97, 0.98, 0.99, 1.0, 1.0, 0.99, 0.98, + 0.97, 0.96, 0.95, 0.94, 0.93, 0.92, 0.91, 0.90, + 0.89, 0.88, 0.87, 0.86, 0.85, 0.84, 0.83, 0.82 + ], + "effective_time_frame": { + "time_interval": { + "start_date_time": "2025-07-04T12:00:00Z", + "end_date_time": "2025-07-04T12:00:00.250Z" + } + } + } +} diff --git a/test-data/ros4hc/full-sample-data/emg-full-sample-data.json b/test-data/ros4hc/full-sample-data/emg-full-sample-data.json new file mode 100644 index 00000000..8a128f38 --- /dev/null +++ b/test-data/ros4hc/full-sample-data/emg-full-sample-data.json @@ -0,0 +1,90 @@ +{ + "header": { + "uuid": "456e7890-babc-45d1-89ef-987654321abc", + "schema_id": { + "namespace": "org.example.emg", + "name": "emg-data", + "version": "1.0" + }, + "source_creation_date_time": "2025-07-04T14:00:00Z", + "modality": "sensed", + "acquisition_rate": { + "value": 1000, + "unit": "Hz" + }, + "device_identity": { + "device_manufacturer": "BioMotion Tech", + "device_name": "EMGTrack Pro", + "device_type": "wearable", + "device_serial_number": "BM-EMG-000987" + }, + "emg_info": { + "sampling_frequency": { + "value": 1000, + "unit": "Hz" + }, + "window_size_samples": 200, + "quality_window_size_samples": 200, + "units": "uV", + "gain": 1.0, + "adc_resolution": 16, + "electrode_placement": ["Biceps"], + "electrode_type": "Surface", + "external_device": "Unknown", + "signal_mode": "Surface" + } + }, + "body": { + "session_id": "emg-session-20250704-xyz987", + "channel_size": 1, + "sample_size": 200, + "emg": [ + 2.1, 2.0, 2.3, 2.2, 2.5, 2.7, 3.0, 3.3, 3.6, 4.0, + 4.2, 4.5, 4.8, 5.1, 5.4, 5.8, 6.0, 6.2, 6.5, 6.8, + 7.0, 7.1, 7.3, 7.5, 7.7, 7.8, 8.0, 8.2, 8.5, 8.7, + 9.0, 9.2, 9.1, 9.0, 8.8, 8.6, 8.4, 8.1, 7.9, 7.6, + 7.3, 7.0, 6.8, 6.5, 6.2, 5.9, 5.6, 5.3, 5.0, 4.7, + 4.5, 4.2, 4.0, 3.7, 3.5, 3.2, 3.0, 2.8, 2.6, 2.4, + 2.2, 2.0, 1.8, 1.7, 1.6, 1.5, 1.3, 1.2, 1.1, 1.0, + 0.9, 0.8, 0.7, 0.6, 0.6, 0.5, 0.4, 0.3, 0.2, 0.2, + 0.1, 0.1, 0.0, 0.0, 0.1, 0.2, 0.4, 0.6, 0.9, 1.2, + 1.6, 2.0, 2.4, 2.8, 3.3, 3.7, 4.2, 4.7, 5.1, 5.6, + 6.1, 6.6, 7.0, 7.5, 7.9, 8.3, 8.6, 9.0, 9.2, 9.4, + 9.5, 9.4, 9.2, 8.9, 8.5, 8.1, 7.7, 7.2, 6.8, 6.3, + 5.8, 5.4, 4.9, 4.5, 4.0, 3.6, 3.2, 2.8, 2.5, 2.2, + 1.9, 1.7, 1.5, 1.3, 1.1, 1.0, 0.9, 0.8, 0.7, 0.6, + 0.6, 0.5, 0.4, 0.3, 0.2, 0.2, 0.1, 0.1, 0.0, 0.0, + 0.1, 0.2, 0.4, 0.6, 1.0, 1.5, 2.1, 2.8, 3.6, 4.5, + 5.5, 6.6, 7.8, 9.0, 9.9, 9.5, 8.4, 6.6, 4.3, 2.2, + 1.0, 0.4, 0.1, 0.0, 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, + 0.6, 0.6, 0.5, 0.4, 0.2, 0.1, 0.0, 0.0, 0.1, 0.3, + 0.6, 1.0, 1.6, 2.4, 3.2, 4.1, 5.1, 6.2, 7.4, 8.6, + 9.5, 9.2, 8.0, 6.2, 3.8, 1.7, 0.5, 0.1, 0.0, 0.0 + ], + "signal_quality": [ + 1.0, 0.99, 0.99, 0.98, 0.98, 0.98, 0.97, 0.97, 0.97, 0.96, + 0.96, 0.96, 0.96, 0.95, 0.95, 0.95, 0.95, 0.94, 0.94, 0.94, + 0.94, 0.93, 0.93, 0.93, 0.93, 0.93, 0.93, 0.92, 0.92, 0.92, + 0.92, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, + 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, + 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, + 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, + 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, + 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, + 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, + 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, + 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, + 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, + 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, + 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, + 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, + 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.91 + ], + "effective_time_frame": { + "time_interval": { + "start_time": "2025-07-04T14:00:00Z", + "end_time": "2025-07-04T14:00:00.200Z" + } + } + } +} diff --git a/test-data/ros4hc/full-sample-data/eog-full-sample-data.json b/test-data/ros4hc/full-sample-data/eog-full-sample-data.json new file mode 100644 index 00000000..d631093d --- /dev/null +++ b/test-data/ros4hc/full-sample-data/eog-full-sample-data.json @@ -0,0 +1,108 @@ +{ + "header": { + "uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479", + "schema_id": { + "name": "eog-data-series", + "version": "1.0.0" + }, + "source_creation_date_time": "2025-07-03T14:20:00Z", + "modality": "sensed", + "acquisition_rate": { + "value": 1000, + "unit": "Hz" + }, + "external_datasheets": [ + { + "datasheet_type": "hardware", + "datasheet_reference": "https://example.com/datasheets/eog-prox" + }, + { + "datasheet_type": "study", + "datasheet_reference": "https://example.com/protocols/eog-blink-detection" + } + ], + "device_identity": { + "device_manufacturer": "BioNeuroTech", + "device_name": "EOG-ProX", + "device_type": "Electrooculography", + "device_serial_number": "EOGX-8459392" + }, + "environmental_requirements": { + "battery_level": { + "value": 88, + "unit": "%" + }, + "minimal_operation_temperature": { + "value": 0, + "unit": "°C" + }, + "maximal_operation_temperature": { + "value": 45, + "unit": "°C" + }, + "maximal_relative_humidity": { + "value": 85, + "unit": "%" + }, + "minimal_atmospheric_pressure": { + "value": 0.8, + "unit": "atm" + }, + "maximal_atmospheric_pressure": { + "value": 1.2, + "unit": "atm" + } + }, + "measurement_specs": { + "measuring_unit": "uV", + "sampling_frequency_hz": 1000, + "resolution": 0.001, + "accuracy": 0.98, + "max_range": 100, + "min_range": -100 + }, + "eog_info": { + "sampling_frequency": { + "value": 1000, + "unit": "Hz" + }, + "window_size_samples": 500, + "quality_window_size_samples": 50, + "units": "uV", + "gain": 0.5, + "adc_resolution": 16, + "electrode_placement": [ + "Left Eye", + "Right Eye", + "Above Eye", + "Below Eye" + ], + "lead_type": "Bipolar Horizontal", + "signal_mode": "Surface", + "lightsource": "LED", + "gazefield_background_light_brightness": { + "value": 250, + "unit": "cd/m^2" + }, + "length_light_dark_phase": [2.5, 2.5] + } + }, + "body": { + "session_id": "EOG-Session-042", + "channel_size": 2, + "sample_size": 500, + "eog": [ + 0.03, 0.07, 0.11, 0.15, 0.13, 0.09, 0.02, -0.01, -0.04, -0.08, + -0.1, -0.05, 0.0, 0.05, 0.1, 0.12, 0.09, 0.06, 0.01, -0.02 + ], + "signal_quality": [ + 0.95, 0.96, 0.94, 0.93, 0.92, 0.91, 0.89, 0.88, 0.9, 0.92 + ], + "effective_time_frame": { + "time_interval": { + "start_time": "2025-07-03T14:20:00Z", + "end_time": "2025-07-03T14:20:05Z" + } + } + } +} diff --git a/test-data/ros4hc/full-sample-data/icg-full-sample-data.json b/test-data/ros4hc/full-sample-data/icg-full-sample-data.json new file mode 100644 index 00000000..708471b2 --- /dev/null +++ b/test-data/ros4hc/full-sample-data/icg-full-sample-data.json @@ -0,0 +1,101 @@ +{ + "header": { + "uuid": "3f2504e0-4f89-11d3-9a0c-0305e82c3301", + "schema_id": { + "name": "icg-data-series", + "version": "1.0.0" + }, + "source_creation_date_time": "2025-07-04T09:30:00Z", + "modality": "sensed", + "acquisition_rate": { + "value": 1000, + "unit": "Hz" + }, + "external_datasheets": [ + { + "datasheet_type": "hardware", + "datasheet_reference": "https://example.com/datasheets/icg-analyzer-x2" + }, + { + "datasheet_type": "software", + "datasheet_reference": "https://example.com/software/icg-v5.4.0" + } + ], + "device_identity": { + "device_manufacturer": "CardioWaveTech", + "device_name": "ICG-Analyzer-X2", + "device_type": "Impedance Cardiography", + "device_serial_number": "CWX2-4871201" + }, + "environmental_requirements": { + "battery_level": { + "value": 80, + "unit": "%" + }, + "minimal_operation_temperature": { + "value": 5, + "unit": "°C" + }, + "maximal_operation_temperature": { + "value": 40, + "unit": "°C" + }, + "maximal_relative_humidity": { + "value": 90, + "unit": "%" + }, + "minimal_atmospheric_pressure": { + "value": 0.85, + "unit": "atm" + }, + "maximal_atmospheric_pressure": { + "value": 1.15, + "unit": "atm" + } + }, + "measurement_specs": { + "measuring_unit": "Ohms", + "sampling_frequency_hz": 1000, + "resolution": 0.001, + "accuracy": 0.97, + "max_range": 10, + "min_range": -10 + }, + "icg_info": { + "sampling_frequency": { + "value": 1000, + "unit": "Hz" + }, + "window_size_samples": 600, + "quality_window_size_samples": 60, + "units": "Ohms", + "gain": 0.01, + "adc_resolution": 16, + "electrode_placement": [ + "Chest", + "Neck", + "Left Arm" + ], + "lead_type": "Four Electrode", + "technique": "Tetrapolar" + } + }, + "body": { + "session_id": "ICG-Session-005", + "sample_size": 600, + "icg": [ + 0.1, 0.12, 0.15, 0.18, 0.21, 0.24, 0.22, 0.2, 0.18, 0.15, + 0.12, 0.1, 0.08, 0.06, 0.05, 0.03, 0.02, 0.01, 0.0, -0.01, + -0.02, -0.03, -0.04, -0.05, -0.06, -0.05, -0.04, -0.02, 0.0, 0.02 + ], + "signal_quality": [ + 0.95, 0.94, 0.92, 0.90, 0.89, 0.87, 0.86, 0.88, 0.90, 0.91 + ], + "effective_time_frame": { + "time_interval": { + "start_time": "2025-07-04T09:30:00Z", + "end_time": "2025-07-04T09:30:05Z" + } + } + } +} diff --git a/test-data/ros4hc/full-sample-data/ppg-full-sample-data.json b/test-data/ros4hc/full-sample-data/ppg-full-sample-data.json new file mode 100644 index 00000000..66c18787 --- /dev/null +++ b/test-data/ros4hc/full-sample-data/ppg-full-sample-data.json @@ -0,0 +1,57 @@ +{ + "header": { + "uuid": "8c1a3d6e-0f3d-4b62-b2c3-8c7a39eae5d7", + "schema_id": { + "name": "ppg-data-series", + "version": "1.0.0" + }, + "source_creation_date_time": "2025-07-04T08:45:00Z", + "modality": "sensed", + "acquisition_rate": { + "value": 250, + "unit": "Hz" + }, + "device_identity": { + "device_manufacturer": "PulseTech", + "device_name": "PT-3000", + "device_type": "Photoplethysmography", + "device_serial_number": "PT3K-9928374" + }, + "measurement_specs": { + "measuring_unit": "Counts", + "sampling_frequency_hz": 250, + "resolution": 0.01, + "accuracy": 0.98 + }, + "ppg_info": { + "window_size_samples": 250, + "quality_window_size_samples": 25, + "units": "Counts", + "gain": 1.0, + "wavelengths_mm": 940, + "sensor_placement": "Finger", + "measuring_mode": "Transmissive Absorption" + } + }, + "body": { + "session_id": "PPG-Session-2025-07-04-A", + "sample_size": 250, + "wavelength_size": 1, + "ac_component": 0.42, + "dc_component": 1.87, + "ppg": [ + 1.90, 1.92, 1.94, 1.95, 1.96, 1.94, 1.91, 1.88, 1.85, 1.83, + 1.82, 1.84, 1.87, 1.89, 1.91, 1.93, 1.95, 1.96, 1.95, 1.94, + 1.93, 1.91, 1.88, 1.85, 1.82, 1.81, 1.83, 1.86, 1.89, 1.92 + ], + "signal_quality": [ + 0.98, 0.97, 0.96, 0.94, 0.95, 0.96, 0.97, 0.98, 0.99, 1.0 + ], + "effective_time_frame": { + "time_interval": { + "start_time": "2025-07-04T08:45:00Z", + "end_time": "2025-07-04T08:45:01Z" + } + } + } +}