From 962a5f3dcbf6b9f759f3feca8d2d04fbc2985226 Mon Sep 17 00:00:00 2001 From: J Grant Forrest Date: Sat, 17 Oct 2020 13:27:17 +0100 Subject: [PATCH 01/16] commit --- logbook-record1.json | 4 ++++ logbook-schema-1.json | 10 ++++++++++ 2 files changed, 14 insertions(+) create mode 100644 logbook-record1.json create mode 100644 logbook-schema-1.json diff --git a/logbook-record1.json b/logbook-record1.json new file mode 100644 index 0000000..e832341 --- /dev/null +++ b/logbook-record1.json @@ -0,0 +1,4 @@ +{ + "name": "encounter1", + "id": "123456", +} \ No newline at end of file diff --git a/logbook-schema-1.json b/logbook-schema-1.json new file mode 100644 index 0000000..f30fc5e --- /dev/null +++ b/logbook-schema-1.json @@ -0,0 +1,10 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "https://github.com/scatauk/logbook-standards/blob/main/logbook-schema-1.json", + "type": "object", + "properties": { + "name": { "type": "string"}, + "id": { "type": "number"}, + "comment": { "type": "string"} + } +} \ No newline at end of file From f7212ce58439eae36253e5cd29760585a94aa653 Mon Sep 17 00:00:00 2001 From: J Grant Forrest Date: Sat, 17 Oct 2020 13:44:19 +0100 Subject: [PATCH 02/16] Update logbook-schema-1.json --- logbook-schema-1.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logbook-schema-1.json b/logbook-schema-1.json index f30fc5e..e180d85 100644 --- a/logbook-schema-1.json +++ b/logbook-schema-1.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema", - "$id": "https://github.com/scatauk/logbook-standards/blob/main/logbook-schema-1.json", + "$id": "https://github.com/scatauk/logbook-standards/blob/grantF/logbook-schema-1.json", "type": "object", "properties": { "name": { "type": "string"}, From faa8b3ed4791bd5a8d0182d62c77cf32dfe0612b Mon Sep 17 00:00:00 2001 From: J Grant Forrest Date: Sat, 17 Oct 2020 14:18:01 +0100 Subject: [PATCH 03/16] update --- logbook-record1.json | 2 ++ logbook-schema-1.json | 11 +++++++++-- logbook-standard.code-workspace | 21 +++++++++++++++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 logbook-standard.code-workspace diff --git a/logbook-record1.json b/logbook-record1.json index e832341..c19c216 100644 --- a/logbook-record1.json +++ b/logbook-record1.json @@ -1,4 +1,6 @@ { "name": "encounter1", "id": "123456", + "comment": "This is a comment", + "category":{ "id": 0, "name": ""} } \ No newline at end of file diff --git a/logbook-schema-1.json b/logbook-schema-1.json index e180d85..cbb9205 100644 --- a/logbook-schema-1.json +++ b/logbook-schema-1.json @@ -1,10 +1,17 @@ { - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://github.com/scatauk/logbook-standards/blob/grantF/logbook-schema-1.json", "type": "object", "properties": { "name": { "type": "string"}, "id": { "type": "number"}, - "comment": { "type": "string"} + "comment": { "type": "string"}, + "category": { + "type": "object", + "properties": { + "name": { "type": "string"}, + "id": { "type": "number"} + } + } } } \ No newline at end of file diff --git a/logbook-standard.code-workspace b/logbook-standard.code-workspace new file mode 100644 index 0000000..05e904f --- /dev/null +++ b/logbook-standard.code-workspace @@ -0,0 +1,21 @@ +{ + "folders": [ + { + "path": "D:/Software/json-schema/logbook-standards" + } + ], + "settings": { + "files.defaultLanguage": "json", + "json.schemas": [ + + + { + "fileMatch": [ + "/logbook-record*.json" + ], + "url": "./logbook-schema-1.json" + } + ] + + } +} \ No newline at end of file From 76e27aa2d1fd4fb191f409b481790c805769eaab Mon Sep 17 00:00:00 2001 From: J Grant Forrest Date: Sat, 17 Oct 2020 14:20:59 +0100 Subject: [PATCH 04/16] update --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3e67e3b..fcdcc40 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # logbook-standards Standards for Anaesthesia Logbooks +This is an initial draft (17-Oct 2020) of a JSON schema for anaesthetic logbooks. +Created for json-schema.org/draft-07 From d9174a24138ec5a2f06806f48b05578ee1f74ab1 Mon Sep 17 00:00:00 2001 From: J Grant Forrest Date: Sat, 17 Oct 2020 15:32:35 +0100 Subject: [PATCH 05/16] commit --- logbook-record1.json | 14 +++++++++++++- logbook-schema-1.json | 30 ++++++++++++++++++++++++++++-- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/logbook-record1.json b/logbook-record1.json index c19c216..d9b0a40 100644 --- a/logbook-record1.json +++ b/logbook-record1.json @@ -2,5 +2,17 @@ "name": "encounter1", "id": "123456", "comment": "This is a comment", - "category":{ "id": 0, "name": ""} + "category": { + "id": 0, + "category_name": "case", + "category_type": "Anaesthesia" + }, + "activity_grouping": { + "activity_name": "Theatre List", + "id": "0" + }, + "timing": { + "start": "2020-10-17T13:23:00+00:00", + "end": "2020-10-17T13:45:00+00:00" + } } \ No newline at end of file diff --git a/logbook-schema-1.json b/logbook-schema-1.json index cbb9205..1c076ec 100644 --- a/logbook-schema-1.json +++ b/logbook-schema-1.json @@ -9,8 +9,34 @@ "category": { "type": "object", "properties": { - "name": { "type": "string"}, - "id": { "type": "number"} + "category_name": { "type": "string"}, + "id": { "type": "number"}, + "category_type": { "type": "string", "enum": ["Anaesthesia","ICM","Pain","Transfer","Resus"]} + } + }, + "activity_grouping": { + "type": "object", + "properties": { + "activity_name": { "type": "string", "enum": ["Theatre List","Ward Round","Clinic"]}, + "id": { "type": "string" } + } + }, + "timing": { + "type": "object", + "properties": { + "start": { "type": "string", "format": "date-time" }, + "end": { "type": "string", "format": "date-time" } + } + }, + "actors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": {"type":"number"}, + "name": {"type":"string"}, + "role": {"type": "string", "enum": ["Patient","Performer","Supervisor"]} + } } } } From 6486870f7e23596ad9324ab28626d67dac61f783 Mon Sep 17 00:00:00 2001 From: J Grant Forrest Date: Sat, 17 Oct 2020 16:23:52 +0100 Subject: [PATCH 06/16] commit --- logbook-record1.json | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/logbook-record1.json b/logbook-record1.json index d9b0a40..f64ac78 100644 --- a/logbook-record1.json +++ b/logbook-record1.json @@ -14,5 +14,26 @@ "timing": { "start": "2020-10-17T13:23:00+00:00", "end": "2020-10-17T13:45:00+00:00" - } + }, + "actors": [ + {"id": 0,"role": "Patient"}, + {"id": 1,"role": "Performer"}, + {"id": 2,"role": "Supervisor"} + ], + "events": [ + { + "id": 0, + "event_type": "procedure", + "event": { + "id": 0, + "description": "GA" + }, + "id": 1, + "event_type": "procedure", + "event": { + "id": 1, + "description":"LA" + } + } + ] } \ No newline at end of file From a8ca7b92b1e908857ea8b4668bff087a98e05e87 Mon Sep 17 00:00:00 2001 From: J Grant Forrest Date: Sat, 17 Oct 2020 16:24:02 +0100 Subject: [PATCH 07/16] commit --- logbook-schema-1.json | 20 +++++++++++++++++++- treeview.svg | 12 ++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 treeview.svg diff --git a/logbook-schema-1.json b/logbook-schema-1.json index 1c076ec..06d2e32 100644 --- a/logbook-schema-1.json +++ b/logbook-schema-1.json @@ -34,10 +34,28 @@ "type": "object", "properties": { "id": {"type":"number"}, - "name": {"type":"string"}, "role": {"type": "string", "enum": ["Patient","Performer","Supervisor"]} } } + }, + "events": { + "type": "array", + "items": { + "type":"object", + "properties": { + "id": { "type": "integer"}, + "event_type": { "type":"string","enum": ["procedure","teaching","simulation"]}, + "event": { + "type":"object", + "properties":{ + "description": { "type":"string", "enum":["GA","LA","GA/LA","Other"]}, + "id": { "type":"integer"} + } + } + } + } + } + } } \ No newline at end of file diff --git a/treeview.svg b/treeview.svg new file mode 100644 index 0000000..df3d7b6 --- /dev/null +++ b/treeview.svg @@ -0,0 +1,12 @@ + +id0category_namecasecategory_typeAnaesthesiacategoryactivity_nameTheatre Listid0activity_groupingstart2020-10-17T13:23:00+00:00end2020-10-17T13:45:00+00:00timingid0rolePatientactors[0]id1rolePerformeractors[1]id2roleSupervisoractors[2]id0descriptionGAeventid0event_typeprocedureevents[0]nameencounter1id123456commentThis is a comment \ No newline at end of file From 263da1aac08b0f04d92312f22ab599193e6dd302 Mon Sep 17 00:00:00 2001 From: J Grant Forrest Date: Sat, 17 Oct 2020 16:26:21 +0100 Subject: [PATCH 08/16] Delete logbook-standard.code-workspace --- logbook-standard.code-workspace | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 logbook-standard.code-workspace diff --git a/logbook-standard.code-workspace b/logbook-standard.code-workspace deleted file mode 100644 index 05e904f..0000000 --- a/logbook-standard.code-workspace +++ /dev/null @@ -1,21 +0,0 @@ -{ - "folders": [ - { - "path": "D:/Software/json-schema/logbook-standards" - } - ], - "settings": { - "files.defaultLanguage": "json", - "json.schemas": [ - - - { - "fileMatch": [ - "/logbook-record*.json" - ], - "url": "./logbook-schema-1.json" - } - ] - - } -} \ No newline at end of file From b7910c85f7db3597b89f794835e723b6a450c970 Mon Sep 17 00:00:00 2001 From: J Grant Forrest Date: Sat, 17 Oct 2020 16:26:31 +0100 Subject: [PATCH 09/16] Delete treeview.svg --- treeview.svg | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 treeview.svg diff --git a/treeview.svg b/treeview.svg deleted file mode 100644 index df3d7b6..0000000 --- a/treeview.svg +++ /dev/null @@ -1,12 +0,0 @@ - -id0category_namecasecategory_typeAnaesthesiacategoryactivity_nameTheatre Listid0activity_groupingstart2020-10-17T13:23:00+00:00end2020-10-17T13:45:00+00:00timingid0rolePatientactors[0]id1rolePerformeractors[1]id2roleSupervisoractors[2]id0descriptionGAeventid0event_typeprocedureevents[0]nameencounter1id123456commentThis is a comment \ No newline at end of file From f671891ff75dfe1abe7e01bed5d8375c15de6ffa Mon Sep 17 00:00:00 2001 From: J Grant Forrest Date: Sat, 17 Oct 2020 16:26:54 +0100 Subject: [PATCH 10/16] Create .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..725a524 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +logbook-standard.code-workspace +treeview.svg From 03604a394e8fcab3003abb81b1292448e94421bb Mon Sep 17 00:00:00 2001 From: J Grant Forrest Date: Sun, 18 Oct 2020 12:45:33 +0100 Subject: [PATCH 11/16] commit --- logbook-schema-procedure.json | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 logbook-schema-procedure.json diff --git a/logbook-schema-procedure.json b/logbook-schema-procedure.json new file mode 100644 index 0000000..c24eae7 --- /dev/null +++ b/logbook-schema-procedure.json @@ -0,0 +1,8 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://github.com/scatauk/logbook-standards/blob/grantF/logbook-schema-procedure.json", + "type": "object", + "properties": { + + } +} \ No newline at end of file From 3fcf486419fb4cffa79c99b28bf5b508afa097c4 Mon Sep 17 00:00:00 2001 From: J Grant Forrest Date: Sun, 18 Oct 2020 13:43:11 +0100 Subject: [PATCH 12/16] comit --- .gitignore | 2 +- .vscode/settings.json | 2 ++ logbook-record1.json | 25 +++++-------------- ...ma-1.json => logbook-schema-encounter.json | 20 +++++++-------- logbook-schema-procedure.json | 9 +++++++ 5 files changed, 28 insertions(+), 30 deletions(-) create mode 100644 .vscode/settings.json rename logbook-schema-1.json => logbook-schema-encounter.json (72%) diff --git a/.gitignore b/.gitignore index 725a524..15737f7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ logbook-standard.code-workspace -treeview.svg + diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..7a73a41 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,2 @@ +{ +} \ No newline at end of file diff --git a/logbook-record1.json b/logbook-record1.json index f64ac78..39bebab 100644 --- a/logbook-record1.json +++ b/logbook-record1.json @@ -1,19 +1,18 @@ { - "name": "encounter1", - "id": "123456", + "id": 123456, "comment": "This is a comment", "category": { "id": 0, - "category_name": "case", "category_type": "Anaesthesia" }, "activity_grouping": { "activity_name": "Theatre List", - "id": "0" + "id": 0 }, "timing": { "start": "2020-10-17T13:23:00+00:00", - "end": "2020-10-17T13:45:00+00:00" + "end": "2020-10-17T13:45:00+00:00", + "category": "Day" }, "actors": [ {"id": 0,"role": "Patient"}, @@ -21,19 +20,7 @@ {"id": 2,"role": "Supervisor"} ], "events": [ - { - "id": 0, - "event_type": "procedure", - "event": { - "id": 0, - "description": "GA" - }, - "id": 1, - "event_type": "procedure", - "event": { - "id": 1, - "description":"LA" - } - } + { "id":0, "event_type": "procedure", "event": {"id": 0, "description": "GA" }}, + { "id":1, "event_type": "procedure", "event": {"id": 1, "description":"LA" }} ] } \ No newline at end of file diff --git a/logbook-schema-1.json b/logbook-schema-encounter.json similarity index 72% rename from logbook-schema-1.json rename to logbook-schema-encounter.json index 06d2e32..b553d83 100644 --- a/logbook-schema-1.json +++ b/logbook-schema-encounter.json @@ -3,14 +3,11 @@ "$id": "https://github.com/scatauk/logbook-standards/blob/grantF/logbook-schema-1.json", "type": "object", "properties": { - "name": { "type": "string"}, - "id": { "type": "number"}, - "comment": { "type": "string"}, + "id": { "type": "integer"}, "category": { "type": "object", "properties": { - "category_name": { "type": "string"}, - "id": { "type": "number"}, + "id": { "type": "integer"}, "category_type": { "type": "string", "enum": ["Anaesthesia","ICM","Pain","Transfer","Resus"]} } }, @@ -18,14 +15,15 @@ "type": "object", "properties": { "activity_name": { "type": "string", "enum": ["Theatre List","Ward Round","Clinic"]}, - "id": { "type": "string" } + "id": { "type": "integer" } } }, "timing": { "type": "object", "properties": { "start": { "type": "string", "format": "date-time" }, - "end": { "type": "string", "format": "date-time" } + "end": { "type": "string", "format": "date-time" }, + "category": { "type": "string", "enum": ["Day","Evening","Night"]} } }, "actors": { @@ -47,9 +45,11 @@ "event_type": { "type":"string","enum": ["procedure","teaching","simulation"]}, "event": { "type":"object", - "properties":{ - "description": { "type":"string", "enum":["GA","LA","GA/LA","Other"]}, - "id": { "type":"integer"} + "properties": { + "procedure": { "$ref": "logbook-schema-procedure.json"}, + "surgical procedure": { "type":"object"}, + "teaching": { "type": "string"}, + "simulation": { "type": "string"} } } } diff --git a/logbook-schema-procedure.json b/logbook-schema-procedure.json index c24eae7..ba61ae0 100644 --- a/logbook-schema-procedure.json +++ b/logbook-schema-procedure.json @@ -3,6 +3,15 @@ "$id": "https://github.com/scatauk/logbook-standards/blob/grantF/logbook-schema-procedure.json", "type": "object", "properties": { + "category": { + "type": "object", + "properties": { + "airway": { "type": "object"}, + "lines": { "type": "object"}, + "regional blocks": { "type": "object" }, + "general anaesthesia": { "type": "object" } + } + } } } \ No newline at end of file From afac3abf701507e0f58e23ea41beeef837dcf469 Mon Sep 17 00:00:00 2001 From: J Grant Forrest Date: Sun, 18 Oct 2020 14:58:41 +0100 Subject: [PATCH 13/16] commit --- logbook-schema-encounter.json | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/logbook-schema-encounter.json b/logbook-schema-encounter.json index b553d83..6fcbe94 100644 --- a/logbook-schema-encounter.json +++ b/logbook-schema-encounter.json @@ -1,6 +1,22 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://github.com/scatauk/logbook-standards/blob/grantF/logbook-schema-1.json", + "$id": "http://json-schema.org/draft-7/hyper-schema-output", + "$schema": "http://json-schema.org/draft-07/schema#" +} +{ + "type": "object", + "properties": { + "metadata": { + "type": "object", + "properties": { + "setting": { "type": "string", "enum": ["unit or physical location","rotation or training programme","country"]}, + "unique_id": { "type": "integer"}, + "comment": { "type": "string" }, + "version": { "type": "string" }, + "timestamp": { "type": "string", "format": "date-time" } + } + } + }, + "type": "object", "properties": { "id": { "type": "integer"}, @@ -31,7 +47,7 @@ "items": { "type": "object", "properties": { - "id": {"type":"number"}, + "id": {"type":"integer"}, "role": {"type": "string", "enum": ["Patient","Performer","Supervisor"]} } } From 539325e1dfc4924a44780958674e0f1544278e36 Mon Sep 17 00:00:00 2001 From: J Grant Forrest Date: Sun, 18 Oct 2020 15:04:18 +0100 Subject: [PATCH 14/16] commit --- logbook-schema-procedure.json | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/logbook-schema-procedure.json b/logbook-schema-procedure.json index ba61ae0..c25a0e5 100644 --- a/logbook-schema-procedure.json +++ b/logbook-schema-procedure.json @@ -1,17 +1,31 @@ { + "$id": "http://json-schema.org/draft-7/hyper-schema-output", "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://github.com/scatauk/logbook-standards/blob/grantF/logbook-schema-procedure.json", + "description": "A sub-schema of logbook-schema-encounter.json, for procedures", + "type": "object", "properties": { "category": { "type": "object", "properties": { - "airway": { "type": "object"}, + "airway": { + "type": "object", + "properties": { + "tracheal intubation": {"type": "string", "enum":["single lumen","double lumen","fibreoptic","awake fibreoptic","other"]}, + "lma placement": { "type": "string", "enum":["standard","supreme","iGel","other"]} + }, "lines": { "type": "object"}, "regional blocks": { "type": "object" }, - "general anaesthesia": { "type": "object" } + "general anaesthesia": { + "type": "object", + "properties": { + "induction": { "type": "string", "enum": ["Inhalation", "Intravenous"]}, + "maintenance": { "type": "string", "enum": ["Inhalational Agent","TIVA/TCI","TIVA/Other"]} + } } } } +} +} } \ No newline at end of file From 68181301548e38788cd118a9a9c2e2b193be8e04 Mon Sep 17 00:00:00 2001 From: J Grant Forrest Date: Sun, 18 Oct 2020 15:05:11 +0100 Subject: [PATCH 15/16] commit --- logbook-record1.json | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/logbook-record1.json b/logbook-record1.json index 39bebab..01a8286 100644 --- a/logbook-record1.json +++ b/logbook-record1.json @@ -20,7 +20,21 @@ {"id": 2,"role": "Supervisor"} ], "events": [ - { "id":0, "event_type": "procedure", "event": {"id": 0, "description": "GA" }}, - { "id":1, "event_type": "procedure", "event": {"id": 1, "description":"LA" }} + { "id":0, "event_type": "procedure", "event": { + "procedure": { + "category": { + "general anaesthesia": { "induction": "Intravenous", "maintenance": "TIVA/TCI" } + } + } + } + }, + { "id":1, "event_type": "procedure", "event": { + "procedure": { + "category": { + "airway": {"tracheal intubation": "single lumen"} + } + } + } + } ] } \ No newline at end of file From 123b7ac65914e5be4d75d86e79eac59060ef39f9 Mon Sep 17 00:00:00 2001 From: J Grant Forrest Date: Sun, 18 Oct 2020 15:37:38 +0100 Subject: [PATCH 16/16] Update logbook-schema-encounter.json --- logbook-schema-encounter.json | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/logbook-schema-encounter.json b/logbook-schema-encounter.json index 6fcbe94..a2323fd 100644 --- a/logbook-schema-encounter.json +++ b/logbook-schema-encounter.json @@ -1,8 +1,9 @@ { "$id": "http://json-schema.org/draft-7/hyper-schema-output", - "$schema": "http://json-schema.org/draft-07/schema#" -} -{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Encounter", + "description": "A root encounter for a logbook", + "type": "object", "properties": { "metadata": { @@ -14,12 +15,7 @@ "version": { "type": "string" }, "timestamp": { "type": "string", "format": "date-time" } } - } - }, - - "type": "object", - "properties": { - "id": { "type": "integer"}, + }, "category": { "type": "object", "properties": {