Package org.openmrs.module.webservices.rest.web.response

Examples of org.openmrs.module.webservices.rest.web.response.ObjectNotFoundException


    String drugUuid = post.get("drug").toString();
    Drug drug = Context.getConceptService().getDrugByUuid(drugUuid);
   
    if (drug == null) {
      // drug doesn't exist, so we won't create the drug info
      throw new ObjectNotFoundException();
    }
   
    // create drug info POJO and add required relationship with a Drug
    DrugInfo drugInfo = new DrugInfo();
    drugInfo.setDrug(drug);
View Full Code Here


    initDrugController();
    String conceptUuid = post.get("concept").toString();
    Concept concept = service.getConceptByUuid(conceptUuid);
   
    if (concept == null) {
      throw new ObjectNotFoundException();
    }
   
    Drug drug = new Drug();
    drug.setConcept(concept);
    updateDrugFieldsFromPostData(drug, post);
View Full Code Here

   * @throws ResponseException
   */
  public SimpleObject getRaxaAlertsByProvider(String providerUniqueId, RequestContext context) throws ResponseException {
    Provider provider = Context.getProviderService().getProviderByUuid(providerUniqueId);
    if (provider == null) {
      throw new ObjectNotFoundException();
    }
    List<RaxaAlert> raxaAlerts = Context.getService(RaxaAlertService.class).getRaxaAlertByProviderRecipientId(
        provider.getId(), false);
    return new NeedsPaging<RaxaAlert>(raxaAlerts, context).toSimpleObject();
  }
View Full Code Here

TOP

Related Classes of org.openmrs.module.webservices.rest.web.response.ObjectNotFoundException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.