Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: MPIFQ3

MPIFQ3.m

Go to the documentation of this file.
  1. 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
  1. ;
  1. MSG(LOCSSN,LOCNAME,MPISSN,MPINAME,MPIDOB,LOCDOB) ;
  1. W !!!,"Local SSN = "_LOCSSN,?40,"MPI SSN = "_MPISSN
  1. W !,"Local NAME = "_LOCNAME,?40,"MPI NAME = "_MPINAME
  1. W !,"Local DATE OF BIRTH = "_LOCDOB,?40,"MPI DATE OF BIRTH = "_MPIDOB
  1. Q
  1. MSG3 W !!,"Updating ICN and CMOR"
  1. Q
  1. MSG1 W !!,"You are attempting to assign an ICN that has already been assigned",!,"to another patient in your Patient file."
  1. W !,"An exception will be recorded noting that these 2 patients ",!,"need to be reviewed to determine if they are duplicates."
  1. Q
  1. 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."
  1. W !," Are you sure this is the correct patient?"
  1. Q
  1. MSG5 W !!,"No Action Taken"
  1. Q
  1. MSG4 W !!,"When you reach the MPI QUERY RESULTS screen, the software has"
  1. W !,"queried the Master Patient Index, for possible matches to the patient"
  1. W !,"you are adding, or have selected (pre-existing record).",!!,"The MPI has returned a list of possible matches for that patient."
  1. W !,"An '*' indicates the Integration Control Number of a patient",!,"on the list already matches one in your PATIENT (#2) file."
  1. W !,"To select a patient from the list, choose SE."
  1. 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."
  1. W !,"To view all data for a patient in the list of possible matches",!,"from the MPI, select MPI."
  1. W !,"To view additional data for a patient in the list of possible",!,"matches from the CMOR site, select CMR."
  1. I $D(MPIFDUP) D
  1. .W !,"If the patients listed as potential matches are not the same as"
  1. .W !,"your patient, there is nothing for you to do. Therefore, you may",!,"wish to mark the exception as processed."
  1. Q
  1. PROMPT ;
  1. W !!
  1. S DIR("A")="Hit the Enter key, to Continue ",DIR(0)="EA"
  1. D ^DIR K DIR(0),DIR("A")
  1. Q
  1. PROMPT1() ;
  1. N DIR,X,Y
  1. W !
  1. S DIR("A")="Are you sure this is the correct patient? Enter YES or NO ",DIR(0)="YA"
  1. D ^DIR K DIR(0),DIR("A")
  1. Q Y
  1. HERESSN(SSN) ;
  1. N DFN
  1. I $G(SSN)="" Q 0
  1. S DFN=$O(^DPT("SSN",SSN,0))
  1. Q:$G(DFN)']"" 0
  1. Q DFN
  1. CHECK(DFN) ;
  1. N CHECK
  1. D GETDATA^MPIFQ0("^DPT(",DFN,"CHECK",".01;.02;.03;.09;.301;391;1901")
  1. I $G(CHECK(2,DFN,.01))']"" Q 0
  1. I $G(CHECK(2,DFN,.02))']"" Q 0
  1. I $G(CHECK(2,DFN,.03))']"" Q 0
  1. I $G(CHECK(2,DFN,.09))']"" Q 0
  1. I $G(CHECK(2,DFN,.301))']"" Q 0
  1. I $G(CHECK(2,DFN,391))']"" Q 0
  1. I $G(CHECK(2,DFN,1901))']"" Q 0
  1. Q 1
  1. TF(DFN,ARR) ;Add you to TF list and trigger TF and Sub msgs
  1. I $$PATCH^XPDUTL("DG*5.3*261") D FILE^VAFCTFU(DFN,+$$SITE^VASITE,1)
  1. N RESLT
  1. S RESLT=$$A24^MPIFA24B(DFN)
  1. I +RESLT<0 D EXC^RGHLLOG(208,"Problem building A24 (ADD TF) for DFN= "_DFN,DFN)
  1. Q
  1. ;
  1. A28(DFN) ;
  1. S ICN=$$A28^MPIFA28(DFN)
  1. I +ICN>0 I '$D(MPIFS) W:'$D(MPIFRPC) !!,"Message sent to MPI requesting Patient to be added."
  1. Q
  1. LOCAL(DFN) ;
  1. Q:+$$GETICN^MPIF001(DFN)>0
  1. N ICN S ICN=$$ICNLC^MPIF001(DFN) ;don't assign local if exists
  1. Q
  1. HEREICN(ICN) ;
  1. Q:$G(ICN)="" 0
  1. N DFN S DFN=$$GETDFN^MPIF001(+ICN)
  1. Q:$G(DFN)'>0 0
  1. Q DFN
  1. 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"
  1. ;D START^RGHLLOG(),EXC^RGHLLOG(218,"For Patient DFN="_DFN_" Use Single Patient Initialization to MPI option to manually process",DFN),STOP^RGHLLOG()
  1. ;D LOCAL(DFN)
  1. Q