nHapi v231 does not contain a SIU^S13 messageType

366 views Asked by At

I am currently working on updating an existing HL7 integration that is build in NET 4.5.1 using the nHapi library version 2.3.1

Our integration partner has changed a couple of things and wishes to send us different messagesTypes of HL7: SIU^12, SIU^13, SIU^14, SIU^15 and SIU^17.

However when I pull up the different supported messageTypes in

NHapi.Model.V231.Message I can only find support for SIU_12 and not the 4 other types that our integrator wants to utilize.

I took a look in the 2.5.0 version with the same result.

Are these messageTypes just not supported in nHapi or am I missing something?

Cheers

2

There are 2 answers

1
Sheng Jiang 蒋晟 On BEST ANSWER

The SIU_S12 message structure is for all SIU messages. So if you parse a SIU_S15 message you get a SIU_S12 structure back. Similarly you can encode a SIU_S15 message by populating a SIU_S12 structure.

0
Adriano Scazzola On

it is also necessary to edit the segment 9.1 in these cases because otherwise the pipe parser is responsible for setting the fields 9.1 and 9.2 based on field 9.3 (structure name) in this case (siu_s12)

 if (Terser.Get(structure, 9, 0, 1, 1) == null)
 {
   string structureName = source.GetStructureName();
   int length = structureName.IndexOf("_");
   if (length > 0)
   {
     string value_Renamed2 = structureName.Substring(0, length);
     string value_Renamed3 = structureName.Substring(length + 1);
     Terser.Set(structure, 9, 0, 1, 1, value_Renamed2);
     Terser.Set(structure, 9, 0, 2, 1, value_Renamed3);
   }
   else
     Terser.Set(structure, 9, 0, 1, 1, structureName);
 }