use of org.openmrs.Drug in project openmrs-core by openmrs.
the class HibernateConceptDAOTest method getDrugs_shouldReturnDrugIfPhraseMatchDrugNameNoNeedToMatchBothConceptNameAndDrugName.
/**
* @see HibernateConceptDAO#getDrugs(String,Concept,boolean,boolean,boolean,Integer,Integer)
*/
@Test
public void getDrugs_shouldReturnDrugIfPhraseMatchDrugNameNoNeedToMatchBothConceptNameAndDrugName() {
// This concept does not contain concept_name with "Triomune"
Concept concept2 = dao.getConcept(3);
// In this test there is no any concept_name match with "Triomune" but
// Drug name match with "Trimonue" so no need to match both drug_name
// and the concept_name to find drug
List<Drug> drugList = dao.getDrugs("Triomune", concept2, true, true, false, 0, 10);
Assert.assertEquals(1, drugList.size());
}
use of org.openmrs.Drug in project openmrs-core by openmrs.
the class HibernateConceptDAOTest method getDrugs_shouldReturnDrugIfPhaseMatchConceptNameNoNeedToMatchBothConceptNameAndDrugName.
/**
* @see HibernateConceptDAO#getDrugs(String,Concept,boolean,boolean,boolean,Integer,Integer)
*/
@Test
public void getDrugs_shouldReturnDrugIfPhaseMatchConceptNameNoNeedToMatchBothConceptNameAndDrugName() {
Concept concept4 = dao.getConcept(7);
// In this test, there is no any drug_name with "VOIDED" but concept_name
// match with "VOIDED" so this prove no need to match both drug_name and the
// concept_name
List<Drug> drugList = dao.getDrugs("VOIDED", concept4, true, true, false, 0, 10);
Assert.assertEquals(1, drugList.size());
}
Aggregations