|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openmrs.api.impl.BaseOpenmrsService org.openmrs.api.impl.EncounterServiceImpl
public class EncounterServiceImpl
Default implementation of the EncounterService
This class should not be instantiated alone, get a service class from the Context: Context.getEncounterService();
Context
,
EncounterService
Constructor Summary | |
---|---|
EncounterServiceImpl()
|
Method Summary | |
---|---|
void |
createEncounter(Encounter encounter)
Deprecated. replaced by saveEncounter(Encounter) |
void |
deleteEncounter(Encounter encounter)
Deprecated. Replaced by purgeEncounter(Encounter) |
java.util.List<EncounterType> |
findEncounterTypes(java.lang.String name)
Find Encounter Types with name matching the beginning of the search string. |
java.util.List<Location> |
findLocations(java.lang.String name)
Deprecated. use LocationService.getLocations(name) |
java.util.List<EncounterType> |
getAllEncounterTypes()
Get all encounter types (not retired) |
java.util.List<EncounterType> |
getAllEncounterTypes(boolean includeVoided)
Get all encounter types. |
Encounter |
getEncounter(java.lang.Integer encounterId)
Get encounter by internal identifier |
Encounter |
getEncounterByUuid(java.lang.String uuid)
Get Encounter by its UUID |
java.util.Collection<Encounter> |
getEncounters(java.util.Date fromDate,
java.util.Date toDate)
Deprecated. replaced by getEncounters(Patient, Location, Date, Date, Collection, Collection, Collection, boolean) |
java.util.List<Encounter> |
getEncounters(Location loc,
java.util.Date fromDate,
java.util.Date toDate)
Deprecated. replaced by getEncounters(Patient, Location, Date, Date, Collection, Collection, Collection, boolean) |
java.util.List<Encounter> |
getEncounters(Patient who)
Deprecated. replaced by getEncountersByPatient(Patient patient) |
java.util.List<Encounter> |
getEncounters(Patient who,
boolean includeVoided)
Deprecated. replaced by getEncounters(Patient, Location, Date, Date, Collection, Collection, Collection, boolean) |
java.util.List<Encounter> |
getEncounters(Patient who,
java.util.Date fromDate,
java.util.Date toDate)
Deprecated. replaced by getEncounters(Patient, Location, Date, Date, Collection, Collection, Collection, boolean) |
java.util.List<Encounter> |
getEncounters(Patient who,
Location where)
Deprecated. replaced by getEncounters(Patient, Location, Date, Date, Collection, Collection, Collection, boolean) |
java.util.List<Encounter> |
getEncounters(Patient who,
Location loc,
java.util.Date fromDate,
java.util.Date toDate,
java.util.Collection<Form> enteredViaForms,
java.util.Collection<EncounterType> encounterTypes,
boolean includeVoided)
Deprecated. replaced by getEncounters(Patient, Location, Date, Date, Collection, Collection, Collection, boolean) |
java.util.List<Encounter> |
getEncounters(Patient who,
Location loc,
java.util.Date fromDate,
java.util.Date toDate,
java.util.Collection<Form> enteredViaForms,
java.util.Collection<EncounterType> encounterTypes,
java.util.Collection<User> providers,
boolean includeVoided)
Get all encounters that match a variety of (nullable) criteria. |
java.util.List<Encounter> |
getEncountersByPatient(Patient patient)
Get all encounters (not voided) for a patient. |
java.util.List<Encounter> |
getEncountersByPatient(java.lang.String query)
Search for encounters by patient name or patient identifier. |
java.util.List<Encounter> |
getEncountersByPatient(java.lang.String query,
boolean includeVoided)
Search for encounters by patient name or patient identifier. |
java.util.List<Encounter> |
getEncountersByPatientId(java.lang.Integer patientId)
Get encounters for a patientId |
java.util.List<Encounter> |
getEncountersByPatientId(java.lang.Integer patientId,
boolean includeVoided)
Deprecated. replaced by getEncountersByPatientId(Integer) |
java.util.List<Encounter> |
getEncountersByPatientIdentifier(java.lang.String identifier)
Get encounters (not voided) for a patient identifier |
java.util.List<Encounter> |
getEncountersByPatientIdentifier(java.lang.String identifier,
boolean includeVoided)
Deprecated. replaced by getEncountersByPatientIdentifier(String) |
EncounterType |
getEncounterType(java.lang.Integer encounterTypeId)
Get encounterType by internal identifier |
EncounterType |
getEncounterType(java.lang.String name)
Get encounterType by exact name |
EncounterType |
getEncounterTypeByUuid(java.lang.String uuid)
Get EncounterType by its UUID |
java.util.List<EncounterType> |
getEncounterTypes()
Deprecated. replaced by getAllEncounterTypes() |
Location |
getLocation(java.lang.Integer locationId)
Deprecated. use LocationService.getLocation(locationId) |
Location |
getLocationByName(java.lang.String name)
Deprecated. use LocationService.getLocation(name) |
java.util.List<Location> |
getLocations()
Deprecated. use LocationService.getAllLocations() |
void |
purgeEncounter(Encounter encounter)
Completely remove an encounter from database. |
void |
purgeEncounter(Encounter encounter,
boolean cascade)
Completely remove an encounter from database. |
void |
purgeEncounterType(EncounterType encounterType)
Completely remove an encounter type from database. |
EncounterType |
retireEncounterType(EncounterType encounterType,
java.lang.String reason)
Retire an EncounterType. |
Encounter |
saveEncounter(Encounter encounter)
Saves a new encounter or updates an existing encounter. |
EncounterType |
saveEncounterType(EncounterType encounterType)
Save a new Encounter Type or update an existing Encounter Type. |
void |
setEncounterDAO(EncounterDAO dao)
Set the given dao on this encounter service. |
EncounterType |
unretireEncounterType(EncounterType encounterType)
Unretire an EncounterType. |
Encounter |
unvoidEncounter(Encounter encounter)
Unvoid encounter record |
void |
updateEncounter(Encounter encounter)
Deprecated. replaced by saveEncounter(Encounter) |
Encounter |
voidEncounter(Encounter encounter,
java.lang.String reason)
Voiding a encounter essentially removes it from circulation |
Methods inherited from class org.openmrs.api.impl.BaseOpenmrsService |
---|
onShutdown, 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 |
---|
onShutdown, onStartup |
Constructor Detail |
---|
public EncounterServiceImpl()
Method Detail |
---|
public void setEncounterDAO(EncounterDAO dao)
EncounterService
dao
on this encounter service. The dao will act as the conduit
through with all encounter calls get to the database
setEncounterDAO
in interface EncounterService
EncounterService.setEncounterDAO(org.openmrs.api.db.EncounterDAO)
public java.util.List<Encounter> getEncountersByPatient(java.lang.String query, boolean includeVoided) throws APIException
EncounterService
getEncountersByPatient
in interface EncounterService
query
- patient name or identifierincludeVoided
- Specifies whether voided encounters should be included
APIException
EncounterService.getEncountersByPatient(java.lang.String, boolean)
public Encounter saveEncounter(Encounter encounter) throws APIException
EncounterService
saveEncounter
in interface EncounterService
encounter
- to be saved
APIException
EncounterService.saveEncounter(org.openmrs.Encounter)
public Encounter getEncounter(java.lang.Integer encounterId) throws APIException
EncounterService
getEncounter
in interface EncounterService
encounterId
- encounter id
APIException
EncounterService.getEncounter(java.lang.Integer)
public java.util.List<Encounter> getEncountersByPatient(Patient patient) throws APIException
EncounterService
getEncountersByPatient
in interface EncounterService
APIException
EncounterService.getEncountersByPatient(org.openmrs.Patient)
public java.util.List<Encounter> getEncountersByPatient(java.lang.String query) throws APIException
EncounterService
getEncountersByPatient
in interface EncounterService
query
- patient name or identifier
APIException
EncounterService.getEncountersByPatient(String)
public java.util.List<Encounter> getEncountersByPatientId(java.lang.Integer patientId) throws APIException
EncounterService
getEncountersByPatientId
in interface EncounterService
APIException
EncounterService.getEncountersByPatientId(java.lang.Integer)
public java.util.List<Encounter> getEncountersByPatientIdentifier(java.lang.String identifier) throws APIException
EncounterService
getEncountersByPatientIdentifier
in interface EncounterService
APIException
EncounterService.getEncountersByPatientIdentifier(java.lang.String)
@Deprecated public java.util.List<Encounter> getEncounters(Patient who, Location loc, java.util.Date fromDate, java.util.Date toDate, java.util.Collection<Form> enteredViaForms, java.util.Collection<EncounterType> encounterTypes, boolean includeVoided)
getEncounters(Patient, Location, Date, Date, Collection, Collection, Collection, boolean)
getEncounters
in interface EncounterService
EncounterService.getEncounters(org.openmrs.Patient,
org.openmrs.Location, java.util.Date, java.util.Date, java.util.Collection,
java.util.Collection, boolean)
public java.util.List<Encounter> getEncounters(Patient who, Location loc, java.util.Date fromDate, java.util.Date toDate, java.util.Collection<Form> enteredViaForms, java.util.Collection<EncounterType> encounterTypes, java.util.Collection<User> providers, boolean includeVoided)
EncounterService
getEncounters
in interface EncounterService
who
- the patient the encounter is forloc
- the location this encounter took placefromDate
- the minimum date (inclusive) this encounter took placetoDate
- the maximum date (exclusive) this encounter took placeenteredViaForms
- the form that entered this encounter must be in this listencounterTypes
- the type of encounter must be in this listproviders
- the provider of this encounter must be in this listincludeVoided
- true/false to include the voided encounters or not
EncounterService.getEncounters(org.openmrs.Patient,
org.openmrs.Location, java.util.Date, java.util.Date, java.util.Collection,
java.util.Collection, java.util.Collection, boolean)
public Encounter voidEncounter(Encounter encounter, java.lang.String reason)
EncounterService
voidEncounter
in interface EncounterService
encounter
- Encounter object to voidreason
- String reason that it's being voidedEncounterService.voidEncounter(org.openmrs.Encounter, java.lang.String)
public Encounter unvoidEncounter(Encounter encounter) throws APIException
EncounterService
unvoidEncounter
in interface EncounterService
encounter
- Encounter to be revived
APIException
EncounterService.unvoidEncounter(org.openmrs.Encounter)
public void purgeEncounter(Encounter encounter) throws APIException
EncounterService
voidEncounter(org.openmrs.Encounter)
purgeEncounter
in interface EncounterService
encounter
- encounter object to be purged
APIException
EncounterService.purgeEncounter(org.openmrs.Encounter)
public void purgeEncounter(Encounter encounter, boolean cascade) throws APIException
EncounterService
voidEncounter(org.openmrs.Encounter)
purgeEncounter
in interface EncounterService
encounter
- encounter object to be purgedcascade
- Purge any related observations as well?
APIException
EncounterService.purgeEncounter(Encounter, boolean)
public EncounterType saveEncounterType(EncounterType encounterType)
EncounterService
saveEncounterType
in interface EncounterService
EncounterService.saveEncounterType(org.openmrs.EncounterType)
public EncounterType getEncounterType(java.lang.Integer encounterTypeId) throws APIException
EncounterService
getEncounterType
in interface EncounterService
encounterTypeId
- Integer
APIException
EncounterService.getEncounterType(java.lang.Integer)
public EncounterType getEncounterType(java.lang.String name) throws APIException
EncounterService
getEncounterType
in interface EncounterService
name
- string to match to an Encounter.name
APIException
EncounterService.getEncounterType(java.lang.String)
public java.util.List<EncounterType> getAllEncounterTypes() throws APIException
EncounterService
getAllEncounterTypes
in interface EncounterService
APIException
EncounterService.getAllEncounterTypes()
public java.util.List<EncounterType> getAllEncounterTypes(boolean includeVoided) throws APIException
EncounterService
getAllEncounterTypes
in interface EncounterService
APIException
EncounterService.getAllEncounterTypes(boolean)
public java.util.List<EncounterType> findEncounterTypes(java.lang.String name) throws APIException
EncounterService
findEncounterTypes
in interface EncounterService
name
- of the encounter type to find
APIException
EncounterService.findEncounterTypes(java.lang.String)
public EncounterType retireEncounterType(EncounterType encounterType, java.lang.String reason) throws APIException
EncounterService
retireEncounterType
in interface EncounterService
encounterType
- the encounter type to retirereason
- required non-null purpose for retiring this encounter type
APIException
EncounterService.retireEncounterType(EncounterType, String)
public EncounterType unretireEncounterType(EncounterType encounterType) throws APIException
EncounterService
unretireEncounterType
in interface EncounterService
encounterType
- the encounter type to unretire
APIException
EncounterService.unretireEncounterType(org.openmrs.EncounterType)
public void purgeEncounterType(EncounterType encounterType) throws APIException
EncounterService
purgeEncounterType
in interface EncounterService
APIException
EncounterService.purgeEncounterType(org.openmrs.EncounterType)
@Deprecated public void createEncounter(Encounter encounter) throws APIException
saveEncounter(Encounter)
EncounterService
createEncounter
in interface EncounterService
encounter
- to be created
APIException
EncounterService.createEncounter(org.openmrs.Encounter)
@Deprecated public void updateEncounter(Encounter encounter) throws APIException
saveEncounter(Encounter)
EncounterService
updateEncounter
in interface EncounterService
APIException
EncounterService.updateEncounter(org.openmrs.Encounter)
@Deprecated public void deleteEncounter(Encounter encounter) throws APIException
purgeEncounter(Encounter)
EncounterService
voidEncounter(org.openmrs.Encounter)
deleteEncounter
in interface EncounterService
encounter
- encounter object to be deleted
APIException
EncounterService.deleteEncounter(org.openmrs.Encounter)
@Deprecated public java.util.List<Encounter> getEncountersByPatientId(java.lang.Integer patientId, boolean includeVoided) throws APIException
getEncountersByPatientId(Integer)
EncounterService
EncounterService.getEncounters(Patient, Location, Date, Date, Collection, Collection, boolean)
getEncountersByPatientId
in interface EncounterService
includeVoided
- No longer supported
APIException
EncounterService.getEncountersByPatientId(java.lang.Integer, boolean)
@Deprecated public java.util.List<Encounter> getEncountersByPatientIdentifier(java.lang.String identifier, boolean includeVoided) throws APIException
getEncountersByPatientIdentifier(String)
EncounterService
EncounterService.getEncounters(Patient, Location, Date, Date, Collection, Collection, boolean)
getEncountersByPatientIdentifier
in interface EncounterService
includeVoided
- No longer supported.
APIException
EncounterService.getEncountersByPatientIdentifier(java.lang.String,
boolean)
@Deprecated public java.util.List<Encounter> getEncounters(Patient who)
getEncountersByPatient(Patient patient)
EncounterService
getEncounters
in interface EncounterService
EncounterService.getEncounters(org.openmrs.Patient)
@Deprecated public java.util.List<Encounter> getEncounters(Patient who, boolean includeVoided)
getEncounters(Patient, Location, Date, Date, Collection, Collection, Collection, boolean)
EncounterService
EncounterService.getEncounters(Patient, Location, Date, Date, Collection, Collection, boolean)
getEncounters
in interface EncounterService
includeVoided
- No longer supported.
EncounterService.getEncounters(org.openmrs.Patient, boolean)
@Deprecated public java.util.List<Encounter> getEncounters(Patient who, Location where)
getEncounters(Patient, Location, Date, Date, Collection, Collection, Collection, boolean)
EncounterService
getEncounters
in interface EncounterService
EncounterService.getEncounters(org.openmrs.Patient,
org.openmrs.Location)
@Deprecated public java.util.List<Encounter> getEncounters(Patient who, java.util.Date fromDate, java.util.Date toDate)
getEncounters(Patient, Location, Date, Date, Collection, Collection, Collection, boolean)
EncounterService
getEncounters
in interface EncounterService
EncounterService.getEncounters(org.openmrs.Patient, java.util.Date,
java.util.Date)
@Deprecated public java.util.Collection<Encounter> getEncounters(java.util.Date fromDate, java.util.Date toDate)
getEncounters(Patient, Location, Date, Date, Collection, Collection, Collection, boolean)
EncounterService
getEncounters
in interface EncounterService
EncounterService.getEncounters(java.util.Date, java.util.Date)
@Deprecated public java.util.List<Encounter> getEncounters(Location loc, java.util.Date fromDate, java.util.Date toDate)
getEncounters(Patient, Location, Date, Date, Collection, Collection, Collection, boolean)
EncounterService
getEncounters
in interface EncounterService
loc
- Location
EncounterService.getEncounters(org.openmrs.Location, java.util.Date,
java.util.Date)
@Deprecated public java.util.List<EncounterType> getEncounterTypes()
getAllEncounterTypes()
EncounterService
getEncounterTypes
in interface EncounterService
EncounterService.getEncounterTypes()
@Deprecated public java.util.List<Location> getLocations() throws APIException
EncounterService
getLocations
in interface EncounterService
APIException
EncounterService.getLocations()
@Deprecated public Location getLocation(java.lang.Integer locationId) throws APIException
EncounterService
getLocation
in interface EncounterService
APIException
EncounterService.getLocation(java.lang.Integer)
@Deprecated public Location getLocationByName(java.lang.String name) throws APIException
EncounterService
getLocationByName
in interface EncounterService
name
- location's name
APIException
EncounterService.getLocationByName(java.lang.String)
@Deprecated public java.util.List<Location> findLocations(java.lang.String name) throws APIException
EncounterService
findLocations
in interface EncounterService
name
- location's name
APIException
EncounterService.findLocations(java.lang.String)
public Encounter getEncounterByUuid(java.lang.String uuid) throws APIException
EncounterService
getEncounterByUuid
in interface EncounterService
APIException
EncounterService.getEncounterByUuid(java.lang.String)
public EncounterType getEncounterTypeByUuid(java.lang.String uuid) throws APIException
EncounterService
getEncounterTypeByUuid
in interface EncounterService
APIException
EncounterService.getEncounterTypeByUuid(java.lang.String)
|
OpenMRS-1.7.x | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |