public interface LogicContext
| Modifier and Type | Method and Description | 
|---|---|
Result | 
eval(java.lang.Integer patientId,
    LogicCriteria criteria,
    java.util.Map<java.lang.String,java.lang.Object> parameters)
Evaluate a rule with criteria and parameters for a single patient 
 | 
Result | 
eval(java.lang.Integer patientId,
    java.lang.String token)
Evaluate a rule for a single patient 
 | 
Result | 
eval(java.lang.Integer patientId,
    java.lang.String token,
    java.util.Map<java.lang.String,java.lang.Object> parameters)
Evaluate a rule with parameters for a single patient 
 | 
java.lang.Object | 
getGlobalParameter(java.lang.String id)
Fetches a global parameter value by name 
 | 
java.util.Collection<java.lang.String> | 
getGlobalParameters()  | 
java.util.Date | 
getIndexDate()  | 
LogicDataSource | 
getLogicDataSource(java.lang.String name)
Fetches a logic data source by name 
 | 
Patient | 
getPatient(java.lang.Integer patientId)
Gets the patient object for the given patient id (this patient must be in the cohort of this context) 
 | 
Result | 
read(java.lang.Integer patientId,
    LogicCriteria criteria)
Reads a key with criteria from a logic data source 
 | 
Result | 
read(java.lang.Integer patientId,
    LogicDataSource dataSource,
    LogicCriteria criteria)
Reads a key with criteria from a logic data source 
 | 
Result | 
read(java.lang.Integer patientId,
    LogicDataSource dataSource,
    java.lang.String key)
Reads a key from a logic data source 
 | 
Result | 
read(java.lang.Integer patientId,
    java.lang.String key)
Reads a key from a logic data source 
 | 
java.lang.Object | 
setGlobalParameter(java.lang.String id,
                  java.lang.Object value)
Assigns a value to a global parameters within this logic context 
 | 
void | 
setIndexDate(java.util.Date indexDate)
Changes the index date for this logic context 
 | 
java.util.Date | 
today()  | 
Patient getPatient(java.lang.Integer patientId)
patientId - Result eval(java.lang.Integer patientId, java.lang.String token) throws LogicException
patientId - token - Result of the evaluationLogicExceptionLogicService.eval(Patient, String)Result eval(java.lang.Integer patientId, java.lang.String token, java.util.Map<java.lang.String,java.lang.Object> parameters) throws LogicException
patientId - token - parameters - Result of the evaluationLogicExceptionLogicService.eval(Patient, String, Map)Result eval(java.lang.Integer patientId, LogicCriteria criteria, java.util.Map<java.lang.String,java.lang.Object> parameters) throws LogicException
patientId - criteria - parameters - Result object with the result of the evaluationLogicExceptionLogicService.eval(Patient, LogicCriteria, Map)LogicDataSource getLogicDataSource(java.lang.String name)
name - LogicDataSourceResult read(java.lang.Integer patientId, LogicDataSource dataSource, java.lang.String key) throws LogicException
patientId - dataSource - key - Result of the read operationLogicExceptionResult read(java.lang.Integer patientId, java.lang.String key) throws LogicException
patientId - key - Result of the read operationLogicExceptionResult read(java.lang.Integer patientId, LogicCriteria criteria) throws LogicException
patientId - criteria - Result of the readLogicExceptionResult read(java.lang.Integer patientId, LogicDataSource dataSource, LogicCriteria criteria) throws LogicException
patientId - dataSource - criteria - Result of the readLogicExceptionvoid setIndexDate(java.util.Date indexDate)
indexDate - the new Date value for "today" to be used by rules within this
            logic contextjava.util.Date getIndexDate()
java.util.Date today()
getIndexDate()java.lang.Object setGlobalParameter(java.lang.String id,
                                    java.lang.Object value)
id - value - java.lang.Object getGlobalParameter(java.lang.String id)
id - Objectjava.util.Collection<java.lang.String> getGlobalParameters()
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.