-- DBMS: bigquery
CREATE TABLE `bigquery-public-data.fhir_synthea.diagnostic_report`
(
  basedOn ARRAY<STRUCT<carePlanId STRING, immunizationRecommendationId STRING, medicationRequestId STRING, nutritionOrderId STRING, procedureRequestId STRING, referralRequestId STRING, reference STRING, identifier STRUCT<use STRING, type STRUCT<coding ARRAY<STRUCT<system STRING, version STRING, code STRING, display STRING, userSelected BOOL>>, text STRING>, system STRING, value STRING, period STRUCT<start STRING, `end` STRING>, assigner STRUCT<organizationId STRING, reference STRING, identifier STRUCT<use STRING, type STRUCT<coding ARRAY<STRUCT<system STRING, version STRING, code STRING, display STRING, userSelected BOOL>>, text STRING>, system STRING, value STRING, period STRUCT<start STRING, `end` STRING>, assigner STRUCT<organizationId STRING, reference STRING, display STRING>>, display STRING>>, display STRING>>,
  category STRUCT<coding ARRAY<STRUCT<system STRING, version STRING, code STRING, display STRING, userSelected BOOL>>, text STRING>,
  codedDiagnosis ARRAY<STRUCT<coding ARRAY<STRUCT<system STRING, version STRING, code STRING, display STRING, userSelected BOOL>>, text STRING>>,
  conclusion STRING,
  identifier ARRAY<STRUCT<use STRING, type STRUCT<coding ARRAY<STRUCT<system STRING, version STRING, code STRING, display STRING, userSelected BOOL>>, text STRING>, system STRING, value STRING, period STRUCT<start STRING, `end` STRING>, assigner STRUCT<organizationId STRING, reference STRING, identifier STRUCT<use STRING, type STRUCT<coding ARRAY<STRUCT<system STRING, version STRING, code STRING, display STRING, userSelected BOOL>>, text STRING>, system STRING, value STRING, period STRUCT<start STRING, `end` STRING>, assigner STRUCT<organizationId STRING, reference STRING, display STRING>>, display STRING>>>,
  image ARRAY<STRUCT<comment STRING, link STRUCT<mediaId STRING, reference STRING, identifier STRUCT<use STRING, type STRUCT<coding ARRAY<STRUCT<system STRING, version STRING, code STRING, display STRING, userSelected BOOL>>, text STRING>, system STRING, value STRING, period STRUCT<start STRING, `end` STRING>, assigner STRUCT<organizationId STRING, reference STRING, identifier STRUCT<use STRING, type STRUCT<coding ARRAY<STRUCT<system STRING, version STRING, code STRING, display STRING, userSelected BOOL>>, text STRING>, system STRING, value STRING, period STRUCT<start STRING, `end` STRING>, assigner STRUCT<organizationId STRING, reference STRING, display STRING>>, display STRING>>, display STRING>>>,
  imagingStudy ARRAY<STRUCT<imagingStudyId STRING, imagingManifestId STRING, reference STRING, identifier STRUCT<use STRING, type STRUCT<coding ARRAY<STRUCT<system STRING, version STRING, code STRING, display STRING, userSelected BOOL>>, text STRING>, system STRING, value STRING, period STRUCT<start STRING, `end` STRING>, assigner STRUCT<organizationId STRING, reference STRING, identifier STRUCT<use STRING, type STRUCT<coding ARRAY<STRUCT<system STRING, version STRING, code STRING, display STRING, userSelected BOOL>>, text STRING>, system STRING, value STRING, period STRUCT<start STRING, `end` STRING>, assigner STRUCT<organizationId STRING, reference STRING, display STRING>>, display STRING>>, display STRING>>,
  implicitRules STRING,
  language STRING,
  meta STRUCT<versionId STRING, lastUpdated TIMESTAMP, profile ARRAY<STRING>, security ARRAY<STRUCT<system STRING, version STRING, code STRING, display STRING, userSelected BOOL>>, tag ARRAY<STRUCT<system STRING, version STRING, code STRING, display STRING, userSelected BOOL>>>,
  performer ARRAY<STRUCT<role STRUCT<coding ARRAY<STRUCT<system STRING, version STRING, code STRING, display STRING, userSelected BOOL>>, text STRING>, actor STRUCT<practitionerId STRING, organizationId STRING, reference STRING, identifier STRUCT<use STRING, type STRUCT<coding ARRAY<STRUCT<system STRING, version STRING, code STRING, display STRING, userSelected BOOL>>, text STRING>, system STRING, value STRING, period STRUCT<start STRING, `end` STRING>, assigner STRUCT<organizationId STRING, reference STRING, identifier STRUCT<use STRING, type STRUCT<coding ARRAY<STRUCT<system STRING, version STRING, code STRING, display STRING, userSelected BOOL>>, text STRING>, system STRING, value STRING, period STRUCT<start STRING, `end` STRING>, assigner STRUCT<organizationId STRING, reference STRING, display STRING>>, display STRING>>, display STRING>>>,
  presentedForm ARRAY<STRUCT<contentType STRING, language STRING, data STRING, url STRING, size INT64, `hash` STRING, title STRING, creation STRING>>,
  specimen ARRAY<STRUCT<specimenId STRING, reference STRING, identifier STRUCT<use STRING, type STRUCT<coding ARRAY<STRUCT<system STRING, version STRING, code STRING, display STRING, userSelected BOOL>>, text STRING>, system STRING, value STRING, period STRUCT<start STRING, `end` STRING>, assigner STRUCT<organizationId STRING, reference STRING, identifier STRUCT<use STRING, type STRUCT<coding ARRAY<STRUCT<system STRING, version STRING, code STRING, display STRING, userSelected BOOL>>, text STRING>, system STRING, value STRING, period STRUCT<start STRING, `end` STRING>, assigner STRUCT<organizationId STRING, reference STRING, display STRING>>, display STRING>>, display STRING>>,
  text STRUCT<status STRING, div STRING>,
  code STRUCT<coding ARRAY<STRUCT<userSelected BOOL, version STRING, code STRING, display STRING, system STRING>>, text STRING>,
  context STRUCT<display STRING, episodeOfCareId STRING, identifier STRUCT<use STRING, type STRUCT<coding ARRAY<STRUCT<system STRING, version STRING, code STRING, display STRING, userSelected BOOL>>, text STRING>, system STRING, value STRING, period STRUCT<start STRING, `end` STRING>, assigner STRUCT<organizationId STRING, reference STRING, identifier STRUCT<use STRING, type STRUCT<coding ARRAY<STRUCT<system STRING, version STRING, code STRING, display STRING, userSelected BOOL>>, text STRING>, system STRING, value STRING, period STRUCT<start STRING, `end` STRING>, assigner STRUCT<organizationId STRING, reference STRING, display STRING>>, display STRING>>, reference STRING, encounterId STRING>,
  effective STRUCT<period STRUCT<start STRING, `end` STRING>, dateTime STRING>,
  id STRING,
  issued TIMESTAMP,
  result ARRAY<STRUCT<identifier STRUCT<use STRING, type STRUCT<coding ARRAY<STRUCT<system STRING, version STRING, code STRING, display STRING, userSelected BOOL>>, text STRING>, system STRING, value STRING, period STRUCT<start STRING, `end` STRING>, assigner STRUCT<organizationId STRING, reference STRING, identifier STRUCT<use STRING, type STRUCT<coding ARRAY<STRUCT<system STRING, version STRING, code STRING, display STRING, userSelected BOOL>>, text STRING>, system STRING, value STRING, period STRUCT<start STRING, `end` STRING>, assigner STRUCT<organizationId STRING, reference STRING, display STRING>>, display STRING>>, reference STRING, display STRING, observationId STRING>>,
  status STRING,
  subject STRUCT<deviceId STRING, display STRING, groupId STRING, identifier STRUCT<use STRING, type STRUCT<coding ARRAY<STRUCT<system STRING, version STRING, code STRING, display STRING, userSelected BOOL>>, text STRING>, system STRING, value STRING, period STRUCT<start STRING, `end` STRING>, assigner STRUCT<organizationId STRING, reference STRING, identifier STRUCT<use STRING, type STRUCT<coding ARRAY<STRUCT<system STRING, version STRING, code STRING, display STRING, userSelected BOOL>>, text STRING>, system STRING, value STRING, period STRUCT<start STRING, `end` STRING>, assigner STRUCT<organizationId STRING, reference STRING, display STRING>>, display STRING>>, locationId STRING, reference STRING, patientId STRING>
);

INSERT INTO `bigquery-public-data.fhir_synthea.diagnostic_report` (basedOn, category, codedDiagnosis, conclusion, identifier, image, imagingStudy, implicitRules, language, meta, performer, presentedForm, specimen, text, code, context, effective, id, issued, result, status, subject) VALUES ('[]', NULL, '[]', NULL, '[]', '[]', '[]', NULL, NULL, NULL, '[]', '[]', '[]', NULL, {'coding': "[{'userSelected': None, 'version': None, 'code': '57698-3', 'display': 'Lipid Panel', 'system': 'http://loinc.org'}]", 'text': 'Lipid Panel'}, {'display': None, 'episodeOfCareId': None, 'identifier': None, 'reference': None, 'encounterId': '679e23b3-3482-4e5f-aab4-a989a815f018'}, {'period': None, 'dateTime': '1972-01-18T01:13:58+00:00'}, '68891173-47cf-4ded-a3d8-b17324ead788', '1972-01-18 01:13:58.448000+00:00', '[{''identifier'': None, ''reference'': None, ''display'': ''Total Cholesterol'', ''observationId'': ''4711de85-26e3-4127-8078-2eca471a05ec''}
 {''identifier'': None, ''reference'': None, ''display'': ''Triglycerides'', ''observationId'': ''ec2b667d-0148-4345-911f-1339791b95ce''}
 {''identifier'': None, ''reference'': None, ''display'': ''Low Density Lipoprotein Cholesterol'', ''observationId'': ''112a6043-c6bd-4ad3-a3a3-23a9b1687465''}
 {''identifier'': None, ''reference'': None, ''display'': ''High Density Lipoprotein Cholesterol'', ''observationId'': ''f4a30feb-21b6-4635-8636-f37be190341b''}]', 'final', {'deviceId': None, 'display': None, 'groupId': None, 'identifier': None, 'locationId': None, 'reference': None, 'patientId': '50652048-f452-4122-ab2b-6572a2febef5'}), ('[]', NULL, '[]', NULL, '[]', '[]', '[]', NULL, NULL, NULL, '[]', '[]', '[]', NULL, {'coding': "[{'userSelected': None, 'version': None, 'code': '57698-3', 'display': 'Lipid Panel', 'system': 'http://loinc.org'}]", 'text': 'Lipid Panel'}, {'display': None, 'episodeOfCareId': None, 'identifier': None, 'reference': None, 'encounterId': '7679100b-b97b-47eb-a477-e865b652f7a3'}, {'period': None, 'dateTime': '2010-10-02T00:51:51+00:00'}, '6898282c-4524-4cbf-8b00-7796acb6e65c', '2010-10-02 00:51:51.852000+00:00', '[{''identifier'': None, ''reference'': None, ''display'': ''Total Cholesterol'', ''observationId'': ''457b7e20-cde0-40eb-b516-b4141c710fd2''}
 {''identifier'': None, ''reference'': None, ''display'': ''Triglycerides'', ''observationId'': ''18a2e556-a9a4-4f1a-955e-745f39a4f2c1''}
 {''identifier'': None, ''reference'': None, ''display'': ''Low Density Lipoprotein Cholesterol'', ''observationId'': ''4e33feb1-4f3c-44cc-974b-2a3e87251510''}
 {''identifier'': None, ''reference'': None, ''display'': ''High Density Lipoprotein Cholesterol'', ''observationId'': ''038bf89e-19d3-4fc4-80b2-76c174efae7b''}]', 'final', {'deviceId': None, 'display': None, 'groupId': None, 'identifier': None, 'locationId': None, 'reference': None, 'patientId': '6e6f800d-9441-4a86-91ba-ad13325bb345'}), ('[]', NULL, '[]', NULL, '[]', '[]', '[]', NULL, NULL, NULL, '[]', '[]', '[]', NULL, {'coding': "[{'userSelected': None, 'version': None, 'code': '57698-3', 'display': 'Lipid Panel', 'system': 'http://loinc.org'}]", 'text': 'Lipid Panel'}, {'display': None, 'episodeOfCareId': None, 'identifier': None, 'reference': None, 'encounterId': 'c7be7b05-847c-43bd-9c23-c60dd38b9eeb'}, {'period': None, 'dateTime': '2012-01-02T11:34:52+00:00'}, '68985239-9281-496a-8993-73b3126b89fc', '2012-01-02 11:34:52.797000+00:00', '[{''identifier'': None, ''reference'': None, ''display'': ''Total Cholesterol'', ''observationId'': ''76568ad3-d722-4cad-948d-cd93a65e87c4''}
 {''identifier'': None, ''reference'': None, ''display'': ''Triglycerides'', ''observationId'': ''7d233e36-0891-400b-8648-30c7671d2afa''}
 {''identifier'': None, ''reference'': None, ''display'': ''Low Density Lipoprotein Cholesterol'', ''observationId'': ''ea41d0da-3bbf-43b7-8572-8d8b58aad52a''}
 {''identifier'': None, ''reference'': None, ''display'': ''High Density Lipoprotein Cholesterol'', ''observationId'': ''33999b25-5115-466e-af5c-cb5d9ba51b51''}]', 'final', {'deviceId': None, 'display': None, 'groupId': None, 'identifier': None, 'locationId': None, 'reference': None, 'patientId': '8d207ef9-29dd-444c-aed3-aa93b1680f55'}), ('[]', NULL, '[]', NULL, '[]', '[]', '[]', NULL, NULL, NULL, '[]', '[]', '[]', NULL, {'coding': "[{'userSelected': None, 'version': None, 'code': '57698-3', 'display': 'Lipid Panel', 'system': 'http://loinc.org'}]", 'text': 'Lipid Panel'}, {'display': None, 'episodeOfCareId': None, 'identifier': None, 'reference': None, 'encounterId': '64d4d2b2-e5bd-40b8-b7ab-8b4dd82a60a2'}, {'period': None, 'dateTime': '2017-11-17T08:08:13+00:00'}, '689f8f3e-bf05-4dc4-a164-bc71c49c029a', '2017-11-17 08:08:13.797000+00:00', '[{''identifier'': None, ''reference'': None, ''display'': ''Total Cholesterol'', ''observationId'': ''857f8ac1-18ee-4e0d-bdf8-700b408506cd''}
 {''identifier'': None, ''reference'': None, ''display'': ''Triglycerides'', ''observationId'': ''b5ff00ae-9e62-460c-9b94-2d43b81219dc''}
 {''identifier'': None, ''reference'': None, ''display'': ''Low Density Lipoprotein Cholesterol'', ''observationId'': ''268fe055-296b-4329-92c7-80e1df2edcae''}
 {''identifier'': None, ''reference'': None, ''display'': ''High Density Lipoprotein Cholesterol'', ''observationId'': ''7335e6d6-f659-45c4-afe2-d0e852c2d65e''}]', 'final', {'deviceId': None, 'display': None, 'groupId': None, 'identifier': None, 'locationId': None, 'reference': None, 'patientId': 'f23fb767-f6a8-408c-97f4-d55de10ac55e'}), ('[]', NULL, '[]', NULL, '[]', '[]', '[]', NULL, NULL, NULL, '[]', '[]', '[]', NULL, {'coding': "[{'userSelected': None, 'version': None, 'code': '57698-3', 'display': 'Lipid Panel', 'system': 'http://loinc.org'}]", 'text': 'Lipid Panel'}, {'display': None, 'episodeOfCareId': None, 'identifier': None, 'reference': None, 'encounterId': '2a33a6bf-46c3-40da-9086-38144a7e8c45'}, {'period': None, 'dateTime': '2011-04-13T14:54:45+00:00'}, '68a76130-27f8-4d72-b874-4d3b1e2fcb87', '2011-04-13 14:54:45.312000+00:00', '[{''identifier'': None, ''reference'': None, ''display'': ''Total Cholesterol'', ''observationId'': ''593b358c-5759-4807-b46b-862a9fe6cb43''}
 {''identifier'': None, ''reference'': None, ''display'': ''Triglycerides'', ''observationId'': ''c77a4805-51a2-4ed3-8b6a-f1a0fb156072''}
 {''identifier'': None, ''reference'': None, ''display'': ''Low Density Lipoprotein Cholesterol'', ''observationId'': ''019422a8-ae89-4e3e-b768-ee845be4353d''}
 {''identifier'': None, ''reference'': None, ''display'': ''High Density Lipoprotein Cholesterol'', ''observationId'': ''9cd73597-f267-493e-97b3-3bfeb9cae45a''}]', 'final', {'deviceId': None, 'display': None, 'groupId': None, 'identifier': None, 'locationId': None, 'reference': None, 'patientId': '619984c7-ec72-4a5a-b321-2ca5bb6eb492'});