/** * @see org.openmrs.module.webservices.rest.web.resource.api.SubResource#doGetAll(java.lang.Object, * org.openmrs.module.webservices.rest.web.RequestContext) */ @Override public NeedsPaging<DrugIngredient> doGetAll(Drug parent, RequestContext context) throws ResponseException { List<DrugIngredient> ingredients = new ArrayList<DrugIngredient>(); if (parent != null) { ingredients.addAll(parent.getIngredients()); } return new NeedsPaging<DrugIngredient>(ingredients, context); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingSubResource#doGetAll(Object, * RequestContext) */ @Override public NeedsPaging<ConceptAttribute> doGetAll(Concept parent, RequestContext context) throws ResponseException { return new NeedsPaging<ConceptAttribute>((List<ConceptAttribute>) parent.getActiveAttributes(), context); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingSubResource#doGetAll(java.lang.Object, * org.openmrs.module.webservices.rest.web.RequestContext) */ @Override public NeedsPaging<LocationAttribute> doGetAll(Location parent, RequestContext context) throws ResponseException { return new NeedsPaging<LocationAttribute>((List<LocationAttribute>) parent.getActiveAttributes(), context); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingSubResource#doGetAll(java.lang.Object, * org.openmrs.module.webservices.rest.web.RequestContext) */ @Override public PageableResult doGetAll(Concept parent, RequestContext context) throws ResponseException { List<ConceptMap> maps = new ArrayList<ConceptMap>(parent.getConceptMappings()); return new NeedsPaging<ConceptMap>(maps, context); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource#doGetAll(org.openmrs.module.webservices.rest.web.RequestContext) */ @Override public NeedsPaging<Module> doGetAll(RequestContext context) throws ResponseException { moduleFactoryWrapper.checkPrivilege(); return new NeedsPaging<Module>(new ArrayList<Module>(moduleFactoryWrapper.getLoadedModules()), context); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource#doGetAll(org.openmrs.module.webservices.rest.web.RequestContext) */ @Override protected NeedsPaging<ProviderAttributeType> doGetAll(RequestContext context) throws ResponseException { return new NeedsPaging<ProviderAttributeType>(service().getAllProviderAttributeTypes(), context); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource#doGetAll(org.openmrs.module.webservices.rest.web.RequestContext) */ @Override protected PageableResult doGetAll(RequestContext context) throws ResponseException { List<ConceptStopWord> conceptStopWords = Context.getConceptService().getAllConceptStopWords(); return new NeedsPaging<ConceptStopWord>(conceptStopWords, context); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource#doSearch(java.lang.String, * org.openmrs.module.webservices.rest.web.RequestContext) */ @Override protected NeedsPaging<Relationship> doGetAll(RequestContext context) throws ResponseException { return new NeedsPaging<Relationship>(Context.getPersonService().getAllRelationships(), context); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingSubResource#doGetAll(java.lang.Object, * org.openmrs.module.webservices.rest.web.RequestContext) */ @Override public NeedsPaging<CohortMember1_8> doGetAll(Cohort parent, RequestContext context) throws ResponseException { List<CohortMember1_8> members = new ArrayList<CohortMember1_8>(); for (Patient cohortMember : Context.getService(RestHelperService.class).getPatients(parent.getMemberIds())) { members.add(new CohortMember1_8(cohortMember, parent)); } return new NeedsPaging<CohortMember1_8>(members, context); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource#doSearch(java.lang.String, * org.openmrs.module.webservices.rest.web.RequestContext) */ @Override protected NeedsPaging<Provider> doGetAll(RequestContext context) throws ResponseException { return new NeedsPaging<Provider>(Context.getProviderService() .getAllProviders(context.getIncludeAll()), context); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource#doSearch(org.openmrs.module.webservices.rest.web.RequestContext) */ @Override protected NeedsPaging<EncounterType> doSearch(RequestContext context) { return new NeedsPaging<EncounterType>(Context.getEncounterService().findEncounterTypes(context.getParameter("q")), context); } }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource#doGetAll(org.openmrs.module.webservices.rest.web.RequestContext) */ @Override protected NeedsPaging<Cohort> doGetAll(RequestContext context) throws ResponseException { return new NeedsPaging<Cohort>(Context.getCohortService().getAllCohorts(context.getIncludeAll()), context); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource#doGetAll(org.openmrs.module.webservices.rest.web.RequestContext) */ @Override protected NeedsPaging<CareSetting> doGetAll(RequestContext context) { return new NeedsPaging<CareSetting>(Context.getOrderService().getCareSettings(context.getIncludeAll()), context); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource#doSearch(org.openmrs.module.webservices.rest.web.RequestContext) */ @Override protected NeedsPaging<Form> doSearch(RequestContext context) { return new NeedsPaging<Form>(Context.getFormService().getForms(context.getParameter("q"), false), context); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource#doSearch(org.openmrs.module.webservices.rest.web.RequestContext) */ @Override protected NeedsPaging<PersonAttributeType> doSearch(RequestContext context) { return new NeedsPaging<PersonAttributeType>(service().getPersonAttributeTypes(context.getParameter("q"), null, null, null), context); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource#doGetAll(org.openmrs.module.webservices.rest.web.RequestContext) */ @Override protected NeedsPaging<EncounterType> doGetAll(RequestContext context) { return new NeedsPaging<EncounterType>(Context.getEncounterService().getAllEncounterTypes(context.getIncludeAll()), context); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource#doGetAll(org.openmrs.module.webservices.rest.web.RequestContext) */ @Override protected NeedsPaging<OrderType> doGetAll(RequestContext context) { return new NeedsPaging<OrderType>(Context.getOrderService().getOrderTypes(context.getIncludeAll()), context); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource#doGetAll(org.openmrs.module.webservices.rest.web.RequestContext) * @should return all Orders (including retired) if context.includeAll is set */ @Override protected PageableResult doGetAll(RequestContext context) throws ResponseException { //ORDER_STATUS.ANY is used to specify that all orders, including voided ones should be retrieved ORDER_STATUS orderStatus = context.getIncludeAll() ? ORDER_STATUS.ANY : null; return new NeedsPaging<Order>(Context.getOrderService().getOrders(Order.class, null, null, orderStatus, null, null, null), context); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource#doSearch(org.openmrs.module.webservices.rest.web.RequestContext) */ @Override protected NeedsPaging<OrderFrequency> doSearch(RequestContext context) { return new NeedsPaging<OrderFrequency>(Context.getOrderService().getOrderFrequencies(context.getParameter("q"), null, false, context.getIncludeAll()), context); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource#doGetAll(org.openmrs.module.webservices.rest.web.RequestContext) */ @Override protected NeedsPaging<ConceptMapType> doGetAll(RequestContext context) { //Note that if includeAll is set to false, then types marked as hidden will be excluded return new NeedsPaging<ConceptMapType>(Context.getConceptService().getConceptMapTypes(context.getIncludeAll(), context.getIncludeAll()), context); }