|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.openmrs.api.impl.BaseOpenmrsService
org.openmrs.api.impl.PatientServiceImpl
public class PatientServiceImpl
Default implementation of the patient service. This class should not be used on its own. The
current OpenMRS implementation should be fetched from the Context via
Context.getPatientService()
Context,
PatientService,
PersonService| Constructor Summary | |
|---|---|
PatientServiceImpl()
|
|
| Method Summary | |
|---|---|
void |
checkPatientIdentifier(PatientIdentifier pi)
Deprecated. use PatientIdentifierValidator.validateIdentifier(PatientIdentifier) |
void |
checkPatientIdentifiers(Patient patient)
Convenience method to validate all identifiers for a given patient |
Patient |
createPatient(Patient patient)
Deprecated. replaced by #savePatient(Patient) |
void |
deletePatient(Patient patient)
Deprecated. replaced by purgePatient(Patient) |
void |
exitFromCare(Patient patient,
java.util.Date dateExited,
Concept reasonForExit)
This is the way to establish that a patient has left the care center. |
java.util.List<Patient> |
findDuplicatePatients(java.util.Set<java.lang.String> attributes)
Deprecated. use getDuplicatePatientsByAttributes(List) |
Patient |
findPatient(Patient patientToMatch)
Deprecated. |
java.util.List<Patient> |
findPatients(java.lang.String query,
boolean includeVoided)
Deprecated. |
java.util.List<Allergy> |
getAllergies(Person p)
Returns a sorted set of Allergies, sorted on sort_weight |
Allergy |
getAllergy(java.lang.Integer allergyListId)
Returns the Allergy |
java.util.Collection<IdentifierValidator> |
getAllIdentifierValidators()
|
java.util.List<PatientIdentifierType> |
getAllPatientIdentifierTypes()
Get all patientIdentifier types |
java.util.List<PatientIdentifierType> |
getAllPatientIdentifierTypes(boolean includeRetired)
Get all patientIdentifier types |
java.util.List<Patient> |
getAllPatients()
Returns all non voided patients in the system |
java.util.List<Patient> |
getAllPatients(boolean includeVoided)
Returns patients in the system |
IdentifierValidator |
getDefaultIdentifierValidator()
|
java.util.List<Patient> |
getDuplicatePatientsByAttributes(java.util.List<java.lang.String> attributes)
Search the database for patients that both share the given attributes. |
IdentifierValidator |
getIdentifierValidator(java.lang.Class<IdentifierValidator> identifierValidator)
Gets an identifier validator matching the given class. |
IdentifierValidator |
getIdentifierValidator(java.lang.String pivClassName)
|
java.util.Map<java.lang.Class<? extends IdentifierValidator>,IdentifierValidator> |
getIdentifierValidators()
|
Patient |
getPatient(java.lang.Integer patientId)
Get patient by internal identifier |
Patient |
getPatientByExample(Patient patientToMatch)
This default implementation simply looks at the OpenMRS internal id (patient_id). |
Patient |
getPatientByUuid(java.lang.String uuid)
Get patient by universally unique identifier. |
PatientIdentifier |
getPatientIdentifier(java.lang.Integer patientIdentifierId)
Returns a patient identifier that matches the given patientIndentifier id |
PatientIdentifier |
getPatientIdentifierByUuid(java.lang.String uuid)
Get patient identifier by universally unique identifier. |
java.util.List<PatientIdentifier> |
getPatientIdentifiers(PatientIdentifierType pit)
Deprecated. replaced by getPatientIdentifiers(String, List, List, List, Boolean) |
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)
Get all patientIdentifiers that match all of the given criteria Voided identifiers are not returned |
java.util.List<PatientIdentifier> |
getPatientIdentifiers(java.lang.String identifier,
PatientIdentifierType pit)
Deprecated. replaced by getPatientIdentifiers(String, List, List, List, Boolean) |
java.util.List<PatientIdentifier> |
getPatientIdentifiers(java.lang.String identifier,
PatientIdentifierType patientIdentifierType,
boolean includeVoided)
Deprecated. replaced by getPatientIdentifiers(String, List, List, List, Boolean) |
PatientIdentifierType |
getPatientIdentifierType(java.lang.Integer patientIdentifierTypeId)
Get patientIdentifierType by internal identifier |
PatientIdentifierType |
getPatientIdentifierType(java.lang.String name)
Deprecated. |
PatientIdentifierType |
getPatientIdentifierTypeByName(java.lang.String name)
Get patientIdentifierType by exact name |
PatientIdentifierType |
getPatientIdentifierTypeByUuid(java.lang.String uuid)
Get patient identifierType by universally unique identifier |
java.util.List<PatientIdentifierType> |
getPatientIdentifierTypes()
Deprecated. replaced by getAllPatientIdentifierTypes() |
java.util.List<PatientIdentifierType> |
getPatientIdentifierTypes(java.lang.String name,
java.lang.String format,
java.lang.Boolean required,
java.lang.Boolean hasCheckDigit)
Get all patientIdentifier types that match the given criteria |
java.util.List<Patient> |
getPatients(java.lang.String query)
Generic search on patients based on the given string. |
java.util.List<Patient> |
getPatients(java.lang.String name,
java.lang.String identifier,
java.util.List<PatientIdentifierType> identifierTypes)
Deprecated. replaced by getPatients(String, String, List, boolean) |
java.util.List<Patient> |
getPatients(java.lang.String name,
java.lang.String identifier,
java.util.List<PatientIdentifierType> identifierTypes,
boolean matchIdentifierExactly)
Get patients based on given criteria The identifier is matched with the regex OpenmrsConstants.PATIENT_IDENTIFIER_REGEX All parameters are optional and
nullable. |
java.util.List<Patient> |
getPatientsByIdentifier(java.lang.String identifier,
boolean includeVoided)
Deprecated. replaced by @deprecated replaced by getPatients(String, String, List) |
java.util.List<Patient> |
getPatientsByIdentifierPattern(java.lang.String identifier,
boolean includeVoided)
Deprecated. replaced by getPatients(String, String, List, boolean) |
java.util.List<Patient> |
getPatientsByName(java.lang.String name)
Deprecated. replaced by getPatients(String, String, List, boolean) |
java.util.List<Patient> |
getPatientsByName(java.lang.String name,
boolean includeVoided)
Deprecated. replaced by getPatients(String, String, List, boolean) |
Problem |
getProblem(java.lang.Integer problemListId)
Returns the Problem |
java.util.List<Problem> |
getProblems(Person p)
Get a list of the problems for the patient, sorted on sort_weight |
Patient |
identifierInUse(java.lang.String identifier,
PatientIdentifierType type,
Patient ignorePatient)
Deprecated. use getPatientByIdentifier(String) instead |
boolean |
isIdentifierInUseByAnotherPatient(PatientIdentifier patientIdentifier)
Checks whether the given patient identifier is already assigned to a patient other than patientIdentifier.patient |
void |
mergePatients(Patient preferred,
Patient notPreferred)
1) Moves object (encounters/obs) pointing to nonPreferred to
preferred 2) Copies data (gender/birthdate/names/ids/etc) from
nonPreferred to preferred iff the data is missing or null in
preferred 3) notPreferred is marked as voided |
void |
onShutdown()
Clean up after this class. |
void |
processDeath(Patient patient,
java.util.Date dateDied,
Concept causeOfDeath,
java.lang.String otherReason)
This is the way to establish that a patient has died. |
void |
purgePatient(Patient patient)
Delete patient from database. |
void |
purgePatientIdentifier(PatientIdentifier patientIdentifier)
Purge PatientIdentifier (cannot be undone) |
void |
purgePatientIdentifierType(PatientIdentifierType patientIdentifierType)
Purge PatientIdentifierType (cannot be undone) |
void |
removeAllergy(Allergy allergy,
java.lang.String reason)
Resolving the allergy, effectively removes the Allergy from the Patient's Active List by setting the stop date to now, if null. |
void |
removeProblem(Problem problem,
java.lang.String reason)
Effectively removes the Problem from the Patient's Active List by setting the stop date to now, if null. |
PatientIdentifierType |
retirePatientIdentifierType(PatientIdentifierType patientIdentifierType,
java.lang.String reason)
Retire a type of patient identifier |
void |
saveAllergy(Allergy allergy)
Creates an AllergyListItem to the Patient's Allergy Active List. |
void |
saveCauseOfDeathObs(Patient patient,
java.util.Date deathDate,
Concept cause,
java.lang.String otherReason)
Convenience method that saves the Obs that indicates when and why the patient died (including any "other" reason there might be) TODO keep this in the PatientService? |
Patient |
savePatient(Patient patient)
Saved the given patient to the database |
PatientIdentifier |
savePatientIdentifier(PatientIdentifier patientIdentifier)
Saved the given patientIndentifier to the database |
PatientIdentifierType |
savePatientIdentifierType(PatientIdentifierType patientIdentifierType)
TODO: Add changedBy and DateChanged columns to table patient_identifier_type |
void |
saveProblem(Problem problem)
Creates a ProblemListItem to the Patient's Problem Active List. |
void |
setIdentifierValidators(java.util.Map<java.lang.Class<? extends IdentifierValidator>,IdentifierValidator> identifierValidators)
ADDs identifierValidators, doesn't replace them |
void |
setPatientDAO(PatientDAO dao)
Sets the DAO for this service. |
PatientIdentifierType |
unretirePatientIdentifierType(PatientIdentifierType patientIdentifierType)
Unretire a type of patient identifier |
Patient |
unvoidPatient(Patient patient)
Unvoid patient record |
Patient |
updatePatient(Patient patient)
Deprecated. replaced by #savePatient(Patient) |
void |
updatePatientIdentifier(PatientIdentifier pi)
Deprecated. patient identifiers should not be updated directly; rather, after changing patient identifiers, use savePatient(Patient) to save changes to the
database |
void |
voidAllergy(Allergy allergy,
java.lang.String reason)
Used only in cases where the Allergy was entered by error |
Patient |
voidPatient(Patient patient,
java.lang.String reason)
Void patient record (functionally delete patient from system) |
PatientIdentifier |
voidPatientIdentifier(PatientIdentifier patientIdentifier,
java.lang.String reason)
Void patient identifier (functionally delete patient identifier from system) |
void |
voidProblem(Problem problem,
java.lang.String reason)
Used only in cases where the Problem was entered by error |
| Methods inherited from class org.openmrs.api.impl.BaseOpenmrsService |
|---|
onStartup |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.openmrs.api.OpenmrsService |
|---|
onStartup |
| Constructor Detail |
|---|
public PatientServiceImpl()
| Method Detail |
|---|
public void setPatientDAO(PatientDAO dao)
PatientService
setPatientDAO in interface PatientServicedao - DAO for this servicePatientService.setPatientDAO(org.openmrs.api.db.PatientDAO)public void onShutdown()
onShutdown in interface OpenmrsServiceonShutdown in class BaseOpenmrsServiceBaseOpenmrsService.onShutdown()
@Deprecated
public Patient createPatient(Patient patient)
throws APIException
createPatient in interface PatientServiceAPIExceptionsavePatient(Patient),
PatientService.createPatient(org.openmrs.Patient)
public Patient savePatient(Patient patient)
throws APIException
PatientServicepatient to the database
savePatient in interface PatientServicepatient - patient to be created or updated
APIExceptionPatientService.savePatient(org.openmrs.Patient)
public Patient getPatient(java.lang.Integer patientId)
throws APIException
PatientService
getPatient in interface PatientServicepatientId - internal patient identifier
APIExceptionPatientService.getPatient(java.lang.Integer)
@Deprecated
public Patient updatePatient(Patient patient)
throws APIException
updatePatient in interface PatientServiceAPIExceptionsavePatient(Patient),
PatientService.updatePatient(org.openmrs.Patient)
public java.util.List<Patient> getAllPatients()
throws APIException
PatientService
getAllPatients in interface PatientServiceAPIExceptionPatientService.getAllPatients()
public java.util.List<Patient> getAllPatients(boolean includeVoided)
throws APIException
PatientService
getAllPatients in interface PatientServiceincludeVoided - if false, will limit the search to non-voided patients
APIExceptionPatientService.getAllPatients(boolean)
@Deprecated
public java.util.List<Patient> getPatients(java.lang.String name,
java.lang.String identifier,
java.util.List<PatientIdentifierType> identifierTypes)
throws APIException
getPatients(String, String, List, boolean)
getPatients in interface PatientServiceAPIExceptionPatientService.getPatients(java.lang.String, java.lang.String,
java.util.List)
public java.util.List<Patient> getPatients(java.lang.String name,
java.lang.String identifier,
java.util.List<PatientIdentifierType> identifierTypes,
boolean matchIdentifierExactly)
throws APIException
PatientServiceOpenmrsConstants.PATIENT_IDENTIFIER_REGEX All parameters are optional and
nullable. If null, it is not included in the search. Will not return voided patients
getPatients in interface PatientServicename - (optional) this is a slight break from the norm, patients with a partial match on
this name will be returnedidentifier - (optional) only patients with a matching identifier are returnedidentifierTypes - (optional) the PatientIdentifierTypes to restrict tomatchIdentifierExactly - (required) if true, then the given identifier must
equal the id in the database. if false, then the identifier is 'searched' for by
using a regular expression
APIExceptionPatientService.getPatients(java.lang.String, java.lang.String,
java.util.List, boolean)
public void checkPatientIdentifiers(Patient patient)
throws PatientIdentifierException
PatientService
checkPatientIdentifiers in interface PatientServicepatient - patient for which to validate identifiers
PatientIdentifierException - if one or more of the identifiers are invalidPatientService.checkPatientIdentifiers(org.openmrs.Patient)
@Deprecated
public void checkPatientIdentifier(PatientIdentifier pi)
throws PatientIdentifierException
PatientIdentifierValidator.validateIdentifier(PatientIdentifier)
PatientService
checkPatientIdentifier in interface PatientServicepi - identifier to be validated
PatientIdentifierException - if the identifier is invalidPatientService.checkPatientIdentifier(org.openmrs.PatientIdentifier)
@Deprecated
public Patient identifierInUse(java.lang.String identifier,
PatientIdentifierType type,
Patient ignorePatient)
identifierInUse in interface PatientServicePatientService.identifierInUse(java.lang.String,
org.openmrs.PatientIdentifierType, org.openmrs.Patient)
@Deprecated
public java.util.List<Patient> getPatientsByIdentifier(java.lang.String identifier,
boolean includeVoided)
throws APIException
getPatients(String, String, List)
getPatientsByIdentifier in interface PatientServiceAPIExceptionPatientService.getPatientsByIdentifier(java.lang.String, boolean)
@Deprecated
public java.util.List<Patient> getPatientsByIdentifierPattern(java.lang.String identifier,
boolean includeVoided)
throws APIException
getPatients(String, String, List, boolean)
getPatientsByIdentifierPattern in interface PatientServiceAPIExceptionPatientService.getPatientsByIdentifierPattern(java.lang.String, boolean)
@Deprecated
public java.util.List<Patient> getPatientsByName(java.lang.String name)
throws APIException
getPatients(String, String, List, boolean)
getPatientsByName in interface PatientServiceAPIExceptionPatientService.getPatientsByName(java.lang.String)
@Deprecated
public java.util.List<Patient> getPatientsByName(java.lang.String name,
boolean includeVoided)
throws APIException
getPatients(String, String, List, boolean)
getPatientsByName in interface PatientServiceAPIException
public Patient voidPatient(Patient patient,
java.lang.String reason)
throws APIException
PatientService
voidPatient in interface PatientServicepatient - patient to be voidedreason - reason for voiding patient
APIExceptionPatientService.voidPatient(org.openmrs.Patient, java.lang.String)
public Patient unvoidPatient(Patient patient)
throws APIException
PatientService
unvoidPatient in interface PatientServicepatient - patient to be revived
APIExceptionPatientService.unvoidPatient(org.openmrs.Patient)
@Deprecated
public void deletePatient(Patient patient)
throws APIException
purgePatient(Patient)
deletePatient in interface PatientServiceAPIExceptionvoidPatient(org.openmrs.Patient,java.lang.String)
public void purgePatient(Patient patient)
throws APIException
PatientService
purgePatient in interface PatientServicepatient - patient to be deleted
APIExceptionPatientService.purgePatient(org.openmrs.Patient)
public 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 APIException
PatientService
getPatientIdentifiers in interface PatientServiceidentifier - the full identifier to match onpatientIdentifierTypes - the type of identifiers to getlocations - the locations of the identifiers to matchpatients - the patients containing these identifiersisPreferred - if true, limits to only preferred identifiers if false, only non
preferred. if null, ignores preferred status
APIExceptionPatientService.getPatientIdentifiers(java.lang.String, java.util.List,
java.util.List, java.util.List, java.lang.Boolean)
@Deprecated
public java.util.List<PatientIdentifier> getPatientIdentifiers(PatientIdentifierType pit)
throws APIException
getPatientIdentifiers(String, List, List, List, Boolean)
getPatientIdentifiers in interface PatientServiceAPIExceptionPatientService.getPatientIdentifiers(org.openmrs.PatientIdentifierType)
@Deprecated
public java.util.List<PatientIdentifier> getPatientIdentifiers(java.lang.String identifier,
PatientIdentifierType pit)
throws APIException
getPatientIdentifiers(String, List, List, List, Boolean)
getPatientIdentifiers in interface PatientServiceAPIExceptionPatientService.getPatientIdentifiers(java.lang.String,
org.openmrs.PatientIdentifierType)
@Deprecated
public java.util.List<PatientIdentifier> getPatientIdentifiers(java.lang.String identifier,
PatientIdentifierType patientIdentifierType,
boolean includeVoided)
throws APIException
getPatientIdentifiers(String, List, List, List, Boolean)
APIExceptionPatientService.getPatientIdentifiers(String, PatientIdentifierType)
@Deprecated
public void updatePatientIdentifier(PatientIdentifier pi)
throws APIException
savePatient(Patient) to save changes to the
database
PatientService
updatePatientIdentifier in interface PatientServicepi - identifier to be updated
APIException
public PatientIdentifierType savePatientIdentifierType(PatientIdentifierType patientIdentifierType)
throws APIException
savePatientIdentifierType in interface PatientServicepatientIdentifierType - PatientIdentifierType to create or update
APIExceptionPatientService.savePatientIdentifierType(org.openmrs.PatientIdentifierType)
@Deprecated
public java.util.List<PatientIdentifierType> getPatientIdentifierTypes()
throws APIException
getAllPatientIdentifierTypes()
getPatientIdentifierTypes in interface PatientServiceAPIExceptionPatientService.getPatientIdentifierTypes(),
PatientService.getAllPatientIdentifierTypes()
public java.util.List<PatientIdentifierType> getAllPatientIdentifierTypes()
throws APIException
PatientService
getAllPatientIdentifierTypes in interface PatientServiceAPIExceptionPatientService.getAllPatientIdentifierTypes()
public java.util.List<PatientIdentifierType> getAllPatientIdentifierTypes(boolean includeRetired)
throws APIException
PatientService
getAllPatientIdentifierTypes in interface PatientServiceincludeRetired - true/false whether retired types should be included
APIExceptionPatientService.getAllPatientIdentifierTypes(boolean)
public java.util.List<PatientIdentifierType> getPatientIdentifierTypes(java.lang.String name,
java.lang.String format,
java.lang.Boolean required,
java.lang.Boolean hasCheckDigit)
throws APIException
PatientService
getPatientIdentifierTypes in interface PatientServicename - name of the type to match onformat - the string format to match onrequired - if true, limits to only identifiers marked as required if false, only non
required. if null, ignores required bithasCheckDigit - if true, limits to only check digit'd identifiers if false, only non
checkdigit'd. if null, ignores checkDigit
APIExceptionPatientService.getPatientIdentifierTypes(java.lang.String,
java.lang.String, java.lang.Boolean, java.lang.Boolean)
public PatientIdentifierType getPatientIdentifierType(java.lang.Integer patientIdentifierTypeId)
throws APIException
PatientService
getPatientIdentifierType in interface PatientServiceAPIExceptionPatientService.getPatientIdentifierType(java.lang.Integer)
@Deprecated
public PatientIdentifierType getPatientIdentifierType(java.lang.String name)
throws APIException
getPatientIdentifierType in interface PatientServiceAPIExceptionPatientService.getPatientIdentifierType(java.lang.String)
public PatientIdentifierType getPatientIdentifierTypeByName(java.lang.String name)
throws APIException
PatientService
getPatientIdentifierTypeByName in interface PatientServiceAPIExceptionPatientService.getPatientIdentifierTypeByName(java.lang.String)
public PatientIdentifierType retirePatientIdentifierType(PatientIdentifierType patientIdentifierType,
java.lang.String reason)
throws APIException
PatientService
retirePatientIdentifierType in interface PatientServicepatientIdentifierType - type of patient identifier to be retiredreason - the reason to retire this identifier type
APIExceptionPatientService.retirePatientIdentifierType(org.openmrs.PatientIdentifierType,
String)
public PatientIdentifierType unretirePatientIdentifierType(PatientIdentifierType patientIdentifierType)
throws APIException
PatientService
unretirePatientIdentifierType in interface PatientServicepatientIdentifierType - type of patient identifier to be unretired
APIExceptionPatientService.unretirePatientIdentifierType(org.openmrs.PatientIdentifierType)
public void purgePatientIdentifierType(PatientIdentifierType patientIdentifierType)
throws APIException
PatientService
purgePatientIdentifierType in interface PatientServicepatientIdentifierType - PatientIdentifierType to purge from the database
APIExceptionPatientService.purgePatientIdentifierType(org.openmrs.PatientIdentifierType)
@Deprecated
public java.util.List<Patient> findPatients(java.lang.String query,
boolean includeVoided)
throws APIException
findPatients in interface PatientServiceAPIExceptionPatientService.findPatients(java.lang.String, boolean)
public java.util.List<Patient> getPatients(java.lang.String query)
throws APIException
PatientService
getPatients in interface PatientServicequery - the string to search on
APIExceptionPatientService.getPatients(java.lang.String)
@Deprecated
public Patient findPatient(Patient patientToMatch)
throws APIException
findPatient in interface PatientServiceAPIExceptionPatientService.findPatient(org.openmrs.Patient),
getPatientByExample(Patient)
public Patient getPatientByExample(Patient patientToMatch)
throws APIException
getPatientByExample in interface PatientServiceAPIExceptionPatientService.getPatientByExample(org.openmrs.Patient)
@Deprecated
public java.util.List<Patient> findDuplicatePatients(java.util.Set<java.lang.String> attributes)
throws APIException
getDuplicatePatientsByAttributes(List)
findDuplicatePatients in interface PatientServiceAPIExceptionPatientService.getDuplicatePatientsByAttributes(List)
public java.util.List<Patient> getDuplicatePatientsByAttributes(java.util.List<java.lang.String> attributes)
throws APIException
PatientService
getDuplicatePatientsByAttributes in interface PatientServiceattributes - attributes on a Person or Patient object. similar to: [gender, givenName,
middleName, familyName]
APIExceptionPatientService.getDuplicatePatientsByAttributes(java.util.List)
public void mergePatients(Patient preferred,
Patient notPreferred)
throws APIException
nonPreferred to
preferred 2) Copies data (gender/birthdate/names/ids/etc) from
nonPreferred to preferred iff the data is missing or null in
preferred 3) notPreferred is marked as voided
mergePatients in interface PatientServicepreferred - notPreferred -
APIExceptionPatientService.mergePatients(org.openmrs.Patient, org.openmrs.Patient)
public void exitFromCare(Patient patient,
java.util.Date dateExited,
Concept reasonForExit)
throws APIException
exitFromCare in interface PatientServicepatient - - the patient who has exited caredateExited - - the declared date/time of the patient's exitreasonForExit - - the concept that corresponds with why the patient has been declared as
exited
APIException
public void processDeath(Patient patient,
java.util.Date dateDied,
Concept causeOfDeath,
java.lang.String otherReason)
throws APIException
processDeath in interface PatientServicepatient - - the patient who has dieddateDied - - the declared date/time of the patient's deathcauseOfDeath - - the concept that corresponds with the reason the patient diedotherReason - - in case the causeOfDeath is 'other', a place to store more info
APIException
public void saveCauseOfDeathObs(Patient patient,
java.util.Date deathDate,
Concept cause,
java.lang.String otherReason)
throws APIException
PatientService
saveCauseOfDeathObs in interface PatientServicepatient - - the patient who has dieddeathDate - - the declared date/time of the patient's deathcause - - the concept that corresponds with the reason the patient diedotherReason - - if the concept representing the reason is OTHER NON-CODED, and a
string-based "other" reason is supplied
APIExceptionPatientService.saveCauseOfDeathObs(org.openmrs.Patient, java.util.Date,
org.openmrs.Concept, java.lang.String)
public Patient getPatientByUuid(java.lang.String uuid)
throws APIException
PatientService
getPatientByUuid in interface PatientServiceuuid - universally unique identifier
APIExceptionPatientService.getPatientByUuid(java.lang.String)
public PatientIdentifier getPatientIdentifierByUuid(java.lang.String uuid)
throws APIException
PatientService
getPatientIdentifierByUuid in interface PatientServiceuuid - universally unique identifier
APIException
public PatientIdentifierType getPatientIdentifierTypeByUuid(java.lang.String uuid)
throws APIException
PatientService
getPatientIdentifierTypeByUuid in interface PatientServiceAPIExceptionPatientService.getPatientIdentifierTypeByUuid(java.lang.String)public IdentifierValidator getDefaultIdentifierValidator()
getDefaultIdentifierValidator in interface PatientServicePatientService.getDefaultIdentifierValidator()public IdentifierValidator getIdentifierValidator(java.lang.Class<IdentifierValidator> identifierValidator)
PatientService
getIdentifierValidator in interface PatientServiceidentifierValidator - identifierValidator which validator to get.PatientService.getIdentifierValidator(java.lang.String)public java.util.Map<java.lang.Class<? extends IdentifierValidator>,IdentifierValidator> getIdentifierValidators()
public void setIdentifierValidators(java.util.Map<java.lang.Class<? extends IdentifierValidator>,IdentifierValidator> identifierValidators)
identifierValidators - public java.util.Collection<IdentifierValidator> getAllIdentifierValidators()
getAllIdentifierValidators in interface PatientServicePatientService.getAllIdentifierValidators()public IdentifierValidator getIdentifierValidator(java.lang.String pivClassName)
getIdentifierValidator in interface PatientServicePatientService.getIdentifierValidator(java.lang.String)public boolean isIdentifierInUseByAnotherPatient(PatientIdentifier patientIdentifier)
PatientService
isIdentifierInUseByAnotherPatient in interface PatientServicepatientIdentifier - the patient identifier to look for in other patients
PatientService.isIdentifierInUseByAnotherPatient(org.openmrs.PatientIdentifier)
public PatientIdentifier getPatientIdentifier(java.lang.Integer patientIdentifierId)
throws APIException
PatientService
getPatientIdentifier in interface PatientServiceAPIExceptionPatientService.getPatientIdentifier(java.lang.Integer)
public PatientIdentifier voidPatientIdentifier(PatientIdentifier patientIdentifier,
java.lang.String reason)
throws APIException
PatientService
voidPatientIdentifier in interface PatientServicereason - reason for voiding patient identifier
APIExceptionPatientService.voidPatientIdentifier(org.openmrs.PatientIdentifier,
java.lang.String)
public PatientIdentifier savePatientIdentifier(PatientIdentifier patientIdentifier)
throws APIException
PatientServicepatientIndentifier to the database
savePatientIdentifier in interface PatientServiceAPIExceptionPatientService.savePatientIdentifier(org.openmrs.PatientIdentifier)
public void purgePatientIdentifier(PatientIdentifier patientIdentifier)
throws APIException
PatientService
purgePatientIdentifier in interface PatientServicepatientIdentifier - PatientIdentifier to purge from the database
APIExceptionPatientService.purgePatientIdentifier(org.openmrs.PatientIdentifier)
public java.util.List<Problem> getProblems(Person p)
throws APIException
PatientService
getProblems in interface PatientServicep - the Person
APIExceptionorg.openmrs.api.PatientService#getProblems(org.openmrs.api.Person)
public Problem getProblem(java.lang.Integer problemListId)
throws APIException
PatientService
getProblem in interface PatientServiceAPIExceptionPatientService.getProblem(java.lang.Integer)
public void saveProblem(Problem problem)
throws APIException
PatientService
saveProblem in interface PatientServiceproblem - the Problem
APIExceptionPatientService.saveProblem(org.openmrs.activelist.Problem)
public void removeProblem(Problem problem,
java.lang.String reason)
throws APIException
PatientService
removeProblem in interface PatientServiceproblem - the Problemreason - the reason of removing the problem
APIExceptionPatientService.removeProblem(org.openmrs.activelist.Problem,
java.lang.String)
public void voidProblem(Problem problem,
java.lang.String reason)
throws APIException
PatientService
voidProblem in interface PatientServiceAPIExceptionPatientService.voidProblem(org.openmrs.activelist.Problem,
java.lang.String)
public java.util.List<Allergy> getAllergies(Person p)
throws APIException
PatientService
getAllergies in interface PatientServicep - the Person
APIExceptionorg.openmrs.api.PatientService#getAllergies(org.openmrs.api.Person)
public Allergy getAllergy(java.lang.Integer allergyListId)
throws APIException
PatientService
getAllergy in interface PatientServiceAPIExceptionPatientService.getAllergy(java.lang.Integer)
public void saveAllergy(Allergy allergy)
throws APIException
PatientService
saveAllergy in interface PatientServiceallergy - the Allergy
APIExceptionPatientService.saveAllergy(org.openmrs.activelist.Allergy)
public void removeAllergy(Allergy allergy,
java.lang.String reason)
throws APIException
PatientService
removeAllergy in interface PatientServiceallergy - the Allergyreason - the reason of remove
APIExceptionPatientService.removeAllergy(org.openmrs.activelist.Allergy,
java.lang.String)
public void voidAllergy(Allergy allergy,
java.lang.String reason)
throws APIException
PatientService
voidAllergy in interface PatientServiceAPIExceptionPatientService.voidAllergy(org.openmrs.activelist.Allergy,
java.lang.String)
|
OpenMRS-1.7.x | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||