This repository was archived by the owner on Nov 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatasette.yaml
More file actions
47 lines (46 loc) · 1.48 KB
/
datasette.yaml
File metadata and controls
47 lines (46 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
title: SFS Switchboard
databases:
sfs-redcap:
title: SFS REDCap
description_html: |
<p>Summary information aggregated across the REDCap projects used by SFS.
<p><em>Updated every 30 minutes.</em>
queries:
lookup-barcode:
title: Barcode lookup
sql: |
select
max(record_link) as record,
max(project_id) as project_id,
max(record_id) as record_id,
max(event_name) as event_name,
max(repeat_instance) as repeat_instance,
max(back_end_scan_date) as back_end_scan_date,
max(barcode) as barcode,
group_concat(redcap_field, ', ') as REDCap_fields
from
record_barcodes
where lower(:barcode) = barcode
group by record_url
order by max(project_id), max(record_id), max(event_name)
see-related-barcodes:
title: See related barcodes
sql: |
select
record_link as record,
project_id,
record_id,
event_name,
repeat_instance,
back_end_scan_date,
barcode,
redcap_field as REDCap_field
from
record_barcodes
where unique_record_id in (select distinct(unique_record_id) from record_barcodes where barcode = lower(:barcode))
order by project_id, record_id, event_name, redcap_field
extra_css_urls:
- /static/styles.css
extra_js_urls:
- /static/fix-links.js