Wiki Spaces

Documentation
Projects
Resources

Get Help from Others

Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack

Documentation

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
import org.openmrs.Person;
import org.openmrs.Obs;

// Create a list with one person
List<Person> personList = new ArrayList<Person>();
personList.add(personContext.getPersonService().getPerson(4562)) // using a random person ID for example

// Get all observations for person 4562 that are not voided
List<Obs> obsList = obs.Context.getObsService().
    getObservations(personList, null, null, null, null, null, null, null, null, null, null, false);

// obsList now contains all non-voided observations for person 4562