MPIFEXT2 ;SFCIO/CMC-EXTENDED PDAT - RPC ;26 JUN 01
;;1.0; MASTER PATIENT INDEX VISTA ;**20,28**;30 Apr 99
;
;Integration Agreements Utilized:
; ^DPT( - #2070
; NOTICE^DGSEC4 - #3027
; PTSEC^DGSEC4 - #3027
; D GETS^DIQ(2,DFN_",",".097","I","MPIFAR") - #3581
;
PATINFO(RETN,ICN,SSN,RPC) ;get patient info array
N MPINODE,MPIFAR,DFN,TICN,TSSN,TEXT,CNTD,PICN,XX,X,XXX
I $G(ICN)=""&($G(SSN)="") S RETN="-1^NO ICN OR SSN PASSED" Q
S TICN=ICN,TSSN=SSN,TEXT=""
I $G(SSN)'="" D
.S ICN=$$GETICNS^MPIF002(SSN)
.I RPC=1 S TEXT="MPI(""SSN USED"")="
.S RETN(1,"SSN USED")=TEXT_""""_SSN_""""
.; possible to have multiple entries with same SSN
S PICN=ICN,CNTD=0
F XX=1:1 S ICN=$P(PICN,"^",XX) Q:ICN="" D
.S DFN=$$GETDFN^MPIF001(+ICN),CNTD=CNTD+1
.I +DFN=-1 S RETN(XX)="-1^NO SUCH ICN "_ICN Q
.I '$D(^DPT(DFN)) S RETN(XX)="-1^BAD AICN X-REF, PT FILE ENTRY DOESN'T EXIST DFN= "_DFN_" ICN= "_ICN Q
.; check if this data can be returned and if sensative pt bulletin needed
.N SENS D PTSEC^DGSEC4(.SENS,DFN,1,"Remote Procedure from MPI^RPC frm MPI ext PDAT infor")
.N NOT D NOTICE^DGSEC4(.NOT,DFN,"Remote Procedure from MPI^RPC frm MPI ext PDAT infor")
.I SENS(1)=3!(SENS(1)=4)!(SENS(1)=-1) S RETN(XX)="-1^SENSATIVE PT ISSUE "_SENS(2)_" DFN= "_DFN_" ICN= "_ICN Q
.I RPC=1 S TEXT="MPI("_DFN_",""DFN"")="
.S RETN(XX,"DFN")=TEXT_""""_DFN_""""
.S MPINODE=$$MPINODE^MPIFAPI(DFN)
.D GETS^DIQ(2,DFN_",",".097","I","MPIFAR")
.I RPC=1 S TEXT="MPI("_DFN_",""ENTERED PT FILE"")="
.S RETN(DFN,"ENTERED PT FILE")=TEXT_""""_$$FMTE^XLFDT(MPIFAR(2,DFN_",",.097,"I"),5)_""""
.K VADM
.D DEM^VADPT
.F X=1,2,3,5,6,11,12 D
..I X=1 D
...I RPC=1 S TEXT="MPI("_DFN_",""NAME"")="
...S RETN(DFN,"NAME")=TEXT_""""_VADM(1)_""""
..I X=2 D
...I RPC=1 S TEXT="MPI("_DFN_",""SEX"")="
...S RETN(DFN,"SEX")=TEXT_""""_VADM(5)_""""
..I X=3 D
...I RPC=1 S TEXT="MPI("_DFN_",""DOB"")="
...S RETN(DFN,"DOB")=TEXT_""""_VADM(3)_""""
..I X=12 D
..I RPC=1 S TEXT="MPI("_DFN_",""RACE"","
..S XXX=0
..I VADM(12)=0 S RETN(DFN,"RACE",0)=TEXT_XXX_")="_"""NONE""" Q
..I VADM(12)>0 F S XXX=$O(VADM(12,XXX)) Q:XXX="" S RETN(DFN,"RACE",XXX)=TEXT_XXX_")="_""""_$P($G(VADM(12,XXX)),"^",2)_""""
..I X=2 D
...I RPC=1 S TEXT="MPI("_DFN_",""SSN"")="
...S RETN(DFN,"SSN")=TEXT_""""_VADM(2)_""""
..I X=6 D
...I RPC=1 S TEXT="MPI("_DFN_",""DOD"")="
...S RETN(DFN,"DOD")=TEXT_""""_$$FMTE^XLFDT($P(VADM(6),"^"))_""""
..I X=11 D
..I RPC=1 S TEXT="MPI("_DFN_",""ETHNIC"")="
..I VADM(11)=0 S RETN(DFN,"ETHNIC")=TEXT_"""NONE""" Q
..I VADM(11)=1 S RETN(DFN,"ETHNIC")=TEXT_""""_$P($G(VADM(11,1)),"^",2)_""""
.K VAPA,VADM
.D ADD^VADPT
.F X=1,2,3,4,5,6,8,11 D
..I X=1 D
...I RPC=1 S TEXT="MPI("_DFN_",""ADDRESS"")="
...S RETN(DFN,"ADDRESS 1")=TEXT_""""_VAPA(1)_""""
..I X=6 D
...I RPC=1 S TEXT="MPI("_DFN_",""ZIP"")="
...S RETN(DFN,"ZIP")=TEXT_""""_VAPA(6)_""""
..I X=2 D
...I RPC=1 S TEXT="MPI("_DFN_",""ADDRESS 2"")="
...S RETN(DFN,"ADDRESS 2")=TEXT_""""_VAPA(2)_""""
..I X=3 D
...I RPC=1 S TEXT="MPI("_DFN_",""ADDRESS 3"")="
...S RETN(DFN,"ADDRESS 3")=TEXT_""""_VAPA(3)_""""
..I X=5 D
...I RPC=1 S TEXT="MPI("_DFN_",""STATE"")="
...S RETN(DFN,"STATE")=TEXT_""""_$P(VAPA(5),"^",2)_""""
..I X=4 D
...I RPC=1 S TEXT="MPI("_DFN_",""CITY"")="
...S RETN(DFN,"CITY")=TEXT_""""_VAPA(4)_""""
..I X=8 D
...I RPC=1 S TEXT="MPI("_DFN_",""HOME PHONE #"")="
...S RETN(DFN,"HOME PHONE #")=TEXT_""""_VAPA(8)_""""
.K VAPA,VAEL
.D ELIG^VADPT
.I VAEL(4)=1 S VAEL("VET Y/N")="YES"
.I VAEL(4)'=1 S VAEL("VET Y/N")="NO"
.F X=1,4,7 D
..I X=7 D
...I RPC=1 S TEXT="MPI("_DFN_",""CLAIM #"")="
...S RETN(DFN,"CLAIM #")=TEXT_""""_VAEL(7)_""""
..I X=4 D
...I RPC=1 S TEXT="MPI("_DFN_",""VET Y/N"")="
...S RETN(DFN,"VET Y/N")=TEXT_""""_VAEL("VET Y/N")_""""
..I X=1 D
...I RPC=1 S TEXT="MPI("_DFN_",""PRIM ELIG"")="
...S RETN(DFN,"PRIM ELIG")=TEXT_""""_$P(VAEL(1),"^",2)_""""
.K VAEL,VAOA
.D OAD^VADPT
.I RPC=1 S TEXT="MPI("_DFN_",""NOK NAME"")="
.S RETN(DFN,"NOK NAME")=TEXT_""""_VAOA(9)_""""
.K VAOA
.S VAOA("A")=1
.D OAD^VADPT
.I RPC=1 S TEXT="MPI("_DFN_",""EMERGENCY POC"")="
.S RETN(DFN,"EMERGENCY POC")=TEXT_""""_VAOA(9)_""""
.K VAOA
.S VAOA("A")=2
.D OAD^VADPT
.I RPC=1 S TEXT="MPI("_DFN_",""DESIGNEE"")="
.S RETN(DFN,"DESIGNEE")=TEXT_""""_VAOA(9)_""""
.K VAOA,VAPD
.D OPD^VADPT
.F X=1,2,3,4,5 D
..I X=5 D
...I RPC=1 S TEXT="MPI("_DFN_",""MMN"")="
...S RETN(DFN,"MMN")=TEXT_""""_VAPD(5)_""""
..I X=1 D
...I RPC=1 S TEXT="MPI("_DFN_",""POBC"")="
...S RETN(DFN,"POBC")=TEXT_""""_VAPD(1)_""""
..I X=2 D
...I RPC=1 S TEXT="MPI("_DFN_",""POBS"")="
...S RETN(DFN,"POBS")=TEXT_""""_$P(VAPD(2),"^",2)_""""
..I X=3 D
...I RPC=1 S TEXT="MPI("_DFN_",""FATHER'S NAME"")="
...S RETN(DFN,"FATHER'S NAME")=TEXT_""""_VAPD(3)_""""
..I X=4 D
...I RPC=1 S TEXT="MPI("_DFN_",""MOTHER'S NAME"")="
...S RETN(DFN,"MOTHER'S NAME")=TEXT_""""_VAPD(4)_""""
.K VAPD,VASV
.D SVC^VADPT
.I RPC=1 S TEXT="MPI("_DFN_",""POW STATUS"")="
.I VASV(4)=1 S VASV(4)="YES"
.I VASV(4)=0 S VASV(4)="NO"
.S RETN(DFN,"POW STATUS")=TEXT_""""_VASV(4)_""""
.I RPC=1 S TEXT="MPI("_DFN_",""LAST SRV BRANCH"")="
.S RETN(DFN,"LAST SRV BRANCH")=TEXT_""""_$P(VASV(6,1),"^",2)_""""
.I RPC=1 S TEXT="MPI("_DFN_",""LAST SRV #"")="
.S RETN(DFN,"LAST SRV #")=TEXT_""""_VASV(6,2)_""""
.I RPC=1 S TEXT="MPI("_DFN_",""LAST SRV ENT DT"")="
.S RETN(DFN,"LAST SRV ENT DT")=TEXT_""""_$$FMTE^XLFDT($P(VASV(6,4),"^"))_""""
.I RPC=1 S TEXT="MPI("_DFN_",""LAST SRV SEP DT"")="
.S RETN(DFN,"LAST SRV SEP DT")=TEXT_""""_$$FMTE^XLFDT($P(VASV(6,5),"^"))_""""
.K VASV
.N MPINODE
.S MPINODE=$$MPINODE^MPIFAPI(DFN)
.I RPC=1 S TEXT="MPI("_DFN_",""SUB CONTROL #"")="
.S RETN(DFN,"SUB CONTROL #")=TEXT_""""_$P(MPINODE,"^",5)_""""
.I RPC=1 S TEXT="MPI("_DFN_",""SCORE"")="
.S RETN(DFN,"SCORE")=TEXT_""""_$P(MPINODE,"^",6)_""""
.I RPC=1 S TEXT="MPI("_DFN_",""SCORE DATE"")="
.S RETN(DFN,"SCORE DATE")=TEXT_""""_$P(MPINODE,"^",7)_""""
.I RPC=1 S TEXT="MPI("_DFN_",""LOCAL ICN"")="
.I $P(MPINODE,"^",4)=1 S RETN(DFN,"LOCAL ICN")=TEXT_"""YES"""
.I $P(MPINODE,"^",4)="" S RETN(DFN,"LOCAL ICN")=TEXT_"""NO"""
.N RESULT,SENS
.S SENS="NO"
.D PTSEC^DGSEC4(.RESULT,DFN)
.I RESULT(1)>0 S SENS="YES"
.I RPC=1 S TEXT="MPI("_DFN_",""SENSATIVE PT"")="
.S RETN(DFN,"SENSATIVE PT")=TEXT_""""_SENS_""""
.D ALIAS^MPIFEXT3(.RETN,DFN,RPC)
.D CMORCH^MPIFEXT3(.RETN,DFN,RPC)
.D TFLIST^MPIFEXT3(.RETN,DFN,RPC)
.D SUBLST^MPIFEXT3(.RETN,DFN,RPC)
D ICNSTAT^MPIFRPC(.RETN,TICN,TSSN,RPC)
K VA,VAERR
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMPIFEXT2 6625 printed Nov 22, 2024@17:21:12 Page 2
MPIFEXT2 ;SFCIO/CMC-EXTENDED PDAT - RPC ;26 JUN 01
+1 ;;1.0; MASTER PATIENT INDEX VISTA ;**20,28**;30 Apr 99
+2 ;
+3 ;Integration Agreements Utilized:
+4 ; ^DPT( - #2070
+5 ; NOTICE^DGSEC4 - #3027
+6 ; PTSEC^DGSEC4 - #3027
+7 ; D GETS^DIQ(2,DFN_",",".097","I","MPIFAR") - #3581
+8 ;
PATINFO(RETN,ICN,SSN,RPC) ;get patient info array
+1 NEW MPINODE,MPIFAR,DFN,TICN,TSSN,TEXT,CNTD,PICN,XX,X,XXX
+2 IF $GET(ICN)=""&($GET(SSN)="")
SET RETN="-1^NO ICN OR SSN PASSED"
QUIT
+3 SET TICN=ICN
SET TSSN=SSN
SET TEXT=""
+4 IF $GET(SSN)'=""
Begin DoDot:1
+5 SET ICN=$$GETICNS^MPIF002(SSN)
+6 IF RPC=1
SET TEXT="MPI(""SSN USED"")="
+7 SET RETN(1,"SSN USED")=TEXT_""""_SSN_""""
+8 ; possible to have multiple entries with same SSN
End DoDot:1
+9 SET PICN=ICN
SET CNTD=0
+10 FOR XX=1:1
SET ICN=$PIECE(PICN,"^",XX)
if ICN=""
QUIT
Begin DoDot:1
+11 SET DFN=$$GETDFN^MPIF001(+ICN)
SET CNTD=CNTD+1
+12 IF +DFN=-1
SET RETN(XX)="-1^NO SUCH ICN "_ICN
QUIT
+13 IF '$DATA(^DPT(DFN))
SET RETN(XX)="-1^BAD AICN X-REF, PT FILE ENTRY DOESN'T EXIST DFN= "_DFN_" ICN= "_ICN
QUIT
+14 ; check if this data can be returned and if sensative pt bulletin needed
+15 NEW SENS
DO PTSEC^DGSEC4(.SENS,DFN,1,"Remote Procedure from MPI^RPC frm MPI ext PDAT infor")
+16 NEW NOT
DO NOTICE^DGSEC4(.NOT,DFN,"Remote Procedure from MPI^RPC frm MPI ext PDAT infor")
+17 IF SENS(1)=3!(SENS(1)=4)!(SENS(1)=-1)
SET RETN(XX)="-1^SENSATIVE PT ISSUE "_SENS(2)_" DFN= "_DFN_" ICN= "_ICN
QUIT
+18 IF RPC=1
SET TEXT="MPI("_DFN_",""DFN"")="
+19 SET RETN(XX,"DFN")=TEXT_""""_DFN_""""
+20 SET MPINODE=$$MPINODE^MPIFAPI(DFN)
+21 DO GETS^DIQ(2,DFN_",",".097","I","MPIFAR")
+22 IF RPC=1
SET TEXT="MPI("_DFN_",""ENTERED PT FILE"")="
+23 SET RETN(DFN,"ENTERED PT FILE")=TEXT_""""_$$FMTE^XLFDT(MPIFAR(2,DFN_",",.097,"I"),5)_""""
+24 KILL VADM
+25 DO DEM^VADPT
+26 FOR X=1,2,3,5,6,11,12
Begin DoDot:2
+27 IF X=1
Begin DoDot:3
+28 IF RPC=1
SET TEXT="MPI("_DFN_",""NAME"")="
+29 SET RETN(DFN,"NAME")=TEXT_""""_VADM(1)_""""
End DoDot:3
+30 IF X=2
Begin DoDot:3
+31 IF RPC=1
SET TEXT="MPI("_DFN_",""SEX"")="
+32 SET RETN(DFN,"SEX")=TEXT_""""_VADM(5)_""""
End DoDot:3
+33 IF X=3
Begin DoDot:3
+34 IF RPC=1
SET TEXT="MPI("_DFN_",""DOB"")="
+35 SET RETN(DFN,"DOB")=TEXT_""""_VADM(3)_""""
End DoDot:3
+36 IF X=12
Begin DoDot:3
End DoDot:3
+37 IF RPC=1
SET TEXT="MPI("_DFN_",""RACE"","
+38 SET XXX=0
+39 IF VADM(12)=0
SET RETN(DFN,"RACE",0)=TEXT_XXX_")="_"""NONE"""
QUIT
+40 IF VADM(12)>0
FOR
SET XXX=$ORDER(VADM(12,XXX))
if XXX=""
QUIT
SET RETN(DFN,"RACE",XXX)=TEXT_XXX_")="_""""_$PIECE($GET(VADM(12,XXX)),"^",2)_""""
+41 IF X=2
Begin DoDot:3
+42 IF RPC=1
SET TEXT="MPI("_DFN_",""SSN"")="
+43 SET RETN(DFN,"SSN")=TEXT_""""_VADM(2)_""""
End DoDot:3
+44 IF X=6
Begin DoDot:3
+45 IF RPC=1
SET TEXT="MPI("_DFN_",""DOD"")="
+46 SET RETN(DFN,"DOD")=TEXT_""""_$$FMTE^XLFDT($PIECE(VADM(6),"^"))_""""
End DoDot:3
+47 IF X=11
Begin DoDot:3
End DoDot:3
+48 IF RPC=1
SET TEXT="MPI("_DFN_",""ETHNIC"")="
+49 IF VADM(11)=0
SET RETN(DFN,"ETHNIC")=TEXT_"""NONE"""
QUIT
+50 IF VADM(11)=1
SET RETN(DFN,"ETHNIC")=TEXT_""""_$PIECE($GET(VADM(11,1)),"^",2)_""""
End DoDot:2
+51 KILL VAPA,VADM
+52 DO ADD^VADPT
+53 FOR X=1,2,3,4,5,6,8,11
Begin DoDot:2
+54 IF X=1
Begin DoDot:3
+55 IF RPC=1
SET TEXT="MPI("_DFN_",""ADDRESS"")="
+56 SET RETN(DFN,"ADDRESS 1")=TEXT_""""_VAPA(1)_""""
End DoDot:3
+57 IF X=6
Begin DoDot:3
+58 IF RPC=1
SET TEXT="MPI("_DFN_",""ZIP"")="
+59 SET RETN(DFN,"ZIP")=TEXT_""""_VAPA(6)_""""
End DoDot:3
+60 IF X=2
Begin DoDot:3
+61 IF RPC=1
SET TEXT="MPI("_DFN_",""ADDRESS 2"")="
+62 SET RETN(DFN,"ADDRESS 2")=TEXT_""""_VAPA(2)_""""
End DoDot:3
+63 IF X=3
Begin DoDot:3
+64 IF RPC=1
SET TEXT="MPI("_DFN_",""ADDRESS 3"")="
+65 SET RETN(DFN,"ADDRESS 3")=TEXT_""""_VAPA(3)_""""
End DoDot:3
+66 IF X=5
Begin DoDot:3
+67 IF RPC=1
SET TEXT="MPI("_DFN_",""STATE"")="
+68 SET RETN(DFN,"STATE")=TEXT_""""_$PIECE(VAPA(5),"^",2)_""""
End DoDot:3
+69 IF X=4
Begin DoDot:3
+70 IF RPC=1
SET TEXT="MPI("_DFN_",""CITY"")="
+71 SET RETN(DFN,"CITY")=TEXT_""""_VAPA(4)_""""
End DoDot:3
+72 IF X=8
Begin DoDot:3
+73 IF RPC=1
SET TEXT="MPI("_DFN_",""HOME PHONE #"")="
+74 SET RETN(DFN,"HOME PHONE #")=TEXT_""""_VAPA(8)_""""
End DoDot:3
End DoDot:2
+75 KILL VAPA,VAEL
+76 DO ELIG^VADPT
+77 IF VAEL(4)=1
SET VAEL("VET Y/N")="YES"
+78 IF VAEL(4)'=1
SET VAEL("VET Y/N")="NO"
+79 FOR X=1,4,7
Begin DoDot:2
+80 IF X=7
Begin DoDot:3
+81 IF RPC=1
SET TEXT="MPI("_DFN_",""CLAIM #"")="
+82 SET RETN(DFN,"CLAIM #")=TEXT_""""_VAEL(7)_""""
End DoDot:3
+83 IF X=4
Begin DoDot:3
+84 IF RPC=1
SET TEXT="MPI("_DFN_",""VET Y/N"")="
+85 SET RETN(DFN,"VET Y/N")=TEXT_""""_VAEL("VET Y/N")_""""
End DoDot:3
+86 IF X=1
Begin DoDot:3
+87 IF RPC=1
SET TEXT="MPI("_DFN_",""PRIM ELIG"")="
+88 SET RETN(DFN,"PRIM ELIG")=TEXT_""""_$PIECE(VAEL(1),"^",2)_""""
End DoDot:3
End DoDot:2
+89 KILL VAEL,VAOA
+90 DO OAD^VADPT
+91 IF RPC=1
SET TEXT="MPI("_DFN_",""NOK NAME"")="
+92 SET RETN(DFN,"NOK NAME")=TEXT_""""_VAOA(9)_""""
+93 KILL VAOA
+94 SET VAOA("A")=1
+95 DO OAD^VADPT
+96 IF RPC=1
SET TEXT="MPI("_DFN_",""EMERGENCY POC"")="
+97 SET RETN(DFN,"EMERGENCY POC")=TEXT_""""_VAOA(9)_""""
+98 KILL VAOA
+99 SET VAOA("A")=2
+100 DO OAD^VADPT
+101 IF RPC=1
SET TEXT="MPI("_DFN_",""DESIGNEE"")="
+102 SET RETN(DFN,"DESIGNEE")=TEXT_""""_VAOA(9)_""""
+103 KILL VAOA,VAPD
+104 DO OPD^VADPT
+105 FOR X=1,2,3,4,5
Begin DoDot:2
+106 IF X=5
Begin DoDot:3
+107 IF RPC=1
SET TEXT="MPI("_DFN_",""MMN"")="
+108 SET RETN(DFN,"MMN")=TEXT_""""_VAPD(5)_""""
End DoDot:3
+109 IF X=1
Begin DoDot:3
+110 IF RPC=1
SET TEXT="MPI("_DFN_",""POBC"")="
+111 SET RETN(DFN,"POBC")=TEXT_""""_VAPD(1)_""""
End DoDot:3
+112 IF X=2
Begin DoDot:3
+113 IF RPC=1
SET TEXT="MPI("_DFN_",""POBS"")="
+114 SET RETN(DFN,"POBS")=TEXT_""""_$PIECE(VAPD(2),"^",2)_""""
End DoDot:3
+115 IF X=3
Begin DoDot:3
+116 IF RPC=1
SET TEXT="MPI("_DFN_",""FATHER'S NAME"")="
+117 SET RETN(DFN,"FATHER'S NAME")=TEXT_""""_VAPD(3)_""""
End DoDot:3
+118 IF X=4
Begin DoDot:3
+119 IF RPC=1
SET TEXT="MPI("_DFN_",""MOTHER'S NAME"")="
+120 SET RETN(DFN,"MOTHER'S NAME")=TEXT_""""_VAPD(4)_""""
End DoDot:3
End DoDot:2
+121 KILL VAPD,VASV
+122 DO SVC^VADPT
+123 IF RPC=1
SET TEXT="MPI("_DFN_",""POW STATUS"")="
+124 IF VASV(4)=1
SET VASV(4)="YES"
+125 IF VASV(4)=0
SET VASV(4)="NO"
+126 SET RETN(DFN,"POW STATUS")=TEXT_""""_VASV(4)_""""
+127 IF RPC=1
SET TEXT="MPI("_DFN_",""LAST SRV BRANCH"")="
+128 SET RETN(DFN,"LAST SRV BRANCH")=TEXT_""""_$PIECE(VASV(6,1),"^",2)_""""
+129 IF RPC=1
SET TEXT="MPI("_DFN_",""LAST SRV #"")="
+130 SET RETN(DFN,"LAST SRV #")=TEXT_""""_VASV(6,2)_""""
+131 IF RPC=1
SET TEXT="MPI("_DFN_",""LAST SRV ENT DT"")="
+132 SET RETN(DFN,"LAST SRV ENT DT")=TEXT_""""_$$FMTE^XLFDT($PIECE(VASV(6,4),"^"))_""""
+133 IF RPC=1
SET TEXT="MPI("_DFN_",""LAST SRV SEP DT"")="
+134 SET RETN(DFN,"LAST SRV SEP DT")=TEXT_""""_$$FMTE^XLFDT($PIECE(VASV(6,5),"^"))_""""
+135 KILL VASV
+136 NEW MPINODE
+137 SET MPINODE=$$MPINODE^MPIFAPI(DFN)
+138 IF RPC=1
SET TEXT="MPI("_DFN_",""SUB CONTROL #"")="
+139 SET RETN(DFN,"SUB CONTROL #")=TEXT_""""_$PIECE(MPINODE,"^",5)_""""
+140 IF RPC=1
SET TEXT="MPI("_DFN_",""SCORE"")="
+141 SET RETN(DFN,"SCORE")=TEXT_""""_$PIECE(MPINODE,"^",6)_""""
+142 IF RPC=1
SET TEXT="MPI("_DFN_",""SCORE DATE"")="
+143 SET RETN(DFN,"SCORE DATE")=TEXT_""""_$PIECE(MPINODE,"^",7)_""""
+144 IF RPC=1
SET TEXT="MPI("_DFN_",""LOCAL ICN"")="
+145 IF $PIECE(MPINODE,"^",4)=1
SET RETN(DFN,"LOCAL ICN")=TEXT_"""YES"""
+146 IF $PIECE(MPINODE,"^",4)=""
SET RETN(DFN,"LOCAL ICN")=TEXT_"""NO"""
+147 NEW RESULT,SENS
+148 SET SENS="NO"
+149 DO PTSEC^DGSEC4(.RESULT,DFN)
+150 IF RESULT(1)>0
SET SENS="YES"
+151 IF RPC=1
SET TEXT="MPI("_DFN_",""SENSATIVE PT"")="
+152 SET RETN(DFN,"SENSATIVE PT")=TEXT_""""_SENS_""""
+153 DO ALIAS^MPIFEXT3(.RETN,DFN,RPC)
+154 DO CMORCH^MPIFEXT3(.RETN,DFN,RPC)
+155 DO TFLIST^MPIFEXT3(.RETN,DFN,RPC)
+156 DO SUBLST^MPIFEXT3(.RETN,DFN,RPC)
End DoDot:1
+157 DO ICNSTAT^MPIFRPC(.RETN,TICN,TSSN,RPC)
+158 KILL VA,VAERR
+159 QUIT
+160 ;