@Test public void formatDrug_shouldFormatDrugReferenceAsConceptOrDrug() throws Exception { DrugReference drugRef1 = DrugReference.fromConceptUuid("84309AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); Assert.assertThat(kenyaUi.formatDrug(drugRef1, ui), is(notNullValue())); DrugReference drugRef2 = DrugReference.fromDrugUuid("a74fefc6-931d-47b9-b282-5d6c8c8d8060"); Assert.assertThat(kenyaUi.formatDrug(drugRef2, ui), is(notNullValue())); }
public String formatDrug(DrugReference drugRef, UiUtils ui) { return drugRef.isConceptOnly() ? drugRef.getConcept().getPreferredName(CoreConstants.LOCALE).getName() : drugRef.getDrug().getName(); }
EmrUiUtils { public String formatDrug(DrugReference drugRef, UiUtils ui) { return drugRef.isConceptOnly() ? drugRef.getConcept().getPreferredName(CoreConstants.LOCALE).getName() : drugRef.getDrug().getName(); } }
EmrUiUtils { public String formatDrug(DrugReference drugRef, UiUtils ui) { return drugRef.isConceptOnly() ? drugRef.getConcept().getPreferredName(CoreConstants.LOCALE).getName() : drugRef.getDrug().getName(); }  }
EmrUiUtils { public String formatDrug(DrugReference drugRef, UiUtils ui) { return drugRef.isConceptOnly() ? drugRef.getConcept().getPreferredName(CoreConstants.LOCALE).getName() : drugRef.getDrug().getName(); }  String formatDrug(DrugReference drugRef, UiUtils ui); String formatRegimenShort(RegimenOrder regimen, UiUtils ui); String formatRegimenLong(RegimenOrder regimen, UiUtils ui); SimpleObject simpleRegimen(RegimenOrder regimen, UiUtils ui); List<SimpleObject> simpleRegimenHistory(RegimenChangeHistory history, UiUtils ui); List<SimpleObject> simpleRegimenDefinitions(Collection<RegimenDefinition> definitions, UiUtils ui); }
EmrUiUtils { public String formatDrug(DrugReference drugRef, UiUtils ui) { return drugRef.isConceptOnly() ? drugRef.getConcept().getPreferredName(CoreConstants.LOCALE).getName() : drugRef.getDrug().getName(); }  String formatDrug(DrugReference drugRef, UiUtils ui); String formatRegimenShort(RegimenOrder regimen, UiUtils ui); String formatRegimenLong(RegimenOrder regimen, UiUtils ui); SimpleObject simpleRegimen(RegimenOrder regimen, UiUtils ui); List<SimpleObject> simpleRegimenHistory(RegimenChangeHistory history, UiUtils ui); List<SimpleObject> simpleRegimenDefinitions(Collection<RegimenDefinition> definitions, UiUtils ui);  }