-
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.
Re-apply referencing IEEE schemas (#28)
* Revert "Revert "Feature/reference ieee schemas"" This reverts commit f25a749. * Use versions of dependencies known to work
- Loading branch information
Showing
32 changed files
with
292 additions
and
8 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
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,39 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://w3id.org/openmhealth/schemas/omh/area-unit-value-1.1.json", | ||
"type": "object", | ||
"description": "This schema represents an area (measure of a surface)", | ||
"references": [ | ||
{ | ||
"description": "The SNOMED code represents Area", | ||
"url": "http://purl.bioontology.org/ontology/SNOMEDCT/42798000" | ||
} | ||
], | ||
"allOf": [ | ||
{ | ||
"$ref": "https://w3id.org/ieee/ieee-1752-schema/unit-value-1.0.json" | ||
}, | ||
{ | ||
"properties": { | ||
"unit": { | ||
"references": [ | ||
{ | ||
"description": "The unit of measure of the element. Basic unit is meter (m). Allowed values are drawn from the SI Area Units and English Area Units Common Synonyms (non-UCUM). The valid UCUM code is different for square inch ([sin_i]), square foot ([sft_i]), square yard ([syd_i]).", | ||
"url": "http://download.hl7.de/documents/ucum/ucumdata.html" | ||
} | ||
], | ||
"enum": [ | ||
"mm^2", | ||
"cm^2", | ||
"m^2", | ||
"km^2", | ||
"in^2", | ||
"ft^2", | ||
"yd^2", | ||
"mi^2" | ||
] | ||
} | ||
} | ||
} | ||
] | ||
} |
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,66 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://w3id.org/openmhealth/schemas/omh/blood-pressure-4.0.json", | ||
"description": "This schema represents a person's blood pressure as a combination of systolic and diastolic blood pressure.", | ||
"type": "object", | ||
"references": [ | ||
{ | ||
"description": "The SNOMED codes represents Blood pressure (observable entity)", | ||
"url": "http://purl.bioontology.org/ontology/SNOMEDCT/75367002" | ||
} | ||
], | ||
"definitions": { | ||
"systolic_blood_pressure": { | ||
"$ref": "systolic-blood-pressure-1.x.json" | ||
}, | ||
"diastolic_blood_pressure": { | ||
"$ref": "diastolic-blood-pressure-1.x.json" | ||
}, | ||
"time_frame": { | ||
"$ref": "https://w3id.org/ieee/ieee-1752-schema/time-frame-1.0.json" | ||
}, | ||
"body_posture": { | ||
"$ref": "https://w3id.org/ieee/ieee-1752-schema/body-posture-1.0.json" | ||
}, | ||
"body_location": { | ||
"$ref": "body-location-1.x.json" | ||
}, | ||
"temporal_relationship_to_physical_activity": { | ||
"$ref": "temporal-relationship-to-physical-activity-1.x.json" | ||
}, | ||
"descriptive_statistic": { | ||
"$ref": "https://w3id.org/ieee/ieee-1752-schema/descriptive-statistic-1.0.json" | ||
} | ||
}, | ||
|
||
"properties": { | ||
"systolic_blood_pressure": { | ||
"$ref": "#/definitions/systolic_blood_pressure" | ||
}, | ||
"diastolic_blood_pressure": { | ||
"$ref": "#/definitions/diastolic_blood_pressure" | ||
}, | ||
"effective_time_frame": { | ||
"$ref": "#/definitions/time_frame" | ||
}, | ||
"body_posture": { | ||
"$ref": "#/definitions/body_posture" | ||
}, | ||
"descriptive_statistic": { | ||
"$ref": "#/definitions/descriptive_statistic" | ||
}, | ||
"measurement_location": { | ||
"description": "The location on the body where the blood pressure measuring device is placed for measurement.", | ||
"$ref": "#/definitions/body_location" | ||
}, | ||
"temporal_relationship_to_physical_activity": { | ||
"$ref": "#/definitions/temporal_relationship_to_physical_activity" | ||
} | ||
}, | ||
|
||
"required": [ | ||
"systolic_blood_pressure", | ||
"diastolic_blood_pressure", | ||
"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-pressure-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
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
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,2 @@ | ||
jsonschema[format]==4.17.3 | ||
requests==2.31.0 |
9 changes: 9 additions & 0 deletions
9
test-data/ieee/ambient-sound/1.0/shouldFail/invalid-ambient-sound.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 @@ | ||
{ | ||
"ambient_sound": { | ||
"value": 75, | ||
"unit": "deciB" | ||
}, | ||
"effective_time_frame": { | ||
"date_time": "2019-02-05T06:00:00Z" | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
test-data/ieee/body-posture/1.0/shouldFail/invalid-posture.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 @@ | ||
"stnding" |
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 @@ | ||
"semi-recumbent" |
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 @@ | ||
{} |
10 changes: 10 additions & 0 deletions
10
test-data/ieee/time-frame/1.0/shouldFail/time-interval-and-date-time.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,10 @@ | ||
{ | ||
"date_time": "2013-02-05T07:25:00.123Z", | ||
"time_interval": { | ||
"duration": { | ||
"value": 10, | ||
"unit": "d" | ||
}, | ||
"end_date_time": "2013-02-05T07:35:00Z" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
test-data/ieee/time-interval/1.0/shouldFail/duration-only.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 @@ | ||
{ | ||
"duration": { | ||
"unit": "h", | ||
"value": 7.6 | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
test-data/ieee/time-interval/1.0/shouldFail/empty-document.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 @@ | ||
{} |
3 changes: 3 additions & 0 deletions
3
test-data/ieee/time-interval/1.0/shouldFail/end-time-only.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,3 @@ | ||
{ | ||
"end_date_time": "2013-02-05T07:25:00Z" | ||
} |
3 changes: 3 additions & 0 deletions
3
test-data/ieee/time-interval/1.0/shouldFail/start-time-only.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,3 @@ | ||
{ | ||
"start_date_time": "2013-02-05T07:25:00Z" | ||
} |
4 changes: 4 additions & 0 deletions
4
test-data/omh/area-unit-value/1.1/shouldFail/invalid-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,4 @@ | ||
{ | ||
"unit": "foo", | ||
"value": 7.6 | ||
} |
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,3 @@ | ||
{ | ||
"unit": "m^2" | ||
} |
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,3 @@ | ||
{ | ||
"value": 10 | ||
} |
4 changes: 4 additions & 0 deletions
4
test-data/omh/area-unit-value/1.1/shouldPass/positive-value.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,4 @@ | ||
{ | ||
"unit": "m^2", | ||
"value": 7.6 | ||
} |
1 change: 1 addition & 0 deletions
1
test-data/omh/blood-pressure/4.0/shouldFail/empty-document.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 @@ | ||
{} |
14 changes: 14 additions & 0 deletions
14
test-data/omh/blood-pressure/4.0/shouldFail/invalid-pa-value.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,14 @@ | ||
{ | ||
"systolic_blood_pressure": { | ||
"value": 115, | ||
"unit": "mmHg" | ||
}, | ||
"diastolic_blood_pressure": { | ||
"value": 60, | ||
"unit": "mmHg" | ||
}, | ||
"effective_time_frame": { | ||
"date_time": "2020-02-05T07:25:00-08:00" | ||
}, | ||
"temporal_relationship_to_physical_activity": "rest" | ||
} |
17 changes: 17 additions & 0 deletions
17
test-data/omh/blood-pressure/4.0/shouldFail/invalid-timeframe-format.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 @@ | ||
{ | ||
"systolic_blood_pressure": { | ||
"value": 115, | ||
"unit": "mmHg" | ||
}, | ||
"diastolic_blood_pressure": { | ||
"value": 60, | ||
"unit": "mmHg" | ||
}, | ||
"effective_time_frame": { | ||
"time_interval": { | ||
"date": "2013-02-05", | ||
"part_of_day": "morning" | ||
} | ||
}, | ||
"temporal_relationship_to_physical_activity": "at rest" | ||
} |
13 changes: 13 additions & 0 deletions
13
test-data/omh/blood-pressure/4.0/shouldFail/invalid-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,13 @@ | ||
{ | ||
"systolic_blood_pressure": { | ||
"value": 115, | ||
"unit": "mmH" | ||
}, | ||
"diastolic_blood_pressure": { | ||
"value": 60, | ||
"unit": "mmHg" | ||
}, | ||
"effective_time_frame": { | ||
"date_time": "2020-02-05T07:25:00-08:00" | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
test-data/omh/blood-pressure/4.0/shouldPass/blood-pressure-only.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 @@ | ||
{ | ||
"systolic_blood_pressure": { | ||
"value": 115, | ||
"unit": "mmHg" | ||
}, | ||
"diastolic_blood_pressure": { | ||
"value": 60, | ||
"unit": "mmHg" | ||
}, | ||
"effective_time_frame": { | ||
"date_time": "2020-02-05T07:25:00-08:00" | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
test-data/omh/blood-pressure/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,19 @@ | ||
{ | ||
"systolic_blood_pressure": { | ||
"value": 160, | ||
"unit": "mmHg" | ||
}, | ||
"diastolic_blood_pressure": { | ||
"value": 60, | ||
"unit": "mmHg" | ||
}, | ||
"effective_time_frame": { | ||
"time_interval": { | ||
"start_date_time": "2020-02-05T07:00:00-08:00", | ||
"end_date_time": "2020-02-12T07:00:00-08:00" | ||
} | ||
}, | ||
"body_posture": "sitting", | ||
"measurement_location": "left wrist", | ||
"descriptive_statistic": "maximum" | ||
} |
15 changes: 15 additions & 0 deletions
15
test-data/omh/blood-pressure/4.0/shouldPass/with-posture-and-location.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,15 @@ | ||
{ | ||
"systolic_blood_pressure": { | ||
"value": 140, | ||
"unit": "mmHg" | ||
}, | ||
"diastolic_blood_pressure": { | ||
"value": 60, | ||
"unit": "mmHg" | ||
}, | ||
"body_posture": "sitting", | ||
"measurement_location": "left upper arm", | ||
"effective_time_frame": { | ||
"date_time": "2020-02-05T07:25:00-08:00" | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
test-data/omh/blood-pressure/4.0/shouldPass/with-posture-location-relation.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,16 @@ | ||
{ | ||
"systolic_blood_pressure": { | ||
"value": 125, | ||
"unit": "mmHg" | ||
}, | ||
"diastolic_blood_pressure": { | ||
"value": 60, | ||
"unit": "mmHg" | ||
}, | ||
"body_posture": "sitting", | ||
"measurement_location": "left wrist", | ||
"temporal_relationship_to_physical_activity": "at rest", | ||
"effective_time_frame": { | ||
"date_time": "2020-02-05T07:25:00-08:00" | ||
} | ||
} |