<% color_list = ['info','secondary','primary','gray','warning','dark','success','danger'] %> <% 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'} %> <% _.forEach(Object.keys(data2[0]),function(each,index){ %> <% if (!each.includes('location')){ %> <%} }) %> <% _.forEach(Object.keys(data2[0]),function(each){ %> <% _.forEach(Object.keys(data2[0][each]),function(ea){ %> <% if (!each.includes('location')){ %> <% } }) }) %> <% _.forEach(data2,function(each){ %> <% delete each.location %> <% delete each.location_id %> <% list = Object.keys(each) %> <% _.forEach(each,function(fa){ %> <% ind = 1 %> <% list2 = Object.keys(fa) %> <% _.forEach(fa, function(gh){ %> <% hj = Object.values(gh) %> <% attribute = Object.keys(gh)[0]; if(attribute.includes('%')){percent = '%'} else{percent = ''}%> <% if(isNaN(hj[0])){hj[0] = "NA";percent = ''}else{hj[0] = Math.round(hj[0])} %> <% ind = ind + 1 }) %> <% }) %> <% }) %>
<%- column %>
<%- each %>
NAMES
<%= (ea.toUpperCase()+'\n('+Object.keys(data2[0][each][ea])[0].toUpperCase()+')').replace('\n','
') %>
<%- toCamelCase(each.location.value) %>
<%- hj[1] %>><%- hj[0].toLocaleString('en-IN')+percent%>