private void updateRevisedFlagOfPreviousDiagnosis(
     BahmniDiagnosisRequest bahmniDiagnosisRequest, Concept bahmniDiagnosisRevisedConcept) {
   if (bahmniDiagnosisRequest.getPreviousObs() == null) {
     return;
   }
   Obs previousObs = obsService.getObsByUuid(bahmniDiagnosisRequest.getPreviousObs());
   updateRevisedFlag(previousObs, true, bahmniDiagnosisRevisedConcept);
   obsService.saveObs(previousObs, "Diagnosis is revised");
 }
  private void updateInitialDiagnosis(
      Obs diagnosisObs,
      BahmniDiagnosisRequest bahmniDiagnosis,
      Concept bahmniInitialDiagnosisConcept) {
    Obs obs = findOrCreateObs(diagnosisObs, bahmniInitialDiagnosisConcept);
    String initialDiagnosisUuid =
        bahmniDiagnosis.getPreviousObs() == null && obs.getId() == null
            ? diagnosisObs.getUuid()
            : bahmniDiagnosis.getFirstDiagnosis().getExistingObs();

    obs.setValueText(initialDiagnosisUuid);
    addToObsGroup(diagnosisObs, obs);
  }