Package | Description |
---|---|
org.openmrs.logic |
The OpenMRS Logic Service provides access to granular and derived
data.
|
org.openmrs.logic.op |
Modifier and Type | Method and Description |
---|---|
boolean |
Duration.supports(ComparisonOperator operator) |
Modifier and Type | Class and Description |
---|---|
class |
After
The After operator works with a date object to tests whether an expression will yield result
after a certain date position.
Example: - logicService.parse("'CD4 COUNT'").after(Context.getDateformat().parse("2009/12/04"); The above will give us a criteria to check if there's "CD4 COUNT" observations after 12/04/2009 |
class |
Before
The Before operator works with a date object to tests whether an expression will yield result
before a certain date position.
Example: - logicService.parse("'CD4 COUNT'").before(Context.getDateformat().parse("2009/12/04");
The above will give us a criteria to check if there's "CD4 COUNT" observations before 12/04/2009 |
class |
Contains
The Contains operator will return results that contains the operand .
Example: - logicService.parse("EncounterDataSource.ENCOUNTER_KEY").contains("ADULTRETURN"); The above will give us a criteria to check if there's encounter ADULTRETURN for a certain patients |
class |
Equals
The Equals operator will test whether a result equals to an operand or not.
Example: - logicService.parse("EncounterDataSource.ENCOUNTER_KEY").equals("ADULTRETURN"); The above will give us a criteria to get only ADULTRETURN encounters |
class |
GreaterThan
The GreaterThan operator will return result that have a greater value than the operand.
Example: - logicService.parse("'CD4 COUNT'").gt(200); The above will give us a criteria to get the "CD4 COUNT" observations that has the value numeric more than 200 |
class |
GreaterThanEquals
The GreaterThanEquals operator will return result that have a greater value than or equals to the
operand.
Example: - logicService.parse("'CD4 COUNT'").gte(200); The above will give us a criteria to get the "CD4 COUNT" observations that has the value numeric more than or equals to 200 |
class |
In
The In operator test whether a value is in a collection of value or not.
Example:
Collection answers = Collection.asList("ADULTRETURN"); The above criteria will test whether a patient have EncounterType in the list |
class |
LessThan
The LessThan operator will return result that have a less value than the operand.
Example: - logicService.parse("'CD4 COUNT'").gte(200); The above will give us a criteria to get the "CD4 COUNT" observations that has the value numeric less than 200 |
class |
LessThanEquals
The LessThan operator will return result that have a less value than or equals to the operand.
Example: - logicService.parse("'CD4 COUNT'").lte(200); The above will give us a criteria to get the "CD4 COUNT" observations that has the value numeric less than or equals to 200 |
class |
Within
The Within operator tests whether an expression will yield true for a certain time frame.
Example: - logicService.parse("'CD4 COUNT'").within(Duration.years(2)); The above will give us a criteria to check if there's "CD4 COUNT" observations within the last 2 years |
Modifier and Type | Field and Description |
---|---|
static ComparisonOperator |
ComparisonOperator.AFTER |
static ComparisonOperator |
ComparisonOperator.BEFORE |
static ComparisonOperator |
ComparisonOperator.CONTAINS |
static ComparisonOperator |
ComparisonOperator.EQUALS |
static ComparisonOperator |
ComparisonOperator.GT |
static ComparisonOperator |
ComparisonOperator.GTE |
static ComparisonOperator |
ComparisonOperator.IN |
static ComparisonOperator |
ComparisonOperator.LT |
static ComparisonOperator |
ComparisonOperator.LTE |
static ComparisonOperator |
ComparisonOperator.WITHIN |
Modifier and Type | Method and Description |
---|---|
boolean |
Operand.supports(ComparisonOperator operator)
Sanity check for this Operand vs a given operator.
|
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.