*/
private void createNewDrugInfo(Drug drug, LinkedHashMap drugInfoMap) {
String drugUuid = drug.getUuid();
// create drug info POJO and add required relationship with a Drug
DrugInfo drugInfo = new DrugInfo();
drugInfo.setDrug(drug);
if (drugInfoMap.get("name") != null) {
drugInfo.setName(drugInfoMap.get("name").toString());
}
if (drugInfoMap.get("description") != null) {
drugInfo.setDescription(drugInfoMap.get("description").toString());
}
if (drugInfoMap.get("price") != null) {
drugInfo.setPrice(Double.parseDouble(drugInfoMap.get("price").toString()));
}
if (drugInfoMap.get("cost") != null) {
drugInfo.setCost(Double.parseDouble(drugInfoMap.get("cost").toString()));
}
// save new object and prepare response
DrugInfo drugInfoJustCreated = Context.getService(DrugInfoService.class).saveDrugInfo(drugInfo);
}