Package org.openmrs

Examples of org.openmrs.User


   * Test of GetEncountersInPatientList method, of class PatientListServiceImpl given provider uuid.
   */
  @Test
  public void testGetEncountersInPatientListShouldReturnEncountersOfRequiredProvider() {
    PatientList p = new PatientList();
    p.setCreator(new User());
    p.setName("GetPatientsTestList");
    p.setSearchQuery("?encounterType=61ae96f4-6afe-4351-b6f8-cd4fc383ctyr"
            + "&provider=3effc802-12dd-4539-87f6-4065ca8e992c");
    List<Encounter> encs = s.getEncountersInPatientList(p);
    //testing encounterType
View Full Code Here


   * Test of GetEncountersInPatientList method, of class PatientListServiceImpl given provider uuid.
   */
  @Test
  public void testGetEncountersInPatientListShouldFilterDrugOrders() {
    PatientList p = new PatientList();
    p.setCreator(new User());
    p.setName("GetPatientsTestList");
    p.setSearchQuery("?encounterType=61ae96f4-6afe-4351-b6f8-cd4fc383ctyr" + "&containsOrderType=drugOrder");
    List<Encounter> encs = s.getEncountersInPatientList(p);
    //testing encounterType
   
View Full Code Here

   * Test of getPatientsInPatientList method, of class PatientListServiceImpl.
   */
  @Test
  public void testGetPatientsInPatientListShouldReturnPatients() {
    PatientList p = new PatientList();
    p.setCreator(new User());
    p.setName("GetPatientsTestList");
    p.setSearchQuery("?encounterType=61ae96f4-6afe-4351-b6f8-cd4fc383cce1"
            + "&startDate=2000-01-01T00:00:00&endDate=2012-01-02T00:00:00");
    List<Patient> pList = s.getPatientsInPatientList(p);
    //testing encounterType
View Full Code Here

   * Test of getPatientsInPatientList method, of class PatientListServiceImpl.
   */
  @Test
  public void testGetPatientsInPatientListShouldNotReturnPatientsWithInvalidDates() {
    PatientList p = new PatientList();
    p.setCreator(new User());
    p.setName("GetPatientsTestList");
    p.setSearchQuery("?encounterType=61ae96f4-6afe-4351-b6f8-cd4fc383cce1"
            + "&startDate=2012-01-02T00:00:0&endDate=2012-01-01T00:00:00");
    List<Patient> pList = s.getPatientsInPatientList(p);
    assertEquals(pList.size(), 0);
View Full Code Here

   */
  @Test
  public void testGetPatientsInPatientListShouldUsePrivileges() {
    Context.getUserContext().getAuthenticatedUser().removeRole(Context.getUserService().getRole("System Developer"));
    PatientList p = new PatientList();
    p.setCreator(new User());
    p.setName("GetPatientsTestList");
    p.setSearchQuery("?encounterType=61ae96f4-6afe-4351-b6f8-cd4fc383cce1"
            + "&startDate=2000-01-01T00:00:00&endDate=2012-01-02T00:00:00");
    List<Patient> pList = null;
    try {
View Full Code Here

            String date = attributes.getNamedItem("date").getNodeValue();
            String userid = attributes.getNamedItem("userid").getNodeValue();
            String xcoordinate = attributes.getNamedItem("xcoordinate").getNodeValue();
            String ycoordinate = attributes.getNamedItem("ycoordinate").getNodeValue();
            Position position = new Position(Integer.parseInt(xcoordinate), Integer.parseInt(ycoordinate));
            User user = Context.getUserService().getUser(Integer.parseInt(userid));
            annotations.add(new ImageAnnotation(Integer.parseInt(idString), position, text, new Date(Long
                    .parseLong(date)), user, Status.UNCHANGED));
          }
          catch (NumberFormatException e) {
            // Skip that annotation
View Full Code Here

TOP

Related Classes of org.openmrs.User

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.