PXAIVST ;ISL/JVS,KWP,ESW - GET A VISIT FROM ENCOUNTER NODE ;04/11/2024
;;1.0;PCE PATIENT CARE ENCOUNTER;**5,9,15,74,111,96,130,124,164,168,211,238**;Aug 12, 1996;Build 3
;
; Reference to ^DPT( in ICR #10035
; Reference to ^VA(200, in ICR #10060
;
Q
;
VST ;--CREATE A VISIT
;
SET ;--SET AND NEW VARIABLES
N AFTER0,AFTER21,AFTER800,AFTER150,BEFOR0,BEFOR21,BEFOR800,BEFOR150
N AFTER811,BEFOR811,BEFOR812
N PXAA,PXAB,PXALOOK,SUB,PIECE,STOP,TEMP
N AFTER8A,AFTER812
;
S SUB="" F S SUB=$O(@PXADATA@("ENCOUNTER",1,SUB)) Q:SUB="" D
.S PXAA(SUB)=@PXADATA@("ENCOUNTER",1,SUB)
;
S (AFTER812,BEFOR812)=""
;
S PXAK=1
S PXAERR(8)=1
S PXAERR(7)="ENCOUNTER"
;
VAL ;--VALIDATE ENOUGH DATA
I $D(@PXADATA@("ENCOUNTER")) D VAL^PXAIVSTV Q:$G(STOP)
;
;If this is an existing Visit load the fields that cannot be edited.
I $G(PXAVISIT) D
. S TEMP=^AUPNVSIT(PXAVISIT,0)
. S PXAA("ENC D/T")=$P(TEMP,U,1)
. S (PATIENT,PXAA("PATIENT"))=$P(TEMP,U,5)
. S PXAA("SERVICE CATEGORY")=$P(TEMP,U,7)
. S PXAA("HOS LOC")=$P(TEMP,U,22)
;
SETVARA ;--SET VISIT VARIABLES
S $P(AFTER0,U,1)=$G(PXAA("ENC D/T"))
;PX*1*96 - Set TYPE (Piece #3) according to following;
; 1. If OUTSIDE LOCATION then TYPE is "O"
; 2. If no OUTSIDE LOCATION but INSTITUTION then TYPE is "V"
; 3. If DUZ("AG") is defined set TYPE to it.
; 4. If still not defined and DUZ(2) is defined try to use the
; Institution's Agency Code, ICR #10090.
; 5. If still not defined set TYPE to "O"
S TEMP=$S($G(PXAA("OUTSIDE LOCATION"))'="":"O",$G(PXAA("INSTITUTION"))'="":"V",1:$G(DUZ("AG")))
I TEMP="",$G(DUZ(2))'="" S TEMP=$$GET1^DIQ(4,DUZ(2)_",",95,"I")
I TEMP="" S TEMP="O"
S $P(AFTER0,U,3)=TEMP
S (PATIENT,$P(AFTER0,U,5))=$G(PXAA("PATIENT"))
S $P(AFTER0,U,6)=$G(PXAA("INSTITUTION"))
S $P(AFTER0,U,7)=$G(PXAA("SERVICE CATEGORY"))
S $P(AFTER0,U,8)=$G(PXAA("DSS ID"))
S $P(AFTER0,U,12)=$G(PXAA("PARENT"))
S $P(AFTER0,U,18)=$G(PXAA("CHECKOUT D/T"))
S $P(AFTER0,U,21)=$G(PXAA("ELIGIBILITY"))
S $P(AFTER0,U,22)=$G(PXAA("HOS LOC"))
S $P(AFTER0,U,23)=$G(PXAUSER)
S $P(AFTER0,U,26)=$S($G(PXACCNT)>0:$G(PXACCNT),1:"") ;PX*1.0*164
S $P(PXELAP,U,1)=$G(PXAA("ELIGIBILITY"))
S $P(PXELAP,U,3)=$G(PXAA("APPT"))
S $P(AFTER800,U,1)=$G(PXAA("SC"))
S $P(AFTER800,U,2)=$G(PXAA("AO"))
S $P(AFTER800,U,3)=$G(PXAA("IR"))
S $P(AFTER800,U,4)=$G(PXAA("EC"))
S $P(AFTER800,U,5)=$G(PXAA("MST"))
;PX*1*111 - Add HNC
S $P(AFTER800,U,6)=$G(PXAA("HNC"))
S $P(AFTER800,U,7)=$G(PXAA("CV"))
S $P(AFTER800,U,8)=$G(PXAA("SHAD"))
;
;--VALIDATE SERVICE CONNECTEDNESS
S AFTER8A=AFTER800
D VALSCC^PXAIVSTV
S AFTER800=AFTER8A
;
S $P(AFTER21,U,1)=$G(PXAA("OUTSIDE LOCATION")) ;PX/96
S $P(AFTER150,U,3)=$G(PXAA("ENCOUNTER TYPE"))
S $P(AFTER811,U,1)=$G(PXAA("COMMENT"))
S $P(AFTER812,U,2)=$G(PXAPKG)
S $P(AFTER812,U,3)=$G(PXASOURC)
SETPXKA ;--SET PXK ARRAY AFTER
S ^TMP("PXK",$J,"VST",1,0,"AFTER")=AFTER0
S ^TMP("PXK",$J,"VST",1,21,"AFTER")=AFTER21
S ^TMP("PXK",$J,"VST",1,150,"AFTER")=AFTER150
S ^TMP("PXK",$J,"VST",1,800,"AFTER")=AFTER800
S ^TMP("PXK",$J,"VST",1,811,"AFTER")=AFTER811
S ^TMP("PXK",$J,"VST",1,812,"AFTER")=AFTER812
;
CALL ;--CALL
N DFN,DSS,HLOC,INS,SVC,TYPE,VDT,VISITLIST
S DFN=$P(AFTER0,U,5),DSS=$P(AFTER0,U,8),HLOC=$P(AFTER0,U,22),INS=$P(AFTER0,U,6)
S TYPE=$P(AFTER0,U,3),SVC=$P(AFTER0,U,7),VDT=$P(AFTER0,U,1)
S VISITLIST(0)=0
I +$G(PXAVISIT)=0 D FINDVISIT^PXUTLVST(DFN,VDT,HLOC,SVC,DSS,INS,TYPE,"",1,.VISITLIST)
I (+$G(PXAVISIT)=0),(VISITLIST(0)=0) S ^TMP("PXK",$J,"VISITCREATE")="F"
I VISITLIST(0)=1 S PXAVISIT=VISITLIST(1)
I VISITLIST(0)=-1 D Q
.;This should not happen, the initial input checking should catch bad input.
. S PXAERR(7)="VDT= "_VDT
. S PXAERR(8)="SVC= "_SVC_" TYPE="_TYPE
. S PXAERR(9)="HLOC= "_HLOC_" INS="_INS
. S PXAERR(10)="DFN= "_DFN
. S PXAERR(12)="The input parameters to FINDVISIT are bad, cannot continue."
. D ERRSET^PXAIVSTV
;If there are multiple matches use the first one and send a MailMan message.
I VISITLIST(0)>1 D
. S PXAVISIT=VISITLIST(1)
. D MULTMATCHMSG(DFN,VDT,HLOC,SVC,DSS,INS,TYPE,DUZ,.VISITLIST)
;
;--SET VARIABLES BEFORE
I $G(PXAVISIT) D
.F PIECE=0,21,150,800,811,812 S ^TMP("PXK",$J,"VST",1,PIECE,"BEFORE")=$G(^AUPNVSIT(PXAVISIT,PIECE))
.I '$D(@PXADATA@("ENCOUNTER")) D
..F PIECE=0,21,150,800,811,812 S ^TMP("PXK",$J,"VST",1,PIECE,"AFTER")=$G(^AUPNVSIT(PXAVISIT,PIECE))
E D
.S (BEFOR0,BEFOR21,BEFOR150,BEFOR800,BEFOR811)=""
.;--SET PXK ARRAY BEFORE
.S ^TMP("PXK",$J,"VST",1,0,"BEFORE")=BEFOR0
.S ^TMP("PXK",$J,"VST",1,21,"BEFORE")=BEFOR21
.S ^TMP("PXK",$J,"VST",1,150,"BEFORE")=BEFOR150
.S ^TMP("PXK",$J,"VST",1,800,"BEFORE")=BEFOR800
.S ^TMP("PXK",$J,"VST",1,811,"BEFORE")=BEFOR811
.S ^TMP("PXK",$J,"VST",1,812,"BEFORE")=BEFOR812
;
S ^TMP("PXK",$J,"VST",1,"IEN")=$G(PXAVISIT)
;
D EN1^PXKMAIN
I '$G(PXAVISIT) S PXAVISIT=$G(^TMP("PXK",$J,"VST",1,"IEN"))
Q
;
MULTMATCHMSG(DFN,VDT,HLOC,SVC,DSS,INS,TYPE,DUZ,VISITLIST) ;Send a MailMan message to the
;PCE Management mail group when multiple vists are matched.
;Reference ICR#
;Read ^DPT 10035
;Read ^VA(200 10060
;
N IND,PATIENT,PROVIDER,SUBJECT,VLIST
S PATIENT=$P(^DPT(DFN,0),U,1)
S PROVIDER=$$GET1^DIQ(200,DUZ,.01)
S SUBJECT="DATA2PCE - MULTIPLE VISITS WERE MATCHED"
S VLIST=VISITLIST(1)
F IND=2:1:VISITLIST(0) S VLIST=VLIST_", "_VISITLIST(IND)
K ^TMP("PXMULTMSG",$J)
S ^TMP("PXMULTMSG",$J,1,0)=PROVIDER_" (DUZ="_DUZ_") was editing an encounter for patient"
S ^TMP("PXMULTMSG",$J,2,0)=PATIENT_" (DFN="_DFN_") and multiple Visit file entries"
S ^TMP("PXMULTMSG",$J,3,0)="matched the visit string."
S ^TMP("PXMULTMSG",$J,4,0)="The matching Visit file IENs are: "_VLIST_"."
S ^TMP("PXMULTMSG",$J,5,0)=""
S ^TMP("PXMULTMSG",$J,6,0)="The visit match parameters are:"
S ^TMP("PXMULTMSG",$J,7,0)="DFN="_DFN
S ^TMP("PXMULTMSG",$J,8,0)="VISIT DATE/TIME="_VDT
S ^TMP("PXMULTMSG",$J,9,0)="HOSPITAL LOCATION="_HLOC
S ^TMP("PXMULTMSG",$J,10,0)="SERVICE CATEGORY="_SVC
S ^TMP("PXMULTMSG",$J,11,0)="STOP CODE="_DSS
S ^TMP("PXMULTMSG",$J,12,0)="INSTITUTION="_INS
S ^TMP("PXMULTMSG",$J,13,0)="TYPE="_TYPE
S ^TMP("PXMULTMSG",$J,14,0)=""
S ^TMP("PXMULTMSG",$J,15,0)="Only one encounter can be edited at a time, therefore the encounter"
S ^TMP("PXMULTMSG",$J,16,0)="corresponding to the first Visit IEN on the list was edited."
S ^TMP("PXMULTMSG",$J,17,0)=""
S ^TMP("PXMULTMSG",$J,18,0)="To lessen the chance of future multiple matches you can use the option"
S ^TMP("PXMULTMSG",$J,19,0)="PXQ USER REVIEW (User's Visit Review) to determine what data is contained in"
S ^TMP("PXMULTMSG",$J,20,0)="each of the encounters and move as much of it as possible to a single"
S ^TMP("PXMULTMSG",$J,21,0)="encounter."
S ^TMP("PXMULTMSG",$J,22,0)=""
S ^TMP("PXMULTMSG",$J,23,0)="If assistance is needed, please save this message and enter a ticket for help"
S ^TMP("PXMULTMSG",$J,24,0)="from PCE Support."
D SEND^PXMSG("PXMULTMSG",SUBJECT)
K ^TMP("PXMULTMSG",$J)
Q
;
SPKGSRC(PXAVISIT,EPKG,PXAPKG,ESOURCE,PXASOURC,PXAERRF,PXAERR) ;Save Package and
;Source.
N FDA,IENS,MSG,TEMP
S TEMP=$G(^AUPNVSIT(PXAVISIT,812))
S IENS=PXAVISIT_","
I EPKG="" S FDA(9000010,IENS,81202)=PXAPKG
I ESOURCE="" S FDA(9000010,IENS,81203)=PXASOURC
I $D(FDA) D FILE^DIE("","FDA","MSG")
I $D(MSG) D Q
. S PXAERR(9)="PACKAGE AND SOURCE"
. S PXAERR(12)=MSG("DIERR",1,"TEXT",1)
.;The second line of the error text may not always be defined.
. S PXAERR(13)=$G(MSG("DIERR",1,"TEXT",2))
. D ERRSET^PXAIVSTV
S ^TMP("PXK",$J,"VST",1,812,"AFTER")=U_PXAPKG_U_PXASOURC
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPXAIVST 7685 printed Dec 13, 2024@02:26:07 Page 2
PXAIVST ;ISL/JVS,KWP,ESW - GET A VISIT FROM ENCOUNTER NODE ;04/11/2024
+1 ;;1.0;PCE PATIENT CARE ENCOUNTER;**5,9,15,74,111,96,130,124,164,168,211,238**;Aug 12, 1996;Build 3
+2 ;
+3 ; Reference to ^DPT( in ICR #10035
+4 ; Reference to ^VA(200, in ICR #10060
+5 ;
+6 QUIT
+7 ;
VST ;--CREATE A VISIT
+1 ;
SET ;--SET AND NEW VARIABLES
+1 NEW AFTER0,AFTER21,AFTER800,AFTER150,BEFOR0,BEFOR21,BEFOR800,BEFOR150
+2 NEW AFTER811,BEFOR811,BEFOR812
+3 NEW PXAA,PXAB,PXALOOK,SUB,PIECE,STOP,TEMP
+4 NEW AFTER8A,AFTER812
+5 ;
+6 SET SUB=""
FOR
SET SUB=$ORDER(@PXADATA@("ENCOUNTER",1,SUB))
if SUB=""
QUIT
Begin DoDot:1
+7 SET PXAA(SUB)=@PXADATA@("ENCOUNTER",1,SUB)
End DoDot:1
+8 ;
+9 SET (AFTER812,BEFOR812)=""
+10 ;
+11 SET PXAK=1
+12 SET PXAERR(8)=1
+13 SET PXAERR(7)="ENCOUNTER"
+14 ;
VAL ;--VALIDATE ENOUGH DATA
+1 IF $DATA(@PXADATA@("ENCOUNTER"))
DO VAL^PXAIVSTV
if $GET(STOP)
QUIT
+2 ;
+3 ;If this is an existing Visit load the fields that cannot be edited.
+4 IF $GET(PXAVISIT)
Begin DoDot:1
+5 SET TEMP=^AUPNVSIT(PXAVISIT,0)
+6 SET PXAA("ENC D/T")=$PIECE(TEMP,U,1)
+7 SET (PATIENT,PXAA("PATIENT"))=$PIECE(TEMP,U,5)
+8 SET PXAA("SERVICE CATEGORY")=$PIECE(TEMP,U,7)
+9 SET PXAA("HOS LOC")=$PIECE(TEMP,U,22)
End DoDot:1
+10 ;
SETVARA ;--SET VISIT VARIABLES
+1 SET $PIECE(AFTER0,U,1)=$GET(PXAA("ENC D/T"))
+2 ;PX*1*96 - Set TYPE (Piece #3) according to following;
+3 ; 1. If OUTSIDE LOCATION then TYPE is "O"
+4 ; 2. If no OUTSIDE LOCATION but INSTITUTION then TYPE is "V"
+5 ; 3. If DUZ("AG") is defined set TYPE to it.
+6 ; 4. If still not defined and DUZ(2) is defined try to use the
+7 ; Institution's Agency Code, ICR #10090.
+8 ; 5. If still not defined set TYPE to "O"
+9 SET TEMP=$SELECT($GET(PXAA("OUTSIDE LOCATION"))'="":"O",$GET(PXAA("INSTITUTION"))'="":"V",1:$GET(DUZ("AG")))
+10 IF TEMP=""
IF $GET(DUZ(2))'=""
SET TEMP=$$GET1^DIQ(4,DUZ(2)_",",95,"I")
+11 IF TEMP=""
SET TEMP="O"
+12 SET $PIECE(AFTER0,U,3)=TEMP
+13 SET (PATIENT,$PIECE(AFTER0,U,5))=$GET(PXAA("PATIENT"))
+14 SET $PIECE(AFTER0,U,6)=$GET(PXAA("INSTITUTION"))
+15 SET $PIECE(AFTER0,U,7)=$GET(PXAA("SERVICE CATEGORY"))
+16 SET $PIECE(AFTER0,U,8)=$GET(PXAA("DSS ID"))
+17 SET $PIECE(AFTER0,U,12)=$GET(PXAA("PARENT"))
+18 SET $PIECE(AFTER0,U,18)=$GET(PXAA("CHECKOUT D/T"))
+19 SET $PIECE(AFTER0,U,21)=$GET(PXAA("ELIGIBILITY"))
+20 SET $PIECE(AFTER0,U,22)=$GET(PXAA("HOS LOC"))
+21 SET $PIECE(AFTER0,U,23)=$GET(PXAUSER)
+22 ;PX*1.0*164
SET $PIECE(AFTER0,U,26)=$SELECT($GET(PXACCNT)>0:$GET(PXACCNT),1:"")
+23 SET $PIECE(PXELAP,U,1)=$GET(PXAA("ELIGIBILITY"))
+24 SET $PIECE(PXELAP,U,3)=$GET(PXAA("APPT"))
+25 SET $PIECE(AFTER800,U,1)=$GET(PXAA("SC"))
+26 SET $PIECE(AFTER800,U,2)=$GET(PXAA("AO"))
+27 SET $PIECE(AFTER800,U,3)=$GET(PXAA("IR"))
+28 SET $PIECE(AFTER800,U,4)=$GET(PXAA("EC"))
+29 SET $PIECE(AFTER800,U,5)=$GET(PXAA("MST"))
+30 ;PX*1*111 - Add HNC
+31 SET $PIECE(AFTER800,U,6)=$GET(PXAA("HNC"))
+32 SET $PIECE(AFTER800,U,7)=$GET(PXAA("CV"))
+33 SET $PIECE(AFTER800,U,8)=$GET(PXAA("SHAD"))
+34 ;
+35 ;--VALIDATE SERVICE CONNECTEDNESS
+36 SET AFTER8A=AFTER800
+37 DO VALSCC^PXAIVSTV
+38 SET AFTER800=AFTER8A
+39 ;
+40 ;PX/96
SET $PIECE(AFTER21,U,1)=$GET(PXAA("OUTSIDE LOCATION"))
+41 SET $PIECE(AFTER150,U,3)=$GET(PXAA("ENCOUNTER TYPE"))
+42 SET $PIECE(AFTER811,U,1)=$GET(PXAA("COMMENT"))
+43 SET $PIECE(AFTER812,U,2)=$GET(PXAPKG)
+44 SET $PIECE(AFTER812,U,3)=$GET(PXASOURC)
SETPXKA ;--SET PXK ARRAY AFTER
+1 SET ^TMP("PXK",$JOB,"VST",1,0,"AFTER")=AFTER0
+2 SET ^TMP("PXK",$JOB,"VST",1,21,"AFTER")=AFTER21
+3 SET ^TMP("PXK",$JOB,"VST",1,150,"AFTER")=AFTER150
+4 SET ^TMP("PXK",$JOB,"VST",1,800,"AFTER")=AFTER800
+5 SET ^TMP("PXK",$JOB,"VST",1,811,"AFTER")=AFTER811
+6 SET ^TMP("PXK",$JOB,"VST",1,812,"AFTER")=AFTER812
+7 ;
CALL ;--CALL
+1 NEW DFN,DSS,HLOC,INS,SVC,TYPE,VDT,VISITLIST
+2 SET DFN=$PIECE(AFTER0,U,5)
SET DSS=$PIECE(AFTER0,U,8)
SET HLOC=$PIECE(AFTER0,U,22)
SET INS=$PIECE(AFTER0,U,6)
+3 SET TYPE=$PIECE(AFTER0,U,3)
SET SVC=$PIECE(AFTER0,U,7)
SET VDT=$PIECE(AFTER0,U,1)
+4 SET VISITLIST(0)=0
+5 IF +$GET(PXAVISIT)=0
DO FINDVISIT^PXUTLVST(DFN,VDT,HLOC,SVC,DSS,INS,TYPE,"",1,.VISITLIST)
+6 IF (+$GET(PXAVISIT)=0)
IF (VISITLIST(0)=0)
SET ^TMP("PXK",$JOB,"VISITCREATE")="F"
+7 IF VISITLIST(0)=1
SET PXAVISIT=VISITLIST(1)
+8 IF VISITLIST(0)=-1
Begin DoDot:1
+9 ;This should not happen, the initial input checking should catch bad input.
+10 SET PXAERR(7)="VDT= "_VDT
+11 SET PXAERR(8)="SVC= "_SVC_" TYPE="_TYPE
+12 SET PXAERR(9)="HLOC= "_HLOC_" INS="_INS
+13 SET PXAERR(10)="DFN= "_DFN
+14 SET PXAERR(12)="The input parameters to FINDVISIT are bad, cannot continue."
+15 DO ERRSET^PXAIVSTV
End DoDot:1
QUIT
+16 ;If there are multiple matches use the first one and send a MailMan message.
+17 IF VISITLIST(0)>1
Begin DoDot:1
+18 SET PXAVISIT=VISITLIST(1)
+19 DO MULTMATCHMSG(DFN,VDT,HLOC,SVC,DSS,INS,TYPE,DUZ,.VISITLIST)
End DoDot:1
+20 ;
+21 ;--SET VARIABLES BEFORE
+22 IF $GET(PXAVISIT)
Begin DoDot:1
+23 FOR PIECE=0,21,150,800,811,812
SET ^TMP("PXK",$JOB,"VST",1,PIECE,"BEFORE")=$GET(^AUPNVSIT(PXAVISIT,PIECE))
+24 IF '$DATA(@PXADATA@("ENCOUNTER"))
Begin DoDot:2
+25 FOR PIECE=0,21,150,800,811,812
SET ^TMP("PXK",$JOB,"VST",1,PIECE,"AFTER")=$GET(^AUPNVSIT(PXAVISIT,PIECE))
End DoDot:2
End DoDot:1
+26 IF '$TEST
Begin DoDot:1
+27 SET (BEFOR0,BEFOR21,BEFOR150,BEFOR800,BEFOR811)=""
+28 ;--SET PXK ARRAY BEFORE
+29 SET ^TMP("PXK",$JOB,"VST",1,0,"BEFORE")=BEFOR0
+30 SET ^TMP("PXK",$JOB,"VST",1,21,"BEFORE")=BEFOR21
+31 SET ^TMP("PXK",$JOB,"VST",1,150,"BEFORE")=BEFOR150
+32 SET ^TMP("PXK",$JOB,"VST",1,800,"BEFORE")=BEFOR800
+33 SET ^TMP("PXK",$JOB,"VST",1,811,"BEFORE")=BEFOR811
+34 SET ^TMP("PXK",$JOB,"VST",1,812,"BEFORE")=BEFOR812
End DoDot:1
+35 ;
+36 SET ^TMP("PXK",$JOB,"VST",1,"IEN")=$GET(PXAVISIT)
+37 ;
+38 DO EN1^PXKMAIN
+39 IF '$GET(PXAVISIT)
SET PXAVISIT=$GET(^TMP("PXK",$JOB,"VST",1,"IEN"))
+40 QUIT
+41 ;
MULTMATCHMSG(DFN,VDT,HLOC,SVC,DSS,INS,TYPE,DUZ,VISITLIST) ;Send a MailMan message to the
+1 ;PCE Management mail group when multiple vists are matched.
+2 ;Reference ICR#
+3 ;Read ^DPT 10035
+4 ;Read ^VA(200 10060
+5 ;
+6 NEW IND,PATIENT,PROVIDER,SUBJECT,VLIST
+7 SET PATIENT=$PIECE(^DPT(DFN,0),U,1)
+8 SET PROVIDER=$$GET1^DIQ(200,DUZ,.01)
+9 SET SUBJECT="DATA2PCE - MULTIPLE VISITS WERE MATCHED"
+10 SET VLIST=VISITLIST(1)
+11 FOR IND=2:1:VISITLIST(0)
SET VLIST=VLIST_", "_VISITLIST(IND)
+12 KILL ^TMP("PXMULTMSG",$JOB)
+13 SET ^TMP("PXMULTMSG",$JOB,1,0)=PROVIDER_" (DUZ="_DUZ_") was editing an encounter for patient"
+14 SET ^TMP("PXMULTMSG",$JOB,2,0)=PATIENT_" (DFN="_DFN_") and multiple Visit file entries"
+15 SET ^TMP("PXMULTMSG",$JOB,3,0)="matched the visit string."
+16 SET ^TMP("PXMULTMSG",$JOB,4,0)="The matching Visit file IENs are: "_VLIST_"."
+17 SET ^TMP("PXMULTMSG",$JOB,5,0)=""
+18 SET ^TMP("PXMULTMSG",$JOB,6,0)="The visit match parameters are:"
+19 SET ^TMP("PXMULTMSG",$JOB,7,0)="DFN="_DFN
+20 SET ^TMP("PXMULTMSG",$JOB,8,0)="VISIT DATE/TIME="_VDT
+21 SET ^TMP("PXMULTMSG",$JOB,9,0)="HOSPITAL LOCATION="_HLOC
+22 SET ^TMP("PXMULTMSG",$JOB,10,0)="SERVICE CATEGORY="_SVC
+23 SET ^TMP("PXMULTMSG",$JOB,11,0)="STOP CODE="_DSS
+24 SET ^TMP("PXMULTMSG",$JOB,12,0)="INSTITUTION="_INS
+25 SET ^TMP("PXMULTMSG",$JOB,13,0)="TYPE="_TYPE
+26 SET ^TMP("PXMULTMSG",$JOB,14,0)=""
+27 SET ^TMP("PXMULTMSG",$JOB,15,0)="Only one encounter can be edited at a time, therefore the encounter"
+28 SET ^TMP("PXMULTMSG",$JOB,16,0)="corresponding to the first Visit IEN on the list was edited."
+29 SET ^TMP("PXMULTMSG",$JOB,17,0)=""
+30 SET ^TMP("PXMULTMSG",$JOB,18,0)="To lessen the chance of future multiple matches you can use the option"
+31 SET ^TMP("PXMULTMSG",$JOB,19,0)="PXQ USER REVIEW (User's Visit Review) to determine what data is contained in"
+32 SET ^TMP("PXMULTMSG",$JOB,20,0)="each of the encounters and move as much of it as possible to a single"
+33 SET ^TMP("PXMULTMSG",$JOB,21,0)="encounter."
+34 SET ^TMP("PXMULTMSG",$JOB,22,0)=""
+35 SET ^TMP("PXMULTMSG",$JOB,23,0)="If assistance is needed, please save this message and enter a ticket for help"
+36 SET ^TMP("PXMULTMSG",$JOB,24,0)="from PCE Support."
+37 DO SEND^PXMSG("PXMULTMSG",SUBJECT)
+38 KILL ^TMP("PXMULTMSG",$JOB)
+39 QUIT
+40 ;
SPKGSRC(PXAVISIT,EPKG,PXAPKG,ESOURCE,PXASOURC,PXAERRF,PXAERR) ;Save Package and
+1 ;Source.
+2 NEW FDA,IENS,MSG,TEMP
+3 SET TEMP=$GET(^AUPNVSIT(PXAVISIT,812))
+4 SET IENS=PXAVISIT_","
+5 IF EPKG=""
SET FDA(9000010,IENS,81202)=PXAPKG
+6 IF ESOURCE=""
SET FDA(9000010,IENS,81203)=PXASOURC
+7 IF $DATA(FDA)
DO FILE^DIE("","FDA","MSG")
+8 IF $DATA(MSG)
Begin DoDot:1
+9 SET PXAERR(9)="PACKAGE AND SOURCE"
+10 SET PXAERR(12)=MSG("DIERR",1,"TEXT",1)
+11 ;The second line of the error text may not always be defined.
+12 SET PXAERR(13)=$GET(MSG("DIERR",1,"TEXT",2))
+13 DO ERRSET^PXAIVSTV
End DoDot:1
QUIT
+14 SET ^TMP("PXK",$JOB,"VST",1,812,"AFTER")=U_PXAPKG_U_PXASOURC
+15 QUIT
+16 ;