use of org.openmrs.ConceptNumeric in project openmrs-core by openmrs.
the class OpenmrsUtilUnitTest method isInAbsoluteNumericRange_shouldReturnFalseIfValueIsAboveRange.
@Test
public void isInAbsoluteNumericRange_shouldReturnFalseIfValueIsAboveRange() {
ConceptNumeric concept = new ConceptNumeric();
concept.setHiCritical(4.34d);
concept.setLowCritical(3.67d);
assertFalse(OpenmrsUtil.isInAbsoluteNumericRange(5.67f, concept));
}
use of org.openmrs.ConceptNumeric in project openmrs-core by openmrs.
the class OpenmrsUtilUnitTest method isInCriticalNumericRange_shouldReturnTrueIfValueIsEqualToHiRangeLimit.
@Test
public void isInCriticalNumericRange_shouldReturnTrueIfValueIsEqualToHiRangeLimit() {
ConceptNumeric concept = new ConceptNumeric();
concept.setHiCritical(5.67d);
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 isInCriticalNumericRange_shouldReturnFalseIfLowCriticalIsNull.
@Test
public void isInCriticalNumericRange_shouldReturnFalseIfLowCriticalIsNull() {
ConceptNumeric concept = new ConceptNumeric();
concept.setLowCritical(null);
assertFalse(OpenmrsUtil.isInCriticalNumericRange(5.67f, concept));
}
use of org.openmrs.ConceptNumeric in project openmrs-core by openmrs.
the class OpenmrsUtilUnitTest method isInCriticalNumericRange_shouldReturnFalseIfValueIsBelowRange.
@Test
public void isInCriticalNumericRange_shouldReturnFalseIfValueIsBelowRange() {
ConceptNumeric concept = new ConceptNumeric();
concept.setHiCritical(10.34d);
concept.setLowCritical(3.67d);
assertFalse(OpenmrsUtil.isInCriticalNumericRange(2.67f, concept));
}
use of org.openmrs.ConceptNumeric in project openmrs-core by openmrs.
the class ConceptServiceTest method getConceptNumericByUuid_shouldFindObjectGivenValidUuid.
/**
* @see ConceptService#getConceptNumericByUuid(String)
*/
@Test
public void getConceptNumericByUuid_shouldFindObjectGivenValidUuid() {
String uuid = "c607c80f-1ea9-4da3-bb88-6276ce8868dd";
ConceptNumeric conceptNumeric = Context.getConceptService().getConceptNumericByUuid(uuid);
Assert.assertEquals(5089, (int) conceptNumeric.getConceptId());
}
Aggregations