MPIFQ3 ;BIRM/CMC-QUERY LIST MANAGER FUNCTIONS ;APR 28, 2003
;;1.0; MASTER PATIENT INDEX VISTA ;**28,43,53**;30 Apr 99;Build 1
;
MSG(LOCSSN,LOCNAME,MPISSN,MPINAME,MPIDOB,LOCDOB) ;
W !!!,"Local SSN = "_LOCSSN,?40,"MPI SSN = "_MPISSN
W !,"Local NAME = "_LOCNAME,?40,"MPI NAME = "_MPINAME
W !,"Local DATE OF BIRTH = "_LOCDOB,?40,"MPI DATE OF BIRTH = "_MPIDOB
Q
MSG3 W !!,"Updating ICN and CMOR"
Q
MSG1 W !!,"You are attempting to assign an ICN that has already been assigned",!,"to another patient in your Patient file."
W !,"An exception will be recorded noting that these 2 patients ",!,"need to be reviewed to determine if they are duplicates."
Q
MSG2 W !!,"You have selected a patient from the list of potential matches",!," where there is a difference found between your data and the MPI."
W !," Are you sure this is the correct patient?"
Q
MSG5 W !!,"No Action Taken"
Q
MSG4 W !!,"When you reach the MPI QUERY RESULTS screen, the software has"
W !,"queried the Master Patient Index, for possible matches to the patient"
W !,"you are adding, or have selected (pre-existing record).",!!,"The MPI has returned a list of possible matches for that patient."
W !,"An '*' indicates the Integration Control Number of a patient",!,"on the list already matches one in your PATIENT (#2) file."
W !,"To select a patient from the list, choose SE."
I '$D(MPIFDUP) W !,"If the patients listed as potential matches are not the same patient",!,"select NEW to create a new entry on the MPI for this patient."
W !,"To view all data for a patient in the list of possible matches",!,"from the MPI, select MPI."
W !,"To view additional data for a patient in the list of possible",!,"matches from the CMOR site, select CMR."
I $D(MPIFDUP) D
.W !,"If the patients listed as potential matches are not the same as"
.W !,"your patient, there is nothing for you to do. Therefore, you may",!,"wish to mark the exception as processed."
Q
PROMPT ;
W !!
S DIR("A")="Hit the Enter key, to Continue ",DIR(0)="EA"
D ^DIR K DIR(0),DIR("A")
Q
PROMPT1() ;
N DIR,X,Y
W !
S DIR("A")="Are you sure this is the correct patient? Enter YES or NO ",DIR(0)="YA"
D ^DIR K DIR(0),DIR("A")
Q Y
HERESSN(SSN) ;
N DFN
I $G(SSN)="" Q 0
S DFN=$O(^DPT("SSN",SSN,0))
Q:$G(DFN)']"" 0
Q DFN
CHECK(DFN) ;
N CHECK
D GETDATA^MPIFQ0("^DPT(",DFN,"CHECK",".01;.02;.03;.09;.301;391;1901")
I $G(CHECK(2,DFN,.01))']"" Q 0
I $G(CHECK(2,DFN,.02))']"" Q 0
I $G(CHECK(2,DFN,.03))']"" Q 0
I $G(CHECK(2,DFN,.09))']"" Q 0
I $G(CHECK(2,DFN,.301))']"" Q 0
I $G(CHECK(2,DFN,391))']"" Q 0
I $G(CHECK(2,DFN,1901))']"" Q 0
Q 1
TF(DFN,ARR) ;Add you to TF list and trigger TF and Sub msgs
I $$PATCH^XPDUTL("DG*5.3*261") D FILE^VAFCTFU(DFN,+$$SITE^VASITE,1)
N RESLT
S RESLT=$$A24^MPIFA24B(DFN)
I +RESLT<0 D EXC^RGHLLOG(208,"Problem building A24 (ADD TF) for DFN= "_DFN,DFN)
Q
;
A28(DFN) ;
S ICN=$$A28^MPIFA28(DFN)
I +ICN>0 I '$D(MPIFS) W:'$D(MPIFRPC) !!,"Message sent to MPI requesting Patient to be added."
Q
LOCAL(DFN) ;
Q:+$$GETICN^MPIF001(DFN)>0
N ICN S ICN=$$ICNLC^MPIF001(DFN) ;don't assign local if exists
Q
HEREICN(ICN) ;
Q:$G(ICN)="" 0
N DFN S DFN=$$GETDFN^MPIF001(+ICN)
Q:$G(DFN)'>0 0
Q DFN
LOC2(DFN) ;**53 MPIC_1853 The LOC2 module is obsolete and is no longer being called.
;W:'$D(MPIFRPC) !!,"Potential Match Found Assigning Local ICN"
;D START^RGHLLOG(),EXC^RGHLLOG(218,"For Patient DFN="_DFN_" Use Single Patient Initialization to MPI option to manually process",DFN),STOP^RGHLLOG()
;D LOCAL(DFN)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMPIFQ3 3584 printed Oct 16, 2024@18:12:11 Page 2
MPIFQ3 ;BIRM/CMC-QUERY LIST MANAGER FUNCTIONS ;APR 28, 2003
+1 ;;1.0; MASTER PATIENT INDEX VISTA ;**28,43,53**;30 Apr 99;Build 1
+2 ;
MSG(LOCSSN,LOCNAME,MPISSN,MPINAME,MPIDOB,LOCDOB) ;
+1 WRITE !!!,"Local SSN = "_LOCSSN,?40,"MPI SSN = "_MPISSN
+2 WRITE !,"Local NAME = "_LOCNAME,?40,"MPI NAME = "_MPINAME
+3 WRITE !,"Local DATE OF BIRTH = "_LOCDOB,?40,"MPI DATE OF BIRTH = "_MPIDOB
+4 QUIT
MSG3 WRITE !!,"Updating ICN and CMOR"
+1 QUIT
MSG1 WRITE !!,"You are attempting to assign an ICN that has already been assigned",!,"to another patient in your Patient file."
+1 WRITE !,"An exception will be recorded noting that these 2 patients ",!,"need to be reviewed to determine if they are duplicates."
+2 QUIT
MSG2 WRITE !!,"You have selected a patient from the list of potential matches",!," where there is a difference found between your data and the MPI."
+1 WRITE !," Are you sure this is the correct patient?"
+2 QUIT
MSG5 WRITE !!,"No Action Taken"
+1 QUIT
MSG4 WRITE !!,"When you reach the MPI QUERY RESULTS screen, the software has"
+1 WRITE !,"queried the Master Patient Index, for possible matches to the patient"
+2 WRITE !,"you are adding, or have selected (pre-existing record).",!!,"The MPI has returned a list of possible matches for that patient."
+3 WRITE !,"An '*' indicates the Integration Control Number of a patient",!,"on the list already matches one in your PATIENT (#2) file."
+4 WRITE !,"To select a patient from the list, choose SE."
+5 IF '$DATA(MPIFDUP)
WRITE !,"If the patients listed as potential matches are not the same patient",!,"select NEW to create a new entry on the MPI for this patient."
+6 WRITE !,"To view all data for a patient in the list of possible matches",!,"from the MPI, select MPI."
+7 WRITE !,"To view additional data for a patient in the list of possible",!,"matches from the CMOR site, select CMR."
+8 IF $DATA(MPIFDUP)
Begin DoDot:1
+9 WRITE !,"If the patients listed as potential matches are not the same as"
+10 WRITE !,"your patient, there is nothing for you to do. Therefore, you may",!,"wish to mark the exception as processed."
End DoDot:1
+11 QUIT
PROMPT ;
+1 WRITE !!
+2 SET DIR("A")="Hit the Enter key, to Continue "
SET DIR(0)="EA"
+3 DO ^DIR
KILL DIR(0),DIR("A")
+4 QUIT
PROMPT1() ;
+1 NEW DIR,X,Y
+2 WRITE !
+3 SET DIR("A")="Are you sure this is the correct patient? Enter YES or NO "
SET DIR(0)="YA"
+4 DO ^DIR
KILL DIR(0),DIR("A")
+5 QUIT Y
HERESSN(SSN) ;
+1 NEW DFN
+2 IF $GET(SSN)=""
QUIT 0
+3 SET DFN=$ORDER(^DPT("SSN",SSN,0))
+4 if $GET(DFN)']""
QUIT 0
+5 QUIT DFN
CHECK(DFN) ;
+1 NEW CHECK
+2 DO GETDATA^MPIFQ0("^DPT(",DFN,"CHECK",".01;.02;.03;.09;.301;391;1901")
+3 IF $GET(CHECK(2,DFN,.01))']""
QUIT 0
+4 IF $GET(CHECK(2,DFN,.02))']""
QUIT 0
+5 IF $GET(CHECK(2,DFN,.03))']""
QUIT 0
+6 IF $GET(CHECK(2,DFN,.09))']""
QUIT 0
+7 IF $GET(CHECK(2,DFN,.301))']""
QUIT 0
+8 IF $GET(CHECK(2,DFN,391))']""
QUIT 0
+9 IF $GET(CHECK(2,DFN,1901))']""
QUIT 0
+10 QUIT 1
TF(DFN,ARR) ;Add you to TF list and trigger TF and Sub msgs
+1 IF $$PATCH^XPDUTL("DG*5.3*261")
DO FILE^VAFCTFU(DFN,+$$SITE^VASITE,1)
+2 NEW RESLT
+3 SET RESLT=$$A24^MPIFA24B(DFN)
+4 IF +RESLT<0
DO EXC^RGHLLOG(208,"Problem building A24 (ADD TF) for DFN= "_DFN,DFN)
+5 QUIT
+6 ;
A28(DFN) ;
+1 SET ICN=$$A28^MPIFA28(DFN)
+2 IF +ICN>0
IF '$DATA(MPIFS)
if '$DATA(MPIFRPC)
WRITE !!,"Message sent to MPI requesting Patient to be added."
+3 QUIT
LOCAL(DFN) ;
+1 if +$$GETICN^MPIF001(DFN)>0
QUIT
+2 ;don't assign local if exists
NEW ICN
SET ICN=$$ICNLC^MPIF001(DFN)
+3 QUIT
HEREICN(ICN) ;
+1 if $GET(ICN)=""
QUIT 0
+2 NEW DFN
SET DFN=$$GETDFN^MPIF001(+ICN)
+3 if $GET(DFN)'>0
QUIT 0
+4 QUIT DFN
LOC2(DFN) ;**53 MPIC_1853 The LOC2 module is obsolete and is no longer being called.
+1 ;W:'$D(MPIFRPC) !!,"Potential Match Found Assigning Local ICN"
+2 ;D START^RGHLLOG(),EXC^RGHLLOG(218,"For Patient DFN="_DFN_" Use Single Patient Initialization to MPI option to manually process",DFN),STOP^RGHLLOG()
+3 ;D LOCAL(DFN)
+4 QUIT