From f25a749de01544868ad53831f90d9622c5686ab3 Mon Sep 17 00:00:00 2001 From: scarini Date: Fri, 28 Jul 2023 17:08:26 -0700 Subject: [PATCH] Revert "Feature/reference ieee schemas" --- schema/omh/area-unit-value-1.1.json | 39 ----------- schema/omh/blood-pressure-4.0.json | 66 ------------------- schema/omh/blood-pressure-4.x.json | 1 - schema/omh/body-posture-1.0.json | 6 +- schema/omh/physical-activity-1.2.json | 6 +- schema/omh/step-count-3.0.json | 6 +- schema/omh/time-frame-1.0.json | 6 +- schema/omh/time-interval-1.0.json | 6 +- .../1.0/shouldFail/invalid-ambient-sound.json | 9 --- .../1.0/shouldFail/invalid-posture.json | 1 - .../1.0/shouldPass/valid-posture.json | 1 - .../1.0/shouldFail/empty-document.json | 1 - .../time-interval-and-date-time.json | 10 --- .../1.0/shouldFail/duration-only.json | 6 -- .../1.0/shouldFail/empty-document.json | 1 - .../1.0/shouldFail/end-time-only.json | 3 - .../1.0/shouldFail/start-time-only.json | 3 - .../1.1/shouldFail/invalid-unit.json | 4 -- .../1.1/shouldFail/unit-only.json | 3 - .../1.1/shouldFail/value-only.json | 3 - .../1.1/shouldPass/positive-value.json | 4 -- .../4.0/shouldFail/empty-document.json | 1 - .../4.0/shouldFail/invalid-pa-value.json | 14 ---- .../shouldFail/invalid-timeframe-format.json | 17 ----- .../4.0/shouldFail/invalid-unit.json | 13 ---- .../4.0/shouldPass/blood-pressure-only.json | 13 ---- .../with-descriptive-statistic.json | 19 ------ .../shouldPass/with-posture-and-location.json | 15 ----- .../with-posture-location-relation.json | 16 ----- 29 files changed, 5 insertions(+), 288 deletions(-) delete mode 100644 schema/omh/area-unit-value-1.1.json delete mode 100644 schema/omh/blood-pressure-4.0.json delete mode 120000 schema/omh/blood-pressure-4.x.json delete mode 100644 test-data/ieee/ambient-sound/1.0/shouldFail/invalid-ambient-sound.json delete mode 100644 test-data/ieee/body-posture/1.0/shouldFail/invalid-posture.json delete mode 100644 test-data/ieee/body-posture/1.0/shouldPass/valid-posture.json delete mode 100644 test-data/ieee/time-frame/1.0/shouldFail/empty-document.json delete mode 100644 test-data/ieee/time-frame/1.0/shouldFail/time-interval-and-date-time.json delete mode 100644 test-data/ieee/time-interval/1.0/shouldFail/duration-only.json delete mode 100644 test-data/ieee/time-interval/1.0/shouldFail/empty-document.json delete mode 100644 test-data/ieee/time-interval/1.0/shouldFail/end-time-only.json delete mode 100644 test-data/ieee/time-interval/1.0/shouldFail/start-time-only.json delete mode 100644 test-data/omh/area-unit-value/1.1/shouldFail/invalid-unit.json delete mode 100644 test-data/omh/area-unit-value/1.1/shouldFail/unit-only.json delete mode 100644 test-data/omh/area-unit-value/1.1/shouldFail/value-only.json delete mode 100644 test-data/omh/area-unit-value/1.1/shouldPass/positive-value.json delete mode 100644 test-data/omh/blood-pressure/4.0/shouldFail/empty-document.json delete mode 100644 test-data/omh/blood-pressure/4.0/shouldFail/invalid-pa-value.json delete mode 100644 test-data/omh/blood-pressure/4.0/shouldFail/invalid-timeframe-format.json delete mode 100644 test-data/omh/blood-pressure/4.0/shouldFail/invalid-unit.json delete mode 100644 test-data/omh/blood-pressure/4.0/shouldPass/blood-pressure-only.json delete mode 100644 test-data/omh/blood-pressure/4.0/shouldPass/with-descriptive-statistic.json delete mode 100644 test-data/omh/blood-pressure/4.0/shouldPass/with-posture-and-location.json delete mode 100644 test-data/omh/blood-pressure/4.0/shouldPass/with-posture-location-relation.json diff --git a/schema/omh/area-unit-value-1.1.json b/schema/omh/area-unit-value-1.1.json deleted file mode 100644 index 86fdb681..00000000 --- a/schema/omh/area-unit-value-1.1.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "$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" - ] - } - } - } - ] -} \ No newline at end of file diff --git a/schema/omh/blood-pressure-4.0.json b/schema/omh/blood-pressure-4.0.json deleted file mode 100644 index 55bf2d49..00000000 --- a/schema/omh/blood-pressure-4.0.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "$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" - ] -} \ No newline at end of file diff --git a/schema/omh/blood-pressure-4.x.json b/schema/omh/blood-pressure-4.x.json deleted file mode 120000 index 2411562a..00000000 --- a/schema/omh/blood-pressure-4.x.json +++ /dev/null @@ -1 +0,0 @@ -blood-pressure-4.0.json \ No newline at end of file diff --git a/schema/omh/body-posture-1.0.json b/schema/omh/body-posture-1.0.json index 57bec066..69060ede 100644 --- a/schema/omh/body-posture-1.0.json +++ b/schema/omh/body-posture-1.0.json @@ -1,10 +1,6 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "deprecation": { - "reason": "This schema is now deprecated, in favor of the IEEE 1752.1 schema of the same name.", - "supersededBy": "https://w3id.org/ieee/ieee-1752-schema/body-posture.json", - "date": "2022-12-01" - }, + "type": "string", "description": "The posture of the subject (for example, during a clinical measurement). This value set is not exhaustive.", "references": [ diff --git a/schema/omh/physical-activity-1.2.json b/schema/omh/physical-activity-1.2.json index 7f3acc89..0e83ca1b 100644 --- a/schema/omh/physical-activity-1.2.json +++ b/schema/omh/physical-activity-1.2.json @@ -1,10 +1,6 @@ { "$schema": "http://json-schema.org/draft-04/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/physical-activity.json", - "date": "2022-12-01" - }, + "description": "This schema represents a single episode of physical activity.", "type": "object", "references": [ diff --git a/schema/omh/step-count-3.0.json b/schema/omh/step-count-3.0.json index 972aebfa..cfe82f81 100644 --- a/schema/omh/step-count-3.0.json +++ b/schema/omh/step-count-3.0.json @@ -1,10 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "deprecation": { - "reason": "This schema is now deprecated, in favor of the IEEE 1752.1 physical-activity schema which models also number of steps.", - "supersededBy": "https://w3id.org/ieee/ieee-1752-schema/physical-activity.json", - "date": "2022-12-01" - }, + "description": "This schema represents number of steps.", "type": "object", diff --git a/schema/omh/time-frame-1.0.json b/schema/omh/time-frame-1.0.json index 704685ad..45748204 100644 --- a/schema/omh/time-frame-1.0.json +++ b/schema/omh/time-frame-1.0.json @@ -1,10 +1,6 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "deprecation": { - "reason": "This schema is now deprecated, in favor of the IEEE 1752.1 schema of the same name.", - "supersededBy": "https://w3id.org/ieee/ieee-1752-schema/time-frame.json", - "date": "2022-12-01" - }, + "description": "This schema describes a time frame as a point in time or a time interval.", "type": "object", diff --git a/schema/omh/time-interval-1.0.json b/schema/omh/time-interval-1.0.json index 6072277e..f614df55 100644 --- a/schema/omh/time-interval-1.0.json +++ b/schema/omh/time-interval-1.0.json @@ -1,10 +1,6 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "deprecation": { - "reason": "This schema is now deprecated, in favor of the IEEE 1752.1 schema of the same name.", - "supersededBy": "https://w3id.org/ieee/ieee-1752-schema/time-interval.json", - "date": "2022-12-01" - }, + "description": "This schema describes an interval of time. In the absence of a precise start and/or end time, the time interval can be described as a date + a part of the day (morning, afternoon, evening, night). No commitments are made as to 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).", "type": "object", diff --git a/test-data/ieee/ambient-sound/1.0/shouldFail/invalid-ambient-sound.json b/test-data/ieee/ambient-sound/1.0/shouldFail/invalid-ambient-sound.json deleted file mode 100644 index c968d212..00000000 --- a/test-data/ieee/ambient-sound/1.0/shouldFail/invalid-ambient-sound.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ambient_sound": { - "value": 75, - "unit": "deciB" - }, - "effective_time_frame": { - "date_time": "2019-02-05T06:00:00Z" - } -} diff --git a/test-data/ieee/body-posture/1.0/shouldFail/invalid-posture.json b/test-data/ieee/body-posture/1.0/shouldFail/invalid-posture.json deleted file mode 100644 index c4671b9b..00000000 --- a/test-data/ieee/body-posture/1.0/shouldFail/invalid-posture.json +++ /dev/null @@ -1 +0,0 @@ -"stnding" \ No newline at end of file diff --git a/test-data/ieee/body-posture/1.0/shouldPass/valid-posture.json b/test-data/ieee/body-posture/1.0/shouldPass/valid-posture.json deleted file mode 100644 index 71569d80..00000000 --- a/test-data/ieee/body-posture/1.0/shouldPass/valid-posture.json +++ /dev/null @@ -1 +0,0 @@ -"semi-recumbent" \ No newline at end of file diff --git a/test-data/ieee/time-frame/1.0/shouldFail/empty-document.json b/test-data/ieee/time-frame/1.0/shouldFail/empty-document.json deleted file mode 100644 index 9e26dfee..00000000 --- a/test-data/ieee/time-frame/1.0/shouldFail/empty-document.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/test-data/ieee/time-frame/1.0/shouldFail/time-interval-and-date-time.json b/test-data/ieee/time-frame/1.0/shouldFail/time-interval-and-date-time.json deleted file mode 100644 index 4d596734..00000000 --- a/test-data/ieee/time-frame/1.0/shouldFail/time-interval-and-date-time.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "date_time": "2013-02-05T07:25:00.123Z", - "time_interval": { - "duration": { - "value": 10, - "unit": "d" - }, - "end_date_time": "2013-02-05T07:35:00Z" - } -} \ No newline at end of file diff --git a/test-data/ieee/time-interval/1.0/shouldFail/duration-only.json b/test-data/ieee/time-interval/1.0/shouldFail/duration-only.json deleted file mode 100644 index 7ae9cfc6..00000000 --- a/test-data/ieee/time-interval/1.0/shouldFail/duration-only.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "duration": { - "unit": "h", - "value": 7.6 - } -} \ No newline at end of file diff --git a/test-data/ieee/time-interval/1.0/shouldFail/empty-document.json b/test-data/ieee/time-interval/1.0/shouldFail/empty-document.json deleted file mode 100644 index 9e26dfee..00000000 --- a/test-data/ieee/time-interval/1.0/shouldFail/empty-document.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/test-data/ieee/time-interval/1.0/shouldFail/end-time-only.json b/test-data/ieee/time-interval/1.0/shouldFail/end-time-only.json deleted file mode 100644 index 1b2fdd15..00000000 --- a/test-data/ieee/time-interval/1.0/shouldFail/end-time-only.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "end_date_time": "2013-02-05T07:25:00Z" -} \ No newline at end of file diff --git a/test-data/ieee/time-interval/1.0/shouldFail/start-time-only.json b/test-data/ieee/time-interval/1.0/shouldFail/start-time-only.json deleted file mode 100644 index b86c583d..00000000 --- a/test-data/ieee/time-interval/1.0/shouldFail/start-time-only.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "start_date_time": "2013-02-05T07:25:00Z" -} \ No newline at end of file diff --git a/test-data/omh/area-unit-value/1.1/shouldFail/invalid-unit.json b/test-data/omh/area-unit-value/1.1/shouldFail/invalid-unit.json deleted file mode 100644 index a6088f97..00000000 --- a/test-data/omh/area-unit-value/1.1/shouldFail/invalid-unit.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "unit": "foo", - "value": 7.6 -} \ No newline at end of file diff --git a/test-data/omh/area-unit-value/1.1/shouldFail/unit-only.json b/test-data/omh/area-unit-value/1.1/shouldFail/unit-only.json deleted file mode 100644 index c01cd442..00000000 --- a/test-data/omh/area-unit-value/1.1/shouldFail/unit-only.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "unit": "m^2" -} \ No newline at end of file diff --git a/test-data/omh/area-unit-value/1.1/shouldFail/value-only.json b/test-data/omh/area-unit-value/1.1/shouldFail/value-only.json deleted file mode 100644 index 10711972..00000000 --- a/test-data/omh/area-unit-value/1.1/shouldFail/value-only.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "value": 10 -} \ No newline at end of file diff --git a/test-data/omh/area-unit-value/1.1/shouldPass/positive-value.json b/test-data/omh/area-unit-value/1.1/shouldPass/positive-value.json deleted file mode 100644 index a1ba7713..00000000 --- a/test-data/omh/area-unit-value/1.1/shouldPass/positive-value.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "unit": "m^2", - "value": 7.6 -} \ No newline at end of file diff --git a/test-data/omh/blood-pressure/4.0/shouldFail/empty-document.json b/test-data/omh/blood-pressure/4.0/shouldFail/empty-document.json deleted file mode 100644 index 9e26dfee..00000000 --- a/test-data/omh/blood-pressure/4.0/shouldFail/empty-document.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/test-data/omh/blood-pressure/4.0/shouldFail/invalid-pa-value.json b/test-data/omh/blood-pressure/4.0/shouldFail/invalid-pa-value.json deleted file mode 100644 index 97af5c09..00000000 --- a/test-data/omh/blood-pressure/4.0/shouldFail/invalid-pa-value.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "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" -} diff --git a/test-data/omh/blood-pressure/4.0/shouldFail/invalid-timeframe-format.json b/test-data/omh/blood-pressure/4.0/shouldFail/invalid-timeframe-format.json deleted file mode 100644 index 2754b774..00000000 --- a/test-data/omh/blood-pressure/4.0/shouldFail/invalid-timeframe-format.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "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" -} diff --git a/test-data/omh/blood-pressure/4.0/shouldFail/invalid-unit.json b/test-data/omh/blood-pressure/4.0/shouldFail/invalid-unit.json deleted file mode 100644 index 10a915a1..00000000 --- a/test-data/omh/blood-pressure/4.0/shouldFail/invalid-unit.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "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" - } -} \ No newline at end of file diff --git a/test-data/omh/blood-pressure/4.0/shouldPass/blood-pressure-only.json b/test-data/omh/blood-pressure/4.0/shouldPass/blood-pressure-only.json deleted file mode 100644 index 50349949..00000000 --- a/test-data/omh/blood-pressure/4.0/shouldPass/blood-pressure-only.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "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" - } -} \ No newline at end of file diff --git a/test-data/omh/blood-pressure/4.0/shouldPass/with-descriptive-statistic.json b/test-data/omh/blood-pressure/4.0/shouldPass/with-descriptive-statistic.json deleted file mode 100644 index 1c70e428..00000000 --- a/test-data/omh/blood-pressure/4.0/shouldPass/with-descriptive-statistic.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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" -} \ No newline at end of file diff --git a/test-data/omh/blood-pressure/4.0/shouldPass/with-posture-and-location.json b/test-data/omh/blood-pressure/4.0/shouldPass/with-posture-and-location.json deleted file mode 100644 index d57bc28a..00000000 --- a/test-data/omh/blood-pressure/4.0/shouldPass/with-posture-and-location.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "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" - } -} \ No newline at end of file diff --git a/test-data/omh/blood-pressure/4.0/shouldPass/with-posture-location-relation.json b/test-data/omh/blood-pressure/4.0/shouldPass/with-posture-location-relation.json deleted file mode 100644 index 13aeae2c..00000000 --- a/test-data/omh/blood-pressure/4.0/shouldPass/with-posture-location-relation.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "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" - } -} \ No newline at end of file