source: WorldVistAEHR/trunk/r/MASTER_PATIENT_INDEX_VISTA-MPIF/MPIFQ3.m@ 700

Last change on this file since 700 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.4 KB
RevLine 
[613]1MPIFQ3 ;BIRM/CMC-QUERY LIST MANAGER FUNCTIONS ;APR 28, 2003
2 ;;1.0; MASTER PATIENT INDEX VISTA ;**28,43**;30 Apr 99
3 ;
4MSG(LOCSSN,LOCNAME,MPISSN,MPINAME,MPIDOB,LOCDOB) ;
5 W !!!,"Local SSN = "_LOCSSN,?40,"MPI SSN = "_MPISSN
6 W !,"Local NAME = "_LOCNAME,?40,"MPI NAME = "_MPINAME
7 W !,"Local DATE OF BIRTH = "_LOCDOB,?40,"MPI DATE OF BIRTH = "_MPIDOB
8 Q
9MSG3 W !!,"Updating ICN and CMOR"
10 Q
11MSG1 W !!,"You are attempting to assign an ICN that has already been assigned",!,"to another patient in your Patient file."
12 W !,"An exception will be recorded noting that these 2 patients ",!,"need to be reviewed to determine if they are duplicates."
13 Q
14MSG2 W !!,"You have selected a patient from the list of potential matches",!," where there is a difference found between your data and the MPI."
15 W !," Are you sure this is the correct patient?"
16 Q
17MSG5 W !!,"No Action Taken"
18 Q
19MSG4 W !!,"When you reach the MPI QUERY RESULTS screen, the software has"
20 W !,"queried the Master Patient Index, for possible matches to the patient"
21 W !,"you are adding, or have selected (pre-existing record).",!!,"The MPI has returned a list of possible matches for that patient."
22 W !,"An '*' indicates the Integration Control Number of a patient",!,"on the list already matches one in your PATIENT (#2) file."
23 W !,"To select a patient from the list, choose SE."
24 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."
25 W !,"To view all data for a patient in the list of possible matches",!,"from the MPI, select MPI."
26 W !,"To view additional data for a patient in the list of possible",!,"matches from the CMOR site, select CMR."
27 I $D(MPIFDUP) D
28 .W !,"If the patients listed as potential matches are not the same as"
29 .W !,"your patient, there is nothing for you to do. Therefore, you may",!,"wish to mark the exception as processed."
30 Q
31PROMPT ;
32 W !!
33 S DIR("A")="Hit the Enter key, to Continue ",DIR(0)="EA"
34 D ^DIR K DIR(0),DIR("A")
35 Q
36PROMPT1() ;
37 N DIR,X,Y
38 W !
39 S DIR("A")="Are you sure this is the correct patient? Enter YES or NO ",DIR(0)="YA"
40 D ^DIR K DIR(0),DIR("A")
41 Q Y
42HERESSN(SSN) ;
43 N DFN
44 I $G(SSN)="" Q 0
45 S DFN=$O(^DPT("SSN",SSN,0))
46 Q:$G(DFN)']"" 0
47 Q DFN
48CHECK(DFN) ;
49 N CHECK
50 D GETDATA^MPIFQ0("^DPT(",DFN,"CHECK",".01;.02;.03;.09;.301;391;1901")
51 I $G(CHECK(2,DFN,.01))']"" Q 0
52 I $G(CHECK(2,DFN,.02))']"" Q 0
53 I $G(CHECK(2,DFN,.03))']"" Q 0
54 I $G(CHECK(2,DFN,.09))']"" Q 0
55 I $G(CHECK(2,DFN,.301))']"" Q 0
56 I $G(CHECK(2,DFN,391))']"" Q 0
57 I $G(CHECK(2,DFN,1901))']"" Q 0
58 Q 1
59TF(DFN,ARR) ;Add you to TF list and trigger TF and Sub msgs
60 I $$PATCH^XPDUTL("DG*5.3*261") D FILE^VAFCTFU(DFN,+$$SITE^VASITE,1)
61 N RESLT
62 S RESLT=$$A24^MPIFA24B(DFN)
63 I +RESLT<0 D EXC^RGHLLOG(208,"Problem building A24 (ADD TF) for DFN= "_DFN,DFN)
64 Q
65 ;
66A28(DFN) ;
67 S ICN=$$A28^MPIFA28(DFN)
68 I +ICN>0 I '$D(MPIFS) W:'$D(MPIFRPC) !!,"Message sent to MPI requesting Patient to be added."
69 Q
70LOCAL(DFN) ;
71 Q:+$$GETICN^MPIF001(DFN)>0
72 N ICN S ICN=$$ICNLC^MPIF001(DFN) ;don't assign local if exists
73 Q
74HEREICN(ICN) ;
75 Q:$G(ICN)="" 0
76 N DFN S DFN=$$GETDFN^MPIF001(+ICN)
77 Q:$G(DFN)'>0 0
78 Q DFN
79LOC2(DFN) ;
80 W:'$D(MPIFRPC) !!,"Potential Match Found Assigning Local ICN"
81 D START^RGHLLOG(),EXC^RGHLLOG(218,"For Patient DFN="_DFN_" Use Single Patient Initialization to MPI option to manually process",DFN),STOP^RGHLLOG()
82 D LOCAL(DFN)
83 Q
84 D LOCAL(DFN)
85 Q
Note: See TracBrowser for help on using the repository browser.