Hi guys,
need some help with this.
I'm trying the rowgrouping but it's not grouping at all. i don't get any errors which makes it harder to troubleshoot.
Here is the code and the json file I'm using.
var bvtable = $('#bvTable').DataTable({
scrollY: 600,
"ajax": "data_new.json",
"columns": [
{
"data": "data.patient.pat"
},
{
"data": "data.patient.name"
},
{
"data": "id"
},
{
"data": "bv_date_submitted"
},
{
"data": "bv_completion_date"
},
{
"data": "all_status.2"
},
{
"data": "reverify_date"
},
{
"data": "next_step"
}
],
order: [[0, 'asc']],
rowGroup: {
dataSrc: "data.patient.pat",
startRender: function(rows, group) {
var patient = rows.data()[0]['data']['patient']['name'];
console.log(patient);
return $('tr')
.append("<td><a href='#' class='column-filter' data-filter='" + group + "'>" + group + " <i class='fa fa-filter'></i></a></td>" )
.append("<td colspan='9'>" + patient + "</td>");
}
}
});
JSON FILE FORMAT:
"data": [{
"id": "1-100037168111",
"type": {
"code": 3,
"name": "PA Denied - Generic Coverage Only",
"action": " - "
},
"date": "11/26/2018",
"date_full": "2018-11-26T12:59:17.082Z",
"bv_date_submitted": "03/14/2018",
"pa_date_submitted": "12/14/2017",
"days_in_process": 42,
"reverify_date": "2020-01-07T14:17:34.104Z",
"bv_completion_date": "2019-02-09",
"next_step": [" - "],
"all_status": ["Covered - If insurer guideliens are met", " - ", "PA Denied - Generic Coverage Only"],
"data": {
"patient": {
"pat": 9633061201,
"name": "Bryana Crona",
"sex": "Male",
"DOB": "06/04/1973",
"SSN": 572221760,
"address": "9519 Kuhlman Valleys, East Gaymouth, AZ 80936",
"email": "caleb27@yahoo.com",
"primary_phone": "107-739-0860",
"alternate_phone": "826-062-1862",
"hipaacompleted": "08/25/2018",
"hipaaexpire": "02/16/2018"
},
"physician": {
"name": "Marta McClure",
"NPI": "90432264",
"tax_id": "LT800706797090580719",
"ptan": 554863189,
"email": "lonnie22@hotmail.com",
"phone": "284-815-7447",
"fax": "128-710-5386"
},
"insurance": {
"type": "Health Insurance",
"company": "Kilback LLC",
"phone": "139-052-9554",
"member_id": 817584244,
"group_id": 186542586
},
"facility": {
"name": "Sipes - Considine"
}
}
},