MPIFPST1 ;CMC/SF-MPI VISTA build post-init ;JAN 13, 2000
;;1.0; MASTER PATIENT INDEX VISTA ;**1**;30 Apr 99
;
EN ;This post init will correct any exiting problems with the setting of
; the ^DPT("AICNL" cross reference for local ICNs or the field Locally
; assigned ICN in the patient file for local ICNs.
;
D BMES^XPDUTL("Updating 'AICNL' Cross Reference. This may take some time")
N EN,LOCAL,ICN,SITE
S ICN=0,SITE=$P($$SITE^VASITE(),"^",3)
F S ICN=$O(^DPT("AICN",ICN)) Q:ICN="" D
.S EN=""
.F S EN=$O(^DPT("AICN",ICN,EN)) Q:EN="" D
..I $E(ICN,1,3)=SITE D
...I $P($G(^DPT(EN,"MPI")),"^")=ICN S LOCAL=$$SETLOC^MPIF001(EN,1),^DPT("AICNL",1,EN)=""
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMPIFPST1 685 printed Dec 13, 2024@02:11:25 Page 2
MPIFPST1 ;CMC/SF-MPI VISTA build post-init ;JAN 13, 2000
+1 ;;1.0; MASTER PATIENT INDEX VISTA ;**1**;30 Apr 99
+2 ;
EN ;This post init will correct any exiting problems with the setting of
+1 ; the ^DPT("AICNL" cross reference for local ICNs or the field Locally
+2 ; assigned ICN in the patient file for local ICNs.
+3 ;
+4 DO BMES^XPDUTL("Updating 'AICNL' Cross Reference. This may take some time")
+5 NEW EN,LOCAL,ICN,SITE
+6 SET ICN=0
SET SITE=$PIECE($$SITE^VASITE(),"^",3)
+7 FOR
SET ICN=$ORDER(^DPT("AICN",ICN))
if ICN=""
QUIT
Begin DoDot:1
+8 SET EN=""
+9 FOR
SET EN=$ORDER(^DPT("AICN",ICN,EN))
if EN=""
QUIT
Begin DoDot:2
+10 IF $EXTRACT(ICN,1,3)=SITE
Begin DoDot:3
+11 IF $PIECE($GET(^DPT(EN,"MPI")),"^")=ICN
SET LOCAL=$$SETLOC^MPIF001(EN,1)
SET ^DPT("AICNL",1,EN)=""
End DoDot:3
End DoDot:2
End DoDot:1
+12 QUIT
+13 ;