-
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.
Revert "Revert "Feature/reference ieee schemas""
This reverts commit fea0cd9.
- Loading branch information
Showing
42 changed files
with
521 additions
and
1 deletion.
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,40 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://w3id.org/openmhealth/schemas/omh/body-fat-percentage-2.0.json", | ||
"description": "This schema represents a person's body fat percentage.", | ||
"type": "object", | ||
"references": [ | ||
{ | ||
"description": "The LOINC code represents Body fat percentage:Mass Fraction:Point in time:^Patient:Quantitative:Measured", | ||
"url": "http://purl.bioontology.org/ontology/LNC/41982-0" | ||
} | ||
], | ||
"definitions": { | ||
"percent-unit_value": { | ||
"$ref": "https://w3id.org/ieee/ieee-1752-schema/percent-unit-value-1.0.json" | ||
}, | ||
"time_frame": { | ||
"$ref": "https://w3id.org/ieee/ieee-1752-schema/time-frame-1.0.json" | ||
}, | ||
"descriptive_statistic": { | ||
"$ref": "https://w3id.org/ieee/ieee-1752-schema/descriptive-statistic-1.0.json" | ||
} | ||
}, | ||
|
||
"properties": { | ||
"body_fat_percentage": { | ||
"$ref": "#/definitions/percent-unit_value" | ||
}, | ||
"effective_time_frame": { | ||
"$ref": "#/definitions/time_frame" | ||
}, | ||
"descriptive_statistic": { | ||
"$ref": "#/definitions/descriptive_statistic" | ||
} | ||
}, | ||
|
||
"required": [ | ||
"body_fat_percentage", | ||
"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 @@ | ||
body-fat-percentage-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://w3id.org/openmhealth/schemas/omh/body-height-2.0.json", | ||
"description": "This schema represents a person's body height.", | ||
"type": "object", | ||
"references": [ | ||
{ | ||
"description": "The SNOMED code represents Body height measure (observable entity)", | ||
"url": "http://purl.bioontology.org/ontology/SNOMEDCT/50373000" | ||
} | ||
], | ||
"definitions": { | ||
"length_unit_value": { | ||
"$ref": "https://w3id.org/ieee/ieee-1752-schema/length-unit-value-1.0.json" | ||
}, | ||
"time_frame": { | ||
"$ref": "https://w3id.org/ieee/ieee-1752-schema/time-frame-1.0.json" | ||
}, | ||
"descriptive_statistic": { | ||
"$ref": "https://w3id.org/ieee/ieee-1752-schema/descriptive-statistic-1.0.json" | ||
} | ||
}, | ||
|
||
"properties": { | ||
"body_height": { | ||
"$ref": "#/definitions/length_unit_value" | ||
}, | ||
"effective_time_frame": { | ||
"$ref": "#/definitions/time_frame" | ||
}, | ||
"descriptive_statistic": { | ||
"$ref": "#/definitions/descriptive_statistic" | ||
} | ||
}, | ||
|
||
"required": [ | ||
"body_height", | ||
"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 @@ | ||
body-height-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://w3id.org/openmhealth/schemas/omh/body-location-1.1.json", | ||
"description": "A location on the body. This is an incomplete value set. Values from the Anatomical or acquired body structure hierarchy of SNOMED can be added as needed.", | ||
"type": "string", | ||
"references": [ | ||
{ | ||
"description": "The SNOMED code represents Anatomical or acquired body structure (body structure)", | ||
"url": "http://purl.bioontology.org/ontology/SNOMEDCT/442083009" | ||
} | ||
], | ||
|
||
"enum": [ | ||
"left ankle", | ||
"right ankle", | ||
"left hip", | ||
"right hip", | ||
"left thigh", | ||
"right thigh", | ||
"left thorax", | ||
"middle left thorax", | ||
"left upper arm", | ||
"right upper arm", | ||
"left wrist", | ||
"right wrist" | ||
] | ||
} |
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 @@ | ||
body-location-1.0.json | ||
body-location-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://w3id.org/openmhealth/schemas/omh/body-mass-index-3.0.json", | ||
"description": "This schema represents a person's body mass index (BMI)", | ||
"type": "object", | ||
"references": [ | ||
{ | ||
"description": "The SNOMED code represents Body mass index (observable entity)", | ||
"url": "http://purl.bioontology.org/ontology/SNOMEDCT/60621009" | ||
} | ||
], | ||
"definitions": { | ||
"unit_value": { | ||
"$ref": "https://w3id.org/ieee/ieee-1752-schema/unit-value-1.0.json" | ||
}, | ||
"time_frame": { | ||
"$ref": "https://w3id.org/ieee/ieee-1752-schema/time-frame-1.0.json" | ||
}, | ||
"descriptive_statistic": { | ||
"$ref": "https://w3id.org/ieee/ieee-1752-schema/descriptive-statistic-1.0.json" | ||
} | ||
}, | ||
|
||
"properties": { | ||
"body_mass_index": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/unit_value" | ||
}, | ||
{ | ||
"properties": { | ||
"unit": { | ||
"references": [ | ||
{ | ||
"description": "The unit of measure the element. Allowed value is drawn from the Areic mass Units Common Synonyms (non-UCUM).", | ||
"url": "http://download.hl7.de/documents/ucum/ucumdata.html" | ||
} | ||
], | ||
"enum": ["kg/m^2"] | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"effective_time_frame": { | ||
"$ref": "#/definitions/time_frame" | ||
}, | ||
"descriptive_statistic": { | ||
"$ref": "#/definitions/descriptive_statistic" | ||
} | ||
}, | ||
|
||
"required": [ | ||
"body_mass_index", | ||
"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 @@ | ||
body-mass-index-3.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,64 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://w3id.org/openmhealth/schemas/omh/body-temperature-4.0.json", | ||
"description": "This schema represents a person's body temperature.", | ||
"type": "object", | ||
"references": [ | ||
{ | ||
"description": "The SNOMED code represents body temperature (observable entity)", | ||
"url": "http://purl.bioontology.org/ontology/SNOMEDCT/386725007" | ||
} | ||
], | ||
|
||
"definitions": { | ||
"temperature_unit_value": { | ||
"$ref": "https://w3id.org/ieee/ieee-1752-schema/temperature-unit-value-1.0.json" | ||
}, | ||
"time_frame": { | ||
"$ref": "https://w3id.org/ieee/ieee-1752-schema/time-frame-1.0.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": { | ||
"body_temperature": { | ||
"$ref": "#/definitions/temperature_unit_value" | ||
}, | ||
"effective_time_frame": { | ||
"$ref": "#/definitions/time_frame" | ||
}, | ||
"descriptive_statistic": { | ||
"$ref": "#/definitions/descriptive_statistic" | ||
}, | ||
"measurement_location": { | ||
"description": "The value set is taken from SNOMED CT and LOINC. For common temperature locations, the adjective is used rather than the actual location name (e.g., axillary rather than armpit). Forehead indicates the use of a disposable strip.", | ||
"type": "string", | ||
"enum": [ | ||
"axillary", | ||
"finger", | ||
"forehead", | ||
"oral", | ||
"rectal", | ||
"temporal artery", | ||
"toe", | ||
"tympanic", | ||
"wrist", | ||
"vagina" | ||
] | ||
}, | ||
|
||
"temporal_relationship_to_sleep": { | ||
"description": "The temporal relationship to sleep of the temperature measurement(s). The lowest body temperature attained during rest, usually estimated by a temperature measurement immediately on waking up and before any physical activity has been undertaken is called basal temperature.", | ||
"$ref": "#/definitions/temporal_relationship_to_sleep" | ||
} | ||
}, | ||
"required": [ | ||
"body_temperature", | ||
"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 @@ | ||
body-temperature-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,41 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://w3id.org/openmhealth/schemas/omh/body-weight-2.0.json", | ||
"description": "This schema represents a person's body weight.", | ||
|
||
"type": "object", | ||
"references": [ | ||
{ | ||
"description": "The SNOMED code represents Body weight measure (observable entity)", | ||
"url": "http://purl.bioontology.org/ontology/SNOMEDCT/363808001" | ||
} | ||
], | ||
"definitions": { | ||
"mass_unit_value": { | ||
"$ref": "mass-unit-value-1.x.json" | ||
}, | ||
"time_frame": { | ||
"$ref": "https://w3id.org/ieee/ieee-1752-schema/time-frame-1.0.json" | ||
}, | ||
"descriptive_statistic": { | ||
"$ref": "https://w3id.org/ieee/ieee-1752-schema/descriptive-statistic-1.0.json" | ||
} | ||
}, | ||
|
||
"properties": { | ||
"body_weight": { | ||
"$ref": "#/definitions/mass_unit_value" | ||
}, | ||
"effective_time_frame": { | ||
"$ref": "#/definitions/time_frame" | ||
}, | ||
"descriptive_statistic": { | ||
"$ref": "#/definitions/descriptive_statistic" | ||
} | ||
}, | ||
|
||
"required": [ | ||
"body_weight", | ||
"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 @@ | ||
body-weight-3.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
1 change: 1 addition & 0 deletions
1
test-data/omh/body-fat-percentage/2.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 @@ | ||
{} |
9 changes: 9 additions & 0 deletions
9
test-data/omh/body-fat-percentage/2.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,9 @@ | ||
{ | ||
"body_fat_percentage": { | ||
"value": 16, | ||
"unit": "kg" | ||
}, | ||
"effective_time_frame": { | ||
"date_time": "2023-02-05T07:25:00Z" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
test-data/omh/body-fat-percentage/2.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 @@ | ||
{ | ||
"body_fat_percentage": { | ||
"value": 16, | ||
"unit": "%" | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
test-data/omh/body-fat-percentage/2.0/shouldPass/body-fat-percentage-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,9 @@ | ||
{ | ||
"body_fat_percentage": { | ||
"value": 16, | ||
"unit": "%" | ||
}, | ||
"effective_time_frame": { | ||
"date_time": "2023-02-05T07:25:00-08:00" | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
test-data/omh/body-fat-percentage/2.0/shouldPass/with-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 @@ | ||
{ | ||
"body_fat_percentage": { | ||
"value": 16, | ||
"unit": "%" | ||
}, | ||
"effective_time_frame": { | ||
"time_interval": { | ||
"start_date_time": "2023-01-01T00:00:00Z", | ||
"end_date_time": "2023-12-31T23:59:59Z" | ||
} | ||
}, | ||
"descriptive_statistic": "maximum" | ||
} |
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 changes: 6 additions & 0 deletions
6
test-data/omh/body-height/2.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 @@ | ||
{ | ||
"body_height": { | ||
"value": 180, | ||
"unit": "cm" | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
test-data/omh/body-height/2.0/shouldFail/with-part-of-day.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,12 @@ | ||
{ | ||
"body_height": { | ||
"value": 180, | ||
"unit": "cm" | ||
}, | ||
"effective_time_frame": { | ||
"time_interval": { | ||
"date": "2023-02-05", | ||
"part_of_day": "morning" | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
test-data/omh/body-height/2.0/shouldPass/body-height-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,9 @@ | ||
{ | ||
"body_height": { | ||
"value": 180, | ||
"unit": "cm" | ||
}, | ||
"effective_time_frame": { | ||
"date_time": "2023-02-05T07:25:00Z" | ||
} | ||
} |
Oops, something went wrong.