|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openmrs.reporting.export.DataExportFunctions
@Deprecated public class DataExportFunctions
Field Summary | |
---|---|
protected java.util.Calendar |
calendar
Deprecated. |
protected java.util.Map<java.lang.String,java.util.Collection<java.lang.Integer>> |
cohortMap
Deprecated. |
protected java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,java.util.List<java.util.List<java.lang.Object>>>> |
conceptAttrObsMap
Deprecated. |
protected java.util.Map<java.lang.String,Concept> |
conceptNameMap
Deprecated. |
protected ConceptService |
conceptService
Deprecated. |
java.util.Date |
currentDate
Deprecated. |
protected java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,java.util.List<DrugOrder>>> |
currentDrugOrderMap
Deprecated. |
protected java.text.DateFormat |
dateFormatLong
Deprecated. |
protected java.text.DateFormat |
dateFormatShort
Deprecated. |
protected java.text.DateFormat |
dateFormatYmd
Deprecated. |
protected java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,java.util.List<DrugOrder>>> |
drugOrderMap
Deprecated. |
protected EncounterService |
encounterService
Deprecated. |
protected java.util.Map<java.lang.String,java.text.DateFormat> |
formats
Deprecated. |
protected boolean |
isAllPatients
Deprecated. |
protected java.util.Locale |
locale
Deprecated. |
org.apache.commons.logging.Log |
log
Deprecated. |
protected Patient |
patient
Deprecated. |
protected java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,java.lang.Object>> |
patientAttributeMap
Deprecated. |
protected java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,?>> |
patientEncounterMap
Deprecated. |
protected java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,?>> |
patientFirstEncounterMap
Deprecated. |
protected java.lang.Integer |
patientId
Deprecated. |
protected java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,PatientIdentifier>> |
patientIdentifierMap
Deprecated. |
protected PatientService |
patientService
Deprecated. |
protected Cohort |
patientSet
Deprecated. |
protected PatientSetService |
patientSetService
Deprecated. |
protected java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,java.lang.Object>> |
personAttributeMap
Deprecated. |
protected java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,PatientProgram>> |
programMap
Deprecated. |
protected java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,java.util.List<Relationship>>> |
relationshipMap
Deprecated. |
protected java.lang.String |
separator
Deprecated. |
Constructor Summary | |
---|---|
DataExportFunctions()
Deprecated. |
|
DataExportFunctions(java.lang.Integer patientId)
Deprecated. |
|
DataExportFunctions(Patient p)
Deprecated. |
Method Summary | |
---|---|
int |
calculateAge(java.util.Date birthdate)
Deprecated. Get the person's birthdate as of today |
int |
calculateYearsBetween(java.util.Date fromDate,
java.util.Date toDate)
Deprecated. Calculate the years between two dates (age). |
void |
clear()
Deprecated. |
protected void |
finalize()
Deprecated. Called when garbage collecting this class |
java.lang.String |
formatDate(java.lang.String type,
java.util.Date d)
Deprecated. Format the given date according to the type ('short', 'long', 'ymd') |
protected void |
garbageCollect()
Deprecated. Call the system garbage collecter. |
java.util.Calendar |
getCalendarInstance()
Deprecated. Get a calendar instance for use in velocity scripts. |
java.lang.String |
getCohortDefinitionMembership(java.lang.Integer filterId,
java.lang.String valueIfTrue,
java.lang.String valueIfFalse)
Deprecated. |
protected java.lang.Boolean |
getCohortHelper(java.lang.String key)
Deprecated. |
java.lang.String |
getCohortMembership(java.lang.Integer cohortId,
java.lang.String valueIfTrue,
java.lang.String valueIfFalse)
Deprecated. |
Concept |
getConcept(java.lang.String conceptName)
Deprecated. |
java.lang.String |
getCurrentDrugNames(java.lang.String drugSetName)
Deprecated. |
java.util.List<DrugOrder> |
getCurrentDrugOrders(java.lang.String drugSetName)
Deprecated. |
java.util.List<DrugOrder> |
getDrugOrders(java.lang.String drugSetName)
Deprecated. |
java.util.Date |
getEarliestDrugStart(java.lang.String drugSetName)
Deprecated. |
Encounter |
getFirstEncounter(java.lang.String encounterType)
Deprecated. |
java.lang.Object |
getFirstEncounterAttr(java.lang.Object typeArray,
java.lang.String attr)
Deprecated. Get an attribute (encounterDatetime, provider, etc) from the oldest encounter. |
java.util.List<java.util.List<java.lang.Object>> |
getFirstNObsWithValues(java.lang.Integer n,
Concept concept,
java.util.List<java.lang.String> attrs)
Deprecated. Get the first occurrences of matching obs.concept out of the patient's
encounters |
java.util.List<java.util.List<java.lang.Object>> |
getFirstNObsWithValues(java.lang.Integer n,
java.lang.String conceptId,
java.lang.Object attrs)
Deprecated. Convenience method for other getFirstNObsWithValues method |
java.lang.Object |
getFirstObs(Concept concept)
Deprecated. Get the first occurrence of matching obs.concept out of the patient's encounters |
java.lang.Object |
getFirstObs(java.lang.String conceptName)
Deprecated. Get the first occurrence of matching obs.concept out of the patient's encounters |
java.util.List<java.lang.Object> |
getFirstObsWithValues(Concept concept,
java.util.List<java.lang.String> attrs)
Deprecated. Get the first occurence of matching obs.concept out of the patient's encounters |
java.util.List<java.lang.Object> |
getFirstObsWithValues(java.lang.String conceptName,
java.lang.Object attrs)
Deprecated. Get the first occurrence of matching obs.concept out of the patient's encounters |
Encounter |
getLastEncounter(java.lang.String encounterType)
Deprecated. |
java.lang.Object |
getLastEncounterAttr(java.lang.Object typeArray,
java.lang.String attr)
Deprecated. Get the attribute (encounterDatetime, provider, encounterType, etc) from the most recent encounter. |
java.util.List<java.lang.Object> |
getLastNObs(java.lang.Integer n,
Concept concept)
Deprecated. Gets Observations from the last encounter |
java.util.List<java.lang.Object> |
getLastNObs(java.lang.Integer n,
java.lang.String conceptName)
Deprecated. Gets the last n obs for conceptName |
java.util.List<java.util.List<java.lang.Object>> |
getLastNObsWithValues(java.lang.Integer n,
Concept concept,
java.util.List<java.lang.String> attrs)
Deprecated. Gets the most recent observation value |
java.util.List<java.util.List<java.lang.Object>> |
getLastNObsWithValues(java.lang.Integer n,
java.lang.String conceptId,
java.lang.Object attrs)
Deprecated. |
java.lang.Object |
getLastObs(Concept concept)
Deprecated. Get the most recent obs matching concept out of the patient's encounters |
java.lang.Object |
getLastObs(java.lang.String conceptName)
Deprecated. Gets the most recent Observation matching this concept |
java.util.List<java.lang.Object> |
getLastObsWithValues(Concept concept,
java.util.List<java.lang.String> attrs)
Deprecated. Get the most recent obs matching concept out of the patient's encounters |
java.util.List<java.lang.Object> |
getLastObsWithValues(java.lang.String conceptName,
java.lang.Object attrs)
Deprecated. Gets the most recent Observation value matching this concept |
java.util.List<java.util.List<java.lang.Object>> |
getObsWithValues(Concept c,
java.util.List<java.lang.String> attrs)
Deprecated. |
Patient |
getPatient()
Deprecated. |
java.lang.Object |
getPatientAttr(java.lang.String className,
java.lang.String property)
Deprecated. Retrieves properties on the patient like patient.patientName.familyName |
java.lang.Object |
getPatientAttr(java.lang.String className,
java.lang.String property,
boolean returnAll)
Deprecated. Retrieves properties on the patient like patient.patientName.familyName |
java.lang.Integer |
getPatientId()
Deprecated. |
java.lang.Object |
getPatientIdentifier(java.lang.String typeName)
Deprecated. Retrieves a patient identifier based on the given identifier type. |
java.lang.String |
getPatientSearchMembership(java.lang.Integer searchId,
java.lang.String valueIfTrue,
java.lang.String valueIfFalse)
Deprecated. |
Cohort |
getPatientSet()
Deprecated. |
Cohort |
getPatientSetIfNotAllPatients()
Deprecated. Returns the patient set only if it is a subset of all patients. |
java.lang.Object |
getPersonAttribute(java.lang.String attributeName)
Deprecated. |
java.lang.Object |
getPersonAttribute(java.lang.String attributeName,
java.lang.String joinClass,
java.lang.String joinProperty,
java.lang.String outputColumn,
boolean returnAll)
Deprecated. |
PatientProgram |
getProgram(java.lang.String programIdOrName)
Deprecated. Gets a patient program given a program ID or program name. |
java.lang.String |
getRelationshipIdentifiers(java.lang.String relationshipTypeName)
Deprecated. |
java.lang.String |
getRelationshipIds(java.lang.String relationshipTypeName)
Deprecated. |
java.lang.String |
getRelationshipNames(java.lang.String relationshipTypeName)
Deprecated. |
java.util.List<Relationship> |
getRelationships(java.lang.String relationshipTypeName)
Deprecated. |
java.lang.String |
getSeparator()
Deprecated. |
java.lang.String |
getValueAsString(java.lang.Object o)
Deprecated. |
java.lang.Integer |
hashCode(java.lang.Object o)
Deprecated. |
boolean |
isAllPatients()
Deprecated. |
boolean |
isValidCheckDigit(java.lang.String id)
Deprecated. Check the given string against the check digit algorithm |
void |
setAllPatients(boolean isAllPatients)
Deprecated. |
void |
setPatient(Patient patient)
Deprecated. |
void |
setPatientId(java.lang.Integer patientId)
Deprecated. |
void |
setPatientSet(Cohort patientSet)
Deprecated. |
void |
setSeparator(java.lang.String separator)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final org.apache.commons.logging.Log log
protected java.lang.Integer patientId
protected Patient patient
protected Cohort patientSet
protected boolean isAllPatients
protected java.lang.String separator
protected java.text.DateFormat dateFormatLong
protected java.text.DateFormat dateFormatShort
protected java.text.DateFormat dateFormatYmd
protected java.util.Map<java.lang.String,java.text.DateFormat> formats
public java.util.Date currentDate
protected java.util.Calendar calendar
protected java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,?>> patientEncounterMap
protected java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,PatientIdentifier>> patientIdentifierMap
protected java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,?>> patientFirstEncounterMap
protected java.util.Map<java.lang.String,Concept> conceptNameMap
protected java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,java.util.List<java.util.List<java.lang.Object>>>> conceptAttrObsMap
protected java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,java.util.List<Relationship>>> relationshipMap
protected java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,PatientProgram>> programMap
protected java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,java.util.List<DrugOrder>>> drugOrderMap
protected java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,java.util.List<DrugOrder>>> currentDrugOrderMap
protected java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,java.lang.Object>> patientAttributeMap
protected java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,java.lang.Object>> personAttributeMap
protected java.util.Map<java.lang.String,java.util.Collection<java.lang.Integer>> cohortMap
protected PatientSetService patientSetService
protected PatientService patientService
protected ConceptService conceptService
protected EncounterService encounterService
protected java.util.Locale locale
Constructor Detail |
---|
public DataExportFunctions(Patient p)
public DataExportFunctions(java.lang.Integer patientId)
public DataExportFunctions()
Method Detail |
---|
public void clear()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
Object.finalize()
public Patient getPatient()
public void setPatient(Patient patient)
patient
- The patient to set.public java.lang.Integer getPatientId()
public void setPatientId(java.lang.Integer patientId)
protected void garbageCollect()
public Cohort getPatientSet()
public void setPatientSet(Cohort patientSet)
patientSet
- The patientSet to set.public boolean isAllPatients()
public void setAllPatients(boolean isAllPatients)
isAllPatients
- the isAllPatients to setpublic java.lang.String getSeparator()
public void setSeparator(java.lang.String separator)
separator
- The separator to set.public java.lang.String getCohortMembership(java.lang.Integer cohortId, java.lang.String valueIfTrue, java.lang.String valueIfFalse)
public java.lang.String getCohortDefinitionMembership(java.lang.Integer filterId, java.lang.String valueIfTrue, java.lang.String valueIfFalse)
public java.lang.String getPatientSearchMembership(java.lang.Integer searchId, java.lang.String valueIfTrue, java.lang.String valueIfFalse)
protected java.lang.Boolean getCohortHelper(java.lang.String key)
public Encounter getLastEncounter(java.lang.String encounterType)
encounterType
-
encounterType
public java.lang.Object getLastEncounterAttr(java.lang.Object typeArray, java.lang.String attr)
typeArray
- attr
-
public Encounter getFirstEncounter(java.lang.String encounterType)
encounterType
-
encounterType
public java.lang.Object getFirstEncounterAttr(java.lang.Object typeArray, java.lang.String attr)
typeArray
- attr
-
public Concept getConcept(java.lang.String conceptName) throws java.lang.Exception
java.lang.Exception
public java.util.List<java.util.List<java.lang.Object>> getObsWithValues(Concept c, java.util.List<java.lang.String> attrs)
public PatientProgram getProgram(java.lang.String programIdOrName)
programIdOrName
- the identifier or name of the program
public java.util.List<DrugOrder> getCurrentDrugOrders(java.lang.String drugSetName)
public java.lang.String getCurrentDrugNames(java.lang.String drugSetName)
public java.util.List<DrugOrder> getDrugOrders(java.lang.String drugSetName)
public java.util.Date getEarliestDrugStart(java.lang.String drugSetName)
public java.util.List<Relationship> getRelationships(java.lang.String relationshipTypeName)
public java.lang.String getRelationshipNames(java.lang.String relationshipTypeName)
public java.lang.String getRelationshipIds(java.lang.String relationshipTypeName)
public java.lang.String getRelationshipIdentifiers(java.lang.String relationshipTypeName)
public java.lang.Object getPatientAttr(java.lang.String className, java.lang.String property)
className
- property
-
public java.lang.Object getPatientAttr(java.lang.String className, java.lang.String property, boolean returnAll)
If returnAll is set, returns an array of every matching property for the patient instead of just the preferred one
className
- property
- returnAll
-
public java.lang.Object getPersonAttribute(java.lang.String attributeName, java.lang.String joinClass, java.lang.String joinProperty, java.lang.String outputColumn, boolean returnAll)
public java.lang.Object getPersonAttribute(java.lang.String attributeName)
public java.util.List<java.lang.Object> getLastNObs(java.lang.Integer n, java.lang.String conceptName) throws java.lang.Exception
n
obs for conceptName
n
- max number of obs to returnconceptName
-
public java.util.List<java.lang.Object> getLastNObs(java.lang.Integer n, Concept concept) throws java.lang.Exception
n
- max number of obs to returnconcept
-
public java.util.List<java.util.List<java.lang.Object>> getLastNObsWithValues(java.lang.Integer n, java.lang.String conceptId, java.lang.Object attrs) throws java.lang.Exception
java.lang.Exception
public java.util.List<java.util.List<java.lang.Object>> getLastNObsWithValues(java.lang.Integer n, Concept concept, java.util.List<java.lang.String> attrs) throws java.lang.Exception
n
- max number of obs to returnconcept
- attrs
-
java.lang.Exception
public java.lang.Object getLastObs(java.lang.String conceptName) throws java.lang.Exception
conceptName
-
java.lang.Exception
public java.util.List<java.lang.Object> getLastObsWithValues(java.lang.String conceptName, java.lang.Object attrs) throws java.lang.Exception
conceptName
- attrs
- string array
public java.lang.Object getLastObs(Concept concept) throws java.lang.Exception
concept
out of the patient's encounters
concept
-
java.lang.Exception
public java.util.List<java.lang.Object> getLastObsWithValues(Concept concept, java.util.List<java.lang.String> attrs) throws java.lang.Exception
concept
out of the patient's encounters
concept
- attrs
- list of Strings like provider, encounterDatetime, etc
public java.lang.Object getFirstObs(java.lang.String conceptName) throws java.lang.Exception
obs.concept
out of the patient's encounters
conceptName
-
java.lang.Exception
public java.lang.Object getFirstObs(Concept concept) throws java.lang.Exception
obs.concept
out of the patient's encounters
concept
-
java.lang.Exception
public java.util.List<java.lang.Object> getFirstObsWithValues(java.lang.String conceptName, java.lang.Object attrs) throws java.lang.Exception
obs.concept
out of the patient's encounters
conceptName
-
public java.util.List<java.lang.Object> getFirstObsWithValues(Concept concept, java.util.List<java.lang.String> attrs) throws java.lang.Exception
obs.concept
out of the patient's encounters
concept
- attrs
- the List of attributes to fetch
public java.util.List<java.util.List<java.lang.Object>> getFirstNObsWithValues(java.lang.Integer n, Concept concept, java.util.List<java.lang.String> attrs) throws java.lang.Exception
obs.concept
out of the patient's
encounters
concept
- the Concept of the obs to fetchn
- number of obs to getattrs
- the Extra obs attributes to get along with this obs value
java.lang.Exception
public java.util.List<java.util.List<java.lang.Object>> getFirstNObsWithValues(java.lang.Integer n, java.lang.String conceptId, java.lang.Object attrs) throws java.lang.Exception
java.lang.Exception
getFirstNObsWithValues(Integer, Concept, List)
public java.lang.Object getPatientIdentifier(java.lang.String typeName)
typeName
-
public int calculateYearsBetween(java.util.Date fromDate, java.util.Date toDate)
fromDate
- toDate
- public int calculateAge(java.util.Date birthdate)
birthdate
- the person's date of birth
public java.lang.String formatDate(java.lang.String type, java.util.Date d)
type
- format to used
- Date to format
public java.util.Calendar getCalendarInstance()
public boolean isValidCheckDigit(java.lang.String id)
id
-
public java.lang.Integer hashCode(java.lang.Object o)
public java.lang.String getValueAsString(java.lang.Object o)
public Cohort getPatientSetIfNotAllPatients()
|
OpenMRS-1.7.x | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |