Discussion of open issues, suggestions and bugs regarding to (known as Delphi HL7) HL7 Components
-
hj.frei
- Posts: 2
- Joined: Mon Jul 16, 2012 7:11 am
Post
by hj.frei »
Hi,
I'm currently evaluating Delphi7 and encountered following "Problem":
How can I read the two OBX segments? I'm using Delphi6...
Below the simple example which I used:
Code: Select all
MSH|^~\&|TEST|TEST|EMR|Hospital|20120715172422||ADT^A01|MSG00001|P|2.4||||||WINDOWS-1252
EVN|A01|20110813155112
PID|||24313||Frei^Hans||19690609172545|M||2106-3||||||||||||H
PV1||O|||||||||||||||||v89283982
OBX|1||^BODY_WEIGHT||78|kg|||||O
OBX|2||^BODY_HEIGHT||1.88|m|||||O
-
admin
- Site Admin
- Posts: 256
- Joined: Sun Jun 05, 2011 8:06 pm
Post
by admin »
Hi,
Code: Select all
uses diHL724, diHL7DT24, diHL7Grp24;
procedure TForm1.bAdtA01Click(Sender: TObject);
var
msg : TdiADT_A01_24;
msgstr: string;
begin
msg := TdiADT_A01_24.Create;
msgstr:='MSH|^~\&|TEST|TEST|EMR|Hospital|20120715172422||ADT^A01|MSG00001|P|2.4||||||WINDOWS-1252'+#13+
'EVN|A01|20110813155112'+#13+
'PID|||24313||Frei^Hans||19690609172545|M||2106-3||||||||||||H'+#13+
'PV1||O|||||||||||||||||v89283982'+#13+
'OBX|1||^BODY_WEIGHT||78|kg|||||O'+#13+
'OBX|2||^BODY_HEIGHT||1.88|m|||||O'+#13;
msg.AsString:=msgstr;
//Read first OBX's SetIDOBX field.
ShowMessage(msg.OBX[0].SetIDOBX.AsString);
FreeAndNil(msg);
end;
Best regards.
-
hj.frei
- Posts: 2
- Joined: Mon Jul 16, 2012 7:11 am
Post
by hj.frei »
Hi,
thanks. I actually had somewhere a TrimTrail which causes the problem.
Is it also possible to read the total number of OBX segments?
thanks
-
admin
- Site Admin
- Posts: 256
- Joined: Sun Jun 05, 2011 8:06 pm
Post
by admin »
Hi,
Thanks for your feedback.
Please download setup again and you can see
OBXRepCount function.
I actually had somewhere a TrimTrail which causes the problem.
You can explain more clearly?
We would like to solve the problem.
Please write to us.
Best regards.
Users browsing this forum: No registered users and 8 guests