-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from openmhealth/feature/reference-ieee-schemas-3
Feature/reference ieee schemas 3
- Loading branch information
Showing
28 changed files
with
354 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
acceleration-2.0.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://w3id.org/openmhealth/schemas/omh/blood-glucose-4.0.json", | ||
"description": "This schema represents a person's blood glucose level.", | ||
"type": "object", | ||
|
||
"references": [ | ||
{ | ||
"description": "The SNOMED code represents Blood glucose level (finding)", | ||
"url": "http://purl.bioontology.org/ontology/SNOMEDCT/365812005" | ||
} | ||
], | ||
"definitions": { | ||
"unit_value": { | ||
"$ref": "https://w3id.org/ieee/ieee-1752-schema/unit-value-1.0.json" | ||
}, | ||
"specimen_source": { | ||
"$ref": "specimen-source-2.x.json" | ||
}, | ||
"time_frame": { | ||
"$ref": "https://w3id.org/ieee/ieee-1752-schema/time-frame-1.0.json" | ||
}, | ||
"temporal_relationship_to_meal": { | ||
"$ref": "temporal-relationship-to-meal-1.x.json" | ||
}, | ||
"temporal_relationship_to_sleep": { | ||
"$ref": "temporal-relationship-to-sleep-1.x.json" | ||
}, | ||
"descriptive_statistic": { | ||
"$ref": "https://w3id.org/ieee/ieee-1752-schema/descriptive-statistic-1.0.json" | ||
} | ||
}, | ||
|
||
"properties": { | ||
"blood_glucose": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/unit_value" | ||
}, | ||
{ | ||
"properties": { | ||
"unit": { | ||
"enum": [ | ||
"mg/dL", | ||
"mmol/L" | ||
] | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"specimen_source": { | ||
"$ref": "#/definitions/specimen_source" | ||
}, | ||
"effective_time_frame": { | ||
"$ref": "#/definitions/time_frame" | ||
}, | ||
"temporal_relationship_to_meal": { | ||
"$ref": "#/definitions/temporal_relationship_to_meal" | ||
}, | ||
"temporal_relationship_to_sleep": { | ||
"$ref": "#/definitions/temporal_relationship_to_sleep" | ||
}, | ||
"descriptive_statistic": { | ||
"$ref": "#/definitions/descriptive_statistic" | ||
} | ||
}, | ||
"required": [ | ||
"blood_glucose", | ||
"effective_time_frame" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
blood-glucose-4.0.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
diastolic-blood-pressure-1.0.json | ||
diastolic-blood-pressure-1.1.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/systolic-blood-pressure-1.1.json", | ||
"description": "This schema represents a person's systolic blood pressure.", | ||
"type": "object", | ||
"references": [ | ||
{ | ||
"description": "The SNOMED code represents systolic blood pressure (observable entity)", | ||
"url": "http://purl.bioontology.org/ontology/SNOMEDCT/271649006" | ||
} | ||
], | ||
|
||
"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"] | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
systolic-blood-pressure-1.0.json | ||
systolic-blood-pressure-1.1.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
volume-unit-value-1.0.json | ||
volume-unit-value-1.1.json |
17 changes: 17 additions & 0 deletions
17
test-data/omh/acceleration/2.0/shouldFail/invalid-acceleration-unit.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
18
test-data/omh/acceleration/2.0/shouldPass/valid-acceleration.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
13 changes: 13 additions & 0 deletions
13
test-data/omh/blood-glucose/4.0/shouldFail/invalid-descriptive-statistic.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"blood_glucose": { | ||
"unit": "mg/dL", | ||
"value": 95 | ||
}, | ||
"effective_time_frame": { | ||
"time_interval": { | ||
"start_date_time": "2013-02-05T07:25:00Z", | ||
"end_date_time": "2013-06-05T07:25:00Z" | ||
} | ||
}, | ||
"descriptive_statistic": "minmum" | ||
} |
7 changes: 7 additions & 0 deletions
7
test-data/omh/blood-glucose/4.0/shouldFail/invalid-specimen-source.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"blood_glucose": { | ||
"unit": "mg/dL", | ||
"value": 95 | ||
}, | ||
"specimen_source": "fluid" | ||
} |
7 changes: 7 additions & 0 deletions
7
test-data/omh/blood-glucose/4.0/shouldFail/invalid-temporal-relationship-to-meal.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"blood_glucose": { | ||
"unit": "mg/dL", | ||
"value": 95 | ||
}, | ||
"temporal_relationship_to_meal": "fsting" | ||
} |
7 changes: 7 additions & 0 deletions
7
test-data/omh/blood-glucose/4.0/shouldFail/invalid-temporal-relationship-to-sleep.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"blood_glucose": { | ||
"unit": "mg/dL", | ||
"value": 95 | ||
}, | ||
"temporal_relationship_to_sleep": "bfore sleeping" | ||
} |
11 changes: 11 additions & 0 deletions
11
test-data/omh/blood-glucose/4.0/shouldFail/invalid-time-interval.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"blood_glucose": { | ||
"unit": "mg/dL", | ||
"value": 120 | ||
}, | ||
"effective_time_frame": { | ||
"time_interval": { | ||
"start_date_time": "2013-02-05T07:25:00Z" | ||
} | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
test-data/omh/blood-glucose/4.0/shouldFail/missing-time-frame.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"blood_glucose": { | ||
"unit": "mg/dL", | ||
"value": 120 | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
test-data/omh/blood-glucose/4.0/shouldPass/with-date-time-time-frame.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"blood_glucose": { | ||
"unit": "mg/dL", | ||
"value": 95 | ||
}, | ||
"effective_time_frame": { | ||
"date_time": "2013-02-05T07:25:00Z" | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
test-data/omh/blood-glucose/4.0/shouldPass/with-descriptive-statistic.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"blood_glucose": { | ||
"unit": "mg/dL", | ||
"value": 120 | ||
}, | ||
"effective_time_frame": { | ||
"time_interval": { | ||
"start_date_time": "2013-02-05T07:25:00Z", | ||
"end_date_time": "2013-06-05T07:25:00Z" | ||
} | ||
}, | ||
"descriptive_statistic": "minimum" | ||
} |
Oops, something went wrong.