   with first_names_source as (
     select CASE WHEN sex = 'M' THEN 'male' ELSE 'female' END as sex,
            first_name,
-           row_number() over () from temp.first_names
-    cross join generate_series(0, ceil(_total_count_::float
-                                        / (select count(*) from temp.first_names)::float)::integer)
+           row_number() over ()
+           from temp.first_names
+    cross join generate_series(0, ceil(_total_count_::float
+                                       / (select count(*)
+                                          from temp.first_names)::float)::integer)
     order by random()
   ), last_names_source as (
-    select last_name, row_number() over () from temp.last_names
-    cross join generate_series(0, ceil(_total_count_::float
-                                        / (select count(*) from temp.last_names)::float)::integer)
+    select last_name, row_number() over ()
+    from temp.last_names
+    cross join generate_series(0, ceil(_total_count_::float
+                                       / (select count(*)
+                                          from temp.last_names)::float)::integer)
     order by random()
   ), street_names_source as (
-    select street_name, row_number() over () from temp.street_names
-    cross join generate_series(0, ceil(_total_count_::float
-                                        / (select count(*) from temp.street_names)::float)::integer)
+    select street_name, row_number() over ()
+    from temp.street_names
+    cross join generate_series(0, ceil(_total_count_::float
+                                       / (select count(*)
+                                          from temp.street_names)::float)::integer)
     order by random()
   ), cities_source as (
-    select city, zip, state, row_number() over () from temp.cities
-    cross join generate_series(0, ceil(_total_count_::float
-                                        / (select count(*) from temp.cities)::float)::integer)
+    select city, zip, state, row_number() over ()
+    from temp.cities
+    cross join generate_series(0, ceil(_total_count_::float
+                                       / (select count(*)
+                                          from temp.cities)::float)::integer)
     order by random()
   ), languages_source as (
     select code as language_code,
            name as language_name,
-           row_number() over () from temp.languages
-    cross join generate_series(0, ceil(_total_count_::float
-                                        / (select count(*) from temp.languages)::float)::integer)
+           row_number() over ()
+           from temp.languages
+    cross join generate_series(0, ceil(_total_count_::float
+                                       / (select count(*)
+                                          from temp.languages)::float)::integer)
+    order by random()
+  ), organizations_source as (
+    select logical_id as organization_id,
+           content#>>'{name}' as organization_name,
+           row_number() over ()
+           from organization
+    cross join generate_series(0, ceil(_total_count_::float
+                                       / (select count(*)
+                                          from organization)::float)::integer)
     order by random()
   ), patient_data as (
     select

         'resourceType', 'Patient',
         'gender', sex,
         'birthDate', birth_date,
         'name', ARRAY[
           json_build_object(
            'given', ARRAY[first_name],

    join street_names_source using (row_number)
    join cities_source using (row_number)
    join languages_source using (row_number)
    join organizations_source using (row_number)
  ), inserted as (
    INSERT into patient (logical_id, version_id, content)
    SELECT obj->>'id', obj#>>'{meta,versionId}', obj
