use of org.openmrs.ConceptNumeric in project openmrs-core by openmrs.
the class OpenmrsUtilUnitTest method isValidNumericValue_shouldReturnFalseIfValueIsBelowRange.
@Test
public void isValidNumericValue_shouldReturnFalseIfValueIsBelowRange() {
ConceptNumeric concept = new ConceptNumeric();
concept.setHiAbsolute(10.34d);
concept.setLowAbsolute(6.67d);
assertFalse(OpenmrsUtil.isValidNumericValue(15.67f, concept));
}
use of org.openmrs.ConceptNumeric in project openmrs-core by openmrs.
the class OpenmrsUtilUnitTest method isValidNumericValue_shouldReturnTrueIfValueIsInRange.
@Test
public void isValidNumericValue_shouldReturnTrueIfValueIsInRange() {
ConceptNumeric concept = new ConceptNumeric();
concept.setHiAbsolute(10.34d);
concept.setLowAbsolute(3.67d);
assertTrue(OpenmrsUtil.isValidNumericValue(5.67f, concept));
}
use of org.openmrs.ConceptNumeric in project openmrs-core by openmrs.
the class OpenmrsUtilUnitTest method isInCriticalNumericRange_shouldReturnFalseIfValueIsAboveRange.
@Test
public void isInCriticalNumericRange_shouldReturnFalseIfValueIsAboveRange() {
ConceptNumeric concept = new ConceptNumeric();
concept.setHiCritical(4.34d);
concept.setLowCritical(3.67d);
assertFalse(OpenmrsUtil.isInCriticalNumericRange(5.67f, concept));
}
use of org.openmrs.ConceptNumeric in project openmrs-core by openmrs.
the class OpenmrsUtilUnitTest method isInAbsoluteNumericRange_shouldReturnTrueIfValueIsEqualToLowRangeLimit.
@Test
public void isInAbsoluteNumericRange_shouldReturnTrueIfValueIsEqualToLowRangeLimit() {
ConceptNumeric concept = new ConceptNumeric();
concept.setHiCritical(14.34d);
concept.setLowCritical(4.34d);
assertFalse(OpenmrsUtil.isInAbsoluteNumericRange(4.34f, concept));
}
use of org.openmrs.ConceptNumeric in project openmrs-core by openmrs.
the class OpenmrsUtilUnitTest method isInNormalNumericRange_shouldReturnTrueIfValueIsInRange.
@Test
public void isInNormalNumericRange_shouldReturnTrueIfValueIsInRange() {
ConceptNumeric concept = new ConceptNumeric();
concept.setHiNormal(10.34d);
concept.setLowNormal(3.67d);
assertTrue(OpenmrsUtil.isInNormalNumericRange(5.67f, concept));
}
Aggregations