How to add an NTE after an OBX? #618
-
I'm using the latest NHAPI in a .net 6 project and generating an public static void CreateNote(ORU_R01_ORDER_OBSERVATION orderObservation, string? comment)
{
var nte = orderObservation.AddNTE();
nte.SetIDNTE.Value = orderObservation.NTERepetitionsUsed.ToString();
//see https://hl7-definition.caristix.com/v2/HL7v2.5.1/Tables/0105 for list of valid sources
nte.SourceOfComment.Value = "L";
nte.GetComment(0).Value = comment;
} The issue is that while the observation class has an |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
That is because you don't add NTE to OBX you can add NTE to Here is an example of what I think you are trying to do. // your existing method
public static void CreateNote(ORU_R01_ORDER_OBSERVATION orderObservation, string? comment)
{
var nte = orderObservation.AddNTE();
nte.SetIDNTE.Value = orderObservation.NTERepetitionsUsed.ToString();
//see https://hl7-definition.caristix.com/v2/HL7v2.5.1/Tables/0105 for list of valid sources
nte.SourceOfComment.Value = "L";
nte.GetComment(0).Value = comment;
}
// new method for observation notes
public static void CreateNote(ORU_R01_OBSERVATION observation, string? comment)
{
var nte = observation.AddNTE();
nte.SetIDNTE.Value = observation.NTERepetitionsUsed.ToString();
//see https://hl7-definition.caristix.com/v2/HL7v2.5.1/Tables/0105 for list of valid sources
nte.SourceOfComment.Value = "L";
nte.GetComment(0).Value = comment;
}
...
// how to add the NTE after the OBX
oruR01.GetPATIENT_RESULT().GetORDER_OBSERVATION().GetOBSERVATION().CreateNote("note to add");
... As a side note NET6 is out of support so is considered vulnerable to security exploits, I would consider updating to the current LTS at least which is NET8; should require minimal effort to do so. |
Beta Was this translation helpful? Give feedback.
That is because you don't add NTE to OBX you can add NTE to
ORU_R01_ORDER_OBSERVATION
which is what you are referencing above and you can also add NTE segments toORU_R01_OBSERVATION
which is what you are after.Here is an example of what I think you are trying to do.