|
|
||||||||
| 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.AdministrationServiceImpl
public class AdministrationServiceImpl
Default implementation of the administration services. This class should not be used on its own. The current OpenMRS implementation should be fetched from the Context
AdministrationService,
Context| Field Summary | |
|---|---|
protected AdministrationDAO |
dao
|
protected org.apache.commons.logging.Log |
log
|
protected java.util.SortedMap<java.lang.String,java.lang.String> |
systemVariables
Static-ish variable used to cache the system variables. |
| Constructor Summary | |
|---|---|
AdministrationServiceImpl()
Default empty constructor |
|
| Method Summary | |
|---|---|
void |
addGlobalProperty(GlobalProperty gp)
Deprecated. |
void |
addGlobalProperty(java.lang.String propertyName,
java.lang.String propertyValue)
Deprecated. |
void |
addGlobalPropertyListener(GlobalPropertyListener listener)
Allows code to be notified when a global property is created/edited/deleted. |
void |
createConceptClass(ConceptClass cc)
Deprecated. moved to ConceptService |
void |
createConceptDatatype(ConceptDatatype cd)
Deprecated. moved to ConceptService |
void |
createConceptProposal(ConceptProposal cp)
Deprecated. moved to ConceptService |
void |
createEncounterType(EncounterType encounterType)
Deprecated. |
void |
createFieldType(FieldType fieldType)
Deprecated. |
void |
createLocation(Location location)
Deprecated. |
void |
createMimeType(MimeType mimeType)
Deprecated. use ObsService.saveMimeType(MimeType) |
void |
createPatientIdentifierType(PatientIdentifierType patientIdentifierType)
Deprecated. replaced by PatientService.savePatientIdentifierType(PatientIdentifierType) |
void |
createPrivilege(Privilege privilege)
Deprecated. |
void |
createReport(Report report)
Create a new Report |
void |
createReportObject(AbstractReportObject reportObject)
Create a new Report Object |
void |
createRole(Role role)
Deprecated. |
void |
createTribe(Tribe tribe)
Create a new Tribe |
void |
deleteConceptClass(ConceptClass cc)
Deprecated. moved to ConceptService |
void |
deleteConceptDatatype(ConceptDatatype cd)
Deprecated. moved to ConceptService |
void |
deleteEncounterType(EncounterType encounterType)
Deprecated. |
void |
deleteFieldType(FieldType fieldType)
Deprecated. |
void |
deleteGlobalProperty(java.lang.String propertyName)
Deprecated. |
void |
deleteLocation(Location location)
Deprecated. |
void |
deleteMimeType(MimeType mimeType)
Deprecated. use ObsService.purgeMimeType(MimeType) |
void |
deletePatientIdentifierType(PatientIdentifierType patientIdentifierType)
Deprecated. replaced by PatientService.purgePatientIdentifierType(PatientIdentifierType) |
void |
deletePrivilege(Privilege privilege)
Deprecated. |
void |
deleteReport(Report report)
Delete Report |
void |
deleteReportObject(java.lang.Integer reportObjectId)
Delete Report Object |
void |
deleteRole(Role role)
Deprecated. |
void |
deleteTribe(Tribe tribe)
Delete Tribe |
java.util.List<java.util.List<java.lang.Object>> |
executeSQL(java.lang.String sql,
boolean selectOnly)
Runs the sql on the database. |
java.util.List<GlobalProperty> |
getAllGlobalProperties()
Get a list of all global properties in the system |
java.util.List<DataEntryStatistic> |
getDataEntryStatistics(java.util.Date fromDate,
java.util.Date toDate,
java.lang.String encounterUserColumn,
java.lang.String orderUserColumn,
java.lang.String groupBy)
Creates a list of data entry stats from fromDate to toDate
EncounterUserColumn is a column in the encounter table like creator, provider, etc
(defaults to creator)
EncounterUserColumn is a column in the encounter table like creator, orderer, etc
(defaults to orderer) |
java.util.List<GlobalProperty> |
getGlobalProperties()
Deprecated. |
java.lang.String |
getGlobalProperty(java.lang.String propertyName)
Gets the global property that has the given propertyName
If propertyName is not found in the list of Global Properties
currently in the database, a null value is returned
This method should not have any authorization check |
java.lang.String |
getGlobalProperty(java.lang.String propertyName,
java.lang.String defaultValue)
Gets the global property that has the given propertyName
If propertyName is not found in the list of Global Properties
currently in the database, a defaultValue is returned
This method should not have any authorization check |
java.util.Collection<?> |
getMRNGeneratorLog()
To be deprecated when the mrn generator module is completed |
java.util.SortedMap<java.lang.String,java.lang.String> |
getSystemVariables()
Get a listing or important variables used in openmrs |
void |
mapConceptProposalToConcept(ConceptProposal cp,
Concept mappedConcept)
Deprecated. moved to ConceptService |
void |
mrnGeneratorLog(java.lang.String site,
java.lang.Integer start,
java.lang.Integer count)
To be deprecated when mrn generator module is completed |
void |
purgeGlobalProperty(GlobalProperty globalProperty)
Completely remove the given global property from the database |
void |
rejectConceptProposal(ConceptProposal cp)
Deprecated. moved to ConceptService |
void |
removeGlobalPropertyListener(GlobalPropertyListener listener)
Removes a GlobalPropertyListener previously registered by #addGlobalPropertyListener(String, GlobalPropertyListener) |
void |
retireTribe(Tribe tribe)
Retire Tribe |
java.util.List<GlobalProperty> |
saveGlobalProperties(java.util.List<GlobalProperty> props)
Save the given list of global properties to the database overwriting all values with the given values. |
GlobalProperty |
saveGlobalProperty(GlobalProperty gp)
Save the given global property to the database |
void |
setAdministrationDAO(AdministrationDAO dao)
Used by Spring to set the specific/chosen database access implementation |
void |
setEventListeners(EventListeners eventListeners)
|
void |
setGlobalProperties(java.util.List<GlobalProperty> props)
Deprecated. |
void |
setGlobalProperty(GlobalProperty gp)
Deprecated. |
void |
setGlobalProperty(java.lang.String propertyName,
java.lang.String propertyValue)
Deprecated. |
void |
unretireTribe(Tribe tribe)
Unretire Tribe |
void |
updateConceptClass(ConceptClass cc)
Deprecated. moved to ConceptService |
void |
updateConceptDatatype(ConceptDatatype cd)
Deprecated. moved to ConceptService |
void |
updateConceptProposal(ConceptProposal cp)
Deprecated. moved to ConceptService |
void |
updateConceptSetDerived()
Deprecated. moved to ConceptService |
void |
updateConceptSetDerived(Concept concept)
Deprecated. moved to ConceptService |
void |
updateConceptWord(Concept concept)
Deprecated. moved to ConceptServiceImpl |
void |
updateConceptWords()
Deprecated. moved to ConceptServiceImpl |
void |
updateConceptWords(java.lang.Integer conceptIdStart,
java.lang.Integer conceptIdEnd)
Deprecated. moved to ConceptService |
void |
updateEncounterType(EncounterType encounterType)
Deprecated. |
void |
updateFieldType(FieldType fieldType)
Deprecated. |
void |
updateLocation(Location location)
Deprecated. |
void |
updateMimeType(MimeType mimeType)
Deprecated. use ObsService.saveMimeType(MimeType) |
void |
updatePatientIdentifierType(PatientIdentifierType patientIdentifierType)
Deprecated. replaced by PatientService.savePatientIdentifierType(PatientIdentifierType) |
void |
updatePrivilege(Privilege privilege)
Deprecated. |
void |
updateReport(Report report)
Update Report |
void |
updateReportObject(AbstractReportObject reportObject)
Update Report Object |
void |
updateRole(Role role)
Deprecated. |
void |
updateTribe(Tribe tribe)
Update Tribe |
| 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 |
| Field Detail |
|---|
protected org.apache.commons.logging.Log log
protected AdministrationDAO dao
protected java.util.SortedMap<java.lang.String,java.lang.String> systemVariables
| Constructor Detail |
|---|
public AdministrationServiceImpl()
| Method Detail |
|---|
public void setAdministrationDAO(AdministrationDAO dao)
AdministrationService
setAdministrationDAO in interface AdministrationServicedao - The dao implementation to useAdministrationService.setAdministrationDAO(org.openmrs.api.db.AdministrationDAO)public void setEventListeners(EventListeners eventListeners)
public void createEncounterType(EncounterType encounterType)
throws APIException
createEncounterType in interface AdministrationServiceAPIExceptionAdministrationService.createEncounterType(org.openmrs.EncounterType)
public void updateEncounterType(EncounterType encounterType)
throws APIException
updateEncounterType in interface AdministrationServiceAPIExceptionAdministrationService.updateEncounterType(org.openmrs.EncounterType)
public void deleteEncounterType(EncounterType encounterType)
throws APIException
deleteEncounterType in interface AdministrationServiceAPIExceptionAdministrationService.deleteEncounterType(org.openmrs.EncounterType)
public void createPatientIdentifierType(PatientIdentifierType patientIdentifierType)
throws APIException
PatientService.savePatientIdentifierType(PatientIdentifierType)
createPatientIdentifierType in interface AdministrationServiceAPIExceptionPatientService.savePatientIdentifierType(PatientIdentifierType)
public void updatePatientIdentifierType(PatientIdentifierType patientIdentifierType)
throws APIException
PatientService.savePatientIdentifierType(PatientIdentifierType)
updatePatientIdentifierType in interface AdministrationServiceAPIExceptionPatientService.savePatientIdentifierType(PatientIdentifierType)
public void deletePatientIdentifierType(PatientIdentifierType patientIdentifierType)
throws APIException
PatientService.purgePatientIdentifierType(PatientIdentifierType)
deletePatientIdentifierType in interface AdministrationServiceAPIExceptionPatientService.purgePatientIdentifierType(PatientIdentifierType)
public void createTribe(Tribe tribe)
throws APIException
createTribe in interface AdministrationServiceTribe - to create
APIException
public void updateTribe(Tribe tribe)
throws APIException
updateTribe in interface AdministrationServiceTribe - to update
APIException
public void deleteTribe(Tribe tribe)
throws APIException
deleteTribe in interface AdministrationServiceTribe - to delete
APIException
public void retireTribe(Tribe tribe)
throws APIException
retireTribe in interface AdministrationServiceTribe - to retire
APIException
public void unretireTribe(Tribe tribe)
throws APIException
unretireTribe in interface AdministrationServiceTribe - to unretire
APIException
public void createFieldType(FieldType fieldType)
throws APIException
createFieldType in interface AdministrationServiceAPIException
public void updateFieldType(FieldType fieldType)
throws APIException
updateFieldType in interface AdministrationServiceAPIException
public void deleteFieldType(FieldType fieldType)
throws APIException
deleteFieldType in interface AdministrationServiceAPIException
public void createMimeType(MimeType mimeType)
throws APIException
ObsService.saveMimeType(MimeType)
createMimeType in interface AdministrationServiceAPIException
public void updateMimeType(MimeType mimeType)
throws APIException
ObsService.saveMimeType(MimeType)
updateMimeType in interface AdministrationServiceAPIException
public void deleteMimeType(MimeType mimeType)
throws APIException
ObsService.purgeMimeType(MimeType)
deleteMimeType in interface AdministrationServiceAPIException
public void createLocation(Location location)
throws APIException
createLocation in interface AdministrationServiceAPIExceptionAdministrationService.createLocation(org.openmrs.Location)
public void updateLocation(Location location)
throws APIException
updateLocation in interface AdministrationServiceAPIExceptionAdministrationService.updateLocation(org.openmrs.Location)
public void deleteLocation(Location location)
throws APIException
deleteLocation in interface AdministrationServiceAPIExceptionAdministrationService.deleteLocation(org.openmrs.Location)
public void createRole(Role role)
throws APIException
createRole in interface AdministrationServiceAPIExceptionAdministrationService.createRole(org.openmrs.Role)
public void updateRole(Role role)
throws APIException
updateRole in interface AdministrationServiceAPIExceptionAdministrationService.updateRole(org.openmrs.Role)
public void deleteRole(Role role)
throws APIException
deleteRole in interface AdministrationServiceAPIExceptionAdministrationService.deleteRole(org.openmrs.Role)
public void createPrivilege(Privilege privilege)
throws APIException
createPrivilege in interface AdministrationServiceAPIExceptionAdministrationService.createPrivilege(org.openmrs.Privilege)
public void updatePrivilege(Privilege privilege)
throws APIException
updatePrivilege in interface AdministrationServiceAPIExceptionAdministrationService.updatePrivilege(org.openmrs.Privilege)
public void deletePrivilege(Privilege privilege)
throws APIException
deletePrivilege in interface AdministrationServiceAPIExceptionAdministrationService.deletePrivilege(org.openmrs.Privilege)
public void createConceptClass(ConceptClass cc)
throws APIException
AdministrationService
createConceptClass in interface AdministrationServiceAPIException
public void updateConceptClass(ConceptClass cc)
throws APIException
AdministrationService
updateConceptClass in interface AdministrationServiceAPIException
public void deleteConceptClass(ConceptClass cc)
throws APIException
AdministrationService
deleteConceptClass in interface AdministrationServiceAPIException
public void createConceptDatatype(ConceptDatatype cd)
throws APIException
AdministrationService
createConceptDatatype in interface AdministrationServiceAPIException
public void updateConceptDatatype(ConceptDatatype cd)
throws APIException
AdministrationService
updateConceptDatatype in interface AdministrationServiceAPIException
public void deleteConceptDatatype(ConceptDatatype cd)
throws APIException
AdministrationService
deleteConceptDatatype in interface AdministrationServiceAPIException
public void createReport(Report report)
throws APIException
createReport in interface AdministrationServiceReport - to create
APIException
public void updateReport(Report report)
throws APIException
updateReport in interface AdministrationServiceReport - to update
APIException
public void deleteReport(Report report)
throws APIException
deleteReport in interface AdministrationServiceReport - to delete
APIException
public void createReportObject(AbstractReportObject reportObject)
throws APIException
createReportObject in interface AdministrationServiceReport - Object to create
APIException
public void updateReportObject(AbstractReportObject reportObject)
throws APIException
updateReportObject in interface AdministrationServiceReport - Object to update
APIException
public void deleteReportObject(java.lang.Integer reportObjectId)
throws APIException
deleteReportObject in interface AdministrationServiceReport - Object to delete
APIException
public void updateConceptWord(Concept concept)
throws APIException
AdministrationService
updateConceptWord in interface AdministrationServiceAPIException
public void updateConceptWords()
throws APIException
AdministrationService
updateConceptWords in interface AdministrationServiceAPIException
public void updateConceptWords(java.lang.Integer conceptIdStart,
java.lang.Integer conceptIdEnd)
throws APIException
AdministrationServiceconceptIdStart
and conceptIdEnd (inclusive) calling updateConceptWord(concept)
updateConceptWords in interface AdministrationServiceAPIException
public void updateConceptSetDerived(Concept concept)
throws APIException
AdministrationService
updateConceptSetDerived in interface AdministrationServiceAPIException
public void updateConceptSetDerived()
throws APIException
AdministrationService
updateConceptSetDerived in interface AdministrationServiceAPIException
public void createConceptProposal(ConceptProposal cp)
throws APIException
AdministrationService
createConceptProposal in interface AdministrationServiceAPIException
public void updateConceptProposal(ConceptProposal cp)
throws APIException
AdministrationService
updateConceptProposal in interface AdministrationServiceAPIException
public void mapConceptProposalToConcept(ConceptProposal cp,
Concept mappedConcept)
throws APIException
AdministrationService
mapConceptProposalToConcept in interface AdministrationServiceAPIExceptionpublic void rejectConceptProposal(ConceptProposal cp)
AdministrationService
rejectConceptProposal in interface AdministrationServiceAdministrationService.rejectConceptProposal(org.openmrs.ConceptProposal)
public void mrnGeneratorLog(java.lang.String site,
java.lang.Integer start,
java.lang.Integer count)
throws APIException
AdministrationService
mrnGeneratorLog in interface AdministrationServiceAPIExceptionAdministrationService.mrnGeneratorLog(java.lang.String, java.lang.Integer, java.lang.Integer)
public java.util.Collection<?> getMRNGeneratorLog()
throws APIException
AdministrationService
getMRNGeneratorLog in interface AdministrationServiceAPIExceptionAdministrationService.getMRNGeneratorLog()
public java.util.SortedMap<java.lang.String,java.lang.String> getSystemVariables()
throws APIException
AdministrationService
getSystemVariables in interface AdministrationServiceAPIExceptionAdministrationService.getSystemVariables()
public java.lang.String getGlobalProperty(java.lang.String propertyName)
throws APIException
AdministrationServicepropertyName
If propertyName is not found in the list of Global Properties
currently in the database, a null value is returned
This method should not have any authorization check
getGlobalProperty in interface AdministrationServicepropertyName - property key to look for
APIExceptionAdministrationService.getGlobalProperty(java.lang.String)
public java.lang.String getGlobalProperty(java.lang.String propertyName,
java.lang.String defaultValue)
throws APIException
AdministrationServicepropertyName
If propertyName is not found in the list of Global Properties
currently in the database, a defaultValue is returned
This method should not have any authorization check
getGlobalProperty in interface AdministrationServicepropertyName - property key to look fordefaultValue - value to return if propertyName is not found
APIExceptionAdministrationService.getGlobalProperty(java.lang.String, java.lang.String)
public java.util.List<GlobalProperty> getGlobalProperties()
throws APIException
getGlobalProperties in interface AdministrationServiceAPIExceptionAdministrationService.getGlobalProperties()
public void setGlobalProperties(java.util.List<GlobalProperty> props)
throws APIException
setGlobalProperties in interface AdministrationServiceAPIExceptionAdministrationService.setGlobalProperties(java.util.List)
public void deleteGlobalProperty(java.lang.String propertyName)
throws APIException
AdministrationServicepurgeGlobalProperty(new GlobalProperty(propertyName));
deleteGlobalProperty in interface AdministrationServiceAPIExceptionAdministrationService.deleteGlobalProperty(java.lang.String)
public void setGlobalProperty(java.lang.String propertyName,
java.lang.String propertyValue)
throws APIException
AdministrationServicepurgeGlobalProperty(new GlobalProperty(propertyName, propertyValue));
setGlobalProperty in interface AdministrationServiceAPIExceptionAdministrationService.setGlobalProperty(java.lang.String, java.lang.String)
public void setGlobalProperty(GlobalProperty gp)
throws APIException
setGlobalProperty in interface AdministrationServiceAPIExceptionAdministrationService.setGlobalProperty(org.openmrs.GlobalProperty)public void addGlobalProperty(GlobalProperty gp)
addGlobalProperty in interface AdministrationServiceAdministrationService.addGlobalProperty(org.openmrs.GlobalProperty)
public void addGlobalProperty(java.lang.String propertyName,
java.lang.String propertyValue)
throws APIException
addGlobalProperty in interface AdministrationServiceAPIExceptionAdministrationService.addGlobalProperty(java.lang.String, java.lang.String)
public java.util.List<GlobalProperty> getAllGlobalProperties()
throws APIException
AdministrationService
getAllGlobalProperties in interface AdministrationServiceAPIExceptionAdministrationService.getAllGlobalProperties()
public void purgeGlobalProperty(GlobalProperty globalProperty)
throws APIException
AdministrationService
purgeGlobalProperty in interface AdministrationServiceglobalProperty - the global property to delete/remove from the database
APIExceptionAdministrationService.purgeGlobalProperty(org.openmrs.GlobalProperty)
public java.util.List<GlobalProperty> saveGlobalProperties(java.util.List<GlobalProperty> props)
throws APIException
AdministrationService
saveGlobalProperties in interface AdministrationServiceprops - GlobalProperty objects to save
APIExceptionAdministrationService.saveGlobalProperties(java.util.List)
public GlobalProperty saveGlobalProperty(GlobalProperty gp)
throws APIException
AdministrationService
saveGlobalProperty in interface AdministrationServicegp - global property to save
APIExceptionAdministrationService.saveGlobalProperty(org.openmrs.GlobalProperty)
public java.util.List<DataEntryStatistic> getDataEntryStatistics(java.util.Date fromDate,
java.util.Date toDate,
java.lang.String encounterUserColumn,
java.lang.String orderUserColumn,
java.lang.String groupBy)
throws APIException
AdministrationServicefromDate to toDate
EncounterUserColumn is a column in the encounter table like creator, provider, etc
(defaults to creator)
EncounterUserColumn is a column in the encounter table like creator, orderer, etc
(defaults to orderer)
getDataEntryStatistics in interface AdministrationServicegroupBy - (optional)
APIExceptionAdministrationService.getDataEntryStatistics(java.util.Date, java.util.Date, java.lang