Hi Vikash21,
I have created a sample which full fill your requriement.
You need to use jquery for parsing the json data and access it in right way as in C# we dont get much flexbility to read a json data so client side is better way to read and use the json data.
JSON.json
{
"isSuccess": true,
"serviceData": {
"quality_measures": [
{
"measure_name": "Acute Otitis Externa (AOE): Systemic Antimicrobial Therapy - Avoidance of Inappropriate Use",
"measure_description": "Percentage of patients aged 2 years and older with a diagnosis of AOE who were not prescribed systemic antimicrobial therapy",
"quality_id": "093",
"emeasure_id": "N/A",
"emeasure_nqf": "N/A",
"nqf": "0654",
"nqs_domain": "Efficiency and Cost Reduction",
"primary_measure_steward": "American Academy of Otolaryngology-Head and Neck Surgery",
"measure_type": "Process",
"high_priority": "Yes",
"claims_submission": "Yes",
"csv_submission": "No",
"ehr_submission": "No",
"cms_web_interface_submission": "No",
"registry_submission": "Yes",
"administrative_claims_submission": "No",
"specialty_measure_set": [
"Emergency Medicine",
"Otolaryngology",
"General Practice/Family Medicine",
"Pediatrics"
]
},
{
"measure_name": "Acute Otitis Externa (AOE): Topical Therapy",
"measure_description": "Percentage of patients aged 2 years and older with a diagnosis of AOE who were prescribed topical preparations",
"quality_id": "091",
"emeasure_id": "N/A",
"emeasure_nqf": "N/A",
"nqf": "0653",
"nqs_domain": "Effective Clinical Care",
"primary_measure_steward": "American Academy of Otolaryngology-Head and Neck Surgery",
"measure_type": "Process",
"high_priority": "Yes",
"claims_submission": "Yes",
"csv_submission": "No",
"ehr_submission": "No",
"cms_web_interface_submission": "No",
"registry_submission": "Yes",
"administrative_claims_submission": "No",
"specialty_measure_set": [
"Emergency Medicine",
"Otolaryngology",
"Pediatrics"
]
},
{
"measure_name": "ADHD: Follow-Up Care for Children Prescribed Attention-Deficit/Hyperactivity Disorder (ADHD) Medication",
"measure_description": "Percentage of children 6-12 years of age and newly dispensed a medication for attention-deficit/hyperactivity disorder (ADHD) who had appropriate follow-up care. Two rates are reported. a. Percentage of children who had one follow-up visit with a practitioner with prescribing authority during the 30-Day Initiation Phase. b. Percentage of children who remained on ADHD medication for at least 210 days and who, in addition to the visit in the Initiation Phase, had at least two additional follow-up visits with a practitioner within 270 days (9 months) after the Initiation Phase ended.",
"quality_id": "366",
"emeasure_id": "CMS136v6",
"emeasure_nqf": "N/A",
"nqf": "0108",
"nqs_domain": "Effective Clinical Care",
"primary_measure_steward": "National Committee for Quality Assurance",
"measure_type": "Process",
"high_priority": "No",
"claims_submission": "No",
"csv_submission": "No",
"ehr_submission": "Yes",
"cms_web_interface_submission": "No",
"registry_submission": "No",
"administrative_claims_submission": "No",
"specialty_measure_set": [
"Mental/Behavioral Health",
"Pediatrics"
]
},
{
"measure_name": "Adherence to Antipsychotic Medications For Individuals with Schizophrenia",
"measure_description": "Percentage of individuals at least 18 years of age as of the beginning of the measurement period with schizophrenia or schizoaffective disorder who had at least two prescriptions filled for any antipsychotic medication and who had a Proportion of Days Covered (PDC) of at least 0.8 for antipsychotic medications during the measurement period (12 consecutive months)",
"quality_id": "383",
"emeasure_id": "N/A",
"emeasure_nqf": "N/A",
"nqf": "1879",
"nqs_domain": "Patient Safety",
"primary_measure_steward": "Health Services Advisory Group ",
"measure_type": "Intermediate Outcome",
"high_priority": "Yes",
"claims_submission": "No",
"csv_submission": "No",
"ehr_submission": "No",
"cms_web_interface_submission": "No",
"registry_submission": "Yes",
"administrative_claims_submission": "No",
"specialty_measure_set": [
"Mental/Behavioral Health"
]
},
{
"measure_name": "Adult Kidney Disease: Blood Pressure Management",
"measure_description": "Percentage of patient visits for those patients aged 18 years and older with a diagnosis of chronic kidney disease (CKD) (stage 3, 4, or 5, not receiving Renal Replacement Therapy [RRT]) with a blood pressure < 140/90 mmHg OR >= 140/90 mmHg with a documented plan of care",
"quality_id": "122",
"emeasure_id": "N/A",
"emeasure_nqf": "N/A",
"nqf": "N/A",
"nqs_domain": "Effective Clinical Care",
"primary_measure_steward": "Renal Physicians Association",
"measure_type": "Intermediate Outcome",
"high_priority": "Yes",
"claims_submission": "No",
"csv_submission": "No",
"ehr_submission": "No",
"cms_web_interface_submission": "No",
"registry_submission": "Yes",
"administrative_claims_submission": "No",
"specialty_measure_set": [
null
]
},
{
"measure_name": "Adult Kidney Disease: Catheter Use at Initiation of Hemodialysis",
"measure_description": "Percentage of patients aged 18 years and older with a diagnosis of End Stage Renal Disease (ESRD) who initiate maintenance hemodialysis during the measurement period, whose mode of vascular access is a catheter at the time maintenance hemodialysis is initiated",
"quality_id": "329",
"emeasure_id": "N/A",
"emeasure_nqf": "N/A",
"nqf": "N/A",
"nqs_domain": "Effective Clinical Care",
"primary_measure_steward": "Renal Physicians Association",
"measure_type": "Outcome",
"high_priority": "Yes",
"claims_submission": "No",
"csv_submission": "No",
"ehr_submission": "No",
"cms_web_interface_submission": "No",
"registry_submission": "Yes",
"administrative_claims_submission": "No",
"specialty_measure_set": [
null
]
},
{
"measure_name": "Adult Kidney Disease: Catheter Use for Greater Than or Equal to 90 Days",
"measure_description": "Percentage of patients aged 18 years and older with a diagnosis of End Stage Renal Disease (ESRD) receiving maintenance hemodialysis for greater than or equal to 90 days whose mode of vascular access is a catheter",
"quality_id": "330",
"emeasure_id": "N/A",
"emeasure_nqf": "N/A",
"nqf": "N/A",
"nqs_domain": "Patient Safety",
"primary_measure_steward": "Renal Physicians Association",
"measure_type": "Outcome",
"high_priority": "Yes",
"claims_submission": "No",
"csv_submission": "No",
"ehr_submission": "No",
"cms_web_interface_submission": "No",
"registry_submission": "Yes",
"administrative_claims_submission": "No",
"specialty_measure_set": [
null
]
},
{
"measure_name": "Adult Kidney Disease: Referral to Hospice",
"measure_description": "Percentage of patients aged 18 years and older with a diagnosis of ESRD who withdraw from hemodialysis or peritoneal dialysis who are referred to hospice care",
"quality_id": "403",
"emeasure_id": "N/A",
"emeasure_nqf": "N/A",
"nqf": "N/A",
"nqs_domain": "Person and Caregiver-Centered Experience and Outcomes",
"primary_measure_steward": "Renal Physicians Association",
"measure_type": "Process",
"high_priority": "Yes",
"claims_submission": "No",
"csv_submission": "No",
"ehr_submission": "No",
"cms_web_interface_submission": "No",
"registry_submission": "Yes",
"administrative_claims_submission": "No",
"specialty_measure_set": [
null
]
}
]
}
}
HTML
<div>
<asp:GridView ID="gvJsonData" runat="server" />
</div>
<div>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
$.ajax({
type: "POST",
url: "CS.aspx/GetJsonData",
data: '{}',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: OnSuccess,
failure: function (response) {
alert(response.responseText);
},
error: function (response) {
alert(response.responseText);
}
});
});
function OnSuccess(response) {
var jsonData = $.parseJSON(response.d);
var json = $(jsonData);
var tr = $("[id*=gvJsonData] tr:last-child").clone(true);
$("[id*=gvJsonData] tr").not($("[id*=gvJsonData] tr:first-child")).remove();
for (var i = 0; i < json[0].serviceData.quality_measures.length; i++) {
$('td', tr).eq(0).html(json[0].serviceData.quality_measures[i].administrative_claims_submission);
$('td', tr).eq(1).html(json[0].serviceData.quality_measures[i].claims_submission);
$('td', tr).eq(2).html(json[0].serviceData.quality_measures[i].cms_web_interface_submission);
$('td', tr).eq(3).html(json[0].serviceData.quality_measures[i].csv_submission);
$('td', tr).eq(4).html(json[0].serviceData.quality_measures[i].ehr_submission);
$('td', tr).eq(5).html(json[0].serviceData.quality_measures[i].emeasure_id);
$('td', tr).eq(6).html(json[0].serviceData.quality_measures[i].emeasure_nqf);
$('td', tr).eq(7).html(json[0].serviceData.quality_measures[i].high_priority);
$('td', tr).eq(8).html(json[0].serviceData.quality_measures[i].measure_description);
$('td', tr).eq(9).html(json[0].serviceData.quality_measures[i].measure_name);
$('td', tr).eq(10).html(json[0].serviceData.quality_measures[i].measure_type);
$('td', tr).eq(11).html(json[0].serviceData.quality_measures[i].nqf);
$('td', tr).eq(12).html(json[0].serviceData.quality_measures[i].nqs_domain);
$('td', tr).eq(13).html(json[0].serviceData.quality_measures[i].primary_measure_steward);
$('td', tr).eq(14).html(json[0].serviceData.quality_measures[i].quality_id);
$('td', tr).eq(15).html(json[0].serviceData.quality_measures[i].registry_submission);
if (json[0].serviceData.quality_measures[i].specialty_measure_set.length > 1) {
var specialty_measure_set = '';
for (var j = 0; j < json[0].serviceData.quality_measures[i].specialty_measure_set.length; j++) {
specialty_measure_set += json[0].serviceData.quality_measures[i].specialty_measure_set[j] + ",";
}
$('td', tr).eq(16).html(specialty_measure_set.substr(0, specialty_measure_set.length - 1));
}
else {
$('td', tr).eq(16).html(json[0].serviceData.quality_measures[i].specialty_measure_set[0]);
}
$("[id*=gvJsonData]").append(tr);
tr = $("[id*=gvJsonData] tr:last-child").clone(true);
}
}
</script>
</div>
C#
protected void Page_Load(object sender, EventArgs e)
{
DataTable dummy = new DataTable();
dummy.Columns.Add("ADMINISTRATIVE_CLAIMS_SUBMISSION");
dummy.Columns.Add("CLAIMS_SUBMISSION");
dummy.Columns.Add("CMS_WEB_INTERFACE_SUBMISSION");
dummy.Columns.Add("CSV_SUBMISSION");
dummy.Columns.Add("EHR_SUBMISSION");
dummy.Columns.Add("EMEASURE_ID");
dummy.Columns.Add("EMEASURE_NQF");
dummy.Columns.Add("HIGH_PRIORITY");
dummy.Columns.Add("MEASURE_DESCRIPTION");
dummy.Columns.Add("MEASURE_NAME");
dummy.Columns.Add("MEASURE_TYPE");
dummy.Columns.Add("NQF");
dummy.Columns.Add("NQS_DOMAIN");
dummy.Columns.Add("PRIMARY_MEASURE_STEWARD");
dummy.Columns.Add("QUALITY_ID");
dummy.Columns.Add("REGISTRY_SUBMISSION");
dummy.Columns.Add("SPECIALTY_MEASURE_SET");
dummy.Rows.Add();
gvJsonData.DataSource = dummy;
gvJsonData.DataBind();
}
[System.Web.Services.WebMethod]
public static string GetJsonData()
{
StreamReader stRead = new StreamReader(HttpContext.Current.Server.MapPath("~/JSON.json"));
string jsonData = stRead.ReadToEnd();
return jsonData;
}
VB.Net
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
Dim dummy As New DataTable()
dummy.Columns.Add("ADMINISTRATIVE_CLAIMS_SUBMISSION")
dummy.Columns.Add("CLAIMS_SUBMISSION")
dummy.Columns.Add("CMS_WEB_INTERFACE_SUBMISSION")
dummy.Columns.Add("CSV_SUBMISSION")
dummy.Columns.Add("EHR_SUBMISSION")
dummy.Columns.Add("EMEASURE_ID")
dummy.Columns.Add("EMEASURE_NQF")
dummy.Columns.Add("HIGH_PRIORITY")
dummy.Columns.Add("MEASURE_DESCRIPTION")
dummy.Columns.Add("MEASURE_NAME")
dummy.Columns.Add("MEASURE_TYPE")
dummy.Columns.Add("NQF")
dummy.Columns.Add("NQS_DOMAIN")
dummy.Columns.Add("PRIMARY_MEASURE_STEWARD")
dummy.Columns.Add("QUALITY_ID")
dummy.Columns.Add("REGISTRY_SUBMISSION")
dummy.Columns.Add("SPECIALTY_MEASURE_SET")
dummy.Rows.Add()
gvJsonData.DataSource = dummy
gvJsonData.DataBind()
End Sub
<System.Web.Services.WebMethod> _
Public Shared Function GetJsonData() As String
Dim stRead As New StreamReader(HttpContext.Current.Server.MapPath("~/JSON.json"))
Dim jsonData As String = stRead.ReadToEnd()
Return jsonData
End Function