|
@@ -14,8 +14,8 @@ import org.springframework.web.servlet.ModelAndView;
|
|
import com.lemon.lifecenter.common.LifeCenterController;
|
|
import com.lemon.lifecenter.common.LifeCenterController;
|
|
import com.lemon.lifecenter.common.LifeCenterFunction;
|
|
import com.lemon.lifecenter.common.LifeCenterFunction;
|
|
import com.lemon.lifecenter.common.LifeCenterSessionController;
|
|
import com.lemon.lifecenter.common.LifeCenterSessionController;
|
|
-import com.lemon.lifecenter.dto.LoginDTO;
|
|
|
|
import com.lemon.lifecenter.dto.PatientPHRHistoryDTO;
|
|
import com.lemon.lifecenter.dto.PatientPHRHistoryDTO;
|
|
|
|
+import com.lemon.lifecenter.dto.PatientSymptomSimDTO;
|
|
import com.lemon.lifecenter.service.PHRService;
|
|
import com.lemon.lifecenter.service.PHRService;
|
|
|
|
|
|
@Controller
|
|
@Controller
|
|
@@ -38,7 +38,9 @@ public class MobileHealthController extends LifeCenterController {
|
|
}
|
|
}
|
|
|
|
|
|
@RequestMapping("/health/insert")
|
|
@RequestMapping("/health/insert")
|
|
- public String healthInsert( @ModelAttribute("dto") final PatientPHRHistoryDTO dto,
|
|
|
|
|
|
+ public String healthInsert(
|
|
|
|
+ @ModelAttribute("pdto") final PatientPHRHistoryDTO pdto,
|
|
|
|
+ @ModelAttribute("sdto") final PatientSymptomSimDTO sdto,
|
|
@RequestParam( value="phrTypeAnother", required=false, defaultValue="" ) String phrTypeAnother,
|
|
@RequestParam( value="phrTypeAnother", required=false, defaultValue="" ) String phrTypeAnother,
|
|
@RequestParam( value="phrValueAnother", required=false, defaultValue="" ) String phrValueAnother,
|
|
@RequestParam( value="phrValueAnother", required=false, defaultValue="" ) String phrValueAnother,
|
|
@RequestParam( value="phrValueAnother2", required=false, defaultValue="" ) String phrValueAnother2,
|
|
@RequestParam( value="phrValueAnother2", required=false, defaultValue="" ) String phrValueAnother2,
|
|
@@ -46,25 +48,31 @@ public class MobileHealthController extends LifeCenterController {
|
|
String patientName = LifeCenterSessionController.getSession( request, "sesMName" );
|
|
String patientName = LifeCenterSessionController.getSession( request, "sesMName" );
|
|
int patientIdx = Integer.valueOf( LifeCenterSessionController.getSession( request, "sesMpIdx" ) );
|
|
int patientIdx = Integer.valueOf( LifeCenterSessionController.getSession( request, "sesMpIdx" ) );
|
|
|
|
|
|
- System.out.println(" phrValue : " + dto.getPhrValue() );
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- dto.setPatientIdx( patientIdx );
|
|
|
|
- dto.setRecordedByName( patientName+"(환자)" );
|
|
|
|
- phrService.insertPHR( dto );
|
|
|
|
-
|
|
|
|
- if( !phrTypeAnother.trim().equals( "" ) ) {
|
|
|
|
- dto.setPhrType( phrTypeAnother );
|
|
|
|
|
|
+ if( pdto.getPhrType().equals( "symptom" ) ) {
|
|
|
|
|
|
- if( !phrValueAnother.equals( "" ) ) {
|
|
|
|
- dto.setPhrValue( Float.valueOf( phrValueAnother ) );
|
|
|
|
- }
|
|
|
|
|
|
+ sdto.setPatientIdx( patientIdx );
|
|
|
|
+ sdto.setRecordedByName( patientName + "(환자)" );
|
|
|
|
+ phrService.insertSymptom( sdto );
|
|
|
|
|
|
- if( !phrValueAnother2.equals( "" ) ) {
|
|
|
|
- dto.setPhrValue2( Float.valueOf( phrValueAnother2 ) );
|
|
|
|
- }
|
|
|
|
|
|
+ } else {
|
|
|
|
+
|
|
|
|
+ pdto.setPatientIdx( patientIdx );
|
|
|
|
+ pdto.setRecordedByName( patientName + "(환자)" );
|
|
|
|
+ phrService.insertPHR( pdto );
|
|
|
|
|
|
- phrService.insertPHR( dto );
|
|
|
|
|
|
+ if( !phrTypeAnother.trim().equals( "" ) ) {
|
|
|
|
+ pdto.setPhrType( phrTypeAnother );
|
|
|
|
+
|
|
|
|
+ if( !phrValueAnother.equals( "" ) ) {
|
|
|
|
+ pdto.setPhrValue( Float.valueOf( phrValueAnother ) );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if( !phrValueAnother2.equals( "" ) ) {
|
|
|
|
+ pdto.setPhrValue2( Float.valueOf( phrValueAnother2 ) );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ phrService.insertPHR( pdto );
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
LifeCenterFunction.scriptMessage(response, "alert('기록되었습니다');location.href='/mobile/menu';" );
|
|
LifeCenterFunction.scriptMessage(response, "alert('기록되었습니다');location.href='/mobile/menu';" );
|