I want to create a HL7 2.5 / QBP_Q21 message with event trigger Q22
msg := TdiQBP_Q21_25.create;
msg.Terser('/MSH-3-1').AsString := '111';
msg.Terser('/MSH-4-1').AsString := '111';
msg.Terser('/MSH-5-1').AsString := '222';
msg.Terser('/MSH-6-1').AsString := '222';
msg.Terser('/MSH-9-1').AsString := 'QBP';
msg.Terser('/MSH-9-2').AsString := 'Q22';
msg.Terser('/MSH-9-3').AsString := 'QBP_Q21';
msg.Terser('/MSH-10-1').AsString := '333';
msg.Terser('/MSH-17-1').AsString := 'GBR';
msg.Terser('/MSH-19-1').AsString := 'EN';
msg.Terser('/QPD-1').AsString := 'IHE PDQ Query';
msg.Terser('/QPD-2').AsString := 'PatientQuery';
msg.Terser('/QPD-3').AsString := '@PID.5.1^test~@PID.5.2^adam~@PID.7^19660101'; // -> Access violation at ....
even if I just assign QPD-1 and QPD-2 with terser and manually try to add
msg.asString := msg.AsString + '|'+'@PID.5.1^test~@PID.5.2^adam~@PID.7^19660101' // -> Error: Segment unknown
-> how can I do that? ... who can help me?
Error creating QPD-3 with terser
-
- Site Admin
- Posts: 256
- Joined: Sun Jun 05, 2011 8:06 pm
Re: Error creating QPD-3 with terser
Hi,
msg.QPD.UserParameters field is variable field
try this :
msg := TdiQBP_Q21_25.create;
msg.Terser('/MSH-3-1').AsString := '111';
msg.Terser('/MSH-4-1').AsString := '111';
msg.Terser('/MSH-5-1').AsString := '222';
msg.Terser('/MSH-6-1').AsString := '222';
msg.Terser('/MSH-9-1').AsString := 'QBP';
msg.Terser('/MSH-9-2').AsString := 'Q22';
msg.Terser('/MSH-9-3').AsString := 'QBP_Q21';
msg.Terser('/MSH-10-1').AsString := '333';
msg.Terser('/MSH-17-1').AsString := 'GBR';
msg.Terser('/MSH-19-1').AsString := 'EN';
msg.Terser('/QPD-1-1').AsString := 'IHE PDQ Query';
msg.Terser('/QPD-2').AsString := 'PatientQuery';
msg.QPD.UserParameters:=TdiST_25.Create;
TdiST_25(msg.QPD.UserParameters).Value:= '@PID.5.1^test~@PID.5.2^adam~@PID.7^19660101';
msg.QPD.UserParameters field is variable field
try this :
msg := TdiQBP_Q21_25.create;
msg.Terser('/MSH-3-1').AsString := '111';
msg.Terser('/MSH-4-1').AsString := '111';
msg.Terser('/MSH-5-1').AsString := '222';
msg.Terser('/MSH-6-1').AsString := '222';
msg.Terser('/MSH-9-1').AsString := 'QBP';
msg.Terser('/MSH-9-2').AsString := 'Q22';
msg.Terser('/MSH-9-3').AsString := 'QBP_Q21';
msg.Terser('/MSH-10-1').AsString := '333';
msg.Terser('/MSH-17-1').AsString := 'GBR';
msg.Terser('/MSH-19-1').AsString := 'EN';
msg.Terser('/QPD-1-1').AsString := 'IHE PDQ Query';
msg.Terser('/QPD-2').AsString := 'PatientQuery';
msg.QPD.UserParameters:=TdiST_25.Create;
TdiST_25(msg.QPD.UserParameters).Value:= '@PID.5.1^test~@PID.5.2^adam~@PID.7^19660101';
-
- Posts: 8
- Joined: Tue Feb 11, 2014 12:48 pm
Re: Error creating QPD-3 with terser
hi Admin,
thx ... it works after some small changes: TdiST_25 is not populated but TdiString
Why don't you do this internally in case of Terser('/QPD-3') ?
And I think there are even more cases where terser can not be used - although it's a wonderfull funtion.
thx ... it works after some small changes: TdiST_25 is not populated but TdiString
Why don't you do this internally in case of Terser('/QPD-3') ?
And I think there are even more cases where terser can not be used - although it's a wonderfull funtion.
-
- Site Admin
- Posts: 256
- Joined: Sun Jun 05, 2011 8:06 pm
Who is online
Users browsing this forum: No registered users and 0 guests