STANDARD DATA DICTIONARY #20 -- NAME COMPONENTS FILE                                                              3/24/25    PAGE 1
STORED IN ^VA(20,  (122 ENTRIES)   SITE: WWW.BMIRWIN.COM   UCI: VISTA,VISTA                                        (VERSION 8.0)   

DATA          NAME                  GLOBAL        DATA
ELEMENT       TITLE                 LOCATION      TYPE
-----------------------------------------------------------------------------------------------------------------------------------
This file, introduced with Name Standardization (Patch XU*8.0*134), holds the component parts of a person's name as follows: 
 
  Family (Last) Name (field #1) 
  Given (First) Name (field #2) 
  Middle Name (field #3) 
  Prefix (field #4) 
  Suffix (field #5) 
  Degree (field #6) 
 
The "source name" that has these components is identified by the following three fields: 
                                                      
  File (field #.01) 
  Field (field #.02) 
  IENS (field #.03) 
 
The "ANAME" cross-reference on the Family (Last) Name, Given (First) Name, Middle Name, and Suffix fields keeps each component in
synchronization with the corresponding source name. In the case of Patch XU*8.0*134, the source name is the .01 field (the Name
field) of the NEW PERSON file (#200).  
 
The Degree and Prefix fields are not considered part of a standard name, but can be used to build formatted names for display.  


              DD ACCESS: @
              RD ACCESS: #
              WR ACCESS: #
             DEL ACCESS: #
           LAYGO ACCESS: #
           AUDIT ACCESS: 
IDENTIFIED BY: 
       "NAME": N XUN S XUN("FAMILY")=$P($G(^(1)),U),XUN("GIVEN")=$P($G(^(1)),U,2),XUN("MIDDLE")=$P($G(^(1)),U,3),XUN("SUFFIX")=$P($
               G(^(1)),U,5) D EN^DDIOL($$NAMEFMT^XLFNAME(.XUN,"F","C"),"","?0")

PRIMARY KEY:        A (#2)
  Uniqueness Index: BB (#6)
       File, Field: 1) FILE (20,.01)  2) FIELD (20,.02)  3) IENS (20,.03)

POINTED TO BY: NAME COMPONENTS field (#1.01) of the PATIENT File (#2) 
               K-NAME COMPONENTS field (#1.02) of the PATIENT File (#2) 
               K2-NAME COMPONENTS field (#1.03) of the PATIENT File (#2) 
               FATHER'S NAME COMPONENTS field (#1.04) of the PATIENT File (#2) 
               MOTHER'S NAME COMPONENTS field (#1.05) of the PATIENT File (#2) 
               MOTHERS MAIDEN NAME COMPONENTS field (#1.06) of the PATIENT File (#2) 
               E-NAME COMPONENTS field (#1.07) of the PATIENT File (#2) 
               E2-NAME COMPONENTS field (#1.08) of the PATIENT File (#2) 
               D-NAME COMPONENTS field (#1.09) of the PATIENT File (#2) 
               ALIAS COMPONENTS field (#100.03) of the ALIAS sub-field (#2.01) of the PATIENT File (#2) 
               ATTORNEY'S NAME COMPONENTS field (#100.21) of the DISPOSITION LOG-IN DATE/TIME sub-field (#2.101) of the PATIENT 
                   File (#2) 
               NAME COMPONENTS field (#10.1) of the NEW PERSON File (#200) 
               

CROSS
REFERENCED BY: FILE(B)

INDEXED BY:    FILE & FIELD & IENS & DEGREE (ADEG), FILE & IENS & FIELD & FAMILY (LAST) NAME & GIVEN (FIRST) NAME & MIDDLE NAME &
               SUFFIX & SOURCE NAME FORMAT FLAGS (ANAME), FILE & FIELD & IENS & FAMILY (LAST) NAME & GIVEN (FIRST) NAME & MIDDLE
               NAME & SUFFIX (ASIG), FILE & FIELD & IENS (BB), FAMILY (LAST) NAME & GIVEN (FIRST) NAME & MIDDLE NAME & SUFFIX (C)


    LAST MODIFIED: MAR 1,2019@15:53:20

20,.01        FILE                   0;1 NUMBER (Required) (Key field)

              INPUT TRANSFORM:  K:+X'=X!(X>999999999999)!(X<0)!(X?.E1"."8N.N) X
              LAST EDITED:      AUG 17, 2001 
              HELP-PROMPT:      Answer must be a number between 0 and 999999999999, with up to 7 decimal digits. Answer '??' for 
                                more help. 
              DESCRIPTION:
                                Answer must be the number of the file or subfile that contains the name field.  

                                UNEDITABLE
              CROSS-REFERENCE:  20^B 
                                1)= S ^VA(20,"B",$E(X,1,30),DA)=""
                                2)= K ^VA(20,"B",$E(X,1,30),DA)

              RECORD INDEXES:   ADEG (#3), ANAME (#4), ASIG (#1542), BB (#6)

20,.02        FIELD                  0;2 NUMBER (Required) (Key field)

              INPUT TRANSFORM:  K:+X'=X!(X>999999999999)!(X<0)!(X?.E1"."8N.N) X
              LAST EDITED:      AUG 17, 2001 
              HELP-PROMPT:      Answer must be a number between 0 and 999999999999, with up to 7 decimal digits. Answer '??' for 
                                more help.  
              DESCRIPTION:
                                Answer must be the number of the field that contains the name.  

                                UNEDITABLE
              RECORD INDEXES:   ADEG (#3), ANAME (#4), ASIG (#1542), BB (#6)

20,.03        IENS                   0;3 FREE TEXT (Required) (Key field)

              INPUT TRANSFORM:  K:$L(X)>50!($L(X)<2) X
              LAST EDITED:      AUG 17, 2001 
              HELP-PROMPT:      Answer must be 2-50 characters in length. Answer '??' for more help. 
              DESCRIPTION:
                                Answer must be the IENS of the entry that contains the name.  

                                UNEDITABLE
              RECORD INDEXES:   ADEG (#3), ANAME (#4), ASIG (#1542), BB (#6)

20,1          FAMILY (LAST) NAME     1;1 FREE TEXT (Required)

              LAST NAME   
              INPUT TRANSFORM:  K:$L(X)>35!($L(X)<1)!'(X?1U.UNP)!(X["`") X
              LAST EDITED:      AUG 17, 2001 
              HELP-PROMPT:      Answer must be 1-35 characters in length. Answer '??' for more help. 
              DESCRIPTION:      Answer with the person's family (last) name. It must begin with an upper-case letter and can
                                contain only upper-case letters, numbers, and punctuation, excluding circumflexes (^) and grave
                                accents (`).  

              NOTES:            XXXX--CAN'T BE ALTERED EXCEPT BY PROGRAMMER

              RECORD INDEXES:   ANAME (#4), ASIG (#1542), C (#7)

20,2          GIVEN (FIRST) NAME     1;2 FREE TEXT (Required)

              FIRST NAME   
              INPUT TRANSFORM:  K:$L(X)>25!($L(X)<1)!'(X?1U.UNP)!(X["`") X
              LAST EDITED:      AUG 17, 2001 
              HELP-PROMPT:      Answer must be 1-25 characters in length. Answer '??' for more help. 
              DESCRIPTION:      Answer with the person's given (first) name. It must begin with an upper-case letter and can
                                contain only upper-case letters, numbers, and punctuation, excluding circumflexes (^) and grave
                                accents (`).  

              NOTES:            XXXX--CAN'T BE ALTERED EXCEPT BY PROGRAMMER

              RECORD INDEXES:   ANAME (#4), ASIG (#1542), C (#7)

20,3          MIDDLE NAME            1;3 FREE TEXT

              INPUT TRANSFORM:  K:$L(X)>25!($L(X)<1)!'(X?1U.UNP)!(X["`")!(X="NMI")!(X="NMN") X
              LAST EDITED:      AUG 17, 2001 
              HELP-PROMPT:      Answer must be 1-25 characters in length. Answer '??' for more help. 
              DESCRIPTION:      Answer with the person's middle name. It must begin with an upper-case letter and can contain only
                                upper-case letters, numbers, and punctuation, excluding circumflexes (^) and grave accents (`).
                                Middle names of NMI and NMN are not accepted.  

              NOTES:            XXXX--CAN'T BE ALTERED EXCEPT BY PROGRAMMER

              RECORD INDEXES:   ANAME (#4), ASIG (#1542), C (#7)

20,4          PREFIX                 1;4 FREE TEXT

              INPUT TRANSFORM:  K:$L(X)>10!($L(X)<1)!'(X?1U.UNP)!(X["`") X
              LAST EDITED:      OCT 12, 1999 
              HELP-PROMPT:      Answer must be 1-10 characters in length. Answer '??' for more help. 
              DESCRIPTION:      Answer with the name prefix, such as MR or MS. Answer must begin with an upper-case letter and can
                                contain only upper-case letters, numbers, and punctuation, excluding circumflexes (^) and grave
                                accents (`).  

              NOTES:            XXXX--CAN'T BE ALTERED EXCEPT BY PROGRAMMER


20,5          SUFFIX                 1;5 FREE TEXT

              INPUT TRANSFORM:  K:$L(X)>10!($L(X)<1)!'(X?1UN.UNP)!(X["`") X
              LAST EDITED:      AUG 17, 2001 
              HELP-PROMPT:      Answer must be 1-10 characters in length. Answer '??' for more help. 
              DESCRIPTION:      Answer with the name suffix(es), such as JR, SR, II, or III. Answer must begin with an upper-case
                                letter and can contain only upper-case letters, numbers, and punctuation, excluding circumflexes
                                (^) and grave accents (`).  

              NOTES:            XXXX--CAN'T BE ALTERED EXCEPT BY PROGRAMMER

              RECORD INDEXES:   ANAME (#4), ASIG (#1542), C (#7)

20,6          DEGREE                 1;6 FREE TEXT

              INPUT TRANSFORM:   K:$L(X)>10!($L(X)<1)!($$PATM^XUSESIG3(X))!($$COMP^XUSESIG3(X)) X  I $G(X)'="" N I,Z S Z=X F I=1:1:
                                $L(Z," ") I '$D(^DIC(20.11,"C",$P(Z," ",I))) K X
              MAXIMUM LENGTH:   10
              LAST EDITED:      DEC 20, 2018 
              HELP-PROMPT:      Answer must be valid code/s from the EDUCATION (#20.11) file. The field can contain multiple degree 
                                codes delimited by single blank space up to the 10 character length.  No leading or trailing 
                                spaces. 
              DESCRIPTION:      This field holds any academic or professional degree that have been earned by the user. This would
                                be things like BS, BA, MD, and PHD. Each degree must be a valid code from the EDUCATION (#20.11)
                                file. The field can contain multiple degrees delimited by a single blank space up to the 10
                                character field length. This would be like PHD MD or BA CNA etc. No leading or trailing spaces.  

              NOTES:            XXXX--CAN'T BE ALTERED EXCEPT BY PROGRAMMER

              RECORD INDEXES:   ADEG (#3)

20,7          SOURCE NAME FORMAT FLAGS 1;7 FREE TEXT

              INPUT TRANSFORM:  K:$L(X)>15!($L(X)<1) X
              LAST EDITED:      DEC 28, 2001 
              HELP-PROMPT:      Answer must be 1-15 characters in length. Answer '??' for more help. 
              DESCRIPTION:      When the name fields in the Name Components file are edited, the "ANAME" cross-reference updates
                                the corresponding name field in the source file.  This SOURCE NAME FORMAT FLAGS field can be used
                                to control the format of the name placed in the source name field.  
                                 
                                Answer with the flags used in $$NAMEFMT^XLFNAME API. For example, 
                                 
                                  C  : Return a Comma between the Family (Last) and Given (First) 
                                       Names.  
                                  L  : Truncate the returned name to the maximum length as specified 
                                       by the data type of the source name field.  
                                  L# : Truncate the returned name to a maximum length of # 
                                       characters, where # is an integer between 1 and 256.  
                                  S  : Standardize the name components before building the formatted 
                                       name.  
                                 
                                If this field is null (i.e., no flags are specified), the default is "CLS".  

              RECORD INDEXES:   ANAME (#4)

20,11         NOTES ABOUT NAME       11;1 FREE TEXT

              INPUT TRANSFORM:  K:$L(X)>100!($L(X)<3) X
              LAST EDITED:      JAN 31, 2000 
              HELP-PROMPT:      Answer must be 3-100 characters in length. Answer '??' for more help. 
              DESCRIPTION:      This field stores notes about the name.  
                                 
                                During the New Person Name Conversion, which is run as part of the post-install routine of Patch
                                XU*8.0*134, if a name in the NEW PERSON file contains text in parentheses (), brackets [], or
                                braces {}, that text is removed from the name, and the original name with the parenthetical text is
                                recorded in this field.  


File #20

  Record Indexes:

  ADEG (#3)    RECORD    MUMPS    IR    ACTION
      Short Descr:  Update the DEGREE field in the New Person file, if necessary.
      Description:  If this entry in the Name Components file corresponds to an entry in the New Person file, this MUMPS
                    cross-reference updates the DEGREE field in the New Person file when the DEGREE field in the Name Components
                    file is changed, to ensure that the two fields are in synch.  
        Set Logic:  I '$G(XUNODEGT),X(1)=200,X(2)=.01,X2(4)]"" N XUNODEGT,DIERR,FDA,MSG S XUNODEGT=1,FDA(200,X(3),10.6)=X(4) D FILE
                    ^DIE("","FDA","MSG")
       Kill Logic:  I '$G(XUNODEGT),X(1)=200,X(2)=.01,X2(4)="" N XUNODEGT,DIERR,FDA,MSG S XUNODEGT=1,FDA(200,X(3),10.6)="@" D FILE^
                    DIE("","FDA","MSG")
             X(1):  FILE  (20,.01)  (forwards)
             X(2):  FIELD  (20,.02)  (forwards)
             X(3):  IENS  (20,.03)  (forwards)
             X(4):  DEGREE  (20,6)  (forwards)

  ANAME (#4)    RECORD    MUMPS    IR    ACTION
      Short Descr:  Update the Name field in the source file when any of the components are edited.
      Description:  This MUMPS cross-reference keeps the data in the Name Components file in synchronization with the corresponding
                    name field in the source file (e.g., New Person or Patient file).  
                     
                    The XUNOTRIG flag controls whether this cross-reference is executed. The XUEXISTING USER, XUNEW USER, and
                    XUREACT USER forms all set the XUNOTRIG flag, because the forms themselves contain the logic necessary to keep
                    the New Person name and Name Components entry synchronized.  
        Set Logic:  I '$G(XUNOTRIG) N XUNOTRIG,XUCOMP S XUNOTRIG=1,XUCOMP("FAMILY")=X(4),XUCOMP("GIVEN")=X(5),XUCOMP("MIDDLE")=X(6)
                    ,XUCOMP("SUFFIX")=X(7) D UPDNAME^XLFNAME2(X(1),X(2),X(3),.XUCOMP,X(8))
       Kill Logic:  Q
             X(1):  FILE  (20,.01)  (forwards)
             X(2):  IENS  (20,.03)
             X(3):  FIELD  (20,.02)
             X(4):  FAMILY (LAST) NAME  (20,1)
             X(5):  GIVEN (FIRST) NAME  (20,2)
             X(6):  MIDDLE NAME  (20,3)
             X(7):  SUFFIX  (20,5)
             X(8):  SOURCE NAME FORMAT FLAGS  (20,7)  (forwards)

  ASIG (#1542)    RECORD    MUMPS    IR    ACTION
      Short Descr:  Update the SIGNATURE BLOCK PRINTED NAME in the New Person file, if necessary.
      Description:  If this entry in the Name Components file corresponds to an entry in the New Person file, this MUMPS
                    cross-reference updates the SIGNATURE BLOCK PRINTED NAME field (#20.2) in the New Person file when the Family
                    Name, Given Name, Middle Name, and/or Suffix are changed.  
        Set Logic:  I '$G(XUNOSIGT),X(1)=200,X(2)=.01 N COMP,DIERR,FDA,MSG,SIG,XUNOSIGT S XUNOSIGT=1,COMP("FAMILY")=X(4),COMP("GIVE
                    N")=X(5),COMP("MIDDLE")=X(6),COMP("SUFFIX")=X(7),FDA(200,X(3),20.2)=$$NAMEFMT^XLFNAME(.COMP,"G") D FILE^DIE("",
                    "FDA","MSG")
       Kill Logic:  Q
             X(1):  FILE  (20,.01)  (forwards)
             X(2):  FIELD  (20,.02)  (forwards)
             X(3):  IENS  (20,.03)  (forwards)
             X(4):  FAMILY (LAST) NAME  (20,1)  (forwards)
             X(5):  GIVEN (FIRST) NAME  (20,2)  (forwards)
             X(6):  MIDDLE NAME  (20,3)  (forwards)
             X(7):  SUFFIX  (20,5)  (forwards)

  BB (#6)    RECORD    REGULAR    IR    LOOKUP & SORTING
       Unique for:  Key A (#2), File #20
      Short Descr:  Uniqueness Index for Key 'A' of File #20
        Set Logic:  S ^VA(20,"BB",X(1),X(2),X(3),DA)=""
       Kill Logic:  K ^VA(20,"BB",X(1),X(2),X(3),DA)
       Whole Kill:  K ^VA(20,"BB")
             X(1):  FILE  (20,.01)  (Subscr 1)
             X(2):  FIELD  (20,.02)  (Subscr 2)
             X(3):  IENS  (20,.03)  (Subscr 3)

  C (#7)    RECORD    REGULAR    IR    LOOKUP & SORTING
      Short Descr:  This index allows looking up entries by FamilyName,GivenName MiddleName Suffix
        Set Logic:  S ^VA(20,"C",$E(X(5),1,100),DA)=""
       Kill Logic:  K ^VA(20,"C",$E(X(5),1,100),DA)
       Whole Kill:  K ^VA(20,"C")
             X(1):  FAMILY (LAST) NAME  (20,1)  (forwards)
             X(2):  GIVEN (FIRST) NAME  (20,2)  (forwards)
             X(3):  MIDDLE NAME  (20,3)  (forwards)
             X(4):  SUFFIX  (20,5)  (forwards)
             X(5):  Computed Code: N XUN S XUN("FAMILY")=X(1),XUN("GIVEN")=X(2),XUN("MIDDLE")=X(3),XUN("SUFFIX")=X(4) S X=$$NAMEFMT
                    ^XLFNAME(.XUN,"F","C")
                      (Subscr 1)  (Len 100)  (forwards)
                      Lookup Prompt:  FULL NAME


INPUT TEMPLATE(S):

PRINT TEMPLATE(S):

SORT TEMPLATE(S):

FORM(S)/BLOCK(S):