-
-
Save pramodpk89/08f658212cd06eda41fdd50fd2e7d04c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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