[% META title = 'Resources » Referrers & Referral Sources' %] [% SET skip_wrappers = 1 IF c.stash.skip_wrapper # shared between resource & popup %] [% # INCLUDE dumper.tt dump = data_files %] [% IF ! location_type %]

Referrers & Referral Sources

Choose a resource type to search the CfH data files:

[% END %] [% BLOCK row; query_param = c.query.param('lookup') || c.query.param('type'); class = query_param.match(t) ? 'highlight' : 'normal'; %] [ [% t %] ] [% END %]

Search: [% FOREACH entry IN data_files.sort; INCLUDE row t = entry; END; %]

[% IF location_type %]

CfH data file search:

Containing: [% site.html.submit %]
[ force boundaries using '\b' eg 'york\b' finds 'york' but not 'yorkshire', '\bshire' find 'shires healthcare' but not 'lancashire' ]
[% END %] [% BLOCK file_update; IF file_data; age = file_data.age; # auto-updated since 03/2019 so should always be <1 month DEFAULT class = 'info'; IF age >= 6; class = 'error'; ELSIF age >= 3; class = 'warning'; END %]

source file: [% file_data.filename %].csv; status: [% IF file_data.age %]last updated [% file_data.age %] months ago [% ELSE; 'current ODS data file'; END %] [% IF age AND c.user_can('edit_pid'); # otherwise need to use admin function # subdir = subdirs.item(file_data.filename); # no longer using them return = c.query.self_url FILTER url; cfg = c.cfg('settings'); USE url( app_url _ '/resources/get_data_file', _return = return method = 'url' # https://s3.eu-west-2.amazonaws.com format (Apr 2018): url = cfg.cfh_downloads _ '/' _ file_data.filename _ '.zip' ); %] [% END %] [% END %] [% END %] [% IF c.query.param('string') %] [% IF matches.size %]

Found [% matches.size %] [% location_type %]s matching "[% c.query.param('string') %]":

[% INCLUDE file_update %] [% FOREACH location IN matches; class = location.code.length == 3 AND NOT c.query.param('type').match('trust') ? 'bold' : 'normal' # all trusts have code length 3 %] [% END %]
  Code Details
[% loop.count %] [% IF class.match('bold') %] [% location.code %] [% ELSE %] [% location.code %] [% END %] [% display = location.display | html; # escape, then add markup: highlight(display) # callback %]
[% ELSE %]

No matches found for "[% c.query.param('string') %]"

[% INCLUDE file_update %] [% END %] [% END %]