I just bought your components (2.3.1) and in comparison to the version which I used as a trial 1.6.3, the newest one contain a very strange and basic bugs. I use delphi 7.
1. I can not SaveToFile. The folowing code does absolutely nothing
Code: Select all
var msg : TdiORM_O01_231;
begin
msg := TdiORM_O01_231.Create;
msh(msg);
orc_zlec(msg);
obr_zlec(msg);
nte(msg);
msg.SaveToFile('c:\1.hl7');
msg.Free;
Code: Select all
StrLst.Text := msg.asString;
StrLst.SaveToFile('c:\1.hl7');
2. Later on, your components claims that this message is invalid (Invalid message, must be start with 'MSH')
I have that c:\1.hl7 on my HDD and I try to get it with following code
Code: Select all
var t : TStringList;
m : TdiMessageInfo;
msg : TdiORM_O01_231;
begin
if dlg_2.Execute then
begin
t := TStringList.create;
t.LoadFromFile(dlg_2.FileName);
m := GetMessageInfo(t.Text);
if (m.MessageType ='ORM^O01') and (m.Version = '2.3.1') then
begin
msg := TdiORM_O01_231.Create;
msg.LoadFromFile(dlg_2.FileName);
ShowMessage('Sukces');
end;
t.Free;
end;
Here you have my c:\1.hl7 file
Code: Select all
MSH|^~\&|^Patomorfolog|^HIS|^ELAB|^HL7|20140803185020||ORM^O01|20140803185050|T|2.3.1|||AL|AL|POL|CP1250|PL
NTE||teścik
PID|1|75032107218^^^^PESEL|123456^PAT||Piekarz-Test^Marcin||19810612000000|M|||ul. Kracowa^^Tulce^^63-004||607288724
ORC|NW|6538^HIS|4567896500^ELAB|548^HIS|||^^^^^R||20111114091040|||589^Jaroszewicz^Boguslaw^^9716821^lek. med.^HIS|||||954^Poradnia chir.^HIS
OBR|1|6538^HIS||H^Badanie ogolne moczu^ELAB^MOCZ||||||654^Kowalska^Anna^^^piel.^HIS||||20111114091230|^^^^^^4567896502
NTE|1|P|Pacjent przyjmuje leki przeciwzakrzepowe
OBR|2|6539^CYT||C^Biopsja cienkoigłowa^ELAB^BAC||||||654^Kowalska^Anna^^^piel.^HIS||||20111114091230|^^^^^^4567896503
I'm looking forward hearing from you,
Mario