/** * @see org.openmrs.api.FormService#getAllFields() */ @Override @Transactional(readOnly = true) public List<Field> getAllFields() throws APIException { return Context.getFormService().getAllFields(true); }
/** * @see FormService#getFormsContainingConcept(Concept) */ @Test public void mergeDuplicateFields_shouldMergeDuplicateFieldsInFormFieldsAndThenPurgeTheDuplicateFields() { executeDataSet(INITIAL_FIELDS_XML); executeDataSet(FORM_FIELDS_XML); Context.getFormService().mergeDuplicateFields(); // duplicateField should no longer be referenced Assert.assertNull(Context.getFormService().getFieldByUuid("b1843148-da2f-4349-c9c7-1164b98d91dd")); // duplicateField should be purged assertEquals(2, Context.getFormService().getAllFields().size()); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource#doGetAll(org.openmrs.module.webservices.rest.web.RequestContext) */ @Override protected NeedsPaging<Field> doGetAll(RequestContext context) throws ResponseException { return new NeedsPaging<Field>(Context.getFormService().getAllFields(context.getIncludeAll()), context); }