ORDERRepCount is only 1

Discussion of open issues, suggestions and bugs regarding to (known as Delphi HL7) HL7 Components
Post Reply
Joschim
Posts: 23
Joined: Wed Sep 17, 2014 7:22 am

ORDERRepCount is only 1

Post by Joschim »

Hallo admin,

for example when I receive this message
MSH|^~\&|MKIS|ABCDE|XXXX||20210917104912||ORM^O01|83749|P|2.5|||AL|NE
PID|1|1107959|1107959||Kmt^Edv2|Mustermann|19800101|F|||Musterweg 1 Test2 ^^XXXXr^^11111^DE||0123/2222^^^test@mailtest.de|01111/777777|D
PV1|1|I|ST-B8^^^FA-IA|11|||||||||||||||0167788417||||oc|NP|||||||||||||||ST-B8/FA-IA|||||20171128113400
ORC|NW|4012509|4033719||||^^^20210820104800^^ROUTINE||20210820104910||EISG^Eis^G|KKKKK^Kkkk MHBA^Peter^^^Dr. med.|ST-B8^Station B8|83076||KLINIK Filler und Placer||FU-AUDI
OBR|1|4012509|4033719|VEMPS^VEMP^^FU-AUDI|||20210917104800|20210917104910||||||||||KLINIK Filler und Placer
OBR|2|4012510|4033720|RHINOABS^Rhino nach Abschwellen^FU-AUDI|||20210917104800|20210917104910||||||||||KLINIK Filler und Placer

OBX|1|ST|INFEKT^Infektionsgefahr||N||||||F
OBX|2|CE|DIAB^Diabetes||UNBEKANNT||||||F

I analyse this message as:
if msg.ORDERRepCount > 0 then begin
for i := 0 to msg.ORDERRepCount - 1 do begin
hl7_AnalyseReceivedOBR(msg.ORDER[ i ].ORDER_DETAIL.OBR);
end;
end;

msg.ORDERRepCount is only 1 and I can analyse only the first OBR
what's wrong?


Best regards
Joschim
admin
Site Admin
Posts: 256
Joined: Sun Jun 05, 2011 8:06 pm

Re: ORDERRepCount is only 1

Post by admin »

Hello,

Your message is invalid.

ORM_O01 Order detail group:

Code: Select all

[	--- ORDER_DETAIL begin	
< OBR |	Order Detail Segment OBR, etc.	
  RQD |	
  RQ1 |	
  RXO |	
  ODS |	
  ODT >	

[ { NTE } ]	Notes and Comments (for Detail)
[ CTD ]	Contact Data	
[ { DG1 } ]	Diagnosis	
[{	--- OBSERVATION begin	
  OBX	Observation/Result	
  [ { NTE } ]	Notes and Comments (for Results)	
}]	--- OBSERVATION end	
]--- ORDER_DETAIL end
The segment 'OBR' should not be repeated.

Please check :
https://www.besasoftware.com/docs/hl7v2 ... ON_25.html

http://www.hl7.eu/HL7v2x/v25/std25/ch04.html#Heading15

Best regards.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests