...
Code Block | ||
---|---|---|
| ||
import org.openmrs.Person; import org.openmrs.Obs; // Create a list with one person List<Person> personList = new ArrayList<Person>(); personList.add(Context.getPersonService().getPerson(4562)) // using a random person ID for example // Get all observations for person 4562 that are not voided List<Obs> obsList = 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 |
More API resources
To learn more about OpenMRS API, visit How to Use OpenMRS API and OpenMRS API Doc.