jsonssisscript-component

How do I import CMS Open Data using API?


I'm trying to deserialize the data from CMS Open Payments API using the code below. However, I'm receiving NULL values even though there is data. When debugging, I'm unable to to find any JSON data sets (again, the website shows data present).

#region Namespaces
using System;

using System.Data;

using Microsoft.SqlServer.Dts.Pipeline.Wrapper;

using Microsoft.SqlServer.Dts.Runtime.Wrapper;

using System.Net;

using Microsoft.SqlServer.Dts.Runtime;

using System.IO;

using System.Runtime.Serialization.Json;

using System.Runtime.Serialization;

using System.Collections.Generic;

using System.Text;

using System.Linq;
#endregion


[Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute]
public class ScriptMain : UserComponent
{



    #region Methods

    public override void CreateNewOutputRows()
    {
        ServicePointManager.Expect100Continue = true;
        ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;


        string wUrl = Variables.CMSOpenPayment2021URL;

        try

        {



            //Call getWebServiceResult to return our Article attributes

            List<Payment> outPutResponse = GetWebServiceResult(wUrl);




            if (outPutResponse != null)

            {

                //Outstanding items  
                //1. Incorporate Reference Variables in lieu of hardcoded values
                //2. Duplicate Script for prior years

                foreach (Payment py in outPutResponse)  

                {

                    //Output main attributes of Article

                    Output0Buffer.AddRow();

                    if (py.change_type != null)
                    {
                        Output0Buffer.ChangeType.AddBlobData(Encoding.ASCII.GetBytes(py.change_type));
                    }
                    else
                    {
                        Output0Buffer.ChangeType.SetNull();
                    }

        
                    Output0Buffer.CoveredRecipientType = py.covered_recipient_type;
                    Output0Buffer.TeachingHospitalCCN = py.teaching_hospital_ccn;
                    Output0Buffer.TeachingHospitalID = py.teaching_hospital_id;
                    Output0Buffer.TeachingHospitalName = py.teaching_hospital_name;
                    Output0Buffer.CoveredRecipientProfileID = py.covered_recipient_profile_id;
                    Output0Buffer.CoveredRecipientNPI = py.covered_recipient_npi;
                    Output0Buffer.CoveredRecipientFirstName = py.covered_recipient_first_name;
                    Output0Buffer.CoveredRecipientMiddleName = py.covered_recipient_middle_name;
                    Output0Buffer.CoveredRecipientLastName = py.covered_recipient_last_name;
                    Output0Buffer.CoveredRecipientNameSuffix = py.covered_recipient_name_suffix;
                    Output0Buffer.RecipientPrimaryBusinessStreetAddressLine1 = py.recipient_primary_business_street_address_line1;
                    Output0Buffer.RecipientPrimaryBusinessStreetAddressLine2 = py.recipient_primary_business_street_address_line2;
                    Output0Buffer.RecipientCity = py.recipient_city;
                    Output0Buffer.RecipientState = py.recipient_state;
                    Output0Buffer.RecipientZipCode = py.recipient_zip_code;
                    Output0Buffer.RecipientCountry = py.recipient_country;
                    Output0Buffer.RecipientProvince = py.recipient_province;
                    Output0Buffer.RecipientPostalCode = py.recipient_postal_code;
                    Output0Buffer.CoveredRecipientPrimaryType1 = py.covered_recipient_primary_type_1;
                    Output0Buffer.CoveredRecipientPrimaryType2 = py.covered_recipient_primary_type_2;
                    Output0Buffer.CoveredRecipientPrimaryType3 = py.covered_recipient_primary_type_3;
                    Output0Buffer.CoveredRecipientPrimaryType4 = py.covered_recipient_primary_type_4;
                    Output0Buffer.CoveredRecipientPrimaryType5 = py.covered_recipient_primary_type_5;
                    Output0Buffer.CoveredRecipientPrimaryType6 = py.covered_recipient_primary_type_6;
                    Output0Buffer.CoveredRecipientSpecialty1 = py.covered_recipient_specialty_1;
                    Output0Buffer.CoveredRecipientSpecialty2 = py.covered_recipient_specialty_2;
                    Output0Buffer.CoveredRecipientSpecialty3 = py.covered_recipient_specialty_3;
                    Output0Buffer.CoveredRecipientSpecialty4 = py.covered_recipient_specialty_4;
                    Output0Buffer.CoveredRecipientSpecialty5 = py.covered_recipient_specialty_5;
                    Output0Buffer.CoveredRecipientSpecialty6 = py.covered_recipient_specialty_6;
                    Output0Buffer.CoveredRecipientLicenseStatecode1 = py.covered_recipient_license_state_code1;
                    Output0Buffer.CoveredRecipientLicenseStatecode2 = py.covered_recipient_license_state_code2;
                    Output0Buffer.CoveredRecipientLicenseStatecode3 = py.covered_recipient_license_state_code3;
                    Output0Buffer.CoveredRecipientLicenseStatecode4 = py.covered_recipient_license_state_code4;
                    Output0Buffer.CoveredRecipientLicenseStatecode5 = py.covered_recipient_license_state_code5;
                    Output0Buffer.SubmittingApplicableManufacturerorApplicableGPOName = py.submitting_applicable_manufacturer_or_applicable_gpo_name;
                    Output0Buffer.ApplicableManufacturerorApplicableGPOMakingPaymentID = py.applicable_manufacturer_or_applicable_gpo_making_payment_id;
                    Output0Buffer.ApplicableManufacturerorApplicableGPOMakingPaymentName = py.applicable_manufacturer_or_applicable_gpo_making_payment_name;
                    Output0Buffer.ApplicableManufacturerorApplicableGPOMakingPaymentState = py.applicable_manufacturer_or_applicable_gpo_making_payment_state;
                    Output0Buffer.ApplicableManufacturerorApplicableGPOMakingPaymentCountry = py.applicable_manufacturer_or_applicable_gpo_making_payment_country;
                    Output0Buffer.TotalAmountofPaymentUSDollars = py.total_amount_of_payment_usdollars;
                    Output0Buffer.DateofPayment = DateTime.Parse(py.date_of_payment);
                    Output0Buffer.NumberofPaymentsIncludedinTotalAmount = py.number_of_payments_included_in_total_amount;
                    Output0Buffer.FormofPaymentorTransferofValue = py.form_of_payment_or_transfer_of_value;
                    Output0Buffer.NatureofPaymentorTransferofValue = py.nature_of_payment_or_transfer_of_value;
                    Output0Buffer.CityofTravel = py.city_of_travel;
                    Output0Buffer.StateofTravel = py.state_of_travel;
                    Output0Buffer.CountryofTravel = py.country_of_travel;
                    Output0Buffer.PhysicianOwnershipIndicator = py.physician_ownership_indicator;
                    Output0Buffer.ThirdPartyPaymentRecipientIndicator = py.third_party_payment_recipient_indicator;
                    Output0Buffer.NameofThirdPartyEntityReceivingPaymentorTransferofValue = py.name_of_third_party_entity_receiving_payment_or_transfer_of_value;
                    Output0Buffer.CharityIndicator = py.charity_indicator;
                    Output0Buffer.ThirdPartyEqualsCoveredRecipientIndicator = py.third_party_equals_covered_recipient_indicator;
                    Output0Buffer.ContextualInformation = py.contextual_information;
                    Output0Buffer.DelayinPublicationIndicator = py.delay_in_publication_indicator;
                    Output0Buffer.RecordID = py.record_id;
                    Output0Buffer.DisputeStatusforPublication = py.dispute_status_for_publication;
                    Output0Buffer.RelatedProductIndicator = py.related_product_indicator;
                    Output0Buffer.CoveredorNoncoveredIndicator1 = py.covered_or_noncovered_indicator_1;
                    Output0Buffer.IndicateDrugorBiologicalorDeviceorMedicalSupply1 = py.indicate_drug_or_biological_or_device_or_medical_supply_1;
                    Output0Buffer.ProductCategoryorTherapeuticArea1 = py.product_category_or_therapeutic_area_1;
                    Output0Buffer.NameofDrugorBiologicalorDeviceorMedicalSupply1 = py.name_of_drug_or_biological_or_device_or_medical_supply_1;
                    Output0Buffer.AssociatedDrugorBiologicalNDC1 = py.associated_drug_or_biological_ndc_1;
                    Output0Buffer.AssociatedDeviceorMedicalSupplyPDI1 = py.associated_device_or_medical_supply_pdi_1;
                    Output0Buffer.CoveredorNoncoveredIndicator2 = py.covered_or_noncovered_indicator_2;
                    Output0Buffer.IndicateDrugorBiologicalorDeviceorMedicalSupply2 = py.indicate_drug_or_biological_or_device_or_medical_supply_2;
                    Output0Buffer.ProductCategoryorTherapeuticArea2 = py.product_category_or_therapeutic_area_2;
                    Output0Buffer.NameofDrugorBiologicalorDeviceorMedicalSupply2 = py.name_of_drug_or_biological_or_device_or_medical_supply_2;
                    Output0Buffer.AssociatedDrugorBiologicalNDC2 = py.associated_drug_or_biological_ndc_2;
                    Output0Buffer.AssociatedDeviceorMedicalSupplyPDI2 = py.associated_device_or_medical_supply_pdi_2;
                    Output0Buffer.CoveredorNoncoveredIndicator3 = py.covered_or_noncovered_indicator_3;
                    Output0Buffer.IndicateDrugorBiologicalorDeviceorMedicalSupply3 = py.indicate_drug_or_biological_or_device_or_medical_supply_3;
                    Output0Buffer.ProductCategoryorTherapeuticArea3 = py.product_category_or_therapeutic_area_3;
                    Output0Buffer.NameofDrugorBiologicalorDeviceorMedicalSupply3 = py.name_of_drug_or_biological_or_device_or_medical_supply_3;
                    Output0Buffer.AssociatedDrugorBiologicalNDC3 = py.associated_drug_or_biological_ndc_3;
                    Output0Buffer.AssociatedDeviceorMedicalSupplyPDI3 = py.associated_device_or_medical_supply_pdi_3;
                    Output0Buffer.CoveredorNoncoveredIndicator4 = py.covered_or_noncovered_indicator_4;
                    Output0Buffer.IndicateDrugorBiologicalorDeviceorMedicalSupply4 = py.indicate_drug_or_biological_or_device_or_medical_supply_4;
                    Output0Buffer.ProductCategoryorTherapeuticArea4 = py.product_category_or_therapeutic_area_4;
                    Output0Buffer.NameofDrugorBiologicalorDeviceorMedicalSupply4 = py.name_of_drug_or_biological_or_device_or_medical_supply_4;
                    Output0Buffer.AssociatedDrugorBiologicalNDC4 = py.associated_drug_or_biological_ndc_4;
                    Output0Buffer.AssociatedDeviceorMedicalSupplyPDI4 = py.associated_device_or_medical_supply_pdi_4;
                    Output0Buffer.CoveredorNoncoveredIndicator5 = py.covered_or_noncovered_indicator_5;
                    Output0Buffer.IndicateDrugorBiologicalorDeviceorMedicalSupply5 = py.indicate_drug_or_biological_or_device_or_medical_supply_5;
                    Output0Buffer.ProductCategoryorTherapeuticArea5 = py.product_category_or_therapeutic_area_5;
                    Output0Buffer.NameofDrugorBiologicalorDeviceorMedicalSupply5 = py.name_of_drug_or_biological_or_device_or_medical_supply_5;
                    Output0Buffer.AssociatedDrugorBiologicalNDC5 = py.associated_drug_or_biological_ndc_5;
                    Output0Buffer.AssociatedDeviceorMedicalSupplyPDI5 = py.associated_device_or_medical_supply_pdi_5;
                    Output0Buffer.ProgramYear = py.program_year;
                    Output0Buffer.PaymentPublicationDate = DateTime.Parse(py.payment_publication_date);



                }

            }

        }

        catch (Exception e)

        {

            FailComponent(e.ToString());

        }


    }


    /// <summary>

    /// Method to return our list articles

    /// </summary>

    /// <param name="wUrl">The web service URL to call</param>

    /// <returns>An object that contains a list of Articles</returns>

    #endregion

    private List<Payment> GetWebServiceResult(string wUrl)

    {



        HttpWebRequest httpWReq = (HttpWebRequest)WebRequest.Create(wUrl);

        httpWReq.Method = "GET";

        httpWReq.ContentType = "application/json";

        HttpWebResponse httpWResp = (HttpWebResponse)httpWReq.GetResponse();


        List<Payment> jsonResponse = null;


        try

        {
            Stream responseStream = httpWResp.GetResponseStream();




            //Deserialize the JSON stream

            using (StreamReader reader = new StreamReader(responseStream))

            {
                //Deserialize our JSON

                DataContractJsonSerializer sr = new DataContractJsonSerializer(typeof(List<Payment>));

                jsonResponse = (List<Payment>)sr.ReadObject(responseStream);

            }

        }

        //Output JSON parsing error

        catch (Exception e)

        {

            FailComponent(e.ToString());

        }

        return jsonResponse;


    }


    /// <summary>

    /// Outputs error message

    /// </summary>

    /// <param name="errorMsg">Full error text</param>

    private void FailComponent(string errorMsg)

    {

        bool fail = false;

        IDTSComponentMetaData100 compMetadata = this.ComponentMetaData;

        compMetadata.FireError(1, "Error Getting Data From Webservice!", errorMsg, "", 0, out fail);


    }
}

#region JSON Classes

[DataContract]
public class Payment
{

    [DataMember(Name = "change_type")]
    public string change_type { get; set; }
    [DataMember(Name = "covered_recipient_type")]
    public string covered_recipient_type { get; set; }
    [DataMember(Name = "teaching_hospital_ccn")]
    public string teaching_hospital_ccn { get; set; }
    [DataMember(Name = "teaching_hospital_id")]
    public string teaching_hospital_id { get; set; }
    [DataMember(Name = "teaching_hospital_name")]
    public string teaching_hospital_name { get; set; }
    [DataMember(Name = "covered_recipient_profile_id")]
    public string covered_recipient_profile_id { get; set; }
    [DataMember(Name = "covered_recipient_npi")]
    public string covered_recipient_npi { get; set; }
    [DataMember(Name = "covered_recipient_first_name")]
    public string covered_recipient_first_name { get; set; }
    [DataMember(Name = "covered_recipient_middle_name")]
    public string covered_recipient_middle_name { get; set; }
    [DataMember(Name = "covered_recipient_last_name")]
    public string covered_recipient_last_name { get; set; }
    [DataMember(Name = "covered_recipient_name_suffix")]
    public string covered_recipient_name_suffix { get; set; }
    [DataMember(Name = "recipient_primary_business_street_address_line1")]
    public string recipient_primary_business_street_address_line1 { get; set; }
    [DataMember(Name = "recipient_primary_business_street_address_line2")]
    public string recipient_primary_business_street_address_line2 { get; set; }
    [DataMember(Name = "recipient_city")]
    public string recipient_city { get; set; }
    [DataMember(Name = "recipient_state")]
    public string recipient_state { get; set; }
    [DataMember(Name = "recipient_zip_code")]
    public string recipient_zip_code { get; set; }
    [DataMember(Name = "recipient_country")]
    public string recipient_country { get; set; }
    [DataMember(Name = "recipient_province")]
    public string recipient_province { get; set; }
    [DataMember(Name = "recipient_postal_code")]
    public string recipient_postal_code { get; set; }
    [DataMember(Name = "covered_recipient_primary_type_1")]
    public string covered_recipient_primary_type_1 { get; set; }
    [DataMember(Name = "covered_recipient_primary_type_2")]
    public string covered_recipient_primary_type_2 { get; set; }
    [DataMember(Name = "covered_recipient_primary_type_3")]
    public string covered_recipient_primary_type_3 { get; set; }
    [DataMember(Name = "covered_recipient_primary_type_4")]
    public string covered_recipient_primary_type_4 { get; set; }
    [DataMember(Name = "covered_recipient_primary_type_5")]
    public string covered_recipient_primary_type_5 { get; set; }
    [DataMember(Name = "covered_recipient_primary_type_6")]
    public string covered_recipient_primary_type_6 { get; set; }
    [DataMember(Name = "covered_recipient_specialty_1")]
    public string covered_recipient_specialty_1 { get; set; }
    [DataMember(Name = "covered_recipient_specialty_2")]
    public string covered_recipient_specialty_2 { get; set; }
    [DataMember(Name = "covered_recipient_specialty_3")]
    public string covered_recipient_specialty_3 { get; set; }
    [DataMember(Name = "covered_recipient_specialty_4")]
    public string covered_recipient_specialty_4 { get; set; }
    [DataMember(Name = "covered_recipient_specialty_5")]
    public string covered_recipient_specialty_5 { get; set; }
    [DataMember(Name = "covered_recipient_specialty_6")]
    public string covered_recipient_specialty_6 { get; set; }
    [DataMember(Name = "covered_recipient_license_state_code1")]
    public string covered_recipient_license_state_code1 { get; set; }
    [DataMember(Name = "covered_recipient_license_state_code2")]
    public string covered_recipient_license_state_code2 { get; set; }
    [DataMember(Name = "covered_recipient_license_state_code3")]
    public string covered_recipient_license_state_code3 { get; set; }
    [DataMember(Name = "covered_recipient_license_state_code4")]
    public string covered_recipient_license_state_code4 { get; set; }
    [DataMember(Name = "covered_recipient_license_state_code5")]
    public string covered_recipient_license_state_code5 { get; set; }
    [DataMember(Name = "submitting_applicable_manufacturer_or_applicable_gpo_name")]
    public string submitting_applicable_manufacturer_or_applicable_gpo_name { get; set; }
    [DataMember(Name = "applicable_manufacturer_or_applicable_gpo_making_payment_id")]
    public string applicable_manufacturer_or_applicable_gpo_making_payment_id { get; set; }
    [DataMember(Name = "applicable_manufacturer_or_applicable_gpo_making_payment_name")]
    public string applicable_manufacturer_or_applicable_gpo_making_payment_name { get; set; }
    [DataMember(Name = "applicable_manufacturer_or_applicable_gpo_making_payment_state")]
    public string applicable_manufacturer_or_applicable_gpo_making_payment_state { get; set; }
    [DataMember(Name = "applicable_manufacturer_or_applicable_gpo_making_payment_country")]
    public string applicable_manufacturer_or_applicable_gpo_making_payment_country { get; set; }
    [DataMember(Name = "total_amount_of_payment_usdollars")]
    public string total_amount_of_payment_usdollars { get; set; }
    [DataMember(Name = "date_of_payment")]
    public string date_of_payment { get; set; }
    [DataMember(Name = "number_of_payments_included_in_total_amount")]
    public string number_of_payments_included_in_total_amount { get; set; }
    [DataMember(Name = "form_of_payment_or_transfer_of_value")]
    public string form_of_payment_or_transfer_of_value { get; set; }
    [DataMember(Name = "nature_of_payment_or_transfer_of_value")]
    public string nature_of_payment_or_transfer_of_value { get; set; }
    [DataMember(Name = "city_of_travel")]
    public string city_of_travel { get; set; }
    [DataMember(Name = "state_of_travel")]
    public string state_of_travel { get; set; }
    [DataMember(Name = "country_of_travel")]
    public string country_of_travel { get; set; }
    [DataMember(Name = "physician_ownership_indicator")]
    public string physician_ownership_indicator { get; set; }
    [DataMember(Name = "third_party_payment_recipient_indicator")]
    public string third_party_payment_recipient_indicator { get; set; }
    [DataMember(Name = "name_of_third_party_entity_receiving_payment_or_transfer_of_value")]
    public string name_of_third_party_entity_receiving_payment_or_transfer_of_value { get; set; }
    [DataMember(Name = "charity_indicator")]
    public string charity_indicator { get; set; }
    [DataMember(Name = "third_party_equals_covered_recipient_indicator")]
    public string third_party_equals_covered_recipient_indicator { get; set; }
    [DataMember(Name = "contextual_information")]
    public string contextual_information { get; set; }
    [DataMember(Name = "delay_in_publication_indicator")]
    public string delay_in_publication_indicator { get; set; }
    [DataMember(Name = "record_id")]
    public string record_id { get; set; }
    [DataMember(Name = "dispute_status_for_publication")]
    public string dispute_status_for_publication { get; set; }
    [DataMember(Name = "related_product_indicator")]
    public string related_product_indicator { get; set; }
    [DataMember(Name = "covered_or_noncovered_indicator_1")]
    public string covered_or_noncovered_indicator_1 { get; set; }
    [DataMember(Name = "indicate_drug_or_biological_or_device_or_medical_supply_1")]
    public string indicate_drug_or_biological_or_device_or_medical_supply_1 { get; set; }
    [DataMember(Name = "product_category_or_therapeutic_area_1")]
    public string product_category_or_therapeutic_area_1 { get; set; }
    [DataMember(Name = "name_of_drug_or_biological_or_device_or_medical_supply_1")]
    public string name_of_drug_or_biological_or_device_or_medical_supply_1 { get; set; }
    [DataMember(Name = "associated_drug_or_biological_ndc_1")]
    public string associated_drug_or_biological_ndc_1 { get; set; }
    [DataMember(Name = "associated_device_or_medical_supply_pdi_1")]
    public string associated_device_or_medical_supply_pdi_1 { get; set; }
    [DataMember(Name = "covered_or_noncovered_indicator_2")]
    public string covered_or_noncovered_indicator_2 { get; set; }
    [DataMember(Name = "indicate_drug_or_biological_or_device_or_medical_supply_2")]
    public string indicate_drug_or_biological_or_device_or_medical_supply_2 { get; set; }
    [DataMember(Name = "product_category_or_therapeutic_area_2")]
    public string product_category_or_therapeutic_area_2 { get; set; }
    [DataMember(Name = "name_of_drug_or_biological_or_device_or_medical_supply_2")]
    public string name_of_drug_or_biological_or_device_or_medical_supply_2 { get; set; }
    [DataMember(Name = "associated_drug_or_biological_ndc_2")]
    public string associated_drug_or_biological_ndc_2 { get; set; }
    [DataMember(Name = "associated_device_or_medical_supply_pdi_2")]
    public string associated_device_or_medical_supply_pdi_2 { get; set; }
    [DataMember(Name = "covered_or_noncovered_indicator_3")]
    public string covered_or_noncovered_indicator_3 { get; set; }
    [DataMember(Name = "indicate_drug_or_biological_or_device_or_medical_supply_3")]
    public string indicate_drug_or_biological_or_device_or_medical_supply_3 { get; set; }
    [DataMember(Name = "product_category_or_therapeutic_area_3")]
    public string product_category_or_therapeutic_area_3 { get; set; }
    [DataMember(Name = "name_of_drug_or_biological_or_device_or_medical_supply_3")]
    public string name_of_drug_or_biological_or_device_or_medical_supply_3 { get; set; }
    [DataMember(Name = "associated_drug_or_biological_ndc_3")]
    public string associated_drug_or_biological_ndc_3 { get; set; }
    [DataMember(Name = "associated_device_or_medical_supply_pdi_3")]
    public string associated_device_or_medical_supply_pdi_3 { get; set; }
    [DataMember(Name = "covered_or_noncovered_indicator_4")]
    public string covered_or_noncovered_indicator_4 { get; set; }
    [DataMember(Name = "indicate_drug_or_biological_or_device_or_medical_supply_4")]
    public string indicate_drug_or_biological_or_device_or_medical_supply_4 { get; set; }
    [DataMember(Name = "product_category_or_therapeutic_area_4")]
    public string product_category_or_therapeutic_area_4 { get; set; }
    [DataMember(Name = "name_of_drug_or_biological_or_device_or_medical_supply_4")]
    public string name_of_drug_or_biological_or_device_or_medical_supply_4 { get; set; }
    [DataMember(Name = "associated_drug_or_biological_ndc_4")]
    public string associated_drug_or_biological_ndc_4 { get; set; }
    [DataMember(Name = "associated_device_or_medical_supply_pdi_4")]
    public string associated_device_or_medical_supply_pdi_4 { get; set; }
    [DataMember(Name = "covered_or_noncovered_indicator_5")]
    public string covered_or_noncovered_indicator_5 { get; set; }
    [DataMember(Name = "indicate_drug_or_biological_or_device_or_medical_supply_5")]
    public string indicate_drug_or_biological_or_device_or_medical_supply_5 { get; set; }
    [DataMember(Name = "product_category_or_therapeutic_area_5")]
    public string product_category_or_therapeutic_area_5 { get; set; }
    [DataMember(Name = "name_of_drug_or_biological_or_device_or_medical_supply_5")]
    public string name_of_drug_or_biological_or_device_or_medical_supply_5 { get; set; }
    [DataMember(Name = "associated_drug_or_biological_ndc_5")]
    public string associated_drug_or_biological_ndc_5 { get; set; }
    [DataMember(Name = "associated_device_or_medical_supply_pdi_5")]
    public string associated_device_or_medical_supply_pdi_5 { get; set; }
    [DataMember(Name = "program_year")]
    public string program_year { get; set; }
    [DataMember(Name = "payment_publication_date")]
    public string payment_publication_date { get; set; }


}

#endregion

Here's an image of the data flow task as it's running

enter image description here

If you can advise on how to improve this code or offer an alternative, it would be greatly appreciated.


Solution

  • The solution was simple... the JSON data set name was changed:

    enter image description here

    Replacing iterations of the term "Payment" with "results" fixed the issue.