Dear Philipp,
thanks for the answers and help. I was able to make my application for creating MWL using the NHapi library.
I used the guide from Saravanan Subramanian: https://saravanansubramanian.com/hl72xnhapisendmessage/But like fo-dicom this library is not well described. Therefore, many things have to be guessed.
For example, I am unable to transmit the patient's address using this code:
_ormMesage = new ORM_O01();
...
var pid = _ormMesage.PATIENT.PID;
var patientName = pid.GetPatientName(0);
patientName.FamilyLastName.FamilyName.Value = "Petrov";
patientName.GivenName.Value = "Ivan";
pid.PatientID.ID.Value = "818844378785433211"; //
pid.GetPatientIdentifierList(0).ID.Value = "81883784557854133211";
pid.GetPatientIdentifierList(0).AssigningAuthority.NamespaceID.Value = "ALPHAPLUS";
pid.DateTimeOfBirth.TimeOfAnEvent.Value = "19991111";
pid.Sex.Value = "M";
var patientAddress = pid.GetPatientAddress(0);
patientAddress.StreetAddress.Value = "123 Main Street";
patientAddress.City.Value = "Kiev";
patientAddress.StateOrProvince.Value = "Kiev";
patientAddress.Country.Value = "UKR";
Although other data is transferred completely.
I still can't find how to convey comments about a patient. In which segment or field to be included in the (0010,4000) PatientComments tag.