@Ignore @Test public void simpleRegimen_shouldConvertToSimpleObject() { SimpleObject obj1 = kenyaUi.simpleRegimen(null, ui); Assert.assertThat(obj1.get("shortDisplay"), is((Object) "None")); Assert.assertThat(obj1.get("longDisplay"), is((Object) "None")); SimpleObject obj3 = kenyaUi.simpleRegimen(regimen, ui); Assert.assertThat(obj3.get("shortDisplay"), is(notNullValue())); Assert.assertThat(obj3.get("longDisplay"), is(notNullValue())); }
public SimpleObject simpleRegimen(RegimenOrder regimen, UiUtils ui) { if (regimen == null) { return SimpleObject.create("shortDisplay", "None", "longDisplay", "None"); } else { return SimpleObject.create("shortDisplay", formatRegimenShort(regimen, ui), "longDisplay", formatRegimenLong(regimen, ui)); } }
EmrUiUtils { public SimpleObject simpleRegimen(RegimenOrder regimen, UiUtils ui) { if (regimen == null) { return SimpleObject.create("shortDisplay", "None", "longDisplay", "None"); } else { return SimpleObject.create("shortDisplay", formatRegimenShort(regimen, ui), "longDisplay", formatRegimenLong(regimen, ui)); } } }
EmrUiUtils { public SimpleObject simpleRegimen(RegimenOrder regimen, UiUtils ui) { if (regimen == null) { return SimpleObject.create("shortDisplay", "None", "longDisplay", "None"); } else { return SimpleObject.create("shortDisplay", formatRegimenShort(regimen, ui), "longDisplay", formatRegimenLong(regimen, ui)); } }  }
EmrUiUtils { public SimpleObject simpleRegimen(RegimenOrder regimen, UiUtils ui) { if (regimen == null) { return SimpleObject.create("shortDisplay", "None", "longDisplay", "None"); } else { return SimpleObject.create("shortDisplay", formatRegimenShort(regimen, ui), "longDisplay", formatRegimenLong(regimen, ui)); } }  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 SimpleObject simpleRegimen(RegimenOrder regimen, UiUtils ui) { if (regimen == null) { return SimpleObject.create("shortDisplay", "None", "longDisplay", "None"); } else { return SimpleObject.create("shortDisplay", formatRegimenShort(regimen, ui), "longDisplay", formatRegimenLong(regimen, ui)); } }  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);  }