Hi,
I am tried to load the json to the html table with datatable response but i am not able to. It keeps throwing Invalid Json.
Here's the JSON.
[{"MEASURE NAME":"Age Appropriate Screening Colonoscopy","MEASURE DESCRIPTION":"The percentage of patients greater than 85 years of age who received a screening colonoscopy from January 1 to December 31","eMEASURE NQF":"N/A","NQF":"N/A","NQS DOMAIN":"Efficiency and Cost Reduction","MEASURE TYPE":"Efficiency","HIGH PRIORITY MEASURE":"Yes","DATA SUBMISSION METHOD":"Registry","Specialty Set":"Gastroenterology","PRIMARY MEASURE STEWARD":"American Gastroenterological Association"},{"MEASURE NAME":"Appropriate Follow-Up Interval for Normal Colonoscopy in Average Risk Patients","MEASURE DESCRIPTION":"Percentage of patients aged 50 to 75 years of age receiving a screening colonoscopy without biopsy or polypectomy who had a recommended follow-up interval of at least 10 years for repeat colonoscopy documented in their colonoscopy report","eMEASURE NQF":"N/A","NQF":"658","NQS DOMAIN":"Communication and Care Coordination","MEASURE TYPE":"Process","HIGH PRIORITY MEASURE":"Yes","DATA SUBMISSION METHOD":"Claims,Registry","Specialty Set":"Gastroenterology","PRIMARY MEASURE STEWARD":"American Gastroenterological Association"},{"MEASURE NAME":"Colonoscopy Interval for Patients with a History of Adenomatous Polyps - Avoidance of Inappropriate Use","MEASURE DESCRIPTION":"Percentage of patients aged 18 years and older receiving a surveillance colonoscopy, with a history of a prior adenomatous polyp(s) in previous colonoscopy findings, which had an interval of 3 or more years since their last colonoscopy","eMEASURE NQF":"N/A","NQF":"659","NQS DOMAIN":"Communication and Care Coordination","MEASURE TYPE":"Process","HIGH PRIORITY MEASURE":"Yes","DATA SUBMISSION METHOD":"Claims,Registry","Specialty Set":"Gastroenterology","PRIMARY MEASURE STEWARD":"American Gastroenterological Association"},{"MEASURE NAME":"Hepatitis C: Discussion and Shared Decision Making Surrounding Treatment Options","MEASURE DESCRIPTION":"Percentage of patients aged 18 years and older with a diagnosis of hepatitis C with whom a physician or other qualified healthcare professional reviewed the range of treatment options appropriate to their genotype and demonstrated a shared decision making approach with the patient. To meet the measure, there must be documentation in the patient record of a discussion between the physician or other qualified healthcare professional and the patient that includes all of the following: treatment choices appropriate to genotype, risks and benefits, evidence of effectiveness, and patient preferences toward treatment","eMEASURE NQF":"N/A","NQF":"N/A","NQS DOMAIN":"Person and Caregiver-Centered Experience and Outcomes","MEASURE TYPE":"Process","HIGH PRIORITY MEASURE":"Yes","DATA SUBMISSION METHOD":"Registry","Specialty Set":"Gastroenterology","PRIMARY MEASURE STEWARD":"American Gastroenterological Association"},{"MEASURE NAME":"Inflammatory Bowel Disease (IBD): Assessment of Hepatitis B Virus (HBV) Status Before Initiating Anti-TNF (Tumor Necrosis Factor) Therapy","MEASURE DESCRIPTION":"Percentage of patients aged 18 years and older with a diagnosis of inflammatory bowel disease (IBD) who had Hepatitis B Virus (HBV) status assessed and results interpreted within one year prior to receiving a first course of anti-TNF (tumor necrosis factor) therapy","eMEASURE NQF":"N/A","NQF":"N/A","NQS DOMAIN":"Effective Clinical Care","MEASURE TYPE":"Process","HIGH PRIORITY MEASURE":"No","DATA SUBMISSION METHOD":"Registry","Specialty Set":"Gastroenterology","PRIMARY MEASURE STEWARD":"American Gastroenterological Association"},{"MEASURE NAME":"Inflammatory Bowel Disease (IBD): Preventive Care: Corticosteroid Related Iatrogenic Injury - Bone Loss Assessment","MEASURE DESCRIPTION":"Percentage of patients aged 18 years and older with an inflammatory bowel disease encounter who were prescribed prednisone equivalents greater than or equal to 10 mg/day for 60 or greater consecutive days or a single prescription equating to 600 mg prednisone or greater for all fills and were documented for risk of bone loss once during the reporting year or the previous calendar year","eMEASURE NQF":"N/A","NQF":"N/A","NQS DOMAIN":"Effective Clinical Care","MEASURE TYPE":"Process","HIGH PRIORITY MEASURE":"No","DATA SUBMISSION METHOD":"Registry","Specialty Set":"Gastroenterology","PRIMARY MEASURE STEWARD":"American Gastroenterological Association"},{"MEASURE NAME":"Screening Colonoscopy Adenoma Detection Rate","MEASURE DESCRIPTION":"The percentage of patients age 50 years or older with at least one conventional adenoma or colorectal cancer detected during screening colonoscopy","eMEASURE NQF":"N/A","NQF":"N/A","NQS DOMAIN":"Effective Clinical Care","MEASURE TYPE":"Outcome","HIGH PRIORITY MEASURE":"Yes","DATA SUBMISSION METHOD":"Registry","Specialty Set":"Gastroenterology","PRIMARY MEASURE STEWARD":"American Society for Gastrointestinal Endoscopy"}]
Here's the JS:
$(document).ready(function (){
if ($.fn.dataTable.isDataTable('#tbl_category')) {
t.destroy();
}
t = $("#tbl_category").DataTable({
processing: true,
serverSide: true,
info: true,
ajax: {
type: "POST",
dataType: "json",
url: 'priority.aspx?priselect=Yes',
data: function (data) {
delete data.columns;
}
},
columns: [
{ "data": "MEASURE NAME" },
{ "data": "MEASURE DESCRIPTION" },
{ "data": "eMEASURE NQF" },
{ "data": "NQF" },
{ "data": "NQS DOMAIN" },
{ "data": "MEASURE TYPE" },
{ "data": "HIGH PRIORITY MEASURE" },
{ "data": "DATA SUBMISSION METHOD" },
{ "data": "SPECIALTY MEASURE SET" },
{ "data": "PRIMARY MEASURE STEWARD" },
{
"render": function (data, type, full, meta) {
return '<a class="btn btn-warning" onClick="editdata(' + full.srno + ',\'' + full.MEASURE0NAME + '\',\'' + full.MEASUREDESCRIPTION + '\',\'' + full.NQF + '\',\'' + full.NQSDOMAIN + '\',\'' + full.MEASURETYPE + '\')" href="javascript://">Edit</a> <a class="btn btn-danger" onClick="deletePhantom(' + full.srno + ',\'DELETE\')" href="javascript://">Remove</a>';
}
}
],
order: [[0, 'desc']],
select: true,
dom: 'lfrtip',
responsive: true,
buttons: true
});
t.on('order.dt search.dt', function () {
t.column(0, { search: 'applied', order: 'applied' }).nodes().each(function (cell, i) {
cell.innerHTML = i + 1;
});
}).draw();
});
</script>
I am notsure if how should I address the JSON Invalid alert.
Any help would be great
Also, I am using these CDNs:
<link rel="Stylesheet" href="https://cdn.datatables.net/1.10.12/css/jquery.dataTables.min.css" />
<script type="text/javascript" src="https://code.jquery.com/jquery-1.12.3.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script>
Thanks in advance,
Vikash