Skip to content

Commit

Permalink
Install: RG*1.0*65
Browse files Browse the repository at this point in the history
Patch Subject:  MASTER VETERAN INDEX VISTA ENHANCEMENTS - ITERATION 16 RELEASE 2
Description:

============
 NOTE: To prevent legacy systems ending up as Treating Facilities,
       RG* and MPIF* patches should NOT be installed on legacy
       systems.
 RG*1.0*63 and DG*5.3*926 are the required builds for patch RG*1.0*65.
 NOTE: Master Patient Index (MPI) enhancements are being distributed in
       four VistA namespaces: DG, MPIF, RG and FB.
       The only build enforced requirements are that:
         - FB*3.5*173 and DG*5.3*926 be installed prior to MPIF*1.0*64
         - DG*5.3*926 be installed prior to RG*1.0*65
       Therefore non-legacy sites can install FB*3.5*173 and DG*5.3*926
       in any order, then install MPIF*1.0*64 and RG*1.0*65 patches in any
       order (Do NOT install MPIF*1.0*64 or RG*1.0*65 on legacy sites).
 NOTE: Legacy sites can install just the DG*5.3*926 and FB*3.5*173 patches.
       MPIF*1.0*64 and RG*1.0*65 should NOT be installed on legacy sites.
 Enhancement
 This enhancement patch provides additional support to allow the Master
 Veteran Index (MVI) to support the Date of Death of patients at the
 medical facilities.
 Enhancement #1
 Routine RGADTP was updated to build and retrieve the parsed OBX A08
 Health Level Seven (HL7) Patient update message segments for the
 following additional Date of Death fields in the PATIENT (#2) file:
      - DATE OF DEATH LAST UPDATED (#.354)
      - SUPPORTING DOCUMENT TYPE (#.357)
      - DATE OF DEATH OPTION USED (#.358)
 Enhancement #2
 Routine RGADPT was also modified at the GENACK tag entry point, where
 the Application Acknowledgement (AA) to the MPI is built, to pass the
 name and current value of the PROCESS MVI DOD UPDATE? (#1401) field in
 the MAS PARAMETERS (#43) file, utilizing the $$CHK^VAFCDODA()
 application programming interface (API).
 Note: MPI will use this value to determine if all of the Date of Death
       information should be sync'd out to the site.
 Enhancement #3
 Routine RGADTP3 was modified to update the following Date of Death
 fields in the PATIENT (#2) file:
      - DATE OF DEATH (#.351)
      - DEATH ENTERED BY (#.352)
      - SOURCE OF NOTIFICATION (#.353)
      - DATE OF DEATH LAST UPDATED (#.354)
      - LAST EDITED BY (#.355)
      - SUPPORTING DOCUMENT TYPE (#.357)
      - DATE OF DEATH OPTION USED (#.358)
 Enhancement #4
 Routines RGADTP and RGADTP3 were also modified to allow VistA to ignore
 all updates to the Date of Death fields if an imprecise Date of Death
 is passed. In addition, VistA will transmit an imprecise flag back to
 the MVI in the Application Acknowledgement (AA) synchronization message,
 which will allow MVI to ignore the Date of Death field updates in that
 particular correlation.
 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
 Remote Procedure Calls (RPC) Associated:
 RPC 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
 Additional Information:
 New Service Requests (NSRs)
 ----------------------------
 N/A
 Patient Safety Issues (PSIs)
 -----------------------------
 N/A
 Remedy Ticket(s) & Overview
 ---------------------------
 N/A
 Test Sites:
 ----------
 Central Alabama HCS
 Indianapolis VAMC
 Louisville VAMC
 Software and Documentation Retrieval Instructions:
 ----------------------------------------------------
 Software being released as a host file and/or documentation describing
 the new functionality introduced by this patch are available.
 The preferred method is to retrieve files from download.vista.domain.ext.
 This transmits the files from the first available server. Sites may
 also elect to retrieve files directly from a specific server.
 Sites may retrieve the software and/or documentation directly using Secure
 File Transfer Protocol (SFTP) from the ANONYMOUS.SOFTWARE directory at
 the following OI Field Offices:
 Albany:                 domain.ext
 Hines:                  domain.ext
 Salt Lake City:         domain.ext
 PIMS ADT Documentation can also be found on the VA Software Documentation
 Library at: http://www4.domain.ext/vdl/application.asp?appid=55
 Title                                       File Name              FTP Mode
 ---------------------------------------------------------------------------
 PIMS ADT User Manual - Bed Control Menu     DG_5_3_P926_BC_UM.PDF  (binary)
 PIMS ADT User Manual - Registration Menu    DG_5_3_P926_REG_UM.PDF (binary)
 MPI/PD VistA Documentation can also be found on the VA Software
 Documentation Library at: http://www.domain.ext/vdl/application.asp?appid=16
 Title                                       File Name              FTP Mode
 ---------------------------------------------------------------------------
 MPI/PD VISTA User Manual                    RG_1_0_P65_UM.PDF      (binary)
 MPI/PD VISTA Programmer Manual              RG_1_0_P65_PM.PDF      (binary)
 MPI/PD VISTA Technical Manual               RG_1_0_P65_TM.PDF      (binary)
 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_65
  • Loading branch information
josephsnyder committed Feb 27, 2017
1 parent 9ee6218 commit 15b5cdc
Show file tree
Hide file tree
Showing 11 changed files with 300 additions and 101 deletions.
35 changes: 28 additions & 7 deletions Packages/Clinical Information Resource Network/Routines/RGADTP.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
RGADTP ;BIR/DLR-ADT PROCESSOR TO RETRIGGER A08 or A04 MESSAGES WITH AL/AL (COMMIT/APPLICATION) ACKNOWLEDGEMENTS ;21 May 2015 5:09 PM
;;1.0;CLINICAL INFO RESOURCE NETWORK;**26,27,20,34,35,40,45,44,47,59,60,61,62,63**;30 Apr 99;Build 1
RGADTP ;BIR/DLR-ADT PROCESSOR TO RETRIGGER A08 or A04 MESSAGES WITH AL/AL (COMMIT/APPLICATION) ACKNOWLEDGEMENTS ; 9/2/16 5:19pm
;;1.0;CLINICAL INFO RESOURCE NETWORK;**26,27,20,34,35,40,45,44,47,59,60,61,62,63,65**;30 Apr 99;Build 2
;
;Reference to BLDEVN^VAFCQRY and BLDPID^VAFCQRY supported by IA #3630
;Reference to EN1^VAFHLZEL is supported by IA #752
Expand All @@ -26,7 +26,7 @@ S ZTSAVE("DFN")="",ZTSAVE("RGEVNT")="",ZTSAVE("HLA(""HLS"",")="",ZTRTN="SEND^RGA
K ZTSAVE,ZTRTN,ZTDESC,ZTIO,ZTDTH
Q
IN ;Process in the ADT A04/A08 (routing logic)
N RGI,MSG,RG,SG,DFN,EVN,SITE,RGC,RGJ,DIC,PV1,PID,COMP,ENT,EN,THLA,LAB,RAD,PHARM,TMP,SIG,OBXDONE,OLD,NAMECOMP,DODF
N RGI,MSG,RG,SG,DFN,EVN,SITE,RGC,RGJ,DIC,PV1,PID,COMP,ENT,EN,THLA,LAB,RAD,PHARM,TMP,SIG,OBXDONE,OLD,NAMECOMP,DODF,DODD,DODNP,DODDISDT,DODOPT
S ENT=1,REP=$E(HL("ECH"),2),COMP=$E(HL("ECH"),1)
;set local flag to indicate the processing of an outbound for reformatting
I $P($G(HL("SAF")),COMP)=$P($$SITE^VASITE,"^",3) S RGLOCAL=1
Expand All @@ -47,6 +47,10 @@ S ZTSAVE("DFN")="",ZTSAVE("RGEVNT")="",ZTSAVE("HLA(""HLS"",")="",ZTRTN="SEND^RGA
..S SIG=$$SIG^VAFCSB(DFN) I SIG'="" S HLA("HLS",EN)=SIG,EN=EN+1 ;**61,MVI_3714: Add Self Identified Gender in OBX
..S NAMECOMP=$$NAMEOBX^VAFCSB(DFN) I NAMECOMP'="" S HLA("HLS",EN)=NAMECOMP,EN=EN+1 ;**61,MVI_3976 (mko): Add Name Components in OBX
..S DODF=$$DODF^VAFCSB(DFN) I $G(DODF)'="" S HLA("HLS",EN)=DODF,EN=EN+1 ;**62 MVI_4899 (ckn): Add DOD fields in OBX
..;**65 Story 323009 (ckn) : OBX for additional DOD fields
..S DODD=$$DODD^VAFCSB(DFN) I $G(DODD)'="" S HLA("HLS",EN)=DODD,EN=EN+1 ;Date Of Death Documents
..S DODOPT=$$DODOPT^VAFCSB(DFN) I $G(DODOPT)'="" S HLA("HLS",EN)=DODOPT,EN=EN+1 ;Date Of Death Option Used
..S DODNP=$$DODNTPRV^VAFCSB(DFN) I $G(DODNP)'="" S HLA("HLS",EN)=DODNP,EN=EN+1 ;Date Of Death Notify Provider
..S OBXDONE=1 ;**61 - MVI_3714 (ckn) - flag for all OBX added
.S HLA("HLS",EN)=THLA("HLS",ENT),EN=EN+1
.I $E($G(THLA("HLS",ENT)),1,3)="PID"!($E($G(THLA("HLS",ENT)),1,3)="ZEL") D
Expand Down Expand Up @@ -177,7 +181,7 @@ I RGLOCAL S (EVN(1),THLA("HLS",ENT))=MSG,ENT=ENT+1
I RGLOCAL S THLA("HLS",ENT)=MSG,ENT=ENT+1
Q
OBX ;;
N COMP,SSNV S COMP=$E(HL("ECH"),1)
N COMP,SSNV,SUBCOMP S COMP=$E(HL("ECH"),1),SUBCOMP=$E(HL("ECH"),4)
I RGLOCAL S THLA("HLS",ENT)=MSG,ENT=ENT+1
I 'RGLOCAL D:$$FREE^RGRSPARS($P($P(MSG,HL("FS"),4),RGC,2))="SECURITY LEVEL"
.S ARRAY("SENSITIVITY")=$$SENSTIVE^RGRSPARS($P(MSG,HL("FS"),6),COMP),ARRAY("SENSITIVITY DATE")=$$FREE^RGRSPARS($$FMDATE^HLFNC($P(MSG,HL("FS"),15)))
Expand All @@ -189,6 +193,17 @@ I RGLOCAL S THLA("HLS",ENT)=MSG,ENT=ENT+1
I 'RGLOCAL,$P(HL("SFN"),COMP)="200M" I $P($P(MSG,HL("FS"),4),RGC)="SSN VERIFICATION STATUS" S SSNV=$P($P(MSG,HL("FS"),6),RGC,1),ARRAY(.0907)=$S(SSNV=4:4,SSNV=2:2,1:"@")
;**63 Story 174247 (mko): Get Self-ID Gender
I 'RGLOCAL,$P($P(MSG,HL("FS"),4),RGC)="SELF ID GENDER" S ARRAY(.024)=$$FREE^RGRSPARS($P($P(MSG,HL("FS"),6),RGC))
;**65 Story 323009 (ckn) : parse OBX for additional DOD fields
I 'RGLOCAL,$P($P(MSG,HL("FS"),4),RGC)="DATE OF DEATH DATA" D
.N DODLEB,DODLUPD
. S ARRAY("DODSource")=$$FREE^RGRSPARS($P($P(MSG,HL("FS"),6),RGC)),ARRAY(.353)=ARRAY("DODSource")
. S DODLUPD=$$FMDATE^HLFNC($P(MSG,HL("FS"),15))
. S ARRAY("DODLastUpdated")=$$FREE^RGRSPARS(DODLUPD),ARRAY(.354)=ARRAY("DODLastUpdated")
. S DODLEB=$$FREE^RGRSPARS($P(MSG,HL("FS"),17))
. I DODLEB'="",(DODLEB'=HL("Q")) D
.. S ARRAY("DODEnteredBy")=$$FMNAME^XLFNAME($P(DODLEB,COMP,2,4),"L",COMP),ARRAY(.352)=ARRAY("DODEnteredBy")
.. S ARRAY("DODLastEditedBy")=$P(DODLEB,COMP)_COMP_$P(DODLEB,COMP,13)_COMP_$P($P(DODLEB,COMP,9),SUBCOMP)_COMP_$P($P(DODLEB,COMP,14),SUBCOMP,2),ARRAY(.355)=ARRAY("DODLastEditedBy")
;I 'RGLOCAL,$P($P(MSG,HL("FS"),4),RGC)="DATE OF DEATH DOCUMENTS" S ARRAY("DODDocType")=$$FREE^RGRSPARS($P($P(MSG,HL("FS"),6),RGC)),ARRAY(.357)=ARRAY("DODDocType")
Q
ZPD ;;
I RGLOCAL S THLA("HLS",ENT)=$$EN1^VAFHLZPD(DFN,"1,17,21,34"),ENT=ENT+1 ;**45 to build new ZPD
Expand Down Expand Up @@ -229,13 +244,19 @@ I RGLOCAL S THLA("HLS",ENT)=MSG,ENT=ENT+1
GENACK ;
N RGCNT,IEN,RG,ERRSEG
I $G(ARRAY("DFN"))'>0 S RGER="-1^Unknown ICN#"_$G(ARRAY("ICN"))_" and SSN#"_$G(ARRAY(.09))
E I HL("ETN")="A31",RGSITE="200M" S ERRSEG=$$NAMEERR^VAFCSB(ARRAY("DFN")) ;**61,MVI_3976 (mko): Get Name Components
S RGCNT=1,HLA("HLA",RGCNT)="MSA"_HL("FS")_"AA"_HL("FS")_HL("MID")_HL("FS")_$S(+$G(RGER)<0:$P(RGER,"^",2,3),1:""),RGCNT=RGCNT+1
;**65 - Story 323009 - (ckn) : If DOD did not get updated due to
;imprecise date OR invalid value, create ERR segment
E I HL("ETN")="A31",RGSITE="200M" D
. I $G(DODIMPF) S RGER="-1^IMPRECISE DOD - "_$$HLDATE^HLFNC($P(DODIMPF,"^",2))
. S ERRSEG=$$NAMEERR^VAFCSB(ARRAY("DFN")) ;**61,MVI_3976 (mko): Get Name Components
;E I HL("ETN")="A31",RGSITE="200M" S ERRSEG=$$NAMEERR^VAFCSB(ARRAY("DFN")) ;**61,MVI_3976 (mko): Get Name Components
;send mas parameter 'process mvi dod update?' in 'aa' segment ;**65 - STORY_339759 (dri)
S RGCNT=1,HLA("HLA",RGCNT)="MSA"_HL("FS")_"AA"_HL("FS")_HL("MID")_HL("FS")_$S(+$G(RGER)<0:$P(RGER,"^",2,3),1:(+$$CHK^VAFCDODA_"-"_$$GET1^DID(43,1401,,"LABEL"))),RGCNT=RGCNT+1
S:$G(ERRSEG)]"" HLA("HLA",RGCNT)=ERRSEG,RGCNT=RGCNT+1 ;**61,MVI_3976 (mko): Put name component in ERR segment
S RGSITE=$$LKUP^XUAF4(RGSITE)
D LINK^HLUTIL3(RGSITE,.RG) S IEN=$O(RG(0)) S HLL("LINKS",1)="^"_RG(IEN)
D GENACK^HLMA1(HL("EID"),HLMTIENS,HL("EIDS"),"LM",1,.HLRESLTA,"",.HL)
K HLA
K HLA,DODIMPF
Q
RSP ;
Q
Expand Down
31 changes: 29 additions & 2 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 ;21 May 2015 5:10 PM
;;1.0;CLINICAL INFO RESOURCE NETWORK;**48,59,63**;30 Apr 99;Build 1
RGADTP3 ;BIR/CMC-RGADTP2 - CONTINUED ; 9/6/16 1:41pm
;;1.0;CLINICAL INFO RESOURCE NETWORK;**48,59,63,65**;30 Apr 99;Build 2
;
;MOVED CHKPVT AND DIFF FROM RGADTP2 DUE TO ROUTINE SIZE ISSUE
Q
Expand Down Expand Up @@ -74,4 +74,31 @@
. I FIN'=ARRAY("FIN") S DR=DR_"991.09;",ARAY(2,991.09)=ARRAY("FIN")
; **59, MVI_881 end
I $D(ARRAY("ALIAS")) S DR=DR_"1;"
;**65 - Story 323009 (ckn): Update DOD fields
N ODOD,ODODP,ODODLUP,ODODSRC,ODODARY,ODODD,ANSWER,DUPDFLG
S DUPDFLG=$$CHK^VAFCDODA() ;Date of Death update flag
; check for validation of Date of Death- if imprecise date of
; death - remove all Date of Death if no existin date of death
D VAL^DIE(2,+RGRSDFN_",",.351,"R",$G(ARRAY("MPIDOD")),.ANSWER)
I DUPDFLG D
. I $G(ARRAY("MPIDOD"))="""@"""!($G(ARRAY("MPIDOD"))="") D Q
.. I $$GET1^DIQ(2,+RGRSDFN_",",.351,"I")="" Q
.. S DR=DR_".354;",ARAY(2,.354)=$G(ARRAY(.354)) ;Date of death last updated date
.. ;Remove rest of the DOD fields
.. S DR=DR_".351;.352;.353;.355;.357;.358;",(ARAY(2,.351),ARAY(2,.352),ARAY(2,.353),ARAY(2,.355),ARAY(2,.357),ARAY(2,.358))="@"
. I ANSWER="^" S DODIMPF=1_"^"_$G(ARRAY("MPIDOD")) Q ;Date of Death Imprecise Flag - No update on VistA
. I $G(ARRAY("MPIDOD"))>0 D Q
.. D GETS^DIQ(2,+RGRSDFN_",",".351;.353;.354;.357","I","ODODARY")
.. S ODOD=ODODARY(2,+RGRSDFN_",",.351,"I")
..; 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") 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))
..; I ODODSRC'=$G(ARRAY("DODSource")) S DR=DR_".353;",ARAY(2,.353)=$G(ARRAY(.353))
.. S DR=DR_".353;",ARAY(2,.353)=$G(ARRAY(.353))
.. ;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
Loading

0 comments on commit 15b5cdc

Please sign in to comment.