Skip to content

Commit

Permalink
Updated acceleration, diastolic blood pressure to reference IEEE sche…
Browse files Browse the repository at this point in the history
…mas, deprecated ambient temperature schema
  • Loading branch information
scarini committed Jan 31, 2024
1 parent 63dc54a commit bea1dcc
Show file tree
Hide file tree
Showing 8 changed files with 123 additions and 5 deletions.
47 changes: 47 additions & 0 deletions schema/omh/acceleration-2.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://w3id.org/openmhealth/schemas/omh/acceleration-1.1.json",
"description": "This schema represents accelerometer measurements. The assumption is a 2-axis accelerometer. For a 3-axis accelerometer, the z measurement should also be required.",
"type": "object",

"definitions": {
"acceleration_unit_value": {
"$ref": "acceleration-unit-value-1.x.json"
},
"time_frame": {
"$ref": "https://w3id.org/ieee/ieee-1752-schema/time-frame-1.0.json"
},
"body_location": {
"$ref": "body-location-1.x.json"
},
"descriptive_statistic": {
"$ref": "https://w3id.org/ieee/ieee-1752-schema/descriptive-statistic-1.0.json"
}
},

"properties": {
"acceleration_x": {
"$ref": "#/definitions/acceleration_unit_value"
},
"acceleration_y": {
"$ref": "#/definitions/acceleration_unit_value"
},
"acceleration_z": {
"$ref": "#/definitions/acceleration_unit_value"
},
"effective_time_frame": {
"$ref": "#/definitions/time_frame"
},
"sensor_body_location": {
"$ref": "#/definitions/body_location"
},
"descriptive_statistic": {
"$ref": "#/definitions/descriptive_statistic"
}
},
"required": [
"acceleration_x",
"acceleration_y",
"effective_time_frame"
]
}
1 change: 1 addition & 0 deletions schema/omh/acceleration-2.x.json
4 changes: 2 additions & 2 deletions schema/omh/activity-name-1.0.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",

"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://w3id.org/openmhealth/schemas/omh/activity-name-1.0.json",
"description": "The name(s) of the physical activity(ies) in which the person is engaged. It is recommended that the activity name be drawn from the CDC guidelines to facilitate mapping to standard energy expenditure values (METs)",

"references": [
Expand Down
8 changes: 6 additions & 2 deletions schema/omh/ambient-temperature-1.0.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",

"$schema": "http://json-schema.org/draft-07/schema#",
"deprecation": {
"reason": "This schema is now deprecated, in favor of the IEEE 1752.1 schema with the same name.",
"supersededBy": "https://w3id.org/ieee/ieee-1752-schema/ambient-temperature.json",
"date": "2022-12-01"
},
"description": "This schema represents the ambient temperature, either a single measurement, or the result of aggregating several measurements made over time (see Descriptive schema for a list of aggregate measures)",
"type": "object",
"references": [
Expand Down
31 changes: 31 additions & 0 deletions schema/omh/diastolic-blood-pressure-1.1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://w3id.org/openmhealth/schemas/omh/diastolic-blood-pressure-1.1.json",
"description": "This schema represents a person's diastolic blood pressure.",
"type": "object",
"references": [
{
"description": "The SNOMED code represents diastolic blood pressure (observable entity)",
"url": "http://purl.bioontology.org/ontology/SNOMEDCT/271650006"
}
],

"definitions": {
"unit_value": {
"$ref": "https://w3id.org/ieee/ieee-1752-schema/unit-value-1.0.json"
}
},

"allOf": [
{
"$ref": "#/definitions/unit_value"
},
{
"properties": {
"unit": {
"enum": ["mmHg"]
}
}
}
]
}
2 changes: 1 addition & 1 deletion schema/omh/diastolic-blood-pressure-1.x.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"acceleration_x": {
"value": 0.0596923828125,
"unit": "m/s^2"
},
"acceleration_y": {
"value": 0.0125,
"unit": "m/s"
},
"acceleration_z": {
"value": 0.0001,
"unit": "m/s^2"
},
"effective_time_frame": {
"date_time": "2015-08-18T07:25:00Z"
}
}
18 changes: 18 additions & 0 deletions test-data/omh/acceleration/2.0/shouldPass/valid-acceleration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"acceleration_x": {
"value": 0.0596923828125,
"unit": "m/s^2"
},
"acceleration_y": {
"value": 0.0125,
"unit": "m/s^2"
},
"acceleration_z": {
"value": 0.0001,
"unit": "m/s^2"
},
"sensor_body_location": "right wrist",
"effective_time_frame": {
"date_time": "2015-08-18T07:25:00Z"
}
}

0 comments on commit bea1dcc

Please sign in to comment.