|
@@ -163,7 +163,12 @@ public class PHRService {
|
|
|
PatientPHRLatestDTO phrLatestDTO = new PatientPHRLatestDTO();
|
|
|
phrLatestDTO.setPatientIdx(dto.getPatientIdx());
|
|
|
phrLatestDTO.setSymptomYN("Y");
|
|
|
- mapperPHRLatest.insertPHRLatest(phrLatestDTO);
|
|
|
+ PatientPHRLatestDTO patient = mapperPHRLatest.selectPHRLatest(phrLatestDTO);
|
|
|
+ if (patient == null) {
|
|
|
+ mapperPHRLatest.insertPHRLatest(phrLatestDTO);
|
|
|
+ } else {
|
|
|
+ mapperPHRLatest.updatePHRLatest(phrLatestDTO);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public int selectSymptomCount(PatientSymptomSimDTO dto) {
|