Hello again dear community, i am using " Tersers " to get data from an hl7 v2 messeage, its a ADT_A08 messeage.
Well the thing is that, im trying to get the PatientName with this: string test = terser.Get("PID-5-1"); and that return me nothing, instead if i use the same but changing the command for something like "MSH-16-2" i dont remember, but its work, why it still happend me that? i need to use things like PID-5-2 or EVN-2 , that commands does not work at all. The same happens when I use "MSH-152-2"; the return is the name of a medication, but that is typical of one of my hl7-v2 messages, but I would have to use "RXE-2-1" to get the same data. I apologize for my english , im spanish-language native.
using NHapi.Base.Model;
using NHapi.Base.Util;
using NHapi.Base.Parser;
using System.Diagnostics;
using NHapi.Model.V23.Message;
using System.IO;
public void someMethod()
{
string msg = txtHL7m.Text;
PipeParser pParser = new PipeParser();
var iMesseage = pParser.Parse(msg, "2.3");
try
{
var terser = new Terser(iMesseage);
string test = terser.Get(txtTerserExpression.Text);
txtTerserResults.Text = test;
}
catch
{
Console.WriteLine("ERROR");
}
}
//I expect the patientsData using the correct sintaxis of tesers