% let url = g1.url.parse(window.location.href) %> <% options = $.extend({}, options, url.searchList) %> <% if(options['view'][0] == 'IN'){column = 'States'}else if(options['view'][0] == 'state' ){column = 'Districts'} else if(options['view'][0] == 'district'){column = 'Tbu'} else if(options['view'][0] == 'tbu' ||options['view'][0] == 'phi'){column = 'Health Facility'} %> <% if(options['map-level'][0] == 'district'){column='Districts'} %> <% if (url.directory.includes('/adherence/') && _.includes(['trends_but', 'monthtreat'], button_val)) { %>
<%- column %>
|
<% if (options['adher_date'][0] == 'notif_cohort'){ %>
<%- options['trends_dd_val'][0] == 'monthtreat' ? 'Month into Treatment' : 'Notif. Cohort-' %>
<%- $('.date-label-calendar').html() %>
|
<% } else if (options['adher_date'][0] == 'cal_month'){ %>
Calender Cohort - <%- $('.date-label-calendar').html() %>
|
<% } %>
---|---|---|
<%- toCamelCase(val[0]['location']) %>
|
|
<% }) %>
<%- column %>
|
<% if(options.map[0] == 'avg_benefit_creation'){ %>
<% _.forEach(columns_all[options['map'][0]]["col"],function(each){ %>
<%- (each) %>
|
<% }) %>
<% } else if(!options.map[0].startsWith('avg')){ %>
<% _.forEach(columns_all[options['map'][0]]["col"],function(each){ %>
<%- (each) %>
|
<% }) %>
<% } else { %>
<% var colum = columns_all[options['map'][0]]["col"][0] %>
<%- (colum) %>
|
<% _.forEach(columns_all[options['map'][0]]["col"],function(each){ %>
<% each = each.trim() %>
<% if(!(each.startsWith('Avg.'))) { %>
<% if(each.includes('%')){ percent = '%'} else{ percent = ''} %>
<%- (each) %>
|
<%- (each) %>
|
<% } %>
<% }) %>
---|---|---|---|---|---|
<%- toCamelCase(each.location.value) %>
|
<% delete each.location %>
<% delete each.location_id %>
<% delete each.state_name %>
<% delete each.state_code %>
<% delete each.parent %>
<% delete each['% of Total Beneficiaries Eligible'] %>
<% index = 0 %>
<% _.forEach(each,function(row){ %>
<% if(Object.keys(each)[index].includes('Percentage')){ percent = '%'} else{ percent = ''} %>
<% if(isNaN(row.value) || !isFinite(row.value)){ row.value = 'NA', percent = Object.keys(each)[index].includes('Percentage') ? '%': '' }else{ row.value = Math.round(row.value)} %>
<%- row.value.toLocaleString('en-IN')+(row.value != 'NA' ? percent: '') %>
|
<% index = index + 1 %>
<% }) %>
<% }) %>