@@ -348,10 +348,9 @@ async function get_samples_at_geo_cord_location_via_sample_event(pid) {
348348 SELECT DISTINCT
349349 s.pid as sample_pid,
350350 s.label as sample_label,
351- s.description as sample_description,
352- s.thumbnail_url,
353- s.alternate_identifiers,
351+ s.name as sample_name,
354352 event.label as event_label,
353+ event.pid as event_pid,
355354 site.label as site_label,
356355 site.pid as site_pid,
357356 'direct_event_location' as location_path
@@ -373,10 +372,9 @@ async function get_samples_at_geo_cord_location_via_sample_event(pid) {
373372 SELECT DISTINCT
374373 s.pid as sample_pid,
375374 s.label as sample_label,
376- s.description as sample_description,
377- s.thumbnail_url,
378- s.alternate_identifiers,
375+ s.name as sample_name,
379376 event.label as event_label,
377+ event.pid as event_pid,
380378 site.label as site_label,
381379 site.pid as site_pid,
382380 'via_site_location' as location_path
@@ -393,7 +391,7 @@ async function get_samples_at_geo_cord_location_via_sample_event(pid) {
393391 AND g.otype = 'GeospatialCoordLocation'
394392 AND g.pid = ?
395393
396- ORDER BY thumbnail_url IS NOT NULL DESC, sample_label
394+ ORDER BY sample_label
397395 `;
398396 const result = await loadData(q, [pid, pid], "loading_combined", "samples_combined");
399397 return result ?? [];
@@ -697,15 +695,14 @@ ${JSON.stringify(samples_2, null, 2)}
697695
698696<div id =" loading_combined " hidden >Loading combined samples…</div >
699697
700- This query implements Eric Kansa's ` get_samples_at_geo_cord_location_via_sample_event ` function, which combines both Path 1 and Path 2 using UNION and returns richer sample metadata including:
698+ This query implements Eric Kansa's ` get_samples_at_geo_cord_location_via_sample_event ` function, which combines both Path 1 and Path 2 using UNION and returns sample metadata including:
701699
702- - Sample metadata: ` sample_pid ` , ` sample_label ` , ` sample_description `
703- - Visual assets: ` thumbnail_url ` , ` alternate_identifiers `
704- - Event context: ` event_label `
705- - Site information: ` site_label ` , ` site_pid ` (when available)
700+ - Sample metadata: ` sample_pid ` , ` sample_label ` , ` sample_name `
701+ - Event context: ` event_label ` , ` event_pid `
702+ - Site information: ` site_label ` , ` site_pid ` (when available via Path 2)
706703- Path indicator: ` location_path ` (direct_event_location or via_site_location)
707704
708- Results are ordered with samples that have thumbnails first, making it easier to find visually rich records .
705+ Results are ordered alphabetically by sample label .
709706
710707``` {ojs}
711708//| echo: false
0 commit comments