Tabnine Logo
ProgramWorkflowService.getAllPrograms
Code IndexAdd Tabnine to your IDE (free)

How to use
getAllPrograms
method
in
org.openmrs.api.ProgramWorkflowService

Best Java code snippets using org.openmrs.api.ProgramWorkflowService.getAllPrograms (Showing top 11 results out of 315)

origin: openmrs/openmrs-core

/**
 * @see org.openmrs.api.ProgramWorkflowService#getAllPrograms()
 */
@Override
@Transactional(readOnly = true)
public List<Program> getAllPrograms() throws APIException {
  return Context.getProgramWorkflowService().getAllPrograms(true);
}

origin: openmrs/openmrs-core

Map<String, PatientProgram> knownPatientPrograms = new HashMap<>();
Map<String, Program> programsByName = new HashMap<>();
for (Program program : pws.getAllPrograms()) {
  programsByName.put(program.getConcept().getName(Context.getLocale(), false).getName(), program);
origin: openmrs/openmrs-core

Patient prefPatient = patientService.getPatient(6);
Patient notPrefPatient = patientService.getPatient(7);
Collection<Program> programs = programService.getAllPrograms(false);
origin: openmrs/openmrs-module-webservices.rest

/**
 * @see MainResourceControllerTest#getAllCount()
 */
@Override
public long getAllCount() {
  return service.getAllPrograms(false).size();
}

origin: openmrs/openmrs-module-webservices.rest

@Override
public long getAllCount() {
  return service.getAllPrograms(false).size();
}

origin: openmrs/openmrs-core

public void saveProgram_shouldCreateProgramWorkflows() {
  int numBefore = Context.getProgramWorkflowService().getAllPrograms().size();
  assertEquals("Failed to create program", numBefore + 1, Context.getProgramWorkflowService().getAllPrograms().size());
  Program p = Context.getProgramWorkflowService().getProgramByName("TEST PROGRAM");
  assertNotNull("Program is null", p);
origin: openmrs/openmrs-module-webservices.rest

@Override
protected NeedsPaging<Program> doGetAll(RequestContext context) {
  return new NeedsPaging<Program>(Context.getProgramWorkflowService().getAllPrograms(false), context);
}

origin: openmrs/openmrs-module-htmlformentry

public ProgramWorkflow getWorkflow(Integer id) {
  for (Program p : Context.getProgramWorkflowService().getAllPrograms()) {
    for (ProgramWorkflow w : p.getAllWorkflows()) {
      if (w.getProgramWorkflowId().equals(id)) {
        return w;
      }
    }
  }
  return null;
}
origin: openmrs/openmrs-module-htmlformentry

public static ProgramWorkflow getWorkflow(Integer id) {
  for (Program p : Context.getProgramWorkflowService().getAllPrograms()) {
    for (ProgramWorkflow w : p.getAllWorkflows()) {
      if (w.getProgramWorkflowId().equals(id)) {
        return w;
      }
    }
  }
  return null;
}

origin: openmrs/openmrs-module-htmlformentry

private static List<ProgramWorkflowState> getStates(boolean includeRetired) {
  List<ProgramWorkflowState> ret = new ArrayList<ProgramWorkflowState>();
  for (Program p : Context.getProgramWorkflowService().getAllPrograms()) {
    for (ProgramWorkflow w : p.getAllWorkflows()) {
      for (ProgramWorkflowState s : w.getStates()) {
        if (includeRetired || !s.isRetired()) {
          ret.add(s);
        }
      }
    }
  }
  return ret;
}

origin: openmrs/openmrs-module-htmlformentry

for (Program program : Context.getProgramWorkflowService().getAllPrograms(false)) {
  for (ProgramWorkflow w : program.getAllWorkflows()) {
    if (w.getConcept().equals(concept)) {
org.openmrs.apiProgramWorkflowServicegetAllPrograms

Javadoc

Returns all programs, includes retired programs. This method delegates to the #getAllPrograms(boolean) method

Popular methods of ProgramWorkflowService

  • getProgramByUuid
    Get a program by its uuid. There should be only one of these in the database. If multiple are found,
  • getPatientPrograms
    Returns PatientPrograms that match the input parameters. If an input parameter is set to null, the p
  • getStateByUuid
    Get a state by its uuid. There should be only one of these in the database. If multiple are found, a
  • getPatientProgramByUuid
    Get a patient program by its uuid. There should be only one of these in the database. If multiple ar
  • getProgram
    Returns a program given that programs primary key programId A null value is returned if no program e
  • getProgramByName
    Returns a program given the program's exact name A null value is returned if there is no program wit
  • getWorkflowByUuid
    Get ProgramWorkflow by its UUID
  • savePatientProgram
    Save patientProgram to database (create if new or update if changed)
  • getPatientStateByUuid
    Get a program state by its uuid. There should be only one of these in the database. If multiple are
  • getProgramAttributeTypeByUuid
  • getWorkflow
    Get ProgramWorkflow by internal identifier.
  • purgePatientProgram
    Completely remove a patientProgram from the database (not reversible)
  • getWorkflow,
  • purgePatientProgram,
  • purgeProgram,
  • getAllProgramAttributeTypes,
  • getPatientProgram,
  • getPatientProgramAttributeByUuid,
  • getState,
  • purgeProgramAttributeType,
  • saveProgram

Popular in Java

  • Finding current android device location
  • setRequestProperty (URLConnection)
  • requestLocationUpdates (LocationManager)
  • scheduleAtFixedRate (Timer)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • JFileChooser (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now