I'm trying to encode maiden name and I'm not sure I'm doing it right. Surprisingly Mother's Maiden Name seems to be a standard field but Maiden Name isn't.
My thought is that you would make a 2nd XPN for Patient Name then add the maiden name as the family name and finally set the Name Code to 'M' for Maiden.
I can't find an example online so I just want to know if this is the right way to do it or if I'm off the mark.
ADT_A01 adt = new ADT_A01();
adt.initQuickstart("ADT", "A01", "P");
PID pid = adt.getPID();
pid.getPatientName(0).getFamilyName().getSurname().setValue("Doe");
pid.getPatientName(0).getGivenName().setValue("Jane");
pid.getPatientIdentifierList(0).getIDNumber().setValue("123456");
// now make a 2nd name to handle the maiden name
pid.getPatientName(1).getFamilyName().getSurname().setValue("Smith");
pid.getPatientName(1).getNameTypeCode().setValue( "M" );
HapiContext context = new DefaultHapiContext();
Parser parser = context.getPipeParser();
String encodedMessage = parser.encode(adt);
System.out.println("Printing ER7 Encoded Message:");
System.out.println(encodedMessage);
Output
PID|||123456||Doe^Jane~Smith^^^^^^M
In context of HL7 v2.5,
PID.5.1 - Family Nameis used to provide name of the person.There is separate segment
PID.6 - Mother's Maiden Nameto mention Maiden name. Yes, this is second instance of name; I was wrong while discussing in comments.Following is the quote from here:
Also, some details from here:
So, you can use the same syntax to create Maiden Name. I never used the toolkit, so I may not help you with the code.