encounter.setEncounterType(encounterType); encounter.setCreator(enterer); encounter.setDateCreated(new Date());
encounter.setDateCreated(date);
target.setCreator(getCreator()); target.setDateChanged(getDateChanged()); target.setDateCreated(getDateCreated()); target.setDateVoided(getDateVoided()); target.setVoided(getVoided());
Date date = new Date(System.currentTimeMillis() - 5000); // make sure we encounter.setDateCreated(date); User creator = new User(1); encounter.setCreator(creator);
encounter.setDateCreated(new Date()); encounter.setChangedBy(new User()); encounter.setDateChanged(new Date());
@Override public Encounter getEncounterToView() throws Exception { Encounter e = new Encounter(); e.setPatient(getPatient()); e.setDateCreated(new Date()); TestUtil.addObsGroup(e, 23, new Date(), 18, Boolean.TRUE, new Date()); return e; }
@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 two ALLERGY CONSTRUCT obsgroups, with different text values, one of 01/02/2003, and one with the date set to null TestUtil.addObsGroup(e, 7, new Date(), 8,"Dogs", new Date(), 1119, date, new Date()); TestUtil.addObsGroup(e, 7, new Date(), 8, "Cats", new Date(), 1119, null, new Date()); return e; }
@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", new Date()); return e; }
@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; }
@Override public Encounter getEncounterToView() throws Exception { Encounter e = new Encounter(); 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)); return e; }
@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)); // first create two ALLERGY CONSTRUCT obsgroups, both with ALLERGY CODED obs, but with different answer values TestUtil.addObsGroup(e, 7, new Date(), 8, Context.getConceptService().getConcept(1001), new Date()); TestUtil.addObsGroup(e, 7, new Date(), 8, Context.getConceptService().getConcept(1002), new Date()); return e; }
@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.addObs(e, 19, "2", null); // this is a location return e; }
@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.addObs(e, 6, "blah blah", null); return e; }
@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.addObs(e, 1, 965.0, null); // this is a CD4 Count return e; }
@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.addObs(e, 19, "2 - Xanadu", null); // this is a location return e; }
@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.addObs(e, 19, "7 - Collet Test Chebaskwony", null); return e; }
@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.addObs(e, 2, 12.3, null); // weight has conceptId 2 return e; }
@Override public Encounter getEncounterToEdit() { Encounter encounter = new Encounter(); encounter.setEncounterDatetime(date); encounter.setLocation(Context.getLocationService().getLocation(2)); encounter.setDateCreated(date); encounter.setPatient(Context.getPatientService().getPatient(2)); return encounter; }
@Override public Encounter getEncounterToEdit() { Encounter encounter = new Encounter(); encounter.setEncounterDatetime(date); encounter.setLocation(Context.getLocationService().getLocation(2)); encounter.setDateCreated(date); encounter.setPatient(Context.getPatientService().getPatient(2)); return encounter; }
@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; }