anakin59490
anakin59490

Reputation: 672

Hl7- hapi - PID-5.7.2 value

I use hapi java library to parse HL7 file. I need to access pid-5.7.2 value (=titi): PID|1||1^^^^||toto^test^^^MME^^L~titi^test^^^MME^^D

I can access pid-5.7 value (=L)

pidPatient.getPatientName()[0].getXpn7_NameTypeCode().getValue());

But how can i get 5.7.2 value ?

Upvotes: 1

Views: 411

Answers (1)

Tarmo R
Tarmo R

Reputation: 1153

This is not PID-5-7-2, this is the second repetition of the whole PID-5 segment. ~ is the default repetition symbol in HL7.

My HAPI skills are a bit rusty, but I'd suggest trying something like this to get to the field, where "titi" is. Note the array index 1.

pidPatient.getPatientName()[1].getXpn1_FamilyName().getValue());

Upvotes: 3

Related Questions