/** * This method gets the revision obs for voided obs * * @see ObsService#getRevisionObs(Obs) */ @Test public void shouldGetRevisedObs() { executeDataSet(INITIAL_OBS_XML); executeDataSet(REVISION_OBS_XML); ObsService os = Context.getObsService(); Obs initialObs = os.getObsByUuid("uuid14"); Obs revisedObs = os.getRevisionObs(initialObs); assertEquals(17, revisedObs.getId().intValue()); assertEquals(2, revisedObs.getGroupMembers(true).size()); }
ObsService os = Context.getObsService(); Obs obs = os.getObsByUuid(obsUuid); Assert.assertNotNull(obs); Assert.assertNotNull(os.getObsByUuid(obsUuid)); Assert.assertNull(os.getObsByUuid(obsUuid));
Assert.assertNotNull(complexObs.getValueComplex()); Assert.assertNotNull(complexObs.getComplexData()); Assert.assertEquals(complexObs, os.getObsByUuid(complexObs.getUuid()));
@Override public MRSObservation getObservationById(String observationId) { Obs obs = obsService.getObsByUuid(observationId); if (obs == null) { return null; } else { return convertOpenMRSToMRSObservation(obs); } } }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getByUniqueId(java.lang.String) */ @Override public Obs getByUniqueId(String uniqueId) { return Context.getObsService().getObsByUuid(uniqueId); }
@RequestParam(required = false, defaultValue = "RAW_VIEW") String view, HttpServletResponse response) throws Exception { Obs obs = obsService.getObsByUuid(uuid); if (!obs.isComplex()) { throw new IllegalRequestException("It is not a complex obs, thus have no data.");
@Override public Obs newObject() { return Context.getObsService().getObsByUuid(getUuidProperty()); }
@Override public Obs newObject() { return Context.getObsService().getObsByUuid(getUuidProperty()); }
@Override public Obs newObject() { return Context.getObsService().getObsByUuid(getUuidProperty()); }