Skip to content

Commit

Permalink
Updated blood glucose schema to reference IEEE schemas and added samp…
Browse files Browse the repository at this point in the history
…le data
  • Loading branch information
scarini committed Jan 31, 2024
1 parent 273a75c commit e8b7cc3
Show file tree
Hide file tree
Showing 14 changed files with 183 additions and 0 deletions.
72 changes: 72 additions & 0 deletions schema/omh/blood-glucose-4.0.json
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"
]
}
1 change: 1 addition & 0 deletions schema/omh/blood-glucose-4.x.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
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"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"blood_glucose": {
"unit": "mg/dL",
"value": 95
},
"specimen_source": "fluid"
}
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"
}
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"
}
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"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"blood_glucose": {
"unit": "mg/dL",
"value": 120
}
}
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"
}
}
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"
}
16 changes: 16 additions & 0 deletions test-data/omh/blood-glucose/4.0/shouldPass/with-everything.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"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"
}
},
"specimen_source": "capillary blood",
"temporal_relationship_to_meal": "fasting",
"temporal_relationship_to_sleep": "on waking",
"descriptive_statistic": "minimum"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"blood_glucose": {
"unit": "mg/dL",
"value": 95
},
"effective_time_frame": {
"date_time": "2013-02-05T07:25:00Z"
},
"temporal_relationship_to_meal": "fasting"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"blood_glucose": {
"unit": "mg/dL",
"value": 95
},
"effective_time_frame": {
"date_time": "2013-02-05T20:25:00Z"
},
"temporal_relationship_to_sleep": "before sleeping"
}

0 comments on commit e8b7cc3

Please sign in to comment.