Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RDT Segment with multiple fields #69

Open
roncansan opened this issue Nov 29, 2016 · 1 comment
Open

Add RDT Segment with multiple fields #69

roncansan opened this issue Nov 29, 2016 · 1 comment

Comments

@roncansan
Copy link

Hi Edwards,
I need to add and RDT segment that should look like this:

RDT|555444222111|Adam||19600614|M|
RDT|555444222112|Adam2||19600615|F|
RDT|555444222113|Adam3||19600616|M|

But the most I can do, is this:

RDT|555444222111
RDT|555444222112
RDT|555444222113

I don't know how to add fields after the first one!

This is my code:

private void addSegmentRDT2(DataTable informationTable)
{
    //RDT|555444222111|||19600614|M|
    var tbr_r08 = new TBR_R08();
    int rowNumber = 0;
    foreach (DataRow row in informationTable.Rows)
    {
        var RTD = tbr_r08.AddRDT();
        int columnNumber = 0;
        foreach (DataColumn column in informationTable.Columns)
        {
            NHapi.Model.V23.Datatype.ST a = new NHapi.Model.V23.Datatype.ST(tbr_r08.Message);
            a.Value = row[column]?.ToString() ?? "";
            RTD.ColumnValue.Data = a;
        }
    }
} 

Any help will be appreciated. Thanks

@milkshakeuk
Copy link
Member

@roncansan which Message Type and Version of the HL7 Spec are you trying to make this work with?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants