Package org.openmrs

Examples of org.openmrs.EncounterType


    Context.getEncounterService().saveEncounter(e);
   
    Form form = new Form();
    HtmlForm htmlform = new HtmlForm();
    htmlform.setForm(form);
    form.setEncounterType(new EncounterType());
    htmlform.setDateChanged(new Date());
    htmlform.setXmlData(new TestUtil().loadXmlFromFile(XML_DATASET_PATH
            + "returnSectionsAndConceptsInSectionsTestFormWithGroups.xml"));
   
    HtmlFormEntryUtil.voidEncounterByHtmlFormSchema(e, htmlform, null);
View Full Code Here


    String query = patientList.getSearchQuery();
    if (query.indexOf("?") == 0) {
      query = query.substring(1);
    }
    //"?encounterType=<uuid>&startDate=2012-05-07&endDate=2012-05-08&inlist=<uuidForList>&notinlist=<uuidForList>"
    EncounterType encType = null;
    Date startDate = null;
    Date endDate = null;
    Provider provid = null;
    Patient patient = null;
    String uuid = null;
View Full Code Here

  /**
   * Test of getPatientListByEncounterType method, of class HibernatePatientListDAO.
   */
  @Test
  public void testGetPatientListByEncounterType() {
    EncounterType encounterType = new EncounterType();
    encounterType.setName("Registration");
    encounterType.setUuid("61ae96f4-6afe-4351-b6f8-cd4fc383cce1");
    encounterType.setDescription("Patient has been registered");
    encounterType.setRetired(Boolean.FALSE);
    String name = dao.getPatientListByEncounterType(encounterType).get(0).getName();
    assertEquals("TestList1", name);
  }
View Full Code Here

   * Test of getPatientListByEncounterType method, of class
   * PatientListServiceImpl.
   */
  @Test
  public void testGetPatientListByEncounterTypeShouldReturnPatientList() {
    EncounterType encounterType = Context.getEncounterService().getEncounterTypeByUuid(
        "61ae96f4-6afe-4351-b6f8-cd4fc383cce1");
    String result = s.getPatientListByEncounterType(encounterType).get(0).getName();
    assertEquals("TestList1", result);
  }
View Full Code Here

  @Test
  public void testGetPatientListByEncounterTypeShouldUsePrivileges() {
    Context.getUserContext().getAuthenticatedUser().removeRole(Context.getUserService().getRole("System Developer"));
    Context.getUserContext().addProxyPrivilege("View Encounter Types");
    Context.getUserContext().removeProxyPrivilege("View Patient Lists");
    EncounterType encounterType = Context.getEncounterService().getEncounterTypeByUuid(
        "61ae96f4-6afe-4351-b6f8-cd4fc383cce1");
    String result = null;
    try {
      result = s.getPatientListByEncounterType(encounterType).get(0).getName();
      //if we don't throw exception fail - no privileges required!
View Full Code Here

TOP

Related Classes of org.openmrs.EncounterType

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.