'How to encode maiden name
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
Solution 1:[1]
In context of HL7 v2.5, PID.5.1 - Family Name
is used to provide name of the person.
There is separate segment PID.6 - Mother's Maiden Name
to mention Maiden name. Yes, this is second instance of name; I was wrong while discussing in comments.
Following is the quote from here:
PID.6 - Mother's Maiden Name
This field contains the family name under which the mother was born (i.e., before marriage). It is used to distinguish between patients with the same last name.
Also, some details from here:
PID.6.1 - Family Name
This component allows full specification of the surname of a person. Where appropriate, it differentiates the person's own surname from that of the person's partner or spouse, in cases where the person's name may contain elements from either name. It also permits messages to distinguish the surname prefix (such as "van" or "de") from the surname root. See section 2.A.30, "FN - family name".
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.
Solution 2:[2]
I think the way you have it is exactly the way I would do this. Just make sure you fill out the entire information for the names on both Patient Name iterations. Also you may want to add 'L' to the first iteration. It is usually expected that the 1st iteration is the legal name, but it's also best to set it.
pid.getPatientName(0).getGivenName().setValue("Jane");
pid.getPatientName(0).getFamilyName().getSurname().setValue("Doe");
pid.getPatientName(0).getNameTypeCode().setValue( "L" );
pid.getPatientName(1).getGivenName().setValue("Jane");
pid.getPatientName(1).getFamilyName().getSurname().setValue("Smith");
pid.getPatientName(1).getNameTypeCode().setValue( "M" );
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Amit Joshi |
Solution 2 |