Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@pramodpk89
Created April 30, 2020 13:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pramodpk89/08f658212cd06eda41fdd50fd2e7d04c to your computer and use it in GitHub Desktop.
Save pramodpk89/08f658212cd06eda41fdd50fd2e7d04c to your computer and use it in GitHub Desktop.
package com.ppk.covidcheck.service;
import com.ppk.covidcheck.model.Patient;
import com.ppk.covidcheck.model.Result;
import com.ppk.covidcheck.model.Symptomps;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
@Component
public class EvaluatePatientForCorona {
public Result evaluatePatient(Patient patient){
Result result=new Result();
Symptomps symptomps=patient.getSymptomps();
if(symptomps.isHasBreathingDifficulty() && symptomps.isHasCough() && symptomps.isHasFever() && symptomps.isHasTiredness())
{
result.setName(patient.getFirstName());
result.setResult("VERY LIKELY");
return result;
}
else {
result.setName(patient.getFirstName());
result.setResult("NOT LIKELY");
return result;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment