Skip to content

Commit

Permalink
Install: RG*1.0*71
Browse files Browse the repository at this point in the history
Patch Subject:  MASTER VETERAN INDEX VISTA ENHANCEMENTS - SUPPORT LONG NAMES IN VA MPI
Description:

============
 NOTE: To prevent legacy systems ending up as Treating Facilities,
       RG* and MPIF* patches should NOT be installed on legacy
       systems or the FORUM CLAIMS system (since it is NOT a
       Veterans Affair Medical Center (VAMC) VistA system).
 RG*1.0*67, RG*1.0*68 and MPIF*1.0*69 are the required builds for patch
 RG*1.0*71.
 NOTE: Master Patient Index (MPI) 'Support for Long Names in VA MPI'
       enhancements are being distributed in three VistA namespaces:
       DG, MPIF and RG.
       The only build enforced requirement for this set of related
       patches is that MPIF*1.0*69 be installed before RG*1.0*71.
       (Do NOT install MPIF*1.0*69 or RG*1.0*71 on legacy sites
        or on the FORUM CLAIMS system)
 NOTE: Legacy sites and the FORUM CLAIMS system can install just the
       DG*5.3*974 patch. MPIF*1.0*69 and RG*1.0*71 should NOT be
       installed on legacy sites or on the FORUM CLAIMS system.
 The following enhancements exported in this patch were needed to
 support the collection of the patient's legal name in the Veteran
 Affairs (VA) Master Person Index, which requires MPI to support
 storing patient names and aliases greater than the VistA maximum of
 30 characters in length and to also allow updating of Date of Death
 metadata when the update is triggered through the Override process in
 Toolkit.
 Enhancement #1
 MPI as of patch MPI*1.0*125 will start supporting the collection of
 an individual's legal name, which can now exceed VistA's limitation of
 a maximum length of 30 characters on the name and/or alias fields. To
 support this change on the MPI, VistA has been modified with the
 following change so that it will NOT outright reject the value for
 exceeding the 30-character maximum length:
   The processor for the incoming Admit Discharge Transfer (ADT) A08
   (Update Patient) Health Level Seven (HL7) messages has been modified
   so that when a Patient's name and/or alias exceeds 30 characters and
   the NEW Name Components flag is NOT set that a shortened name will
   be generated from the component parts of the name that were sent in
   the HL7 message. That shortened version of the name is then filed
   into the NAME field (#.01) or ALIAS (#1) multiple NAME (#.01) field
   in the PATIENT (#2) file.
   NOTE: Prior to this change, long names (Patient Name or Aliases)
         would have been rejected by the input transform and the
         update would have failed.
   If the NEW Name Components flag is set to '1' then the name components
   for the 'Name' and 'Aliases' values will be filed directly into the
   NAME COMPONENTS (#20) file. The existing 'ANAME' MUMPS cross-reference
   (X-REF) on the name components fields in the NAME COMPONENTS (#20) file
   will continue to be used to update the corresponding NAME (#.01) and/or
   ALIAS (#1) multiple NAME (#.01) fields in the PATIENT (#2) file.
   NOTE: See patch MPIF*1.0*69 for additional information on the NEW
         Name Components flag stored in the MPI ICN BUILD MANAGEMENT
         (#984.8) file.
 Enhancement #2
 The Healthcare Identity Management (HC IdM) business group has requested
 an enhancement that will modify routine RGADTP3 to NOW allow a patient's
 Date of Death (DOD) metadata to be updated ONLY if the update was received
 from the Override (OVR) process in the Person Service Identity Management
 (PSIM) Toolkit (TK), even if there was no change in the DOD. Currently
 only SOURCE OF NOTIFICATION (field #.353) in the PATIENT File (#2) will be
 updated in VistA through this process, as the other DOD metadata items are
 NOT presently synched out to the sites from the MVI.
   Note: The OVR process will be identified by the ARRAY("TKOVRDOD") flag.
 Patch Components
 ================
 Files & Fields Associated:
 File Name (Number)         Field Name (Number)  New/Modified/Deleted
 ------------------         -------------------  --------------------
 N/A
 Forms Associated:
 Form Name             File #       New/Modified/Deleted
 ---------             ------       --------------------
 N/A
 Mail Groups Associated:
 Mail Group Name          New/Modified/Deleted
 ---------------          --------------------
 N/A
 Options Associated:
 Option Name            Type               New/Modified/Deleted
 -----------            ----               --------------------
 N/A
 Protocols Associated:
 Protocol Name       New/Modified/Deleted
 -------------       --------------------
 N/A
 Security Keys Associated:
 Security Key Name
 -----------------
 N/A
 Templates Associated:
 Template Name      Type      File Name (Number)  New/Modified/Deleted
 -------------      ----      ------------------  --------------------
 N/A
 Remote Procedures Associated:
 Remote Procedure Name             New/Modified/Deleted
 ---------------------------       --------------------
 N/A
 Parameter Definitions Associated:
 Parameter Name                    New/Modified/Deleted
 ---------------------------       --------------------
 N/A
 Additional Information:
 New Service Requests (NSRs)
 ----------------------------
 N/A
 Patient Safety Issues (PSIs)
 -----------------------------
 N/A
 Defect Tracking System Ticket(s) & Overview
 -------------------------------------------
 N/A
 Test Sites:
 ----------
 Birmingham VAMC
 Salt Lake City HCS
 Patch Installation:
 Pre/Post Installation Overview
 ------------------------------
 There are no Pre/Post installation routine processes.

Use default answers for KIDS load/install questions.

Patch-Files: http://code.osehra.org/VistA.git/tree/master/Packages/Clinical+Information+Resource+Network/Patches/RG_1.0_71
  • Loading branch information
josephsnyder committed May 23, 2019
1 parent 9305e8c commit c488b3c
Show file tree
Hide file tree
Showing 7 changed files with 256 additions and 20 deletions.
30 changes: 26 additions & 4 deletions Packages/Clinical Information Resource Network/Routines/RGADTP1.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
RGADTP1 ;BIR/DLR-ADT PROCESSOR TO RETRIGGER A08 or A04 MESSAGES WITH AL/AL (COMMIT/APPLICATION) ACKNOWLEDGEMENTS - CONTINUED ; 4/14/17 11:07am
;;1.0;CLINICAL INFO RESOURCE NETWORK;**26,27,42,45,44,47,48,59,61,64,67**;30 Apr 99;Build 3
RGADTP1 ;BIR/DLR-ADT PROCESSOR TO RETRIGGER A08 or A04 MESSAGES WITH AL/AL (COMMIT/APPLICATION) ACKNOWLEDGEMENTS - CONTINUED ;22 Jan 2019 11:40 AM
;;1.0;CLINICAL INFO RESOURCE NETWORK;**26,27,42,45,44,47,48,59,61,64,67,71**;30 Apr 99;Build 2
PIDP(MSG,ARRAY,HL) ;process PID segment
N ID,IDS,PIDAA,PIDNTC
;Since PID can be over 245 characters loop through setting a PID ARRAY
Expand Down Expand Up @@ -151,11 +151,33 @@ S ARRAY("MPIDOD")=$$FREE^RGRSPARS($$FMDATE^HLFNC($G(PID(30)))),ARRAY(.351)=ARRAY
F X=1:1:LASTNAM S NAME=$P(NAMES,REP,X) D
. I ALISWKD=1 S ALISWKD=0 Q ;first repetition of continuation message already worked
. I X=LASTNAM,$D(PID(6,A+1)) S NAME=NAME_$P($G(PID(6,A+1)),REP,1),ALISWKD=1 ;if last repetition check for an extension of message
. I $P(NAME,COMP,7)="L" S ARRAY("SURNAME")=$P(NAME,COMP),ARRAY("FIRST")=$P(NAME,COMP,2),ARRAY("MIDDLE")=$P(NAME,COMP,3),ARRAY("PREFIX")=$P(NAME,COMP,5),ARRAY("SUFFIX")=$P(NAME,COMP,4),ARRAY("NAME")=$$FMNAME^HLFNC($P(NAME,COMP,1,4)) Q ;legal
. I $P(NAME,COMP,7)="L" D Q ;legal
.. ;**71,Story 841921 (mko): Take into account two quotes -- convert to null
.. S ARRAY("SURNAME")=$$QTON($P(NAME,COMP))
.. S ARRAY("FIRST")=$$QTON($P(NAME,COMP,2))
.. S ARRAY("MIDDLE")=$$QTON($P(NAME,COMP,3))
.. S ARRAY("PREFIX")=$$QTON($P(NAME,COMP,5))
.. S ARRAY("SUFFIX")=$$QTON($P(NAME,COMP,4))
.. S ARRAY("NAME")=$$FMNAME^HLFNC($P(NAME,COMP,1,4))
.;**67 - Story 455458 (ckn) - Parse Preferred Name
. I $P(NAME,COMP,7)="N" D
..N PNAME
..S PNAME=$P(NAME,COMP) S ARRAY("PREFERREDNAME")=$S(PNAME=HL("Q"):"@",1:PNAME)
. I $P(NAME,COMP,7)="A" S $P(ARRAY("ALIAS",IDCNT),"^")=$$FMNAME^HLFNC($P(NAME,COMP,1,4)),IDCNT=IDCNT+1 ;**48 alias
.;**71,Story 841921 (mko): Put the name components into ARRAY("ALIAS",n,"NC")
. I $P(NAME,COMP,7)="A" D
.. N ALIASNC,ALIASNM
.. S ALIASNC=$P(NAME,COMP,1,4),ALIASNM=$$FMNAME^HLFNC(ALIASNC)
.. I $L(ALIASNM)>30,'$$GETFLAG^MPIFNAMC D
... N ALIAS
... S ALIAS("SURNAME")=$$QTON($P(ALIASNC,COMP))
... S ALIAS("FIRST")=$$QTON($P(ALIASNC,COMP,2))
... S ALIAS("MIDDLE")=$$QTON($P(ALIASNC,COMP,3))
... S ALIAS("SUFFIX")=$$QTON($P(ALIASNC,COMP,4))
... S ALIASNM=$$FMTNAME^RGADTP3(.ALIAS,30)
.. S $P(ARRAY("ALIAS",IDCNT),"^")=ALIASNM
.. S ARRAY("ALIAS",IDCNT,"NC")=$TR(ALIASNC,COMP,"^")
.. S IDCNT=IDCNT+1 ;**48 alias
Q
;
QTON(X) ;**71,Story 841921 (mko): Convert two quotes to null
Q $S(X="""""":"",1:X)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
RGADTP2 ;BIR/DLR-ADT PROCESSOR TO RETRIGGER A08 or A04 MESSAGES WITH AL/AL (COMMIT/APPLICATION) ACKNOWLEDGEMENTS - CONTINUED ; 10/26/16 9:29am
;;1.0;CLINICAL INFO RESOURCE NETWORK;**27,20,45,44,47,48,49,52,54,58,59,64,66,67**;30 Apr 99;Build 3
RGADTP2 ;BIR/DLR-ADT PROCESSOR TO RETRIGGER A08 or A04 MESSAGES WITH AL/AL (COMMIT/APPLICATION) ACKNOWLEDGEMENTS - CONTINUED ;16 Nov 2018 4:06 PM
;;1.0;CLINICAL INFO RESOURCE NETWORK;**27,20,45,44,47,48,49,52,54,58,59,64,66,67,71**;30 Apr 99;Build 2
DBIA ;
;Reference to $$ADD^VAFCEHU1 supported by IA #2753
;Reference to EDIT^VAFCPTED supported by IA #2784
Expand Down Expand Up @@ -91,8 +91,10 @@ S ARRAY(.097)=$P($$NOW^XLFDT,".")
...S NAME=$$GET1^DIQ(2,+RGRSDFN_",",.01,"I"),PDOB=$$GET1^DIQ(2,+RGRSDFN_",",.03,"I")
...S SSN=$$GET1^DIQ(2,+RGRSDFN_",",.09,"I"),SEX=$$GET1^DIQ(2,+RGRSDFN_",",.02,"I")
...S MMN=$$GET1^DIQ(2,+RGRSDFN_",",.2403,"I"),MBI=$$GET1^DIQ(2,+RGRSDFN_",",994,"I")
...D STDNAME^XLFNAME(.NAME,"F",.OLDNAME) S HLNAME=ARRAY("NAME") D STDNAME^XLFNAME(.HLNAME,"F",.OLDHLNAM)
...I NAME'=$G(HLNAME) S RGER=$S($G(RGER)'="":$G(RGER)_REP,1:"-1^")_"Name field failure"
...;**71,Story 841921 (mko): Use this STDNAME method of checking that the name was updated only if the new Name Components flag is not set
...I '$$GETFLAG^MPIFNAMC D
....D STDNAME^XLFNAME(.NAME,"F",.OLDNAME) S HLNAME=ARRAY("NAME") D STDNAME^XLFNAME(.HLNAME,"F",.OLDHLNAM)
....I NAME'=$G(HLNAME) S RGER=$S($G(RGER)'="":$G(RGER)_REP,1:"-1^")_"Name field failure"
...I PDOB'=$G(ARRAY("MPIDOB")) S RGER=$S($G(RGER)'="":$G(RGER)_REP,1:"-1^")_"DOB field failure"
...;**48
...I SSN["P" D
Expand Down
48 changes: 44 additions & 4 deletions Packages/Clinical Information Resource Network/Routines/RGADTP3.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
RGADTP3 ;BIR/CMC-RGADTP2 - CONTINUED ;4/27/17 16:30
;;1.0;CLINICAL INFO RESOURCE NETWORK;**48,59,63,65,67,68**;30 Apr 99;Build 1
RGADTP3 ;BIR/CMC-RGADTP2 - CONTINUED ; 12/10/18 3:01pm
;;1.0;CLINICAL INFO RESOURCE NETWORK;**48,59,63,65,67,68,71**;30 Apr 99;Build 2
;
;MOVED CHKPVT AND DIFF FROM RGADTP2 DUE TO ROUTINE SIZE ISSUE
Q
Expand All @@ -19,7 +19,22 @@
S DR="",NAME=$$GET1^DIQ(2,+RGRSDFN_",",.01,"I"),HLNAME=ARRAY("NAME")
;**48 remove name standardization check
;D STDNAME^XLFNAME(.NAME,"F",.OLDNAME) S HLNAME=ARRAY("NAME") D STDNAME^XLFNAME(.HLNAME,"F",.OLDHLNAM)
I NAME'=$G(HLNAME) S DR=DR_".01;",ARAY(2,.01)=ARRAY("NAME")
;**71,Story 841921 (mko): If the Name Components flag is not set, and the incoming name is > 30 chars,
; use the name components to build a truncated name
; If the flag is set, then we need to update the Name Components entry rather than the Patient Name.
; Save the incoming components in ARAY(20), when different from existing values
I '$$GETFLAG^MPIFNAMC D
.S:$L(HLNAME)>30 (HLNAME,ARRAY("NAME"))=$$FMTNAME(.ARRAY,30)
.S:NAME'=$G(HLNAME) DR=DR_".01;",ARAY(2,.01)=ARRAY("NAME")
E D
.N DIERR,DIMSG,DIHELP,MSG,NCIENS,TARG
.S NCIENS=$$GET1^DIQ(2,+RGRSDFN_",",1.01,"I","","MSG")_","
.D:NCIENS>0 GETS^DIQ(20,NCIENS,"1;2;3;5","I","TARG","MSG")
.S:$G(TARG(20,NCIENS,1,"I"))'=$G(ARRAY("SURNAME")) ARAY(2,1.01,"FAMILY")=$G(ARRAY("SURNAME"))
.S:$G(TARG(20,NCIENS,2,"I"))'=$G(ARRAY("FIRST")) ARAY(2,1.01,"GIVEN")=$G(ARRAY("FIRST"))
.S:$G(TARG(20,NCIENS,3,"I"))'=$G(ARRAY("MIDDLE")) ARAY(2,1.01,"MIDDLE")=$G(ARRAY("MIDDLE"))
.S:$G(TARG(20,NCIENS,5,"I"))'=$G(ARRAY("SUFFIX")) ARAY(2,1.01,"SUFFIX")=$G(ARRAY("SUFFIX"))
.S:$D(ARAY(2,1.01)) DR=DR_"1.01;"
;**67 - Story 455460 (ckn) - Update Preferred Name
S PREFNAME=$$GET1^DIQ(2,+RGRSDFN_",",.2405,"I"),HLNAME=$G(ARRAY("PREFERREDNAME"))
I PREFNAME'=$G(HLNAME) S DR=DR_".2405;",ARAY(2,.2405)=ARRAY("PREFERREDNAME")
Expand Down Expand Up @@ -99,7 +114,11 @@
..; S ODODD=ODODARY(2,+RGRSDFN_",",.357,"I")
.. S ODODLUP=ODODARY(2,+RGRSDFN_",",.354,"I")
.. S ODODSRC=ODODARY(2,+RGRSDFN_",",.353,"I")
.. I ODOD=ARRAY("MPIDOD") Q ;No update if no change in Date of Death
..; I ODOD=ARRAY("MPIDOD") Q ;No update if no change in Date of Death
..;**71 - Story 841797 (ckn)
..;DOD metadata update allowed if update is from PSIM TK OVERRIDE even
..;if no change in Date of Death
.. I ODOD=ARRAY("MPIDOD"),'$G(ARRAY("TKOVRDOD")) Q
.. I ODOD'=ARRAY("MPIDOD") S DR=DR_".351;",ARAY(2,.351)=$G(ARRAY(.351))
..; I ODODD'=$G(ARRAY("DODDocType")) S DR=DR_".357;",ARAY(2,.357)=$G(ARRAY(.357))
.. I ODODLUP'=$G(ARRAY("DODLastUpdated")) S DR=DR_".354;",ARAY(2,.354)=$G(ARRAY(.354))
Expand All @@ -108,3 +127,24 @@
.. ;Remove rest of the DOD fields if Date Of Death is getting updated
.. S DR=DR_".352;.355;.357;.358",ARAY(2,.352)="@",ARAY(2,.355)="@",ARAY(2,.358)="@",ARAY(2,.357)="@"
Q
;
FMTNAME(ARRAY,LEN) ;Return a formatted name from cleaned Name Components that doesn't exceed LEN characters in length.
;**71,Story 841921 (mko): New function
N NC
S:'$G(LEN) LEN=30
;
;If ARRAY is passed as a string and doesn't have descendants assume it equals "surname^first^middle^suffix"
D:$D(ARRAY)=1
. S ARRAY("SURNAME")=$P(ARRAY,"^")
. S ARRAY("FIRST")=$P(ARRAY,"^",2)
. S ARRAY("MIDDLE")=$P(ARRAY,"^",3)
. S ARRAY("SUFFIX")=$P(ARRAY,"^",4)
;
;Clean the components
S NC("FAMILY")=$$CLEANC^XLFNAME($G(ARRAY("SURNAME")))
S NC("GIVEN")=$$CLEANC^XLFNAME($G(ARRAY("FIRST")))
S NC("MIDDLE")=$$CLEANC^XLFNAME($G(ARRAY("MIDDLE")))
S NC("SUFFIX")=$$CLEANC^XLFNAME($G(ARRAY("SUFFIX")))
;
;Build a full name, maximum length LEN
Q $$NAMEFMT^XLFNAME(.NC,"F","CL"_LEN)
45 changes: 43 additions & 2 deletions Packages/Kernel/Globals/14.4+TASKS.zwr
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
OSEHRA ZGO Export: TASKS
23-MAY-2019 16:57:04 ZWR
^%ZTSK(-1)=4975
23-MAY-2019 18:23:53 ZWR
^%ZTSK(-1)=4979
^%ZTSK(0)="TASKS^14.4^4344"
^%ZTSK(1001,0)="TASK^XMXBULL^16^^63957,36927^63957,36927^R^^^PATCH,USER^PLA^PLA^ZTDESC^^"
^%ZTSK(1001,.02)="^PLA^^"
Expand Down Expand Up @@ -47266,6 +47266,47 @@ OSEHRA ZGO Export: TASKS
^%ZTSK(4975,.3,"DUZ(",0)="@"
^%ZTSK(4975,.3,"XQSCH")=8
^%ZTSK(4975,.3,"XQY")=9891
^%ZTSK(4976,0)="HOUR^XUTMHR^.5^^65156,65923^65156,65923^R^^^POSTMASTER^VISTA^VISTA^ZTDESC^^"
^%ZTSK(4976,.02)="^VISTA^^"
^%ZTSK(4976,.03)="Taskman Hourly Job"
^%ZTSK(4976,.04)=5629544323
^%ZTSK(4976,.1)="B^65156,65983^Task's volume set not listed in index.^^^^^^"
^%ZTSK(4976,.2)=""
^%ZTSK(4976,.21)=""
^%ZTSK(4976,.25)=""
^%ZTSK(4977,0)="ZTSK^XQ1^.5^VISTA^65156,65983^65156,65983^O^8853^HL AUTOSTART LINK MANAGER^POSTMASTER^VISTA^VISTA^ZTDESC^VISTA^"
^%ZTSK(4977,.02)="^VISTA^^"
^%ZTSK(4977,.03)="No Description (%ZTLOAD)"
^%ZTSK(4977,.04)=5629544383
^%ZTSK(4977,.1)="B^65156,65985^Task's volume set not listed in index.^^^^^^"
^%ZTSK(4977,.2)=""
^%ZTSK(4977,.21)=""
^%ZTSK(4977,.25)=""
^%ZTSK(4977,.3,"DUZ(",0)="@"
^%ZTSK(4977,.3,"XQSCH")=10
^%ZTSK(4977,.3,"XQY")=8853
^%ZTSK(4978,0)="ZTSK^XQ1^.5^VISTA^65156,65983^65156,65983^O^8412^HL TASK RESTART^POSTMASTER^VISTA^VISTA^ZTDESC^VISTA^"
^%ZTSK(4978,.02)="^VISTA^^"
^%ZTSK(4978,.03)="No Description (%ZTLOAD)"
^%ZTSK(4978,.04)=5629544383
^%ZTSK(4978,.1)="B^65156,65987^Task's volume set not listed in index.^^^^^^"
^%ZTSK(4978,.2)=""
^%ZTSK(4978,.21)=""
^%ZTSK(4978,.25)=""
^%ZTSK(4978,.3,"DUZ(",0)="@"
^%ZTSK(4978,.3,"XQSCH")=11
^%ZTSK(4978,.3,"XQY")=8412
^%ZTSK(4979,0)="ZTSK^XQ1^.5^VISTA^65156,65983^65156,65983^O^9891^XOBV LISTENER STARTUP^POSTMASTER^VISTA^VISTA^ZTDESC^VISTA^"
^%ZTSK(4979,.02)="^VISTA^^"
^%ZTSK(4979,.03)="No Description (%ZTLOAD)"
^%ZTSK(4979,.04)=5629544383
^%ZTSK(4979,.1)="B^65156,65989^Task's volume set not listed in index.^^^^^^"
^%ZTSK(4979,.2)=""
^%ZTSK(4979,.21)=""
^%ZTSK(4979,.25)=""
^%ZTSK(4979,.3,"DUZ(",0)="@"
^%ZTSK(4979,.3,"XQSCH")=8
^%ZTSK(4979,.3,"XQY")=9891
^%ZTSK(1082462,.1)="E^64013,39495^Interrupted While Running"
^%ZTSK(1082463,.1)="E^64013,39495^Interrupted While Running"
^%ZTSK(1082464,.1)="E^64013,39495^Interrupted While Running"
Expand Down
Loading

0 comments on commit c488b3c

Please sign in to comment.