Commit 51cddd78 authored by Sebastian Mate's avatar Sebastian Mate
Browse files

Add additional test data (in the comment block at the end of the file) so that...

Add additional test data (in the comment block at the end of the file) so that i2b2 returns a patient count
parent e58bd485
......@@ -4,6 +4,11 @@
-- Author: Sebastian Mate (sebastian.mate@uk-erlangen.de)
-- Revision History:
-- -----------------
-- 2021-01-22: - Add additional test data (in the comment block at the end of the file) so that i2b2 returns a patient count
-- ============= Create Basic Tables =============
-- Create the "fhir" table, which will act as the "inbox" for the FHIR data:
......@@ -490,8 +495,16 @@ INSERT INTO i2b2miracum.fhir (fhir) VALUES ('{ "resourceType": "Encounter", "id"
INSERT INTO i2b2miracum.fhir (fhir) VALUES ('{ "resourceType": "Condition", "id": "Condition1", "meta": { "source": "Condition1.json", "profile": [ "https://fhir.miracum.org/core/StructureDefinition/Diagnose" ] }, "identifier": [ { "use": "official", "system": "https://fhir.diz.uk-erlangen/NamingSystem/kdbSurrogateConditionId", "value": "36574576345432" } ], "verificationStatus": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", "code": "confirmed" } ] }, "code": { "coding": [ { "system": "http://fhir.de/CodeSystem/dimdi/icd-10-gm", "version": "2015", "code": "K59.0" } ] }, "subject": { "identifier": { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "MR" } ] }, "system": "https://fhir.diz.uk-erlangen.de/NamingSystem/patientId", "value": "Patient1" } }, "encounter": { "identifier": { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "VN" } ] }, "system": "https://fhir.diz.uk-erlangen.de/NamingSystem/encounterId", "value": "Encounter1" } }, "onsetDateTime": "2014-06-11T09:08:42+00:00", "recordedDate": "2014-06-11T09:03:42+00:00" }');
INSERT INTO i2b2miracum.fhir (fhir) VALUES ('{ "resourceType": "Condition", "id": "Condition2", "meta": { "source": "Condition2.json", "profile": [ "https://fhir.miracum.org/core/StructureDefinition/Diagnose" ] }, "identifier": [ { "use": "official", "system": "https://fhir.diz.uk-erlangen/NamingSystem/kdbSurrogateConditionId", "value": "36574576345432" } ], "verificationStatus": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", "code": "confirmed" } ] }, "code": { "coding": [ { "system": "http://fhir.de/CodeSystem/dimdi/icd-10-gm", "version": "2015", "code": "K60.0" } ] }, "subject": { "identifier": { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "MR" } ] }, "system": "https://fhir.diz.uk-erlangen.de/NamingSystem/patientId", "value": "Patient2" } }, "encounter": { "identifier": { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "VN" } ] }, "system": "https://fhir.diz.uk-erlangen.de/NamingSystem/encounterId", "value": "Encounter2" } }, "onsetDateTime": "2015-06-11T09:08:42+00:00", "recordedDate": "2016-06-11T09:03:42+00:00" }');
-- Test mit mehreren Codings:
INSERT INTO i2b2miracum.fhir (fhir) VALUES ('{ "resourceType": "Condition", "id": "Condition1", "meta": { "source": "Condition1.json", "profile": [ "https://fhir.miracum.org/core/StructureDefinition/Diagnose" ] }, "identifier": [ { "use": "official", "system": "https://fhir.diz.uk-erlangen/NamingSystem/kdbSurrogateConditionId", "value": "36574576345432" } ], "verificationStatus": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", "code": "confirmed" } ] }, "code": { "coding": [ { "system": "http://fhir.de/CodeSystem/dimdi/System1", "version": "2015", "code": "Code1" }, { "system": "http://fhir.de/CodeSystem/dimdi/System2", "version": "2015", "code": "Code2" } ] }, "subject": { "identifier": { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "MR" } ] }, "system": "https://fhir.diz.uk-erlangen.de/NamingSystem/patientId", "value": "Patient1" } }, "encounter": { "identifier": { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "VN" } ] }, "system": "https://fhir.diz.uk-erlangen.de/NamingSystem/encounterId", "value": "Encounter1" } }, "onsetDateTime": "2014-06-11T09:08:42+00:00", "recordedDate": "2014-06-11T09:03:42+00:00" }');
INSERT INTO i2b2miracum.fhir (fhir) VALUES ('{ "resourceType": "Condition", "id": "Condition3", "meta": { "source": "Condition3.json", "profile": [ "https://fhir.miracum.org/core/StructureDefinition/Diagnose" ] }, "identifier": [ { "use": "official", "system": "https://fhir.diz.uk-erlangen/NamingSystem/kdbSurrogateConditionId", "value": "36574576345432" } ], "verificationStatus": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", "code": "confirmed" } ] }, "code": { "coding": [ { "system": "http://fhir.de/CodeSystem/dimdi/System1", "version": "2015", "code": "Code1" }, { "system": "http://fhir.de/CodeSystem/dimdi/System2", "version": "2015", "code": "Code2" } ] }, "subject": { "identifier": { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "MR" } ] }, "system": "https://fhir.diz.uk-erlangen.de/NamingSystem/patientId", "value": "Patient1" } }, "encounter": { "identifier": { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "VN" } ] }, "system": "https://fhir.diz.uk-erlangen.de/NamingSystem/encounterId", "value": "Encounter1" } }, "onsetDateTime": "2014-06-11T09:08:42+00:00", "recordedDate": "2014-06-11T09:03:42+00:00" }');
-- More data so that i2b2 (with obfuscation) shows a result:
INSERT INTO i2b2miracum.fhir (fhir) VALUES ('{ "resourceType": "Condition", "id": "Condition4", "meta": { "source": "Condition4.json", "profile": [ "https://fhir.miracum.org/core/StructureDefinition/Diagnose" ] }, "identifier": [ { "use": "official", "system": "https://fhir.diz.uk-erlangen/NamingSystem/kdbSurrogateConditionId", "value": "36574576345432" } ], "verificationStatus": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", "code": "confirmed" } ] }, "code": { "coding": [ { "system": "http://fhir.de/CodeSystem/dimdi/icd-10-gm", "version": "2015", "code": "K76.9" } ] }, "subject": { "identifier": { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "MR" } ] }, "system": "https://fhir.diz.uk-erlangen.de/NamingSystem/patientId", "value": "Patient4" } }, "encounter": { "identifier": { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "VN" } ] }, "system": "https://fhir.diz.uk-erlangen.de/NamingSystem/encounterId", "value": "Encounter4" } }, "onsetDateTime": "2015-06-11T09:08:42+00:00", "recordedDate": "2016-06-11T09:03:42+00:00" }');
INSERT INTO i2b2miracum.fhir (fhir) VALUES ('{ "resourceType": "Condition", "id": "Condition5", "meta": { "source": "Condition5.json", "profile": [ "https://fhir.miracum.org/core/StructureDefinition/Diagnose" ] }, "identifier": [ { "use": "official", "system": "https://fhir.diz.uk-erlangen/NamingSystem/kdbSurrogateConditionId", "value": "36574576345432" } ], "verificationStatus": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", "code": "confirmed" } ] }, "code": { "coding": [ { "system": "http://fhir.de/CodeSystem/dimdi/icd-10-gm", "version": "2015", "code": "K76.9" } ] }, "subject": { "identifier": { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "MR" } ] }, "system": "https://fhir.diz.uk-erlangen.de/NamingSystem/patientId", "value": "Patient5" } }, "encounter": { "identifier": { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "VN" } ] }, "system": "https://fhir.diz.uk-erlangen.de/NamingSystem/encounterId", "value": "Encounter5" } }, "onsetDateTime": "2015-06-11T09:08:42+00:00", "recordedDate": "2016-06-11T09:03:42+00:00" }');
INSERT INTO i2b2miracum.fhir (fhir) VALUES ('{ "resourceType": "Condition", "id": "Condition6", "meta": { "source": "Condition6.json", "profile": [ "https://fhir.miracum.org/core/StructureDefinition/Diagnose" ] }, "identifier": [ { "use": "official", "system": "https://fhir.diz.uk-erlangen/NamingSystem/kdbSurrogateConditionId", "value": "36574576345432" } ], "verificationStatus": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", "code": "confirmed" } ] }, "code": { "coding": [ { "system": "http://fhir.de/CodeSystem/dimdi/icd-10-gm", "version": "2015", "code": "K76.9" } ] }, "subject": { "identifier": { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "MR" } ] }, "system": "https://fhir.diz.uk-erlangen.de/NamingSystem/patientId", "value": "Patient6" } }, "encounter": { "identifier": { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "VN" } ] }, "system": "https://fhir.diz.uk-erlangen.de/NamingSystem/encounterId", "value": "Encounter6" } }, "onsetDateTime": "2015-06-11T09:08:42+00:00", "recordedDate": "2016-06-11T09:03:42+00:00" }');
INSERT INTO i2b2miracum.fhir (fhir) VALUES ('{ "resourceType": "Condition", "id": "Condition7", "meta": { "source": "Condition7.json", "profile": [ "https://fhir.miracum.org/core/StructureDefinition/Diagnose" ] }, "identifier": [ { "use": "official", "system": "https://fhir.diz.uk-erlangen/NamingSystem/kdbSurrogateConditionId", "value": "36574576345432" } ], "verificationStatus": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", "code": "confirmed" } ] }, "code": { "coding": [ { "system": "http://fhir.de/CodeSystem/dimdi/icd-10-gm", "version": "2015", "code": "K76.9" } ] }, "subject": { "identifier": { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "MR" } ] }, "system": "https://fhir.diz.uk-erlangen.de/NamingSystem/patientId", "value": "Patient7" } }, "encounter": { "identifier": { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "VN" } ] }, "system": "https://fhir.diz.uk-erlangen.de/NamingSystem/encounterId", "value": "Encounter7" } }, "onsetDateTime": "2015-06-11T09:08:42+00:00", "recordedDate": "2016-06-11T09:03:42+00:00" }');
INSERT INTO i2b2miracum.fhir (fhir) VALUES ('{ "resourceType": "Condition", "id": "Condition8", "meta": { "source": "Condition8.json", "profile": [ "https://fhir.miracum.org/core/StructureDefinition/Diagnose" ] }, "identifier": [ { "use": "official", "system": "https://fhir.diz.uk-erlangen/NamingSystem/kdbSurrogateConditionId", "value": "36574576345432" } ], "verificationStatus": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", "code": "confirmed" } ] }, "code": { "coding": [ { "system": "http://fhir.de/CodeSystem/dimdi/icd-10-gm", "version": "2015", "code": "K76.9" } ] }, "subject": { "identifier": { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "MR" } ] }, "system": "https://fhir.diz.uk-erlangen.de/NamingSystem/patientId", "value": "Patient8" } }, "encounter": { "identifier": { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "VN" } ] }, "system": "https://fhir.diz.uk-erlangen.de/NamingSystem/encounterId", "value": "Encounter8" } }, "onsetDateTime": "2015-06-11T09:08:42+00:00", "recordedDate": "2016-06-11T09:03:42+00:00" }');
INSERT INTO i2b2miracum.fhir (fhir) VALUES ('{ "resourceType": "Observation", "id": "Observation1", "meta": { "source": "Labor1.json", "profile": [ "https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/ObservationLab" ] }, "identifier": [ { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "OBI" } ] }, "system": "https://fhir.diz.uk-erlangen.de/NamingSystem/swisslab/labObservationId", "value": "123123123123-123123123123", "assigner": { "identifier": { "system": "https://www.medizininformatik-initiative.de/fhir/core/NamingSystem/org-identifier", "value": "UKER" } } } ], "status": "final", "category": [ { "coding": [ { "system": "http://loinc.org", "code": "26436-6" }, { "system": "http://terminology.hl7.org/CodeSystem/observation-category", "code": "laboratory" } ] } ], "code": { "coding": [ { "system": "http://loinc.org", "code": "41653-7" } ] }, "subject": { "identifier": { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "MR" } ] }, "system": "https://fhir.diz.uk-erlangen.de/NamingSystem/patientId", "value": "Patient1" } }, "encounter": { "reference": "Encounter/Encounter1", "identifier": { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "VN" } ] }, "system": "https://fhir.diz.uk-erlangen.de/NamingSystem/encounterId", "value": "Encounter1" } }, "effectiveDateTime": "2014-12-22T16:23:00+00:00", "issued": "2014-12-22T16:23:00+00:00", "valueQuantity": { "value": 134, "unit": "mg/dL", "system": "http://unitsofmeasure.org", "code": "mg/dL" } }');
INSERT INTO i2b2miracum.fhir (fhir) VALUES ('{ "resourceType": "Observation", "id": "Observation2", "meta": { "source": "Labor2.json", "profile": [ "https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/ObservationLab" ] }, "identifier": [ { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "OBI" } ] }, "system": "https://fhir.diz.uk-erlangen.de/NamingSystem/swisslab/labObservationId", "value": "5675675567856785678", "assigner": { "identifier": { "system": "https://www.medizininformatik-initiative.de/fhir/core/NamingSystem/org-identifier", "value": "UKER" } } } ], "status": "final", "category": [ { "coding": [ { "system": "http://loinc.org", "code": "26436-6" }, { "system": "http://terminology.hl7.org/CodeSystem/observation-category", "code": "laboratory" } ] } ], "code": { "coding": [ { "system": "http://loinc.org", "code": "41653-8" } ] }, "subject": { "identifier": { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "MR" } ] }, "system": "https://fhir.diz.uk-erlangen.de/NamingSystem/patientId", "value": "Patient2" } }, "encounter": { "reference": "Encounter/Encounter2", "identifier": { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "VN" } ] }, "system": "https://fhir.diz.uk-erlangen.de/NamingSystem/encounterId", "value": "Encounter2" } }, "effectiveDateTime": "2014-12-23T16:23:00+00:00", "issued": "2014-12-23T16:23:00+00:00", "valueQuantity": { "value": 135, "unit": "mg/dL", "system": "http://unitsofmeasure.org", "code": "mg/dL" } }');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment