class RepositoryImpl extends AbstractC32DaoAware implements Repository {

	@Override
	public C32Document getDocument(Date docDate, String patientId) {
		List<C32DocumentEntity> docList = getAllStoredDocuments(patientId); 
		docList = getCompletedDocuments(docList);
		C32DocumentEntity doc = getDocumentByDate(docDate, docList);

		if (doc==null) {
			throw new RuntimeException("document for date:" + docDate + " & id:" + patientId + " does not exist");
		}
		
		return getC32Doc(doc);
	}

}