source: ccr/trunk/nhin-vista/projects/NHINC/Current/Product/Production/Adapters/General/MpiManagerEJB/src/java/gov/hhs/fha/nhinc/adaptermpimanager/MpiDataAccess.java@ 507

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

NHIN gateway and adaptor for use on linux with VistA EHR and RPMS

File size: 1.7 KB
Line 
1/*
2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
4 */
5
6package gov.hhs.fha.nhinc.adaptermpimanager;
7
8import org.apache.commons.logging.Log;
9import org.apache.commons.logging.LogFactory;
10import org.hl7.v3.*;
11import gov.hhs.fha.nhinc.mpilib.*;
12import gov.hhs.fha.nhinc.adaptermpimanager.HL7Parsers.*;
13
14/**
15 *
16 * @author mflynn02
17 */
18public class MpiDataAccess {
19 private static Log log = LogFactory.getLog(MpiDataAccess.class);
20 public static Patients LookupPatients(PRPAMT201301UVPatient patient) {
21 return LookupPatients(patient, true);
22 }
23
24 public static Patients LookupPatients(PRPAMT201301UVPatient patient, boolean AllowSearchByDemographics) {
25 return LookupPatients(HL7Parser201301.ExtractMpiPatientFromHL7Patient(patient), AllowSearchByDemographics);
26 }
27
28 public static Patients LookupPatients(Patient searchParams) {
29 return LookupPatients(searchParams,true);
30 }
31 public static Patients LookupPatients(Patient searchParams, boolean AllowSearchByDemographics) {
32 MiniMpi mpi = MiniMpi.GetMpiInstance();
33 return mpi.Search(searchParams,AllowSearchByDemographics);
34 }
35 public static Patients LookupPatients(Patient searchParams, boolean AllowSearchByDemographics, boolean includeOptOutPatient) {
36 MiniMpi mpi = MiniMpi.GetMpiInstance();
37 return mpi.Search(searchParams,AllowSearchByDemographics,includeOptOutPatient);
38 }
39 public static Patient SavePatient(Patient patient) {
40 MiniMpi mpi = MiniMpi.GetMpiInstance();
41 return mpi.AddUpdate(patient);
42 }
43
44 public static void DeletePatient(Patient patient, String homeCommunityId) {
45 MiniMpi mpi = MiniMpi.GetMpiInstance();
46 mpi.Delete(patient, homeCommunityId);
47 }
48
49}
Note: See TracBrowser for help on using the repository browser.