              'value', this.random(6000000, 100000000)::text,
              'label', 'MRN'
            )
-         ]
+         ],
+         'managingOrganization', json_build_object(
+           'reference', 'Organization/' || organization_id,
+           'display', organization_name
+         )
         )::jsonb as obj
         FROM patient_data
         LIMIT _total_count_

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

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