Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code:   StreamingRowsError
Exception:    CastError
Message:      Couldn't cast
resourceType: string
id: string
status: string
class: struct<system: string, code: string>
  child 0, system: string
  child 1, code: string
subject: struct<reference: string, display: string>
  child 0, reference: string
  child 1, display: string
period: struct<start: timestamp[s], end: timestamp[s]>
  child 0, start: timestamp[s]
  child 1, end: timestamp[s]
group: list<item: struct<source: string, target: string, element: list<item: struct<code: string, target: l (... 56 chars omitted)
  child 0, item: struct<source: string, target: string, element: list<item: struct<code: string, target: list<item: s (... 44 chars omitted)
      child 0, source: string
      child 1, target: string
      child 2, element: list<item: struct<code: string, target: list<item: struct<code: string, equivalence: string>>>>
          child 0, item: struct<code: string, target: list<item: struct<code: string, equivalence: string>>>
              child 0, code: string
              child 1, target: list<item: struct<code: string, equivalence: string>>
                  child 0, item: struct<code: string, equivalence: string>
                      child 0, code: string
                      child 1, equivalence: string
gender: string
birthDate: timestamp[s]
name: list<item: struct<family: string, given: list<item: string>>>
  child 0, item: struct<family: string, given: list<item: string>>
      child 0, family: string
      child 1, given: list<item: string>
          child 0, item: string
deceasedDateTime: timestamp[s]
files: list<item: struct<path: string, bytes: int64, sha256: string>>
  child 0, item: struct<path: string, bytes: int64, sha256: string>
      child 0, path: string
      child 1, bytes: int64
      child 2, sha256: string
dataset: string
conceptmap: struct<resources: int64, groups: list<item: struct<source: string, elements: int64, classes: list<it (... 102 chars omitted)
  child 0, resources: int64
  child 1, groups: list<item: struct<source: string, elements: int64, classes: list<item: string>>>
      child 0, item: struct<source: string, elements: int64, classes: list<item: string>>
          child 0, source: string
          child 1, elements: int64
          child 2, classes: list<item: string>
              child 0, item: string
  child 2, elements: int64
  child 3, fields: list<item: string>
      child 0, item: string
  child 4, display_omitted: bool
  child 5, provenance: string
coverage: struct<cohort_unique_rxcuis: int64, covered_codes: int64, cohort_mentions: int64, resolved_mentions: (... 80 chars omitted)
  child 0, cohort_unique_rxcuis: int64
  child 1, covered_codes: int64
  child 2, cohort_mentions: int64
  child 3, resolved_mentions: int64
  child 4, pct: double
  child 5, cohort_unique_cvx: int64
  child 6, covered_cvx: int64
  child 7, note: string
to
{'dataset': Value('string'), 'files': List({'path': Value('string'), 'bytes': Value('int64'), 'sha256': Value('string')}), 'conceptmap': {'resources': Value('int64'), 'groups': List({'source': Value('string'), 'elements': Value('int64'), 'classes': List(Value('string'))}), 'elements': Value('int64'), 'fields': List(Value('string')), 'display_omitted': Value('bool'), 'provenance': Value('string')}, 'coverage': {'cohort_unique_rxcuis': Value('int64'), 'covered_codes': Value('int64'), 'cohort_mentions': Value('int64'), 'resolved_mentions': Value('int64'), 'pct': Value('float64'), 'cohort_unique_cvx': Value('int64'), 'covered_cvx': Value('int64'), 'note': Value('string')}}
because column names don't match
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 149, in get_rows_or_raise
                  return get_rows(
                      dataset=dataset,
                  ...<4 lines>...
                      column_names=column_names,
                  )
                File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
                  return func(*args, **kwargs)
                File "/src/services/worker/src/worker/utils.py", line 129, in get_rows
                  rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
                File "/src/services/worker/src/worker/utils.py", line 544, in safe_iter
                  yield from ds.decode(False) if ds.features else ds
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 3052, in __iter__
                  for key, example in ex_iterable:
                                      ^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2559, in __iter__
                  for key, pa_table in self._iter_arrow():
                                       ~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2584, in _iter_arrow
                  for key, pa_table in self.ex_iterable._iter_arrow():
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 558, in _iter_arrow
                  for key, pa_table in iterator:
                                       ^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 440, in _iter_arrow
                  for key, pa_table in self.generate_tables_fn(**gen_kwags):
                                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 361, in _generate_tables
                  self._cast_table(pa_table, json_field_paths=json_field_paths),
                  ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
                  pa_table = table_cast(pa_table, self.info.features.arrow_schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2381, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2309, in cast_table_to_schema
                  raise CastError(
                  ...<3 lines>...
                  )
              datasets.table.CastError: Couldn't cast
              resourceType: string
              id: string
              status: string
              class: struct<system: string, code: string>
                child 0, system: string
                child 1, code: string
              subject: struct<reference: string, display: string>
                child 0, reference: string
                child 1, display: string
              period: struct<start: timestamp[s], end: timestamp[s]>
                child 0, start: timestamp[s]
                child 1, end: timestamp[s]
              group: list<item: struct<source: string, target: string, element: list<item: struct<code: string, target: l (... 56 chars omitted)
                child 0, item: struct<source: string, target: string, element: list<item: struct<code: string, target: list<item: s (... 44 chars omitted)
                    child 0, source: string
                    child 1, target: string
                    child 2, element: list<item: struct<code: string, target: list<item: struct<code: string, equivalence: string>>>>
                        child 0, item: struct<code: string, target: list<item: struct<code: string, equivalence: string>>>
                            child 0, code: string
                            child 1, target: list<item: struct<code: string, equivalence: string>>
                                child 0, item: struct<code: string, equivalence: string>
                                    child 0, code: string
                                    child 1, equivalence: string
              gender: string
              birthDate: timestamp[s]
              name: list<item: struct<family: string, given: list<item: string>>>
                child 0, item: struct<family: string, given: list<item: string>>
                    child 0, family: string
                    child 1, given: list<item: string>
                        child 0, item: string
              deceasedDateTime: timestamp[s]
              files: list<item: struct<path: string, bytes: int64, sha256: string>>
                child 0, item: struct<path: string, bytes: int64, sha256: string>
                    child 0, path: string
                    child 1, bytes: int64
                    child 2, sha256: string
              dataset: string
              conceptmap: struct<resources: int64, groups: list<item: struct<source: string, elements: int64, classes: list<it (... 102 chars omitted)
                child 0, resources: int64
                child 1, groups: list<item: struct<source: string, elements: int64, classes: list<item: string>>>
                    child 0, item: struct<source: string, elements: int64, classes: list<item: string>>
                        child 0, source: string
                        child 1, elements: int64
                        child 2, classes: list<item: string>
                            child 0, item: string
                child 2, elements: int64
                child 3, fields: list<item: string>
                    child 0, item: string
                child 4, display_omitted: bool
                child 5, provenance: string
              coverage: struct<cohort_unique_rxcuis: int64, covered_codes: int64, cohort_mentions: int64, resolved_mentions: (... 80 chars omitted)
                child 0, cohort_unique_rxcuis: int64
                child 1, covered_codes: int64
                child 2, cohort_mentions: int64
                child 3, resolved_mentions: int64
                child 4, pct: double
                child 5, cohort_unique_cvx: int64
                child 6, covered_cvx: int64
                child 7, note: string
              to
              {'dataset': Value('string'), 'files': List({'path': Value('string'), 'bytes': Value('int64'), 'sha256': Value('string')}), 'conceptmap': {'resources': Value('int64'), 'groups': List({'source': Value('string'), 'elements': Value('int64'), 'classes': List(Value('string'))}), 'elements': Value('int64'), 'fields': List(Value('string')), 'display_omitted': Value('bool'), 'provenance': Value('string')}, 'coverage': {'cohort_unique_rxcuis': Value('int64'), 'covered_codes': Value('int64'), 'cohort_mentions': Value('int64'), 'resolved_mentions': Value('int64'), 'pct': Value('float64'), 'cohort_unique_cvx': Value('int64'), 'covered_cvx': Value('int64'), 'note': Value('string')}}
              because column names don't match

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

OMOP demo data (FHIR R4 β†’ OMOP CDM v5.5)

Ready-to-stage NDJSON bundles for the SQL-on-FHIR Viewing Room's OMOP mapping gallery (fhir4ds). Each bundle is one FHIR R4 resource per line, including the ConceptMap resources that carry the vocabulary mappings.

Bundles

File Contents Rows
patient-resources.ndjson 25 Synthea patients + the gender/encounter-class ConceptMap supplements 26
encounter-resources.ndjson 25 patients + 1,284 encounters + supplements 1,310
medication-resources.ndjson 25 patients + 1,143 MedicationRequests + 318 Immunizations + one ConceptMap (108,683 mappings: RxNorm, CVX, and the gender/encounter-class/condition-category supplements) 1,487

ConceptMap shape

One standard FHIR ConceptMap resource carries every mapping, with one group per source vocabulary:

{"resourceType":"ConceptMap","id":"fhir4ds-omop-conceptmap","status":"active",
 "group":[{"source":"http://www.nlm.nih.gov/research/umls/rxnorm",
           "target":"urn:omop:concept",
           "element":[{"code":"<RxCUI>",
                       "target":[{"code":"<OMOP concept_id>","equivalence":"equal"}]}]},
          {"source":"http://hl7.org/fhir/sid/cvx", "target":"urn:omop:concept", "element":[ ... ]},
          {"source":"http://hl7.org/fhir/administrative-gender", ...},
          {"source":"http://terminology.hl7.org/CodeSystem/v3-ActCode", ...},
          {"source":"http://terminology.hl7.org/CodeSystem/condition-category", ...}]}
  • RxNorm group: 108,421 mappings covering the product-level RxNorm classes (Clinical Drug, Branded Drug, Quant Clinical Drug, Quant Branded Drug, Clinical Pack, Branded Pack, Clinical Drug Comp, Branded Drug Comp) from the OHDSI Athena vocabulary tables.
  • CVX group: 255 vaccine-code mappings (immunizations).
  • display is omitted β€” it is not needed for mapping and keeps the payload small. equivalence is retained because FHIR requires it (ConceptMap.group.element.target.equivalence is 1..1) and the ViewDefinition's mapping view filters on it.
  • Coverage: 100% of coded rows β€” all 54 cohort RxCUIs (1,143 of 1,143 mentions) and all 13 CVX codes resolve to OMOP concept IDs.
  • 27 MedicationRequests with no medication code (medicationCodeableConcept is null in the Synthea output; there is no drug to represent) are not included: a drug exposure with no drug and no code has nothing to map.
  • No chunking: a single ConceptMap is used. (Earlier revisions chunked the map at 20 elements per resource to work around an O(N x payload) unnest lowering in the ViewDefinition engine; that engine issue is fixed, so 100k-element maps execute in well under a second.)

Why chunked resources?

The fhir4ds ViewDefinition engine's forEach unnest currently re-evaluates the collection per output row (O(N Γ— payload) in DuckDB); a single monolithic 157k-element ConceptMap exhausts memory. Chunking to 20 elements per resource keeps each unnest small and loadable in the browser. An engine fix (single-pass, materialized unnest) is tracked in the fhir4ds backlog; once it lands, chunking becomes unnecessary.

Provenance & licensing

  • FHIR resources: generated by Synthea 4.0.0 (MIT), seed 20261026, Massachusetts, FHIR R4 export, 25 patients. Synthetic data carries no usage restrictions.
  • RxNorm ConceptMap: derived from the NLM RxNorm vocabulary (U.S. government work, public domain) as distributed in the OHDSI Athena vocabulary tables.

See MANIFEST.json for file sizes and SHA-256 hashes.

Downloads last month
123