-- DBMS: bigquery
CREATE TABLE `bigquery-public-data.fhir_synthea.allergy_intolerance`
(
  asserter STRUCT<patientId STRING, relatedPersonId STRING, practitionerId 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>,
  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>>>,
  implicitRules STRING,
  language STRING,
  lastOccurrence STRING,
  note ARRAY<STRUCT<author STRUCT<reference STRUCT<practitionerId STRING, patientId STRING, relatedPersonId 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>, string STRING>, time STRING, text STRING>>,
  onset STRUCT<dateTime STRING, age STRUCT<value FLOAT64, comparator STRING, unit STRING, system STRING, code STRING>, period STRUCT<start STRING, `end` STRING>, `range` STRUCT<low STRUCT<value FLOAT64, unit STRING, system STRING, code STRING>, high STRUCT<value FLOAT64, unit STRING, system STRING, code STRING>>, string STRING>,
  reaction ARRAY<STRUCT<substance STRUCT<coding ARRAY<STRUCT<system STRING, version STRING, code STRING, display STRING, userSelected BOOL>>, text STRING>, manifestation ARRAY<STRUCT<coding ARRAY<STRUCT<system STRING, version STRING, code STRING, display STRING, userSelected BOOL>>, text STRING>>, description STRING, onset STRING, severity STRING, exposureRoute STRUCT<coding ARRAY<STRUCT<system STRING, version STRING, code STRING, display STRING, userSelected BOOL>>, text STRING>, note ARRAY<STRUCT<author STRUCT<reference STRUCT<practitionerId STRING, patientId STRING, relatedPersonId 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>, string STRING>, time STRING, text STRING>>>>,
  recorder STRUCT<practitionerId STRING, patientId 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>,
  assertedDate STRING,
  category ARRAY<STRING>,
  clinicalStatus STRING,
  code STRUCT<coding ARRAY<STRUCT<userSelected BOOL, version STRING, code STRING, display STRING, system STRING>>, text STRING>,
  criticality STRING,
  id STRING,
  meta STRUCT<lastUpdated TIMESTAMP, 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>>, versionId STRING, profile ARRAY<STRING>>,
  patient STRUCT<display 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, patientId STRING>,
  type STRING,
  verificationStatus STRING
);

INSERT INTO `bigquery-public-data.fhir_synthea.allergy_intolerance` (asserter, identifier, implicitRules, language, lastOccurrence, note, onset, reaction, recorder, text, assertedDate, category, clinicalStatus, code, criticality, id, meta, patient, type, verificationStatus) VALUES (NULL, '[]', NULL, NULL, NULL, '[]', NULL, '[]', NULL, NULL, '2010-11-20T15:16:58+00:00', '[''food'']', 'active', {'coding': "[{'userSelected': None, 'version': None, 'code': '300916003', 'display': 'Latex allergy', 'system': 'http://snomed.info/sct'}]", 'text': 'Latex allergy'}, 'low', '8dbc7c01-09d4-4903-a4f6-32eb151305d8', {'lastUpdated': None, 'security': '[]', 'tag': '[]', 'versionId': None, 'profile': "['http://standardhealthrecord.org/fhir/StructureDefinition/shr-allergy-AllergyIntolerance']"}, {'display': None, 'identifier': None, 'reference': None, 'patientId': '8aa399e4-52f3-4fbb-8103-ff1318b4f854'}, 'allergy', 'confirmed'), (NULL, '[]', NULL, NULL, NULL, '[]', NULL, '[]', NULL, NULL, '1991-10-07T23:12:49+00:00', '[''food'']', 'active', {'coding': "[{'userSelected': None, 'version': None, 'code': '300916003', 'display': 'Latex allergy', 'system': 'http://snomed.info/sct'}]", 'text': 'Latex allergy'}, 'low', '8e8361a6-aef0-48d2-92c6-da6b86548f23', {'lastUpdated': None, 'security': '[]', 'tag': '[]', 'versionId': None, 'profile': "['http://standardhealthrecord.org/fhir/StructureDefinition/shr-allergy-AllergyIntolerance']"}, {'display': None, 'identifier': None, 'reference': None, 'patientId': '8cea3975-7853-4c48-b585-ea5dabdbb823'}, 'allergy', 'confirmed'), (NULL, '[]', NULL, NULL, NULL, '[]', NULL, '[]', NULL, NULL, '1999-06-07T01:25:04+00:00', '[''food'']', 'active', {'coding': "[{'userSelected': None, 'version': None, 'code': '300916003', 'display': 'Latex allergy', 'system': 'http://snomed.info/sct'}]", 'text': 'Latex allergy'}, 'low', '9112b24a-c70c-41e9-93f8-6b5575cd99fd', {'lastUpdated': None, 'security': '[]', 'tag': '[]', 'versionId': None, 'profile': "['http://standardhealthrecord.org/fhir/StructureDefinition/shr-allergy-AllergyIntolerance']"}, {'display': None, 'identifier': None, 'reference': None, 'patientId': '284fb4c2-85d3-4398-808a-f2d5d2649144'}, 'allergy', 'confirmed'), (NULL, '[]', NULL, NULL, NULL, '[]', NULL, '[]', NULL, NULL, '1984-01-15T17:11:10+00:00', '[''food'']', 'active', {'coding': "[{'userSelected': None, 'version': None, 'code': '300916003', 'display': 'Latex allergy', 'system': 'http://snomed.info/sct'}]", 'text': 'Latex allergy'}, 'low', '932a0961-5342-4f52-bec2-5a7548e7e722', {'lastUpdated': None, 'security': '[]', 'tag': '[]', 'versionId': None, 'profile': "['http://standardhealthrecord.org/fhir/StructureDefinition/shr-allergy-AllergyIntolerance']"}, {'display': None, 'identifier': None, 'reference': None, 'patientId': 'e225ccb3-a316-4a37-ae01-3b77455bde1d'}, 'allergy', 'confirmed'), (NULL, '[]', NULL, NULL, NULL, '[]', NULL, '[]', NULL, NULL, '1992-08-01T03:53:57+00:00', '[''food'']', 'active', {'coding': "[{'userSelected': None, 'version': None, 'code': '300916003', 'display': 'Latex allergy', 'system': 'http://snomed.info/sct'}]", 'text': 'Latex allergy'}, 'low', '93fa0dd5-b917-431a-ab12-142979147fb8', {'lastUpdated': None, 'security': '[]', 'tag': '[]', 'versionId': None, 'profile': "['http://standardhealthrecord.org/fhir/StructureDefinition/shr-allergy-AllergyIntolerance']"}, {'display': None, 'identifier': None, 'reference': None, 'patientId': '026d2402-1904-4005-8f82-3e53dd48eb6a'}, 'allergy', 'confirmed');