public class DWRPatientService extends Object implements GlobalPropertyListener
PatientService| Constructor and Description | 
|---|
DWRPatientService()  | 
| Modifier and Type | Method and Description | 
|---|---|
String | 
addIdentifier(Integer patientId,
             String identifierType,
             String identifier,
             Integer identifierLocationId)  | 
String | 
changeHealthCenter(Integer patientId,
                  Integer locationId)  | 
String | 
exitPatientFromCare(Integer patientId,
                   Integer exitReasonId,
                   String exitDateStr,
                   Integer causeOfDeathConceptId,
                   String otherReason)  | 
Collection<Object> | 
findBatchOfPatients(String searchValue,
                   boolean includeVoided,
                   Integer start,
                   Integer length)
Search on the  
searchValue. | 
Map<String,Object> | 
findCountAndPatients(String searchValue,
                    Integer start,
                    Integer length,
                    boolean getMatchCount)
Returns a map of results with the values as count of matches and a partial list of the
 matching patients (depending on values of start and length parameters) while the keys are are
 'count' and 'objectList' respectively, if the length parameter is not specified, then all
 matches will be returned from the start index if specified. 
 | 
Map<String,Object> | 
findCountAndPatientsWithVoided(String searchValue,
                              Integer start,
                              Integer length,
                              boolean getMatchCount,
                              Boolean includeVoided)
Returns a map of results with the values as count of matches and a partial list of the
 matching patients (depending on values of start and length parameters) while the keys are are
 'count' and 'objectList' respectively, if the length parameter is not specified, then all
 matches will be returned from the start index if specified. 
 | 
Vector<Object> | 
findDuplicatePatients(String[] searchOn)
find all patients with duplicate attributes (searchOn) 
 | 
Collection<Object> | 
findPatients(String searchValue,
            boolean includeVoided)
Search on the  
searchValue. | 
PatientListItem | 
getPatient(Integer patientId)
Convenience method for dwr/javascript to convert a patient id into a Patient object (or at
 least into data about the patient) 
 | 
void | 
globalPropertyChanged(GlobalProperty newValue)
Called after a global property is created or updated 
 | 
void | 
globalPropertyDeleted(String propertyName)
Called after a global property is deleted 
 | 
static void | 
setMaximumResults(Integer maximumResults)  | 
boolean | 
supportsPropertyName(String propertyName)
Asks this listener whether it wants to be notified about the given property name 
 | 
public Collection<Object> findPatients(String searchValue, boolean includeVoided)
searchValue. If a number is in the search string, do an identifier
 search. Else, do a name searchsearchValue - string to be looked forincludeVoided - true/false whether or not to included voided patientspublic static void setMaximumResults(Integer maximumResults)
public Collection<Object> findBatchOfPatients(String searchValue, boolean includeVoided, Integer start, Integer length)
searchValue. If a number is in the search string, do an identifier
 search. Else, do a name searchsearchValue - string to be looked forincludeVoided - true/false whether or not to included voided patientsstart - The starting index for the results to returnlength - The number of results of returnPatientService.getPatients(String, String, List, boolean, Integer, Integer)public Map<String,Object> findCountAndPatientsWithVoided(String searchValue, Integer start, Integer length, boolean getMatchCount, Boolean includeVoided) throws APIException
searchValue - patient name or identifierincludeVoided - true/false whether or not to included voided patientsstart - the beginning indexlength - the number of matching patients to returngetMatchCount - Specifies if the count of matches should be included in the returned mapAPIExceptionpublic Map<String,Object> findCountAndPatients(String searchValue, Integer start, Integer length, boolean getMatchCount) throws APIException
searchValue - patient name or identifierstart - the beginning indexlength - the number of matching patients to returngetMatchCount - Specifies if the count of matches should be included in the returned mapAPIExceptionpublic PatientListItem getPatient(Integer patientId)
patientId - the Patient.getPatientId() to match onpublic Vector<Object> findDuplicatePatients(String[] searchOn)
searchOn - public String addIdentifier(Integer patientId, String identifierType, String identifier, Integer identifierLocationId)
patientId - identifierType - identifier - identifierLocationId - public String exitPatientFromCare(Integer patientId, Integer exitReasonId, String exitDateStr, Integer causeOfDeathConceptId, String otherReason)
patientId - exitReasonId - exitDateStr - causeOfDeathConceptId - otherReason - public String changeHealthCenter(Integer patientId, Integer locationId)
patientId - locationId - public boolean supportsPropertyName(String propertyName)
GlobalPropertyListenersupportsPropertyName in interface GlobalPropertyListenerpublic void globalPropertyChanged(GlobalProperty newValue)
GlobalPropertyListenerglobalPropertyChanged in interface GlobalPropertyListenernewValue - the new value of the property that was just savedpublic void globalPropertyDeleted(String propertyName)
GlobalPropertyListenerglobalPropertyDeleted in interface GlobalPropertyListenerpropertyName - the name of the property that was just deletedCopyright © 2015 OpenMRS Inc.. All rights reserved.