Package org.openmrs

Examples of org.openmrs.Encounter


        return "multipleObsGroupDifferentAnswerConceptIdForm";
      }

      @Override
      public Encounter getEncounterToView() throws Exception {
        Encounter e = new Encounter();
        e.setPatient(getPatient());
        Date date = Context.getDateFormat().parse("01/02/2003");
        e.setDateCreated(new Date());
        e.setEncounterDatetime(date);
        e.setLocation(Context.getLocationService().getLocation(2));
        e.setProvider(Context.getPersonService().getPerson(502));

        // create three obsgroups with the identical structures but with different answer values for the obs
        TestUtil.addObsGroup(e, 7, new Date(), 1000, Context.getConceptService().getConcept(1001), new Date(), 8, "foo1",
            new Date());
        TestUtil.addObsGroup(e, 7, new Date(), 1000, null, new Date(), 8, "foo2",
View Full Code Here


        return "multipleObsGroupDifferentAnswerConceptIdForm";
      }

      @Override
      public Encounter getEncounterToView() throws Exception {
        Encounter e = new Encounter();
        e.setPatient(getPatient());
        Date date = Context.getDateFormat().parse("01/02/2003");
        e.setDateCreated(new Date());
        e.setEncounterDatetime(date);
        e.setLocation(Context.getLocationService().getLocation(2));
        e.setProvider(Context.getPersonService().getPerson(502));

        // create three obsgroups with the identical structures but with different answer values for the obs
        TestUtil.addObsGroup(e, 7, new Date(), 1000, Context.getConceptService().getConcept(1001), new Date(), 8, "foo1",
            new Date());
        TestUtil.addObsGroup(e, 7, new Date(), 1000, Context.getConceptService().getConcept(1002), new Date(), 8, "foo2",
View Full Code Here

        return "multipleObsGroupDifferentAnswerConceptIdForm";
      }

      @Override
      public Encounter getEncounterToView() throws Exception {
        Encounter e = new Encounter();
        e.setPatient(getPatient());
        Date date = Context.getDateFormat().parse("01/02/2003");
        e.setDateCreated(new Date());
        e.setEncounterDatetime(date);
        e.setLocation(Context.getLocationService().getLocation(2));
        e.setProvider(Context.getPersonService().getPerson(502));

        // create three obsgroups with the identical structures but with different answer values for the obs
        TestUtil.addObsGroup(e, 7, new Date(), 1000, Context.getConceptService().getConcept(1001), new Date(), 8, "foo1",
            new Date());
        TestUtil.addObsGroup(e, 7, new Date(), 1000, null, new Date(), 8, "foo2",
View Full Code Here

        return "multipleObsGroupDifferentAnswerConceptIdForm";
      }

      @Override
      public Encounter getEncounterToView() throws Exception {
        Encounter e = new Encounter();
        e.setPatient(getPatient());
        Date date = Context.getDateFormat().parse("01/02/2003");
        e.setDateCreated(new Date());
        e.setEncounterDatetime(date);
        e.setLocation(Context.getLocationService().getLocation(2));
        e.setProvider(Context.getPersonService().getPerson(502));

        // create three obsgroups with the identical structures but with different answer values for the obs
        TestUtil.addObsGroup(e, 7, new Date(), 1000, null, new Date(), 8, "foo1",
            new Date());
        TestUtil.addObsGroup(e, 7, new Date(), 1000, null, new Date(), 8, "foo2",
View Full Code Here

        return "obsGroupRepeatTestForm";
      }

      @Override
      public Encounter getEncounterToView() throws Exception {
        Encounter e = new Encounter();
        e.setPatient(getPatient());
        Date date = Context.getDateFormat().parse("01/02/2003");
        e.setDateCreated(new Date());
        e.setEncounterDatetime(date);
        e.setLocation(Context.getLocationService().getLocation(2));
        e.setProvider(Context.getPersonService().getPerson(502));

        TestUtil.addObsGroup(e, 7, new Date(), 1000, Context.getConceptService().getConcept(1004), new Date(), 8, "bar4",
            new Date());
       
        return e;
View Full Code Here

        return "obsGroupRepeatTestForm";
      }

      @Override
      public Encounter getEncounterToView() throws Exception {
        Encounter e = new Encounter();
        e.setPatient(getPatient());
        Date date = Context.getDateFormat().parse("01/02/2003");
        e.setDateCreated(new Date());
        e.setEncounterDatetime(date);
        e.setLocation(Context.getLocationService().getLocation(2));
        e.setProvider(Context.getPersonService().getPerson(502));

        TestUtil.addObsGroup(e, 7, new Date(), 1000, null, new Date(), 8, "bar1",
            new Date());

        TestUtil.addObsGroup(e, 7, new Date(), 1000, Context.getConceptService().getConcept(1004), new Date(), 8, "bar4",
View Full Code Here

        return "obsGroupRepeatTestForm";
      }

      @Override
      public Encounter getEncounterToView() throws Exception {
        Encounter e = new Encounter();
        e.setPatient(getPatient());
        Date date = Context.getDateFormat().parse("01/02/2003");
        e.setDateCreated(new Date());
        e.setEncounterDatetime(date);
        e.setLocation(Context.getLocationService().getLocation(2));
        e.setProvider(Context.getPersonService().getPerson(502));

        TestUtil.addObsGroup(e, 7, new Date(), 1000, Context.getConceptService().getConcept(1001), new Date(), 8, "bar1", new Date());

        TestUtil.addObsGroup(e, 7, new Date(), 1000, null, new Date(), 8, "bar2", new Date());
View Full Code Here

        return "obsGroupRepeatTestForm";
      }

      @Override
      public Encounter getEncounterToView() throws Exception {
        Encounter e = new Encounter();
        e.setPatient(getPatient());
        Date date = Context.getDateFormat().parse("01/02/2003");
        e.setDateCreated(new Date());
        e.setEncounterDatetime(date);
        e.setLocation(Context.getLocationService().getLocation(2));
        e.setProvider(Context.getPersonService().getPerson(502));

        TestUtil.addObsGroup(e, 7, new Date(), 1000, Context.getConceptService().getConcept(1001), new Date(), 8, "bar1", new Date());

        TestUtil.addObsGroup(e, 7, new Date(), 1000, Context.getConceptService().getConcept(1002), new Date(), 8, "bar2", new Date());
View Full Code Here

        return "singleObsFormWithCheckbox";
      }

      @Override
      public Encounter getEncounterToView() throws Exception {
        Encounter e = new Encounter();
        e.setPatient(getPatient());
        Date date = Context.getDateFormat().parse("01/02/2003");
        e.setDateCreated(new Date());
        e.setEncounterDatetime(date);
        e.setLocation(Context.getLocationService().getLocation(2));
        e.setProvider(Context.getPersonService().getPerson(502));

        Obs obs = new Obs();
        obs.setConcept(Context.getConceptService().getConcept(4));
        obs.setValueNumeric(new Double(1))// set this obs to a valid Boolean value
           
        e.addObs(obs);
        Context.getEncounterService().saveEncounter(e);
       
        return e;
      }
View Full Code Here

        return "singleObsFormWithCheckbox";
      }

      @Override
      public Encounter getEncounterToView() throws Exception {
        Encounter e = new Encounter();
        e.setPatient(getPatient());
        Date date = Context.getDateFormat().parse("01/02/2003");
        e.setDateCreated(new Date());
        e.setEncounterDatetime(date);
        e.setLocation(Context.getLocationService().getLocation(2));
        e.setProvider(Context.getPersonService().getPerson(502));

        Obs obs = new Obs();
        obs.setConcept(Context.getConceptService().getConcept(4));
        obs.setValueNumeric(null)// set this obs to an invalid Boolean value
           
        e.addObs(obs);
        Context.getEncounterService().saveEncounter(e);
       
        return e;
      }
View Full Code Here

TOP

Related Classes of org.openmrs.Encounter

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.