/** Type level (history of all resources of a given type) */ @History(type=Patient.class) Bundle getHistoryPatientType();
@History public List<T> historyType() { return myTypeHistory; }
/** Server level (history of ALL resources) */ @History Bundle getHistoryServer();
/** Instance level (history of a specific resource instance by type and ID) */ @History(type=Patient.class) Bundle getHistoryPatientInstance(@IdParam IdType theId);
/** * Either (or both) of the "since" and "count" paramaters can * also be included in any of the methods above. */ @History Bundle getHistoryServerWithCriteria(@Since Date theDate, @Count Integer theCount);
@History public List<T> historyInstance(@IdParam IIdType theId) { LinkedList<T> retVal = myIdToHistory.get(theId.getIdPart()); if (retVal == null) { throw new ResourceNotFoundException(theId); } return retVal; }
@History() public List<Patient> getPatientHistory( @IdParam IdType theId, @Since InstantType theSince, @At DateRangeParam theAt ) { List<Patient> retVal = new ArrayList<Patient>(); Patient patient = new Patient(); patient.addName().setFamily("Smith"); // Set the ID and version patient.setId(theId.withVersion("1")); // ...populate the rest... return retVal; } //END SNIPPET: history
@History public IBundleProvider historyServer(HttpServletRequest theRequest, @Since Date theDate, @At DateRangeParam theAt, RequestDetails theRequestDetails) { startRequest(theRequest); try { DateRangeParam range = super.processSinceOrAt(theDate, theAt); return myDao.history(range.getLowerBoundAsInstant(), range.getUpperBoundAsInstant(), theRequestDetails); } finally { endRequest(theRequest); } }
@History public IBundleProvider getHistoryForResourceType( HttpServletRequest theRequest, @Since Date theSince, @At DateRangeParam theAt, RequestDetails theRequestDetails) { startRequest(theRequest); try { DateRangeParam sinceOrAt = processSinceOrAt(theSince, theAt); return myDao.history(sinceOrAt.getLowerBoundAsInstant(), sinceOrAt.getUpperBoundAsInstant(), theRequestDetails); } finally { endRequest(theRequest); } }
@History public List<T> historyType() { return myTypeHistory; }
@History public IBundleProvider getHistoryForResourceInstance( HttpServletRequest theRequest, @IdParam IIdType theId, @Since Date theSince, @At DateRangeParam theAt, RequestDetails theRequestDetails) { startRequest(theRequest); try { DateRangeParam sinceOrAt = processSinceOrAt(theSince, theAt); return myDao.history(theId, sinceOrAt.getLowerBoundAsInstant(), sinceOrAt.getUpperBoundAsInstant(), theRequestDetails); } finally { endRequest(theRequest); } }
@History public List<T> historyInstance(@IdParam IIdType theId) { LinkedList<T> retVal = myIdToHistory.get(theId.getIdPart()); if (retVal == null) { throw new ResourceNotFoundException(theId); } return retVal; }
@History public IBundleProvider historyServer(HttpServletRequest theRequest, @Since Date theDate, @At DateRangeParam theAt, RequestDetails theRequestDetails) { startRequest(theRequest); try { DateRangeParam range = super.processSinceOrAt(theDate, theAt); return myDao.history(range.getLowerBoundAsInstant(), range.getUpperBoundAsInstant(), theRequestDetails); } finally { endRequest(theRequest); } }
@History public IBundleProvider getHistoryForResourceType( HttpServletRequest theRequest, @Since Date theSince, @At DateRangeParam theAt, RequestDetails theRequestDetails) { startRequest(theRequest); try { DateRangeParam sinceOrAt = processSinceOrAt(theSince, theAt); return myDao.history(sinceOrAt.getLowerBoundAsInstant(), sinceOrAt.getUpperBoundAsInstant(), theRequestDetails); } finally { endRequest(theRequest); } }
@History public IBundleProvider getHistoryForResourceInstance( HttpServletRequest theRequest, @IdParam IIdType theId, @Since Date theSince, @At DateRangeParam theAt, RequestDetails theRequestDetails) { startRequest(theRequest); try { DateRangeParam sinceOrAt = processSinceOrAt(theSince, theAt); return myDao.history(theId, sinceOrAt.getLowerBoundAsInstant(), sinceOrAt.getUpperBoundAsInstant(), theRequestDetails); } finally { endRequest(theRequest); } }