@Test public void saveObservations_shouldSaveObservationsForPatient() throws Exception, ObservationController.SaveObservationException { final Concept concept1 = new Concept() {{ setUuid("concept1"); }}; final Concept concept2 = new Concept() {{ setUuid("concept2"); }}; final List<Observation> observations = buildObservations(concept1, concept2); observationController.saveObservations(observations); verify(observationService).saveObservations(observations); }
public void saveObservations(List<Observation> observations) throws SaveObservationException { try { observationService.saveObservations(observations); } catch (IOException e) { throw new SaveObservationException(e); } }
ObservationController { public void saveObservations(List<Observation> observations) throws SaveObservationException { try { observationService.saveObservations(observations); } catch (IOException e) { throw new SaveObservationException(e); } } }
ObservationController { public void saveObservations(List<Observation> observations) throws SaveObservationException { try { observationService.saveObservations(observations); } catch (IOException e) { throw new SaveObservationException(e); } } ObservationController(ObservationService observationService, ConceptService conceptService,
                                 EncounterService encounterService, LastSyncTimeService lastSyncTimeService,
                                 SntpService sntpService); }
ObservationController { public void saveObservations(List<Observation> observations) throws SaveObservationException { try { observationService.saveObservations(observations); } catch (IOException e) { throw new SaveObservationException(e); } } ObservationController(ObservationService observationService, ConceptService conceptService,
                                 EncounterService encounterService, LastSyncTimeService lastSyncTimeService,
                                 SntpService sntpService); Concepts getConceptWithObservations(String patientUuid); Concepts getConceptWithObservations(String patientUuid, String conceptUuid ); List<Observation> getObservationsByPatientuuidAndConceptId(String patientUuid,int conceptid); List<Observation> getObservationsByEncounterId(int encounterId); List<Observation> getObservationsByEncounterType(int encounterTypeId,String patientUuid); int getObservationsCountByPatient(String patientUuid); int getConceptColor(String uuid); void replaceObservations(List<Observation> allObservations); Concepts searchObservationsGroupedByConcepts(String term, String patientUuid); Encounters getEncountersWithObservations(String patientUuid); Encounters getObservationsByEncounterUuid(String encounterUuid); List<Observation> getObservationsByPatient(String patientUuid); Encounters searchObservationsGroupedByEncounter(String term, String patientUuid); List<Observation> downloadObservationsByPatientUuidsAndConceptUuids(List<String> patientUuids, List<String> conceptUuids); void saveObservations(List<Observation> observations); void deleteObservations(List<Observation> observations); void deleteAllObservations(List<Concept> concepts); }
ObservationController { public void saveObservations(List<Observation> observations) throws SaveObservationException { try { observationService.saveObservations(observations); } catch (IOException e) { throw new SaveObservationException(e); } } ObservationController(ObservationService observationService, ConceptService conceptService,
                                 EncounterService encounterService, LastSyncTimeService lastSyncTimeService,
                                 SntpService sntpService); Concepts getConceptWithObservations(String patientUuid); Concepts getConceptWithObservations(String patientUuid, String conceptUuid ); List<Observation> getObservationsByPatientuuidAndConceptId(String patientUuid,int conceptid); List<Observation> getObservationsByEncounterId(int encounterId); List<Observation> getObservationsByEncounterType(int encounterTypeId,String patientUuid); int getObservationsCountByPatient(String patientUuid); int getConceptColor(String uuid); void replaceObservations(List<Observation> allObservations); Concepts searchObservationsGroupedByConcepts(String term, String patientUuid); Encounters getEncountersWithObservations(String patientUuid); Encounters getObservationsByEncounterUuid(String encounterUuid); List<Observation> getObservationsByPatient(String patientUuid); Encounters searchObservationsGroupedByEncounter(String term, String patientUuid); List<Observation> downloadObservationsByPatientUuidsAndConceptUuids(List<String> patientUuids, List<String> conceptUuids); void saveObservations(List<Observation> observations); void deleteObservations(List<Observation> observations); void deleteAllObservations(List<Concept> concepts);  }