org.openmrs.api.db
Interface PatientDAO

All Known Implementing Classes:
HibernatePatientDAO

public interface PatientDAO

Database methods for the PatientService

See Also:
Context, PatientService

Method Summary
 void deletePatient(Patient patient)
          Delete patient from database.
 void deletePatientIdentifier(PatientIdentifier patientIdentifier)
           
 void deletePatientIdentifierType(PatientIdentifierType patientIdentifierType)
           
 java.util.List<PatientIdentifierType> getAllPatientIdentifierTypes(boolean includeRetired)
           
 java.util.List<Patient> getAllPatients(boolean includeVoided)
           
 java.util.List<Patient> getDuplicatePatientsByAttributes(java.util.List<java.lang.String> attributes)
           
 Patient getPatient(java.lang.Integer patientId)
           
 Patient getPatientByUuid(java.lang.String uuid)
          Auto generated method comment
 PatientIdentifier getPatientIdentifier(java.lang.Integer patientIdentifierId)
           
 PatientIdentifier getPatientIdentifierByUuid(java.lang.String uuid)
           
 java.util.List<PatientIdentifier> getPatientIdentifiers(java.lang.String identifier, java.util.List<PatientIdentifierType> patientIdentifierTypes, java.util.List<Location> locations, java.util.List<Patient> patients, java.lang.Boolean isPreferred)
           
 PatientIdentifierType getPatientIdentifierType(java.lang.Integer patientIdentifierTypeId)
           
 PatientIdentifierType getPatientIdentifierTypeByUuid(java.lang.String uuid)
          Auto generated method comment
 java.util.List<PatientIdentifierType> getPatientIdentifierTypes(java.lang.String name, java.lang.String format, java.lang.Boolean required, java.lang.Boolean hasCheckDigit)
           
 java.util.List<Patient> getPatients(java.lang.String name, java.lang.String identifier, java.util.List<PatientIdentifierType> identifierTypes, boolean matchIdentifierExactly)
           
 boolean isIdentifierInUseByAnotherPatient(PatientIdentifier patientIdentifier)
           
 Patient savePatient(Patient patient)
           
 PatientIdentifier savePatientIdentifier(PatientIdentifier patientIdentifier)
           
 PatientIdentifierType savePatientIdentifierType(PatientIdentifierType patientIdentifierType)
           
 

Method Detail

savePatient

Patient savePatient(Patient patient)
                    throws DAOException
Throws:
DAOException
See Also:
PatientService.savePatient(org.openmrs.Patient)

getPatient

Patient getPatient(java.lang.Integer patientId)
                   throws DAOException
Throws:
DAOException
See Also:
PatientService.getPatient(Integer)

deletePatient

void deletePatient(Patient patient)
                   throws DAOException
Delete patient from database. This should not be called except for testing and administration purposes. Use the void method instead

Parameters:
patient - patient to be deleted
Throws:
DAOException
See Also:
PatientService.deletePatient(org.openmrs.Patient), PatientService.voidPatient(Patient, String)

getAllPatients

java.util.List<Patient> getAllPatients(boolean includeVoided)
                                       throws DAOException
Throws:
DAOException
See Also:
PatientService.getAllPatients(boolean)

getPatients

java.util.List<Patient> getPatients(java.lang.String name,
                                    java.lang.String identifier,
                                    java.util.List<PatientIdentifierType> identifierTypes,
                                    boolean matchIdentifierExactly)
                                    throws DAOException
Throws:
DAOException
See Also:
PatientService.getPatients(java.lang.String, java.lang.String, java.util.List, boolean)
Expected behavior:
escape percentage character in name phrase, escape underscore character in name phrase, escape an asterix character in name phrase, escape percentage character in identifier phrase, escape underscore character in identifier phrase, escape an asterix character in identifier phrase

getPatientIdentifiers

java.util.List<PatientIdentifier> getPatientIdentifiers(java.lang.String identifier,
                                                        java.util.List<PatientIdentifierType> patientIdentifierTypes,
                                                        java.util.List<Location> locations,
                                                        java.util.List<Patient> patients,
                                                        java.lang.Boolean isPreferred)
                                                        throws DAOException
Throws:
DAOException
See Also:
PatientService.getPatientIdentifiers(java.lang.String, java.util.List, java.util.List, java.util.List, java.lang.Boolean)

savePatientIdentifierType

PatientIdentifierType savePatientIdentifierType(PatientIdentifierType patientIdentifierType)
                                                throws DAOException
Throws:
DAOException
See Also:
PatientService.savePatientIdentifierType(org.openmrs.PatientIdentifierType)

getAllPatientIdentifierTypes

java.util.List<PatientIdentifierType> getAllPatientIdentifierTypes(boolean includeRetired)
                                                                   throws DAOException
Throws:
DAOException
See Also:
PatientService.getAllPatientIdentifierTypes(boolean)

getPatientIdentifierTypes

java.util.List<PatientIdentifierType> getPatientIdentifierTypes(java.lang.String name,
                                                                java.lang.String format,
                                                                java.lang.Boolean required,
                                                                java.lang.Boolean hasCheckDigit)
                                                                throws DAOException
Throws:
DAOException
See Also:
PatientService.getPatientIdentifierTypes(java.lang.String, java.lang.String, java.lang.Boolean, java.lang.Boolean)

getPatientIdentifierType

PatientIdentifierType getPatientIdentifierType(java.lang.Integer patientIdentifierTypeId)
                                               throws DAOException
Throws:
DAOException
See Also:
PatientService.getPatientIdentifierType(java.lang.Integer)

deletePatientIdentifierType

void deletePatientIdentifierType(PatientIdentifierType patientIdentifierType)
                                 throws DAOException
Throws:
DAOException
See Also:
PatientService.purgePatientIdentifierType(org.openmrs.PatientIdentifierType)

getDuplicatePatientsByAttributes

java.util.List<Patient> getDuplicatePatientsByAttributes(java.util.List<java.lang.String> attributes)
                                                         throws DAOException
Throws:
DAOException
See Also:
PatientService.getDuplicatePatientsByAttributes(java.util.List)

isIdentifierInUseByAnotherPatient

boolean isIdentifierInUseByAnotherPatient(PatientIdentifier patientIdentifier)
See Also:
PatientService.isIdentifierInUseByAnotherPatient(PatientIdentifier)

getPatientByUuid

Patient getPatientByUuid(java.lang.String uuid)
Auto generated method comment

Parameters:
uuid -
Returns:

getPatientIdentifierByUuid

PatientIdentifier getPatientIdentifierByUuid(java.lang.String uuid)

getPatientIdentifierTypeByUuid

PatientIdentifierType getPatientIdentifierTypeByUuid(java.lang.String uuid)
Auto generated method comment

Parameters:
uuid -
Returns:

getPatientIdentifier

PatientIdentifier getPatientIdentifier(java.lang.Integer patientIdentifierId)
                                       throws DAOException
Throws:
DAOException
See Also:
PatientService.getPatientIdentifier(java.lang.Integer)

savePatientIdentifier

PatientIdentifier savePatientIdentifier(PatientIdentifier patientIdentifier)
See Also:
PatientService.savePatientIdentifier(org.openmrs.PatientIdentifier)

deletePatientIdentifier

void deletePatientIdentifier(PatientIdentifier patientIdentifier)
                             throws DAOException
Throws:
DAOException
See Also:
PatientService.purgePatientIdentifier(org.openmrs.PatientIdentifier)

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change