@Deprecated public class DataExportFunctions extends Object
Constructor and Description |
---|
DataExportFunctions()
Deprecated.
|
DataExportFunctions(Integer patientId)
Deprecated.
|
DataExportFunctions(Patient p)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
int |
calculateAge(Date birthdate)
Deprecated.
Get the person's birthdate as of today
|
int |
calculateYearsBetween(Date fromDate,
Date toDate)
Deprecated.
Calculate the years between two dates (age).
|
void |
clear()
Deprecated.
|
protected void |
finalize()
Deprecated.
Called when garbage collecting this class
|
String |
formatDate(String type,
Date d)
Deprecated.
Format the given date according to the type ('short', 'long', 'ymd')
|
protected void |
garbageCollect()
Deprecated.
Call the system garbage collecter.
|
Calendar |
getCalendarInstance()
Deprecated.
Get a calendar instance for use in velocity scripts.
|
String |
getCohortDefinitionMembership(Integer filterId,
String valueIfTrue,
String valueIfFalse)
Deprecated.
|
protected Boolean |
getCohortHelper(String key)
Deprecated.
|
String |
getCohortMembership(Integer cohortId,
String valueIfTrue,
String valueIfFalse)
Deprecated.
|
Concept |
getConcept(String conceptName)
Deprecated.
|
String |
getCurrentDrugNames(String drugSetName)
Deprecated.
|
List<DrugOrder> |
getCurrentDrugOrders(String drugSetName)
Deprecated.
|
List<DrugOrder> |
getDrugOrders(String drugSetName)
Deprecated.
|
Date |
getEarliestDrugStart(String drugSetName)
Deprecated.
|
Encounter |
getFirstEncounter(String encounterType)
Deprecated.
|
Object |
getFirstEncounterAttr(Object typeArray,
String attr)
Deprecated.
Get an attribute (encounterDatetime, provider, etc) from the oldest encounter.
|
List<List<Object>> |
getFirstNObsWithValues(Integer n,
Concept concept,
List<String> attrs)
Deprecated.
Get the first occurrences of matching
obs.concept out of the patient's
encounters |
List<List<Object>> |
getFirstNObsWithValues(Integer n,
String conceptId,
Object attrs)
Deprecated.
Convenience method for other getFirstNObsWithValues method
|
Object |
getFirstObs(Concept concept)
Deprecated.
Get the first occurrence of matching
obs.concept out of the patient's encounters |
Object |
getFirstObs(String conceptName)
Deprecated.
Get the first occurrence of matching
obs.concept out of the patient's encounters |
List<Object> |
getFirstObsWithValues(Concept concept,
List<String> attrs)
Deprecated.
Get the first occurence of matching
obs.concept out of the patient's encounters |
List<Object> |
getFirstObsWithValues(String conceptName,
Object attrs)
Deprecated.
Get the first occurrence of matching
obs.concept out of the patient's encounters |
Encounter |
getLastEncounter(String encounterType)
Deprecated.
|
Object |
getLastEncounterAttr(Object typeArray,
String attr)
Deprecated.
Get the attribute (encounterDatetime, provider, encounterType, etc) from the most recent
encounter.
|
List<Object> |
getLastNObs(Integer n,
Concept concept)
Deprecated.
Gets Observations from the last encounter
|
List<Object> |
getLastNObs(Integer n,
String conceptName)
Deprecated.
Gets the last
n obs for conceptName |
List<List<Object>> |
getLastNObsWithValues(Integer n,
Concept concept,
List<String> attrs)
Deprecated.
Gets the most recent observation value
|
List<List<Object>> |
getLastNObsWithValues(Integer n,
String conceptId,
Object attrs)
Deprecated.
|
Object |
getLastObs(Concept concept)
Deprecated.
Get the most recent obs matching
concept out of the patient's encounters |
Object |
getLastObs(String conceptName)
Deprecated.
Gets the most recent Observation matching this concept
|
List<Object> |
getLastObsWithValues(Concept concept,
List<String> attrs)
Deprecated.
Get the most recent obs matching
concept out of the patient's encounters |
List<Object> |
getLastObsWithValues(String conceptName,
Object attrs)
Deprecated.
Gets the most recent Observation value matching this concept
|
List<List<Object>> |
getObsWithValues(Concept c,
List<String> attrs)
Deprecated.
|
Patient |
getPatient()
Deprecated.
|
Object |
getPatientAttr(String className,
String property)
Deprecated.
Retrieves properties on the patient like patient.patientName.familyName
|
Object |
getPatientAttr(String className,
String property,
boolean returnAll)
Deprecated.
Retrieves properties on the patient like patient.patientName.familyName
|
Integer |
getPatientId()
Deprecated.
|
Object |
getPatientIdentifier(String typeName)
Deprecated.
Retrieves a patient identifier based on the given identifier type.
|
String |
getPatientSearchMembership(Integer searchId,
String valueIfTrue,
String valueIfFalse)
Deprecated.
|
Cohort |
getPatientSet()
Deprecated.
|
Cohort |
getPatientSetIfNotAllPatients()
Deprecated.
Returns the patient set only if it is a subset of all patients.
|
Object |
getPersonAttribute(String attributeName)
Deprecated.
|
Object |
getPersonAttribute(String attributeName,
String joinClass,
String joinProperty,
String outputColumn,
boolean returnAll)
Deprecated.
|
PatientProgram |
getProgram(String programIdOrName)
Deprecated.
Gets a patient program given a program ID or program name.
|
String |
getRelationshipIdentifiers(String relationshipTypeName)
Deprecated.
|
String |
getRelationshipIds(String relationshipTypeName)
Deprecated.
|
String |
getRelationshipNames(String relationshipTypeName)
Deprecated.
|
List<Relationship> |
getRelationships(String relationshipTypeName)
Deprecated.
|
String |
getSeparator()
Deprecated.
|
String |
getValueAsString(Object o)
Deprecated.
|
Integer |
hashCode(Object o)
Deprecated.
|
boolean |
isAllPatients()
Deprecated.
|
boolean |
isValidCheckDigit(String id)
Deprecated.
Check the given string against the check digit algorithm
|
void |
setAllPatients(boolean isAllPatients)
Deprecated.
|
void |
setPatient(Patient patient)
Deprecated.
|
void |
setPatientId(Integer patientId)
Deprecated.
|
void |
setPatientSet(Cohort patientSet)
Deprecated.
|
void |
setSeparator(String separator)
Deprecated.
|
public final org.apache.commons.logging.Log log
protected Integer patientId
protected Patient patient
protected Cohort patientSet
protected boolean isAllPatients
protected String separator
protected DateFormat dateFormatLong
protected DateFormat dateFormatShort
protected DateFormat dateFormatYmd
protected Map<String,DateFormat> formats
public Date currentDate
protected Calendar calendar
protected Map<String,Map<Integer,PatientIdentifier>> patientIdentifierMap
protected Map<String,Map<Integer,List<List<Object>>>> conceptAttrObsMap
protected Map<String,Map<Integer,PatientProgram>> programMap
protected Map<String,Map<Integer,List<DrugOrder>>> currentDrugOrderMap
protected Map<String,Collection<Integer>> cohortMap
protected PatientSetService patientSetService
protected PatientService patientService
protected ConceptService conceptService
protected EncounterService encounterService
protected Locale locale
public DataExportFunctions(Patient p)
public DataExportFunctions(Integer patientId)
public DataExportFunctions()
public void clear()
protected void finalize() throws Throwable
finalize
in class Object
Throwable
Object.finalize()
public Patient getPatient()
public void setPatient(Patient patient)
patient
- The patient to set.public Integer getPatientId()
public void setPatientId(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 String getSeparator()
public void setSeparator(String separator)
separator
- The separator to set.public String getCohortMembership(Integer cohortId, String valueIfTrue, String valueIfFalse)
public String getCohortDefinitionMembership(Integer filterId, String valueIfTrue, String valueIfFalse)
public String getPatientSearchMembership(Integer searchId, String valueIfTrue, String valueIfFalse)
public Encounter getLastEncounter(String encounterType)
encounterType
- encounterType
public Object getLastEncounterAttr(Object typeArray, String attr)
typeArray
- attr
- public Encounter getFirstEncounter(String encounterType)
encounterType
- encounterType
public Object getFirstEncounterAttr(Object typeArray, String attr)
typeArray
- attr
- public Concept getConcept(String conceptName) throws Exception
Exception
public List<List<Object>> getObsWithValues(Concept c, List<String> attrs)
public PatientProgram getProgram(String programIdOrName)
programIdOrName
- the identifier or name of the programpublic List<Relationship> getRelationships(String relationshipTypeName)
public String getRelationshipIdentifiers(String relationshipTypeName)
public Object getPatientAttr(String className, String property)
className
- property
- public Object getPatientAttr(String className, 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 Object getPersonAttribute(String attributeName, String joinClass, String joinProperty, String outputColumn, boolean returnAll)
public List<Object> getLastNObs(Integer n, String conceptName) throws Exception
n
obs for conceptName
n
- max number of obs to returnconceptName
- Exception
public List<Object> getLastNObs(Integer n, Concept concept) throws Exception
n
- max number of obs to returnconcept
- Exception
public List<List<Object>> getLastNObsWithValues(Integer n, String conceptId, Object attrs) throws Exception
Exception
public List<List<Object>> getLastNObsWithValues(Integer n, Concept concept, List<String> attrs) throws Exception
n
- max number of obs to returnconcept
- attrs
- Exception
public Object getLastObs(String conceptName) throws Exception
conceptName
- Exception
public List<Object> getLastObsWithValues(String conceptName, Object attrs) throws Exception
conceptName
- attrs
- string arrayException
public Object getLastObs(Concept concept) throws Exception
concept
out of the patient's encountersconcept
- Exception
public List<Object> getLastObsWithValues(Concept concept, List<String> attrs) throws Exception
concept
out of the patient's encountersconcept
- attrs
- list of Strings like provider, encounterDatetime, etcException
public Object getFirstObs(String conceptName) throws Exception
obs.concept
out of the patient's encountersconceptName
- Exception
public Object getFirstObs(Concept concept) throws Exception
obs.concept
out of the patient's encountersconcept
- Exception
public List<Object> getFirstObsWithValues(String conceptName, Object attrs) throws Exception
obs.concept
out of the patient's encountersconceptName
- Exception
public List<Object> getFirstObsWithValues(Concept concept, List<String> attrs) throws Exception
obs.concept
out of the patient's encountersconcept
- attrs
- the List of attributes to fetchException
public List<List<Object>> getFirstNObsWithValues(Integer n, Concept concept, List<String> attrs) throws Exception
obs.concept
out of the patient's
encountersconcept
- the Concept of the obs to fetchn
- number of obs to getattrs
- the Extra obs attributes to get along with this obs valueException
public List<List<Object>> getFirstNObsWithValues(Integer n, String conceptId, Object attrs) throws Exception
Exception
getFirstNObsWithValues(Integer, Concept, List)
public Object getPatientIdentifier(String typeName)
typeName
- public int calculateYearsBetween(Date fromDate, Date toDate)
fromDate
- toDate
- public int calculateAge(Date birthdate)
birthdate
- the person's date of birthpublic String formatDate(String type, Date d)
type
- format to used
- Date to formatpublic Calendar getCalendarInstance()
public boolean isValidCheckDigit(String id)
id
- public Cohort getPatientSetIfNotAllPatients()
Copyright © 2018 OpenMRS LLC.. All Rights Reserved.