use of org.openmrs.ConceptNumeric in project openmrs-core by openmrs.
the class OpenmrsUtilUnitTest method isInNormalNumericRange_shouldReturnFalseIfLowNormalIsNull.
@Test
public void isInNormalNumericRange_shouldReturnFalseIfLowNormalIsNull() {
ConceptNumeric concept = new ConceptNumeric();
concept.setLowNormal(null);
assertFalse(OpenmrsUtil.isInNormalNumericRange(5.67f, concept));
}
use of org.openmrs.ConceptNumeric in project openmrs-core by openmrs.
the class OpenmrsUtilUnitTest method isInAbsoluteNumericRange_shouldReturnFalseIfHiAbsoluteIsNull.
@Test
public void isInAbsoluteNumericRange_shouldReturnFalseIfHiAbsoluteIsNull() {
ConceptNumeric concept = new ConceptNumeric();
concept.setHiAbsolute(null);
assertFalse(OpenmrsUtil.isInAbsoluteNumericRange(5.67f, concept));
}
use of org.openmrs.ConceptNumeric in project openmrs-core by openmrs.
the class OpenmrsUtilUnitTest method isInCriticalNumericRange_shouldReturnTrueIfValueIsEqualToLowRangeLimit.
@Test
public void isInCriticalNumericRange_shouldReturnTrueIfValueIsEqualToLowRangeLimit() {
ConceptNumeric concept = new ConceptNumeric();
concept.setHiCritical(10.67d);
concept.setLowCritical(5.64d);
assertFalse(OpenmrsUtil.isInCriticalNumericRange(5.64f, concept));
}
use of org.openmrs.ConceptNumeric in project openmrs-core by openmrs.
the class OpenmrsUtilUnitTest method isValidNumericValue_shouldReturnFalseIfValueIsAboveRange.
@Test
public void isValidNumericValue_shouldReturnFalseIfValueIsAboveRange() {
ConceptNumeric concept = new ConceptNumeric();
concept.setHiAbsolute(10.34d);
concept.setLowAbsolute(6.67d);
assertFalse(OpenmrsUtil.isValidNumericValue(5.67f, concept));
}
use of org.openmrs.ConceptNumeric in project openmrs-core by openmrs.
the class OpenmrsUtilUnitTest method isInNormalNumericRange_shouldReturnTrueIfValueIsEqualToLowRangeLimit.
@Test
public void isInNormalNumericRange_shouldReturnTrueIfValueIsEqualToLowRangeLimit() {
ConceptNumeric concept = new ConceptNumeric();
concept.setHiNormal(10.34d);
concept.setLowNormal(5.64d);
assertFalse(OpenmrsUtil.isInNormalNumericRange(5.64f, concept));
}
Aggregations