如何对娘家姓进行编码

How to encode maiden name

我正在尝试对娘家姓进行编码,但我不确定自己是否做对了。令人惊讶的是,Mother's Maiden Name 似乎是一个标准字段,但 Maiden Name 不是。

我的想法是,您可以为患者姓名创建第二个 XPN,然后将娘家姓添加为姓氏,最后将 Maiden 的姓名代码设置为 'M'。

我在网上找不到示例,所以我只想知道这样做是否正确,或者我是否偏离了目标。

    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);

输出

PID|||123456||Doe^Jane~Smith^^^^^^M

在 HL7 v2.5 的上下文中,PID.5.1 - Family Name 用于提供人名。

有单独的部分 PID.6 - Mother's Maiden Name 提及娘家姓。是的,这是名称的第二个实例;我在评论里讨论的时候错了。

以下引自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.

此外,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".

因此,您可以使用相同的语法来创建 Maiden Name。我从来没有使用过工具包,所以我可能无法帮助您完成代码。

我认为你的方式正是我这样做的方式。只需确保您在两次 Patient Name 迭代中都填写了姓名的全部信息。此外,您可能希望将 'L' 添加到第一次迭代中。通常期望第1次迭代是合法名称,但也最好设置它。

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" );