use of org.openmrs.ConceptNumeric in project openmrs-core by openmrs.
the class OpenmrsUtilUnitTest method isInAbsoluteNumericRange_shouldReturnFalseIfValueIsBelowRange.
@Test
public void isInAbsoluteNumericRange_shouldReturnFalseIfValueIsBelowRange() {
ConceptNumeric concept = new ConceptNumeric();
concept.setHiCritical(10.34d);
concept.setLowCritical(6.67d);
assertFalse(OpenmrsUtil.isInAbsoluteNumericRange(5.67f, concept));
}
use of org.openmrs.ConceptNumeric in project openmrs-core by openmrs.
the class OpenmrsUtilUnitTest method isInNormalNumericRange_shouldReturnFalseIfValueIsBelowRange.
@Test
public void isInNormalNumericRange_shouldReturnFalseIfValueIsBelowRange() {
ConceptNumeric concept = new ConceptNumeric();
concept.setHiNormal(10.34d);
concept.setLowNormal(6.67d);
assertFalse(OpenmrsUtil.isInNormalNumericRange(5.67f, concept));
}
use of org.openmrs.ConceptNumeric in project openmrs-core by openmrs.
the class OpenmrsUtilUnitTest method isInNormalNumericRange_shouldReturnTrueIfValueIsEqualToHiRangeLimit.
@Test
public void isInNormalNumericRange_shouldReturnTrueIfValueIsEqualToHiRangeLimit() {
ConceptNumeric concept = new ConceptNumeric();
concept.setHiNormal(5.67);
concept.setLowNormal(2.67);
assertFalse(OpenmrsUtil.isInNormalNumericRange(5.67f, concept));
}
use of org.openmrs.ConceptNumeric in project openmrs-core by openmrs.
the class OpenmrsUtilUnitTest method isInCriticalNumericRange_shouldReturnTrueIfValueIsInRange.
@Test
public void isInCriticalNumericRange_shouldReturnTrueIfValueIsInRange() {
ConceptNumeric concept = new ConceptNumeric();
concept.setHiCritical(10.34d);
concept.setLowCritical(3.67d);
assertTrue(OpenmrsUtil.isInCriticalNumericRange(5.67f, concept));
}
use of org.openmrs.ConceptNumeric in project openmrs-core by openmrs.
the class OpenmrsUtilUnitTest method isInAbsoluteNumericRange_shouldReturnTrueIfValueIsEqualToHiRangeLimit.
@Test
public void isInAbsoluteNumericRange_shouldReturnTrueIfValueIsEqualToHiRangeLimit() {
ConceptNumeric concept = new ConceptNumeric();
concept.setHiCritical(4.34d);
concept.setLowCritical(3.67d);
assertFalse(OpenmrsUtil.isInAbsoluteNumericRange(4.34f, concept));
}
Aggregations