Reputation: 672
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
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