Ver Fonte

Merge branch 'master' into simplatform

sjpark há 5 anos atrás
pai
commit
60be22ff4e

+ 13 - 0
src/main/java/com/lemon/lifecenter/common/LifeCenterFunction.java

@@ -371,4 +371,17 @@ public class LifeCenterFunction {
 
         return result.toString();
     }
+
+    public static String phone(String src) {
+        if (src == null) {
+          return "";
+        }
+        if (src.length() == 8) {
+          return src.replaceFirst("^([0-9]{4})([0-9]{4})$", "$1-$2");
+        } else if (src.length() == 12) {
+          return src.replaceFirst("(^[0-9]{4})([0-9]{4})([0-9]{4})$", "$1-$2-$3");
+        }
+        return src.replaceFirst("(^02|[0-9]{3})([0-9]{3,4})([0-9]{4})$", "$1-$2-$3");
+    }
+    
 }

+ 5 - 3
src/main/java/com/lemon/lifecenter/controller/MobileLoginController.java

@@ -76,14 +76,16 @@ public class MobileLoginController extends LifeCenterController {
             LifeCenterSessionController.setSession(request, "sesMGender", dto.getGender());
             LifeCenterSessionController.setSession(request, "sesMWardNum", dto.getWardNumber());
             LifeCenterSessionController.setSession(request, "sesMRoomNum", dto.getRoomNumber());
-            LifeCenterSessionController.setSession(request, "sesMCenterCode", dto.getCenterCode());
-            
+            LifeCenterSessionController.setSession(request, "sesMCenterCode", String.valueOf(dto.getCenterCode()));
+
+            logger.error("dto.getPw()dto.getPw() -- > " + dto.getPw());
+            object.put("id", dto.getId());
+            object.put("pw", dto.getPw());
             resultCode = "00";
         }
         
         object.put("code", resultCode);
         object.put("message", message);
-        
         return object.toString();
     }
     

+ 1 - 1
src/main/java/com/lemon/lifecenter/controller/MobileNonFaceController.java

@@ -71,7 +71,7 @@ public class MobileNonFaceController extends LifeCenterController {
         mv.addObject("token", token);
         mv.addObject("room_id", roomId);
         mv.addObject("member_name", patientName);
-        mv.addObject("classify", "p");
+        mv.addObject("classify", "p"); // p이면 환자 d이면 의사
         mv.addObject("hashData", hashData);
         
         return mv;

+ 152 - 15
src/main/java/com/lemon/lifecenter/controller/PatientController.java

@@ -1,17 +1,22 @@
 package com.lemon.lifecenter.controller;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.json.JSONObject;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.ModelAttribute;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.ModelAndView;
 
 import com.lemon.lifecenter.common.LifeCenterConfigVO;
@@ -97,53 +102,131 @@ public class PatientController extends LifeCenterController {
     @RequestMapping("/new")
     public ModelAndView patientNew( HttpServletRequest request,HttpServletResponse response ) {
         ModelAndView mv = setMV("patient/new");
-        
         String sesCenterCode  = LifeCenterSessionController.getSession( request, "sesCenterCode" );
-        
-        System.out.println( "sesCenterCode: " + sesCenterCode );
+        String sesId  = LifeCenterSessionController.getSession( request, "sesId" );
         
         // 세션의 센터코드 들고와서 치료센터명 조회후 view 전달
         CenterInfoDTO dto = new CenterInfoDTO();
         dto.setCenterCode( Integer.valueOf( sesCenterCode ) );
+        dto.setStaffId( sesId );
         
         int centerCount   = centerService.selectCenterCount( dto );
         
         String centerName = "";
         
         if( centerCount > 0 ) {
-            centerName = centerService.selectCenterInfo( dto ).getCenterName();
+            centerName = centerService.selectCenterInfoOne( dto ).getCenterName();
         }
         
-        System.out.println("centerCount : " + centerCount );
         mv.addObject( "centerName", centerName );
         mv.addObject( "centerCount", centerCount );
+        mv.addObject( "actionType", "new" );
         
         return mv;
     }
     
     @RequestMapping("/new/insert")
-    public String patientNewInsert() {
-        ModelAndView mv = setMV("patient/info");
+    public String patientNewInsert(
+            @ModelAttribute("dto") final PatientDTO dto,
+            HttpServletRequest request,HttpServletResponse response ) throws Exception {
+        int sesCenterCode = Integer.valueOf( LifeCenterSessionController.getSession( request, "sesCenterCode" ) ) ;
+        String sesId  = LifeCenterSessionController.getSession( request, "sesId" );
+        
+        //patientCare Insert
+        System.out.println( "dto.getJumin().substring(2) : " + dto.getJumin().replace( "-" , "" ).substring(2) );
+        String jumin = dto.getJumin().replace( "-" , "" );
+        
+        dto.setId( dto.getWardNumber().trim() + dto.getRoomNumber().trim() );
+        dto.setPw( LifeCenterFunction.aesEncrypt( config.aesKey, config.IV, jumin.substring(2) ) );
+        dto.setJumin( jumin );
+        dto.setCenterCode( sesCenterCode );
+        dto.setState( "H" ); // H : 입소
+        dto.setCreateBy( sesId );
+        
+        patientService.insertPatientCare( dto );  // 환지 기본정보 insert
         
-        // 트랜잭션
-        // 환자기본정보 insert
-        // 환자 기저질환 여부 insert (예 선택인경우)
-        // 현재증상 insert
+        int patientIdx = dto.getPatientIdx();
+        dto.setPatientIdx( patientIdx );
         
-        return "redirect:/patient/info";
+        //patientDisease Insert
+        dto.setEtcCheck( dto.getEctCheckDisease() );
+        dto.setEtcContent( dto.getEtcContentDisease() );
+        
+        patientService.insertPatientDisease( dto );
+        
+        
+        //patientSymptom Insert
+        dto.setEtcCheck( dto.getEctCheckSymptom() );
+        dto.setEtcContent( dto.getEtcContentSymptom() );
+        dto.setBloodPressureLevel( dto.getBloodPressureLevelCon() + "|" + dto.getBloodPressureLevelRel() );
+        
+        patientService.insertPatientSymptom( dto );
+        
+        return "redirect:/patient/info?patientIdx=" + patientIdx;
     }
 
     @RequestMapping("/info")
-    public ModelAndView patientInfo() {
+    public ModelAndView patientInfo( @ModelAttribute("dto") PatientDTO dto ) {
         ModelAndView mv = setMV("patient/info");
 
+        int patientIdx = dto.getPatientIdx();
+        dto = patientService.selectPatientOne(dto);
+        
+        String jumin = dto.getJumin();
+        jumin = jumin.substring(0, 4) + "년 " + jumin.substring(4, 6) + "월 " + jumin.substring(6, 8) + "일";
+        dto.setJumin(jumin);
+        
+        dto.setPatientPhone(LifeCenterFunction.phone(dto.getPatientPhone()));
+        dto.setGuardianPhone(LifeCenterFunction.phone(dto.getGuardianPhone()));
+        
+        String bloodPress = dto.getBloodPressureLevel();
+        
+        if (!bloodPress.equals("")) {
+            String[] bloodPressureLevel = dto.getBloodPressureLevel().split("[|]");
+            logger.error("bloodPress -- > " + bloodPressureLevel[0]);
+            logger.error("bloodPress -- > " + bloodPressureLevel[1]);
+        }
+        
+        mv.addObject("patientIdx", patientIdx);
+        mv.addObject("info", dto);
         return mv;
     }
 
     @RequestMapping("/edit")
-    public ModelAndView patientEdit() {
+    public ModelAndView patientEdit( 
+            @ModelAttribute("dto") PatientDTO patientDTO,
+            HttpServletRequest request,HttpServletResponse response ) {
+        String sesCenterCode  = LifeCenterSessionController.getSession( request, "sesCenterCode" );
+        String sesId  = LifeCenterSessionController.getSession( request, "sesId" );
+        
+        int patientIdx = patientDTO.getPatientIdx();
+        patientDTO = patientService.selectPatientOne( patientDTO );
+        
+        
+        // 세션의 센터코드 들고와서 치료센터명 조회후 view 전달
+        // 센터가 존재하는지 체크
+        CenterInfoDTO dto = new CenterInfoDTO();
+        dto.setCenterCode( Integer.valueOf( sesCenterCode ) );
+        dto.setStaffId( sesId );
+        String centerName = "";
+        int centerCount   = centerService.selectCenterCount( dto );
+        
+        if( centerCount > 0 ) {
+            centerName = centerService.selectCenterInfoOne( dto ).getCenterName();
+        } else {
+            LifeCenterFunction.scriptMessage(response, "alert('삭제되었거나 존재하지않는 치료센터입니다.');" );
+            // return ""; 아직처리안함
+        }
+        
         ModelAndView mv = setMV("patient/edit");
-
+        
+        mv.addObject( "centerName", centerName );
+        mv.addObject( "centerCount", centerCount );
+        
+        mv.addObject( "patientIdx", patientIdx );
+        mv.addObject( "patientData", patientDTO );
+        mv.addObject( "actionType", "edit" );
+        
         return mv;
     }
 
@@ -153,4 +236,58 @@ public class PatientController extends LifeCenterController {
 
         return mv;
     }
+    
+    @RequestMapping( value="/nonFaceStart", method = RequestMethod.POST )
+    @ResponseBody
+    public String nonFaceStart(
+            @RequestParam( value="pId", required = true ) String pId,
+            @RequestParam( value="roomId", required = true ) String roomId,
+            @RequestParam( value="pName", required = true ) String pName,
+            HttpServletRequest request, HttpServletResponse response) throws Exception {
+        
+        String salt = LifeCenterFunction.getSalt();
+        String timeStamp = LifeCenterFunction.getTimestamp();
+        String signature = LifeCenterFunction.getSignature(config.nonFaceApiSecret, salt, timeStamp);
+        
+        String userId = LifeCenterSessionController.getSession(request, "sesId");
+        String userNm = LifeCenterSessionController.getSession(request, "sesName");
+        
+        HashMap<String, String> data = new HashMap<String, String>();
+        data.put("api_key", config.nonFaceApiKey);
+        data.put("salt", salt);
+        data.put("timestamp", timeStamp);
+        data.put("signature", signature);
+        data.put("client_id", config.nonFaceClientId);
+        data.put("member_id", userId);
+        
+        String result = LifeCenterFunction.httpUrlConnection(config.nonFaceApiTokenUrl, data);
+        
+        JSONObject object = new JSONObject(result);
+        String message = "";
+        String token = "";
+        for(String key : object.keySet()) {
+            logger.error("key -- > " + key);
+            if (key.equals("errorCode")) {
+                message = object.getString("message");
+            } else if (key.equals("token")){
+                token = object.getString("token");
+            }
+        }
+        
+        if (!message.equals("")) {
+            //error
+        }
+        String hashData = LifeCenterFunction.getSignature(config.nonFaceApiSecret, config.nonFaceApiKey, roomId + userId); //"1011503101"
+        
+        object.put("api_key", config.nonFaceApiKey);
+        object.put("member_id", userId);
+        object.put("token", token);
+        object.put("room_id", roomId);
+        object.put("member_name", userNm);
+        object.put("classify", "d"); // p이면 환자 d이면 의사
+        object.put("hashData", hashData);
+        logger.error("pid -- > " + hashData);
+        
+        return object.toString();
+    }
 }

+ 30 - 2
src/main/java/com/lemon/lifecenter/controller/StaffController.java

@@ -27,6 +27,7 @@ import com.lemon.lifecenter.dto.CenterInfoDTO;
 import com.lemon.lifecenter.dto.GroupListDTO;
 import com.lemon.lifecenter.dto.LoginDTO;
 import com.lemon.lifecenter.dto.StaffDTO;
+import com.lemon.lifecenter.service.CenterService;
 import com.lemon.lifecenter.service.GroupListService;
 import com.lemon.lifecenter.service.LoginService;
 import com.lemon.lifecenter.service.StaffService;
@@ -50,8 +51,15 @@ public class StaffController extends LifeCenterController {
     @Autowired
     private GroupListService groupListService;
     
+    @Autowired
+    private CenterService centerService;
+    
     @RequestMapping("/new")
-    public ModelAndView staffNew() throws Exception {
+    public ModelAndView staffNew( HttpServletRequest request,HttpServletResponse response ) throws Exception {
+        int sesCenterCode  = Integer.valueOf( LifeCenterSessionController.getSession( request, "sesCenterCode" ) ) ;
+        int sesGroupIdx    = Integer.valueOf( LifeCenterSessionController.getSession( request, "sesGroupIdx" ) );
+        String sesId       = LifeCenterSessionController.getSession( request, "sesId" );
+        
         List<CenterInfoDTO> centerList = memberService.selectCenterList();
         
         ModelAndView mv = setMV("staff/new");
@@ -59,13 +67,33 @@ public class StaffController extends LifeCenterController {
         GroupListDTO dto = new GroupListDTO();
         List<GroupListDTO> groupList = groupListService.selectGroupList(dto);
         
+        
+        List<CenterInfoDTO> selectCenter = new ArrayList<CenterInfoDTO>();
+        
+        for( CenterInfoDTO c : centerList ) {
+            if( sesGroupIdx == 1 ) {
+                selectCenter.add( c );
+            } else {
+                if( c.getCenterCode() == sesCenterCode ) {
+                    selectCenter.add( c );
+                }
+            }
+        }
+        
+        CenterInfoDTO centerDTO = new CenterInfoDTO();
+        
+        centerDTO.setStaffId( sesId );
+        centerDTO.setCenterCode( sesCenterCode );
+        
+        centerService.selectCenterInfoOne( centerDTO );
+        
         for( GroupListDTO data : groupList ) {
 //            data.setPermissions( LifeCenterFunction.aesEncrypt( config.aesKey, config.IV, data.getPermissions() ) );
             data.setEncryptIdx( LifeCenterFunction.aesEncrypt( config.aesKey, config.IV, String.valueOf( data.getIdx() ) ) );
         }
         
         
-        mv.addObject( "centerList", centerList );
+        mv.addObject( "centerList", selectCenter );
         mv.addObject( "groupList", groupList );
         
         return mv;

+ 273 - 222
src/main/java/com/lemon/lifecenter/dto/PatientDTO.java

@@ -13,7 +13,7 @@ public class PatientDTO {
     private String finamClinicDate;
     private String hospitalizationDate;
     private String state;
-    private String centerCode;
+    private int centerCode;
     private String jumin;
     private String patientPhone;
     private String guardianPhone;
@@ -37,29 +37,33 @@ public class PatientDTO {
     private String pw;
     
     // patient_disease
-    private String highBloodPressureCheck;
-    private String lowBloodPressureCheck;
-    private String organTransplantCheck;
-    private String diabetesCheck;
-    private String respiratoryDiseaseCheck;
-    private String immunologicalDiseaseCheck;
-    private String dyspneaCheck;
-    private String coldFitCheck;
-    private String musclePainCheck;
-    private String headacheCheck;
-    private String soreThroatCheck;
-    private String smellPalateCheck;
-    private String fatigueCheck;
-    private String heartDisease;
-    private String liverDisease;
-    private String operation;
+    private String highBloodPressureCheck="N";
+    private String lowBloodPressureCheck="N";
+    private String organTransplantCheck="N";
+    private String diabetesCheck="N";
+    private String respiratoryDiseaseCheck="N";
+    private String immunologicalDiseaseCheck="N";
+    private String dyspneaCheck="N";
+    private String coldFitCheck="N";
+    private String musclePainCheck="N";
+    private String headacheCheck="N";
+    private String soreThroatCheck="N";
+    private String smellPalateCheck="N";
+    private String fatigueCheck="N";
+    private String heartDisease="N";
+    private String liverDisease="N";
+    private String operation="N";
     private String operationContent;
-    private String allergyCheck;
-    private String kidneyDisease;
-    private String cancerCheck;
+    private String allergyCheck="N";
+    private String kidneyDisease="N";
+    private String cancerCheck="N";
     private String cancerName;
-    private String etcCheck;
+    private String etcCheck="N";
     private String etcContent;
+    private String ectCheckDisease="N";
+    private String ectCheckSymptom="N";
+    private String etcContentDisease;
+    private String etcContentSymptom;
     
     //patient_symptom
     private String feverCheck;
@@ -73,12 +77,12 @@ public class PatientDTO {
     //private String fatigueCheck;
     //private String etcCheck;
     //private String etcContent;
-    private String chestPain;
-    private String noseCheck;
-    private String vomitingCheck;
+    private String chestPain="N";
+    private String noseCheck="N";
+    private String vomitingCheck="N";
     //private String musclePainCheck;
     //private String soreThroatCheck;
-    private String diarrheaCheck;
+    private String diarrheaCheck="N";
     //private String headacheCheck;
     //private String dyspneaCheck;
     private String pulseRate;
@@ -86,99 +90,193 @@ public class PatientDTO {
     private String bloodPressureLevel;
     private String oxygenSaturation;
     
+    private String bloodPressureLevelCon;
+    private String bloodPressureLevelRel;
+    
+    private String centerName = "";
+    
     private int limit;
     private int limitMax;
     
-    
-    public String getFeverCheck() {
-        return feverCheck;
+    public int getPatientIdx() {
+        return patientIdx;
     }
-    public void setFeverCheck(String feverCheck) {
-        this.feverCheck = feverCheck;
+    public void setPatientIdx(int patientIdx) {
+        this.patientIdx = patientIdx;
     }
-    public String getCoughCheck() {
-        return coughCheck;
+    public String getPatientName() {
+        return patientName;
     }
-    public void setCoughCheck(String coughCheck) {
-        this.coughCheck = coughCheck;
+    public void setPatientName(String patientName) {
+        this.patientName = patientName;
     }
-    public String getColic() {
-        return colic;
+    public String getGender() {
+        return gender;
     }
-    public void setColic(String colic) {
-        this.colic = colic;
+    public void setGender(String gender) {
+        this.gender = gender;
     }
-    public String getSputumCheck() {
-        return sputumCheck;
+    public String getWardNumber() {
+        return wardNumber;
     }
-    public void setSputumCheck(String sputumCheck) {
-        this.sputumCheck = sputumCheck;
+    public void setWardNumber(String wardNumber) {
+        this.wardNumber = wardNumber;
     }
-    public String getOcinCheck() {
-        return ocinCheck;
+    public String getRoomNumber() {
+        return roomNumber;
     }
-    public void setOcinCheck(String ocinCheck) {
-        this.ocinCheck = ocinCheck;
+    public void setRoomNumber(String roomNumber) {
+        this.roomNumber = roomNumber;
     }
-    public String getFeverRight() {
-        return feverRight;
+    public String getFinamClinicDate() {
+        return finamClinicDate;
     }
-    public void setFeverRight(String feverRight) {
-        this.feverRight = feverRight;
+    public void setFinamClinicDate(String finamClinicDate) {
+        this.finamClinicDate = finamClinicDate;
     }
-    public String getFeverLeft() {
-        return feverLeft;
+    public String getHospitalizationDate() {
+        return hospitalizationDate;
     }
-    public void setFeverLeft(String feverLeft) {
-        this.feverLeft = feverLeft;
+    public void setHospitalizationDate(String hospitalizationDate) {
+        this.hospitalizationDate = hospitalizationDate;
     }
-    public String getChestPain() {
-        return chestPain;
+    public String getState() {
+        return state;
     }
-    public void setChestPain(String chestPain) {
-        this.chestPain = chestPain;
+    public void setState(String state) {
+        this.state = state;
     }
-    public String getNoseCheck() {
-        return noseCheck;
+    public int getCenterCode() {
+        return centerCode;
     }
-    public void setNoseCheck(String noseCheck) {
-        this.noseCheck = noseCheck;
+    public void setCenterCode(int centerCode) {
+        this.centerCode = centerCode;
     }
-    public String getVomitingCheck() {
-        return vomitingCheck;
+    public String getJumin() {
+        return jumin;
     }
-    public void setVomitingCheck(String vomitingCheck) {
-        this.vomitingCheck = vomitingCheck;
+    public void setJumin(String jumin) {
+        this.jumin = jumin;
     }
-    public String getDiarrheaCheck() {
-        return diarrheaCheck;
+    public String getPatientPhone() {
+        return patientPhone;
     }
-    public void setDiarrheaCheck(String diarrheaCheck) {
-        this.diarrheaCheck = diarrheaCheck;
+    public void setPatientPhone(String patientPhone) {
+        this.patientPhone = patientPhone;
     }
-    public String getPulseRate() {
-        return pulseRate;
+    public String getGuardianPhone() {
+        return guardianPhone;
     }
-    public void setPulseRate(String pulseRate) {
-        this.pulseRate = pulseRate;
+    public void setGuardianPhone(String guardianPhone) {
+        this.guardianPhone = guardianPhone;
     }
-    public String getRespirationRate() {
-        return respirationRate;
+    public String getSymptomStartDate() {
+        return symptomStartDate;
     }
-    public void setRespirationRate(String respirationRate) {
-        this.respirationRate = respirationRate;
+    public void setSymptomStartDate(String symptomStartDate) {
+        this.symptomStartDate = symptomStartDate;
     }
-    public String getBloodPressureLevel() {
-        return bloodPressureLevel;
+    public String getConfirmationDate() {
+        return confirmationDate;
     }
-    public void setBloodPressureLevel(String bloodPressureLevel) {
-        this.bloodPressureLevel = bloodPressureLevel;
+    public void setConfirmationDate(String confirmationDate) {
+        this.confirmationDate = confirmationDate;
     }
-    public String getOxygenSaturation() {
-        return oxygenSaturation;
+    public String getDisisolationDate() {
+        return disisolationDate;
     }
-    public void setOxygenSaturation(String oxygenSaturation) {
-        this.oxygenSaturation = oxygenSaturation;
+    public void setDisisolationDate(String disisolationDate) {
+        this.disisolationDate = disisolationDate;
+    }
+    public String getBasalDiseaseYn() {
+        return basalDiseaseYn;
+    }
+    public void setBasalDiseaseYn(String basalDiseaseYn) {
+        this.basalDiseaseYn = basalDiseaseYn;
+    }
+    public String getDrugYn() {
+        return drugYn;
+    }
+    public void setDrugYn(String drugYn) {
+        this.drugYn = drugYn;
+    }
+    public String getDrugContent() {
+        return drugContent;
+    }
+    public void setDrugContent(String drugContent) {
+        this.drugContent = drugContent;
+    }
+    public String getPregnancyStatus() {
+        return pregnancyStatus;
+    }
+    public void setPregnancyStatus(String pregnancyStatus) {
+        this.pregnancyStatus = pregnancyStatus;
+    }
+    public String getPregnancyWeek() {
+        return pregnancyWeek;
+    }
+    public void setPregnancyWeek(String pregnancyWeek) {
+        this.pregnancyWeek = pregnancyWeek;
+    }
+    public String getId() {
+        return id;
+    }
+    public void setId(String id) {
+        this.id = id;
+    }
+    public String getCreateDate() {
+        return createDate;
+    }
+    public void setCreateDate(String createDate) {
+        this.createDate = createDate;
+    }
+    public String getUpdateDate() {
+        return updateDate;
+    }
+    public void setUpdateDate(String updateDate) {
+        this.updateDate = updateDate;
+    }
+    public String getCreateBy() {
+        return createBy;
+    }
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+    public String getUpdateBy() {
+        return updateBy;
+    }
+    public void setUpdateBy(String updateBy) {
+        this.updateBy = updateBy;
+    }
+    public String getNum() {
+        return num;
+    }
+    public void setNum(String num) {
+        this.num = num;
+    }
+    public String getAge() {
+        return age;
+    }
+    public void setAge(String age) {
+        this.age = age;
+    }
+    public String getStartDate() {
+        return startDate;
+    }
+    public void setStartDate(String startDate) {
+        this.startDate = startDate;
+    }
+    public String getEndDate() {
+        return endDate;
+    }
+    public void setEndDate(String endDate) {
+        this.endDate = endDate;
+    }
+    public String getPw() {
+        return pw;
+    }
+    public void setPw(String pw) {
+        this.pw = pw;
     }
     public String getHighBloodPressureCheck() {
         return highBloodPressureCheck;
@@ -318,185 +416,137 @@ public class PatientDTO {
     public void setEtcContent(String etcContent) {
         this.etcContent = etcContent;
     }
-    public int getPatientIdx() {
-        return patientIdx;
-    }
-    public void setPatientIdx(int patientIdx) {
-        this.patientIdx = patientIdx;
-    }
-    public String getPatientName() {
-        return patientName;
-    }
-    public void setPatientName(String patientName) {
-        this.patientName = patientName;
-    }
-    public String getGender() {
-        return gender;
-    }
-    public void setGender(String gender) {
-        this.gender = gender;
-    }
-    public String getWardNumber() {
-        return wardNumber;
-    }
-    public void setWardNumber(String wardNumber) {
-        this.wardNumber = wardNumber;
-    }
-    public String getRoomNumber() {
-        return roomNumber;
-    }
-    public void setRoomNumber(String roomNumber) {
-        this.roomNumber = roomNumber;
-    }
-    public String getFinamClinicDate() {
-        return finamClinicDate;
-    }
-    public void setFinamClinicDate(String finamClinicDate) {
-        this.finamClinicDate = finamClinicDate;
-    }
-    public String getHospitalizationDate() {
-        return hospitalizationDate;
-    }
-    public void setHospitalizationDate(String hospitalizationDate) {
-        this.hospitalizationDate = hospitalizationDate;
-    }
-    public String getState() {
-        return state;
-    }
-    public void setState(String state) {
-        this.state = state;
+    public String getEctCheckDisease() {
+        return ectCheckDisease;
     }
-    public String getCenterCode() {
-        return centerCode;
+    public void setEctCheckDisease(String ectCheckDisease) {
+        this.ectCheckDisease = ectCheckDisease;
     }
-    public void setCenterCode(String centerCode) {
-        this.centerCode = centerCode;
+    public String getEctCheckSymptom() {
+        return ectCheckSymptom;
     }
-    public String getJumin() {
-        return jumin;
-    }
-    public void setJumin(String jumin) {
-        this.jumin = jumin;
+    public void setEctCheckSymptom(String ectCheckSymptom) {
+        this.ectCheckSymptom = ectCheckSymptom;
     }
-    public String getPatientPhone() {
-        return patientPhone;
+    public String getEtcContentDisease() {
+        return etcContentDisease;
     }
-    public void setPatientPhone(String patientPhone) {
-        this.patientPhone = patientPhone;
+    public void setEtcContentDisease(String etcContentDisease) {
+        this.etcContentDisease = etcContentDisease;
     }
-    public String getGuardianPhone() {
-        return guardianPhone;
+    public String getEtcContentSymptom() {
+        return etcContentSymptom;
     }
-    public void setGuardianPhone(String guardianPhone) {
-        this.guardianPhone = guardianPhone;
+    public void setEtcContentSymptom(String etcContentSymptom) {
+        this.etcContentSymptom = etcContentSymptom;
     }
-    public String getSymptomStartDate() {
-        return symptomStartDate;
+    public String getFeverCheck() {
+        return feverCheck;
     }
-    public void setSymptomStartDate(String symptomStartDate) {
-        this.symptomStartDate = symptomStartDate;
+    public void setFeverCheck(String feverCheck) {
+        this.feverCheck = feverCheck;
     }
-    public String getConfirmationDate() {
-        return confirmationDate;
+    public String getCoughCheck() {
+        return coughCheck;
     }
-    public void setConfirmationDate(String confirmationDate) {
-        this.confirmationDate = confirmationDate;
+    public void setCoughCheck(String coughCheck) {
+        this.coughCheck = coughCheck;
     }
-    public String getDisisolationDate() {
-        return disisolationDate;
+    public String getColic() {
+        return colic;
     }
-    public void setDisisolationDate(String disisolationDate) {
-        this.disisolationDate = disisolationDate;
+    public void setColic(String colic) {
+        this.colic = colic;
     }
-    public String getBasalDiseaseYn() {
-        return basalDiseaseYn;
+    public String getSputumCheck() {
+        return sputumCheck;
     }
-    public void setBasalDiseaseYn(String basalDiseaseYn) {
-        this.basalDiseaseYn = basalDiseaseYn;
+    public void setSputumCheck(String sputumCheck) {
+        this.sputumCheck = sputumCheck;
     }
-    public String getDrugYn() {
-        return drugYn;
+    public String getOcinCheck() {
+        return ocinCheck;
     }
-    public void setDrugYn(String drugYn) {
-        this.drugYn = drugYn;
+    public void setOcinCheck(String ocinCheck) {
+        this.ocinCheck = ocinCheck;
     }
-    public String getDrugContent() {
-        return drugContent;
+    public String getFeverRight() {
+        return feverRight;
     }
-    public void setDrugContent(String drugContent) {
-        this.drugContent = drugContent;
+    public void setFeverRight(String feverRight) {
+        this.feverRight = feverRight;
     }
-    public String getPregnancyStatus() {
-        return pregnancyStatus;
+    public String getFeverLeft() {
+        return feverLeft;
     }
-    public void setPregnancyStatus(String pregnancyStatus) {
-        this.pregnancyStatus = pregnancyStatus;
+    public void setFeverLeft(String feverLeft) {
+        this.feverLeft = feverLeft;
     }
-    public String getPregnancyWeek() {
-        return pregnancyWeek;
+    public String getChestPain() {
+        return chestPain;
     }
-    public void setPregnancyWeek(String pregnancyWeek) {
-        this.pregnancyWeek = pregnancyWeek;
+    public void setChestPain(String chestPain) {
+        this.chestPain = chestPain;
     }
-    public String getId() {
-        return id;
+    public String getNoseCheck() {
+        return noseCheck;
     }
-    public void setId(String id) {
-        this.id = id;
+    public void setNoseCheck(String noseCheck) {
+        this.noseCheck = noseCheck;
     }
-    public String getCreateDate() {
-        return createDate;
+    public String getVomitingCheck() {
+        return vomitingCheck;
     }
-    public void setCreateDate(String createDate) {
-        this.createDate = createDate;
+    public void setVomitingCheck(String vomitingCheck) {
+        this.vomitingCheck = vomitingCheck;
     }
-    public String getUpdateDate() {
-        return updateDate;
+    public String getDiarrheaCheck() {
+        return diarrheaCheck;
     }
-    public void setUpdateDate(String updateDate) {
-        this.updateDate = updateDate;
+    public void setDiarrheaCheck(String diarrheaCheck) {
+        this.diarrheaCheck = diarrheaCheck;
     }
-    public String getCreateBy() {
-        return createBy;
+    public String getPulseRate() {
+        return pulseRate;
     }
-    public void setCreateBy(String createBy) {
-        this.createBy = createBy;
+    public void setPulseRate(String pulseRate) {
+        this.pulseRate = pulseRate;
     }
-    public String getUpdateBy() {
-        return updateBy;
+    public String getRespirationRate() {
+        return respirationRate;
     }
-    public void setUpdateBy(String updateBy) {
-        this.updateBy = updateBy;
+    public void setRespirationRate(String respirationRate) {
+        this.respirationRate = respirationRate;
     }
-    public String getNum() {
-        return num;
+    public String getBloodPressureLevel() {
+        return bloodPressureLevel;
     }
-    public void setNum(String num) {
-        this.num = num;
+    public void setBloodPressureLevel(String bloodPressureLevel) {
+        this.bloodPressureLevel = bloodPressureLevel;
     }
-    public String getAge() {
-        return age;
+    public String getOxygenSaturation() {
+        return oxygenSaturation;
     }
-    public void setAge(String age) {
-        this.age = age;
+    public void setOxygenSaturation(String oxygenSaturation) {
+        this.oxygenSaturation = oxygenSaturation;
     }
-    public String getStartDate() {
-        return startDate;
+    public String getBloodPressureLevelCon() {
+        return bloodPressureLevelCon;
     }
-    public void setStartDate(String startDate) {
-        this.startDate = startDate;
+    public void setBloodPressureLevelCon(String bloodPressureLevelCon) {
+        this.bloodPressureLevelCon = bloodPressureLevelCon;
     }
-    public String getEndDate() {
-        return endDate;
+    public String getBloodPressureLevelRel() {
+        return bloodPressureLevelRel;
     }
-    public void setEndDate(String endDate) {
-        this.endDate = endDate;
+    public void setBloodPressureLevelRel(String bloodPressureLevelRel) {
+        this.bloodPressureLevelRel = bloodPressureLevelRel;
     }
-    public String getPw() {
-        return pw;
+    public String getCenterName() {
+        return centerName;
     }
-    public void setPw(String pw) {
-        this.pw = pw;
+    public void setCenterName(String centerName) {
+        this.centerName = centerName;
     }
     public int getLimit() {
         return limit;
@@ -510,4 +560,5 @@ public class PatientDTO {
     public void setLimitMax(int limitMax) {
         this.limitMax = limitMax;
     }
+
 }

+ 1 - 0
src/main/java/com/lemon/lifecenter/mapper/CenterMapper.java

@@ -18,4 +18,5 @@ public interface CenterMapper {
     public int selectCenterCount(CenterInfoDTO dto);
     public List<CenterInfoDTO> selectCenterList(CenterInfoDTO dto);
     public Integer updateCenterInfo(CenterInfoDTO dto);
+    public CenterInfoDTO selectCenterInfoOne( CenterInfoDTO dto );
 }

+ 4 - 0
src/main/java/com/lemon/lifecenter/mapper/PatientMapper.java

@@ -15,4 +15,8 @@ public interface PatientMapper {
     public void insertPatientCare( PatientDTO dto );
     public void insertPatientDisease( PatientDTO dto );
     public void insertPatientSymptom( PatientDTO dto );
+    public PatientDTO selectPatientOne(PatientDTO dto);
+    public void updatePatientCare( PatientDTO dto );
+    public void updatePatientDisease( PatientDTO dto );
+    public void updatePatientSymptom( PatientDTO dto );
 }

+ 4 - 0
src/main/java/com/lemon/lifecenter/service/CenterService.java

@@ -39,4 +39,8 @@ public class CenterService {
     public Integer updateCenterInfo(CenterInfoDTO dto) {
         return mapper.updateCenterInfo(dto);
     }
+    
+    public CenterInfoDTO selectCenterInfoOne( CenterInfoDTO dto ) {
+        return mapper.selectCenterInfoOne(dto);
+    }
 }

+ 14 - 0
src/main/java/com/lemon/lifecenter/service/PatientService.java

@@ -31,4 +31,18 @@ public class PatientService {
     public void insertPatientSymptom( PatientDTO dto ) {
         mapper.insertPatientSymptom(dto);
     }
+    
+    public PatientDTO selectPatientOne(PatientDTO dto) {
+        return mapper.selectPatientOne(dto);
+    }
+    
+    public void updatePatientCare( PatientDTO dto ) {
+        mapper.updatePatientCare(dto);
+    }
+    public void updatePatientDisease( PatientDTO dto ) {
+        mapper.updatePatientDisease(dto);
+    }
+    public void updatePatientSymptom( PatientDTO dto ) {
+        mapper.updatePatientSymptom(dto);
+    }
 }

+ 1 - 0
src/main/resources/application.properties

@@ -6,6 +6,7 @@ spring.mvc.view.suffix=.jsp
 #spring.datasource.driver-class-name=cubrid.jdbc.driver.CUBRIDDriver
 #spring.datasource.url=jdbc:cubrid:localhost:30000:LIFE_CENTER:::?charset=UTF-8
 spring.datasource.driver-class-name=net.sf.log4jdbc.sql.jdbcapi.DriverSpy
+#spring.datasource.url=jdbc:log4jdbc:cubrid:61.97.184.187:30000:LIFE_CENTER:::?charset=UTF-8
 spring.datasource.url=jdbc:log4jdbc:cubrid:61.97.184.187:30000:LIFE_CENTER:::?charset=UTF-8
 
 spring.datasource.username=dba

+ 13 - 0
src/main/resources/mybatis/mapper/center/center.xml

@@ -138,4 +138,17 @@
         ]]>
     </update>
     
+    
+    <select id="selectCenterInfoOne" parameterType="CenterInfoDTO" resultType="CenterInfoDTO">
+        <![CDATA[
+            SELECT CI.CENTER_CODE                                AS centerCode,
+                   CI.CENTER_NAME                                AS centerName,
+                   M.ID                                          AS staffId
+              FROM CENTER_INFO CI
+              LEFT OUTER JOIN MEMBER M
+                ON CI.CENTER_CODE = M.CENTER_CODE
+             WHERE CI.CENTER_CODE = #{centerCode}
+               AND M.ID           = #{staffId}
+        ]]>
+    </select>
 </mapper>

+ 1 - 1
src/main/resources/mybatis/mapper/group/group.xml

@@ -12,7 +12,7 @@
                    PERMISSIONS AS permissions
               FROM GROUP_LIST
              WHERE USE_YN = 'Y'
-               AND PERMISSIONS != 'SYSTEM'
+               AND PERMISSIONS = 'USER'
              ORDER BY `ORDER`
         ]]>
     </select>

+ 2 - 1
src/main/resources/mybatis/mapper/mobile/login.xml

@@ -21,7 +21,8 @@
                    WARD_NUMBER  AS wardNumber,
                    ROOM_NUMBER  AS roomNumber,
                    CENTER_CODE  AS centerCode,
-                   ID           AS id
+                   ID           AS id,
+                   PW           AS pw
               FROM PATIENT_CARE
              WHERE 1 = 1
                AND ID = #{id}

+ 215 - 27
src/main/resources/mybatis/mapper/patient/patient.xml

@@ -33,7 +33,7 @@
                         WHEN GENDER = 'F' THEN '여'
                         ELSE ''
                    END                                                                AS gender,
-                   (SELECT TRUNC((SYSDATE-TO_DATE(19 || JUMIN, 'YYYYMMDD'))/365) + 1) AS age,
+                   (SELECT TRUNC((SYSDATE-TO_DATE(JUMIN, 'YYYYMMDD'))/365) + 1) AS age,
                    ward_number                                                        AS wardNumber,
                    room_number                                                        AS roomNumber,
                    DATE_FORMAT(FINAL_CLINIC_DATE, '%Y-%m-%d %H:%i')                   AS finamClinicDate,
@@ -71,37 +71,47 @@
     
     
     <insert id="insertPatientCare" parameterType="PatientDTO" useGeneratedKeys="true">
-        INSERT 
-          INTO patient_care
-               ( patient_name,      gender,      ward_number,     room_number,        final_clinic_date,   hospitalization_date, state, 
-                 center_code,       jumin,       patient_phone,   guardian_phone,     symptom_start_date,  confirmation_date,    disisolation_date, 
-                 basal_disease_yn,  drug_yn,     drug_content,    pregnancy_status,   pregnancy_week,      id,                   pw, 
-                 create_date,       update_date, create_by,       update_by)
-                  
-        VALUES ( #{patientName},    #{gender},   #{wardNumber},   #{roomNumber},      NOW(),               NOW(),               #{state}, 
-                 #{centerCode},     #{jumin},    #{patientPhone}, #{guardianPhone},   #{symptomStartDate}, #{confirmationDate}, #{disisolationDate}, 
-                 #{basalDiseaseYn}, #{drugYn},   #{drugContent},  #{pregnancyStatus}, #{pregnancyWeek},    #{id},               #{pw}, 
-                 NOW(),             '',          #{staffId},      '')
+        <selectKey keyProperty="patientIdx" resultType="int" order="AFTER">
+            <![CDATA[
+                SELECT CURRENT_VAL AS patientIdx FROM db_serial WHERE NAME = 'patient_care_ai_patient_idx';
+            ]]>
+        </selectKey>
+        <![CDATA[
+            INSERT 
+              INTO patient_care
+                   ( patient_name,      gender,      ward_number,     room_number,        hospitalization_date, state, 
+                     center_code,       jumin,       patient_phone,   guardian_phone,     symptom_start_date,   confirmation_date,    disisolation_date, 
+                     basal_disease_yn,  drug_yn,     drug_content,    pregnancy_status,   pregnancy_week,       id,                   pw, 
+                     create_date,       create_by,   update_by )
+                      
+            VALUES ( #{patientName},    #{gender},   #{wardNumber},   #{roomNumber},      ${hospitalizationDate}, #{state}, 
+                     #{centerCode},     #{jumin},    #{patientPhone}, #{guardianPhone},   #{symptomStartDate},    #{confirmationDate},    #{disisolationDate}, 
+                     #{basalDiseaseYn}, #{drugYn},   #{drugContent},  #{pregnancyStatus}, #{pregnancyWeek},       #{id},                  #{pw}, 
+                     NOW(),             #{createBy}, '' )
+        ]]>
     </insert>
     
-    <insert id="insertPatientDiseases" parameterType="PatientDTO" useGeneratedKeys="true">
-        INSERT
-          INTO patient_disease
-               ( patient_idx,                high_blood_pressure_check,    low_blood_pressure_check, organ_transplant_check,  diabetes_check, 
-                 respiratory_disease_check,  immunological_disease_check,  dyspnea_check,            cold_fit_check,          muscle_pain_check,
-                 headache_check,             sore_throat_check,            smell_palate_check,       fatigue_check,           heart_disease,
-                 liver_disease,              [operation],                  operation_content,        allergy_check,           kidney_disease,
-                 cancer_check,               cancer_name,                  etc_check,                etc_content )
-        VALUES ( #{patientIdx},              #{highBloodPressureCheck},    #{lowBloodPressureCheck}, #{organTransplantCheck}, #{diabetesCheck}, 
-                 #{respiratoryDiseaseCheck}, #{immunologicalDiseaseCheck}, #{dyspneaCheck},          #{coldFitCheck},         #{musclePainCheck}, 
-                 #{headacheCheck},           #{soreThroatCheck},           #{smellPalateCheck},      #{fatigueCheck},         #{heartDisease},
-                 #{liverDisease},            #{operation},                 #{operationContent},      #{allergyCheck},         #{kidneyDisease}, 
-                 #{cancerCheck},             #{cancerName},                #{etcCheck},              #{etcContent} )
+    <insert id="insertPatientDisease" parameterType="PatientDTO" useGeneratedKeys="true">
+        <![CDATA[
+            INSERT
+              INTO patient_disease
+                   ( patient_idx,                high_blood_pressure_check,    low_blood_pressure_check, organ_transplant_check,  diabetes_check, 
+                     respiratory_disease_check,  immunological_disease_check,  dyspnea_check,            cold_fit_check,          muscle_pain_check,
+                     headache_check,             sore_throat_check,            smell_palate_check,       fatigue_check,           heart_disease,
+                     liver_disease,              `operation`,                  operation_content,        allergy_check,           kidney_disease,
+                     cancer_check,               cancer_name,                  etc_check,                etc_content )
+            VALUES ( #{patientIdx},              #{highBloodPressureCheck},    #{lowBloodPressureCheck}, #{organTransplantCheck}, #{diabetesCheck}, 
+                     #{respiratoryDiseaseCheck}, #{immunologicalDiseaseCheck}, #{dyspneaCheck},          #{coldFitCheck},         #{musclePainCheck}, 
+                     #{headacheCheck},           #{soreThroatCheck},           #{smellPalateCheck},      #{fatigueCheck},         #{heartDisease},
+                     #{liverDisease},            #{operation},                 #{operationContent},      #{allergyCheck},         #{kidneyDisease}, 
+                     #{cancerCheck},             #{cancerName},                #{etcCheck},              #{etcContent} )
+        ]]>
     </insert>
     
     <insert id="insertPatientSymptom" parameterType="PatientDTO" useGeneratedKeys="true">
+        <![CDATA[
             INSERT 
-              INTO patient_symptom 
+              INTO patient_symptom
                    ( patient_idx,      fever_check,     cough_check,      colic,              cold_fit_check,        sputum_check, 
                      ocin_check,       fever_right,     fever_left,       fatigue_check,      etc_check,             etc_content, 
                      chest_pain,       nose_check,      vomiting_check,   muscle_pain_check,  sore_throat_check,     diarrhea_check, 
@@ -110,6 +120,184 @@
             VALUES ( #{patientIdx},    #{feverCheck},   #{coughCheck},    #{colic},           #{coldFitCheck},       #{sputumCheck}, 
                      #{ocinCheck},     #{feverRight},   #{feverLeft},     #{fatigueCheck},    #{etcCheck},           #{etcContent}, 
                      #{chestPain},     #{noseCheck},    #{vomitingCheck}, #{musclePainCheck}, #{soreThroatCheck},    #{diarrheaCheck}, 
-                     #{headacheCheck}, #{dyspneaCheck}, #{pulseRate},     #{respirationRate}, #{bloodPressureLevel}, #{oxygenSaturation )
+                     #{headacheCheck}, #{dyspneaCheck}, #{pulseRate},     #{respirationRate}, #{bloodPressureLevel}, #{oxygenSaturation} )
+        ]]>
     </insert>
+    
+    <select id="selectPatientOne" parameterType="PatientDTO" resultType="PatientDTO">
+        <![CDATA[
+            SELECT PC.PATIENT_IDX AS patientIdx,
+                   PC.PATIENT_NAME AS patientName,
+                   PC.GENDER AS gender,
+                   PC.WARD_NUMBER AS wardNumber,
+                   PC.ROOM_NUMBER AS roomNumber,
+                   PC.FINAL_CLINIC_DATE AS finalClinicDate,
+                   DATE_FORMAT(PC.HOSPITALIZATION_DATE, '%Y-%m-%d %h:%i') AS hospitalizationDate,
+                   PC.STATE AS state,
+                   PC.CENTER_CODE AS centerCode,
+                   PC.JUMIN AS jumin,
+                   PC.PATIENT_PHONE AS patientPhone,
+                   PC.GUARDIAN_PHONE AS guardianPhone,
+                   DATE_FORMAT(PC.SYMPTOM_START_DATE, '%Y-%m-%d %h:%i') AS symptomStartDate,
+                   DATE_FORMAT(PC.CONFIRMATION_DATE, '%Y-%m-%d %h:%i') AS confirmationDate,
+                   DATE_FORMAT(PC.DISISOLATION_DATE, '%Y-%m-%d %h:%i') AS disisolationDate,
+                   PC.BASAL_DISEASE_YN AS basalDiseaseYn,
+                   PC.DRUG_YN AS drugYn,
+                   PC.DRUG_CONTENT AS drugContent,
+                   PC.PREGNANCY_STATUS AS pregnancyStatus,
+                   PC.PREGNANCY_WEEK AS pregnancyWeek,
+                   PC.ID AS id,
+                   PC.PW AS pw,
+                   PC.CREATE_DATE AS createDate,
+                   PC.CREATE_BY AS createBy,
+                   PC.UPDATE_BY AS updateBy,
+            
+                   PS.FEVER_CHECK AS feverCheck,
+                   PS.COUGH_CHECK AS coughCheck,
+                   PS.COLIC AS colic,
+                   PS.COLD_FIT_CHECK AS coldFitCheck,
+                   PS.SPUTUM_CHECK AS sputumCheck,
+                   PS.OCIN_CHECK AS ocinCheck,
+                   PS.FEVER_RIGHT AS feverRight,
+                   PS.FEVER_LEFT AS feverLeft,
+                   PS.FATIGUE_CHECK AS fatigueCheck,
+                   PS.ETC_CHECK AS ectCheckSymptom,
+                   PS.ETC_CONTENT AS etcContentSymptom,
+                   PS.CHEST_PAIN AS chestPain,
+                   PS.NOSE_CHECK AS noseCheck,
+                   PS.VOMITING_CHECK AS vomitingCheck,
+                   PS.MUSCLE_PAIN_CHECK AS musclePainCheck,
+                   PS.SORE_THROAT_CHECK AS soreThroatCheck,
+                   PS.DIARRHEA_CHECK AS diarrheaCheck,
+                   PS.HEADACHE_CHECK AS headacheCheck,
+                   PS.DYSPNEA_CHECK AS dyspneaCheck,
+                   PS.PULSE_RATE AS pulseRate,
+                   PS.RESPIRATION_RATE AS respirationRate,
+                   PS.BLOOD_PRESSURE_LEVEL AS bloodPressureLevel,
+                   PS.OXYGEN_SATURATION AS oxygenSaturation,
+                   
+                   PD.HIGH_BLOOD_PRESSURE_CHECK AS highBloodPressureCheck,
+                   PD.LOW_BLOOD_PRESSURE_CHECK AS lowBloodPressureCheck,
+                   PD.ORGAN_TRANSPLANT_CHECK AS organTransplantCheck,
+                   PD.DIABETES_CHECK AS diabetesCheck,
+                   PD.RESPIRATORY_DISEASE_CHECK AS respiratoryDiseaseCheck,
+                   PD.IMMUNOLOGICAL_DISEASE_CHECK AS immunologicalDiseaseCheck,
+                   PD.DYSPNEA_CHECK AS dyspneaCheck,
+                   PD.COLD_FIT_CHECK AS coldFitCheck,
+                   PD.MUSCLE_PAIN_CHECK AS musclePainCheck,
+                   PD.HEADACHE_CHECK AS headacheCheck,
+                   PD.SORE_THROAT_CHECK AS soreThroatCheck,
+                   PD.SMELL_PALATE_CHECK AS smellPalateCheck,
+                   PD.FATIGUE_CHECK AS fatigueCheck,
+                   PD.HEART_DISEASE AS heartDisease,
+                   PD.LIVER_DISEASE AS liverDisease,
+                   PD.`OPERATION` AS `operation`,
+                   PD.OPERATION_CONTENT AS operationContent,
+                   PD.ALLERGY_CHECK AS allergyCheck,
+                   PD.KIDNEY_DISEASE AS kidneyDisease,
+                   PD.CANCER_CHECK AS cancerCheck,
+                   PD.CANCER_NAME AS cancerName,
+                   PD.ETC_CHECK AS ectCheckDisease,
+                   PD.ETC_CONTENT AS etcContentDisease,
+                   (SELECT CI.CENTER_NAME
+                      FROM CENTER_INFO CI
+                     WHERE CI.CENTER_CODE = PC.CENTER_CODE) AS centerName
+              FROM PATIENT_CARE PC
+              LEFT JOIN PATIENT_SYMPTOM PS
+                ON PC.PATIENT_IDX = PS.PATIENT_IDX
+              LEFT JOIN PATIENT_DISEASE PD
+                ON PC.PATIENT_IDX = PD.PATIENT_IDX
+             WHERE 1 = 1
+               AND PC.PATIENT_IDX = #{patientIdx}
+        ]]>
+    </select>
+    
+    <update id="updatePatientCare" parameterType="PatientDTO" useGeneratedKeys="true">
+        <![CDATA[
+            UPDATE patient_care
+               SET patient_name = ${patientName},
+                   gender = ${gender},
+                   ward_number = ${wardNumber},
+                   room_number = ${roomNumber},
+                   hospitalization_date = ${hospitalizationDate},
+                   state = ${state},
+                   center_code = ${centerCode},
+                   jumin = ${jumin},
+                   patient_phone = ${patientPhone},
+                   guardian_phone = ${guardianPhone},
+                   symptom_start_date = ${symptomStartDate},
+                   confirmation_date = ${confirmationDate},
+                   disisolation_date = ${disisolationDate},
+                   basal_disease_yn = ${basalDiseaseYn},
+                   drug_yn = ${drugYn},
+                   drug_content = ${drugContent},
+                    pregnancy_status = ${pregnancyStatus},
+                   pregnancy_week = ${pregnancyWeek},
+                   id = ${id},
+                   pw = ${pw},
+                   update_date = NOW(),
+                   update_by = ${updateBy}
+             WHERE patient_idx = ${patientIdx}
+        ]]>
+    </update>
+    
+    <update id="updatePatientDisease" parameterType="PatientDTO" useGeneratedKeys="true">
+        <![CDATA[
+            UPDATE patient_disease
+               SET high_blood_pressure_check = #{highBloodPressureCheck},
+                   low_blood_pressure_check = #{lowBloodPressureCheck}, 
+                   organ_transplant_check = #{organTransplantCheck},  
+                   diabetes_check = , #{diabetesCheck}, 
+                   respiratory_disease_check = #{respiratoryDiseaseCheck}, 
+                   immunological_disease_check = #{immunologicalDiseaseCheck}, 
+                   dyspnea_check = #{dyspneaCheck},
+                   cold_fit_check = #{coldFitCheck},
+                   muscle_pain_check =   #{musclePainCheck},
+                   headache_check = #{headacheCheck},
+                   sore_throat_check = #{soreThroatCheck},
+                   smell_palate_check = #{smellPalateCheck},
+                   fatigue_check = #{fatigueCheck},
+                   heart_disease = #{heartDisea},
+                   liver_disease = #{liverDisease},
+                   `operation` = #{operation},
+                   operation_content = #{operationContent},
+                   allergy_check = #{allergyCheck},
+                   kidney_disease =   #{kidneyDisease},
+                   cancer_check = #{cancerCheck},
+                   cancer_name = #{cancerName},
+                   etc_check =   #{etcCheck},
+                   etc_content=${etcContent}
+             WHERE patient_idx = ${patientIdx}
+        ]]>
+    </update>
+    
+    <update id="updatePatientSymptom" parameterType="PatientDTO" useGeneratedKeys="true">
+        <![CDATA[
+            UPDATE patient_symptom
+               SET fever_check = #{feverCheck},
+                   cough_check = #{coughCheck},
+                   colic = #{colic},
+                   cold_fit_check = #{coldFitCheck},
+                   sputum_check = #{sputumCheck},
+                   ocin_check = #{ocinCheck},
+                   fever_right = #{feverRight},
+                   fever_left = #{feverLeft},
+                   fatigue_check = #{fatigueCheck},
+                   etc_check = #{etcCheck},
+                   etc_content = #{etcContent},
+                   chest_pain = #{chestPain},
+                   nose_check = #{noseCheck},
+                   vomiting_check = #{vomitingCheck},
+                   muscle_pain_check = #{musclePainCheck},
+                   sore_throat_check = #{soreThroatCheck},
+                   diarrhea_check = #{diarrheaCheck},
+                   headache_check = #{headacheCheck},
+                   dyspnea_check = #{dyspneaCheck},
+                   pulse_rate = #{pulseRate},
+                   respiration_rate = #{respirationRate},
+                   blood_pressure_level = #{bloodPressureLevel},
+                   oxygen_saturation = #{oxygenSaturation}
+             WHERE patient_idx = #{patient_idx}
+        ]]>
+    </update>
 </mapper>

+ 25 - 2
src/main/webapp/WEB-INF/jsp/mobile/login/login.jsp

@@ -4,6 +4,24 @@
 <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
 <jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
 <script type="text/javascript">
+
+function checkMobile(){
+     
+    var varUA = navigator.userAgent.toLowerCase(); //userAgent 값 얻기
+ 
+    if ( varUA.indexOf('android') > -1) {
+        //안드로이드
+        return "android";
+    } else if ( varUA.indexOf("iphone") > -1||varUA.indexOf("ipad") > -1||varUA.indexOf("ipod") > -1 ) {
+        //IOS
+        return "ios";
+    } else {
+        //아이폰, 안드로이드 외
+        return "other";
+    }
+    
+}
+
 $( function(){
     $( "#id" ).focus();
     
@@ -35,6 +53,11 @@ $( function(){
                     var resultMsg  = data.message;
                     
                     if( data.code == "00" ) {
+                        console.log("checkMobile() -- > " + checkMobile());
+                        if (checkMobile() == "android") {
+                            window.android.login(data.id, data.pw);
+                        }
+                        
                         location.href="/mobile/menu";
                     } else {
                     	$("#errMsg").text(resultMsg);
@@ -87,12 +110,12 @@ $( function(){
                         </div>
                         <div class="part">
                             <div class="input">
-                                <input type="text" name="id" class="number1" placeholder="병동번호" tabindex="1" maxlength="20" required>
+                                <input type="text" id="id" name="id" class="number1" placeholder="병동번호" tabindex="1" maxlength="20" required>
                             </div>
                         </div>
                         <div class="part">
                             <div class="input">
-                                <input type="password" name="pw" class="date1" placeholder="생년월일 6자리" autocomplete="off" tabindex="2" maxlength="15" required>
+                                <input type="password" id="pw" name="pw" class="date1" placeholder="생년월일 6자리" autocomplete="off" tabindex="2" maxlength="15" required>
                             </div>
                         </div>
                         <div class="part">

+ 9 - 2
src/main/webapp/WEB-INF/jsp/mobile/nonface/nonface.jsp

@@ -5,13 +5,20 @@
 <jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
 <script type="text/javascript">
 $( function() {
-    $("#nonface").submit();
+    var gsWin = window.open('about:blank','nonface');
+    var frm =document.nonface;
+    frm.action = 'https://lemon.medihere.com/app/vc';
+    frm.target ="nonface";
+    frm.method ="post";
+    frm.submit();
+
+    //$("#nonface").submit();
 });
 </script>
 </head>
 <body>
     
-    <form id="nonface" action="https://lemon.medihere.com/app/vc" method="POST">
+    <form id="nonface" name="nonface" action="https://lemon.medihere.com/app/vc">
         <input type="hidden" name="member_name" value="${member_name}" />
         <input type="hidden" name="member_id" value="${member_id}" />
         <input type="hidden" name="room_id" value="${room_id}" />

+ 18 - 4
src/main/webapp/WEB-INF/jsp/mobile/servey/servey.jsp

@@ -18,6 +18,20 @@ $( function(){
         $("#hYmd").val( hYear  + "-" + hMonth  + "-" + hDay );
 
     });
+
+    $( ".select-date" ).on( "change", function(){
+        var $this = $( this );
+        var wrap  = $this.closest( "div.date" );
+        
+        var dateYear  = wrap.find( ".date-year" ).val();
+        var dateMonth = wrap.find( ".date-month" ).val();
+        var dateDay   = wrap.find( ".date-day" ).val();
+        
+        dateMonth = Number(dateMonth) < 10 ? "0" + dateMonth : dateMonth;
+        dateDay   = Number(dateDay) < 10   ? "0" + dateDay   : dateDay;
+        
+        wrap.find( "input.error-box" ).val( dateYear  + "-" + dateMonth  + "-" + dateDay );
+    });
 });
 
 
@@ -46,7 +60,7 @@ $( function(){
                     </div>
                     <div class="date">
                         <div class="year">
-                            <select class="custom-select ymd-date" id="hYear">
+                            <select class="custom-select select-date date-year">
                                   <option value="" selected="">년</option>
                                   <c:forEach var="y" begin="1940" end="${sysYear}" step="1">
                                       <option value="${y}">${y} 년</option>
@@ -58,7 +72,7 @@ $( function(){
                         </div>
                         <div class="month">
 <!--                             <input type="text" name=""> 월 -->
-                            <select class="custom-select ymd-date" id="hMonth" >
+                            <select class="custom-select select-date date-month">
                                   <option value="" selected="">월</option>
                                   <c:forEach var="m" begin="1" end="12" step="1">
                                       <option value="${m}">${m} 월</option>
@@ -67,7 +81,7 @@ $( function(){
                         </div>
                         <div class="day">
 <!--                             <input type="text" name=""> 일 -->
-                            <select class="custom-select ymd-date" id="hDay">
+                            <select class="custom-select select-date date-day">
                                   <option value="" selected="">일</option>
                                   <c:forEach var="d" begin="1" end="31" step="1">
                                       <option value="${d}">${d} 일</option>
@@ -108,7 +122,7 @@ $( function(){
                                   </c:forEach>
                             </select>
                         </div>
-                        <input type="date" class="error-box" id="cvYmd" name="cvYmd" required>
+                        <input type="text" class="error-box" id="cvYmd" name="cvYmd" required>
                     </div>
                 </div>
                 <div class="part">

Diff do ficheiro suprimidas por serem muito extensas
+ 512 - 596
src/main/webapp/WEB-INF/jsp/patient/edit.jsp


+ 176 - 156
src/main/webapp/WEB-INF/jsp/patient/info.jsp

@@ -3,99 +3,37 @@
 <%@ page language="java" contentType="text/html; charset=UTF-8"
     pageEncoding="UTF-8"%>
 <jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
-<script>
-    $(function() {
-        // Select2
-        $(".select2").each(function() {
-            $(this).wrap("<div class=\"position-relative\"></div>").select2({
-                placeholder : "Select value",
-                dropdownParent : $(this).parent()
-            });
-        })
-        // Daterangepicker
-        $("input[name=\"daterange\"]").daterangepicker({
-            opens : "left"
-        });
-        $("input[name=\"datetimes\"]").daterangepicker({
-            timePicker : true,
-            opens : "left",
-            startDate : moment().startOf("hour"),
-            endDate : moment().startOf("hour").add(32, "hour"),
-            locale : {
-                format : "M/DD hh:mm A"
-            }
-        });
-        $("input[name=\"datesingle\"]").daterangepicker({
-            singleDatePicker : true,
-            showDropdowns : true
-        });
-        // Datetimepicker
-        $('#datetimepicker-minimum').datetimepicker();
-        $('#datetimepicker-view-mode').datetimepicker({
-            viewMode : 'years'
-        });
-        $('#datetimepicker-time').datetimepicker({
-            format : 'LT'
-        });
-        $('#datetimepicker-date').datetimepicker({
-            format : 'L'
-        });
-        var start = moment().subtract(29, "days");
-        var end = moment();
 
-        function cb(start, end) {
-            $("#reportrange span").html(
-                    start.format("MMMM D, YYYY") + " - "
-                            + end.format("MMMM D, YYYY"));
-        }
-        $("#reportrange").daterangepicker(
-                {
-                    startDate : start,
-                    endDate : end,
-                    ranges : {
-                        "Today" : [ moment(), moment() ],
-                        "Yesterday" : [ moment().subtract(1, "days"),
-                                moment().subtract(1, "days") ],
-                        "Last 7 Days" : [ moment().subtract(6, "days"),
-                                moment() ],
-                        "Last 30 Days" : [ moment().subtract(29, "days"),
-                                moment() ],
-                        "This Month" : [ moment().startOf("month"),
-                                moment().endOf("month") ],
-                        "Last Month" : [
-                                moment().subtract(1, "month").startOf("month"),
-                                moment().subtract(1, "month").endOf("month") ]
-                    }
-                }, cb);
-        cb(start, end);
-    });
-</script>
-<script>
-    $(function() {
-        // Datatables basic
-        $("#datatables-basic").DataTable({
-            responsive : true
-        });
-        // Datatables with Buttons
-        var datatablesButtons = $("#datatables-buttons").DataTable({
-            responsive : true,
-            lengthChange : !1,
-            buttons : [ "copy", "print" ]
-        });
-        datatablesButtons.buttons().container().appendTo(
-                "#datatables-buttons_wrapper .col-md-6:eq(0)");
-        // Datatables with Multiselect
-        var datatablesMulti = $("#datatables-multi").DataTable({
-            responsive : true,
-            select : {
-                style : "multi"
-            }
-        });
+<script type="text/javascript">
+function nonFaceStart() {
+    getAjax("/patient/nonFaceStart", $("#hiddenForm").serialize(), function ( result ) {
+        
+        $("#nonface").append('<input type="hidden" name="member_name" value="'+result.member_name+'" />');
+        $("#nonface").append('<input type="hidden" name="member_id" value="'+result.member_id+'" />');
+        $("#nonface").append('<input type="hidden" name="room_id" value="'+result.room_id+'" />');
+        $("#nonface").append('<input type="hidden" name="hashData" value="'+result.hashData+'">');
+        $("#nonface").append('<input type="hidden" name="token" value="'+result.token+'">');
+        $("#nonface").append('<input type="hidden" name="api_key" value="'+result.api_key+'">');
+
+        $("#nonface").append('<input type="hidden" name="classify" value="d">');
+
+        var gsWin = window.open('about:blank','nonface');
+        var frm =document.nonface;
+        frm.target ="nonface";
+        frm.method ="post";
+        frm.submit();
+
+    }, function(){
+    }, function(){
+        
     });
+}
 </script>
+
 </head>
 <body>
-
+    <form id="nonface" name="nonface" action="https://lemon.medihere.com/app/vc">
+    </form>
     <div class="wrapper">
         <jsp:include page="${data._INCLUDE}/sidebar.jsp"></jsp:include>
 
@@ -103,20 +41,25 @@
             <jsp:include page="${data._INCLUDE}/top.jsp"></jsp:include>
 
             <main class="content">
+                <form id="hiddenForm">
+                    <input type="hidden" id="pId" name="pId" value="<c:out value="${info.id}" />">
+                    <input type="hidden" id="pName" name="pName" value="<c:out value="${info.patientName}" />">
+                    <input type="hidden" id="roomId" name="roomId" value="<c:out value="${info.roomNumber}" />">
+                </form>
                 <div class="container-fluid p-0">
                     <!-- 환자관리 : 신규환자 등록 START -->
                     <div class="row">
                         <div class="col-12 col-lg-6">
-                            <h1 class="h3 mb-3">환자정보</h1>
+                            <h1 class="h3 mb-3">
+                                환자정보
+                            </h1>
                         </div>
                         <div class="col-12 col-lg-6  text-right">
                             <nav aria-label="breadcrumb">
                                 <ol class="breadcrumb">
-                                    <li class="breadcrumb-item"><a
-                                        href="javscript:;">Home</a></li>
+                                    <li class="breadcrumb-item"><a href="javscript:;">Home</a></li>
                                     <li class="breadcrumb-item">환자관리</li>
-                                    <li class="breadcrumb-item active">환자정보
-                                        등록</li>
+                                    <li class="breadcrumb-item active">환자정보 조회</li>
                                 </ol>
                             </nav>
                         </div>
@@ -127,110 +70,187 @@
                                 <div class="card-body">
                                     <table class="table mobile-table">
                                         <colgroup>
-                                            <col style="width: 15%">
-                                            <col style="width: 35%">
-                                            <col style="width: 15%">
-                                            <col style="width: 35%">
+                                            <col style="width:15%">
+                                            <col style="width:35%">
+                                            <col style="width:15%">
+                                            <col style="width:35%">
                                         </colgroup>
                                         <tr>
                                             <th>치료센터</th>
-                                            <td>레몬종합병원</td>
+                                            <td><c:out value="${info.centerName}" /></td>
                                             <th>입소일시</th>
                                             <td colspan="2">
-                                                2020-10-10 10:25</td>
+                                                <c:out value="${info.hospitalizationDate}" />
+                                            </td>
                                         </tr>
                                         <tr>
                                             <th>병동 번호</th>
-                                            <td>1501</td>
+                                            <td>
+                                                <c:out value="${info.wardNumber}동 ${info.roomNumber}호" />
+                                            </td>
                                             <th>이름</th>
-                                            <td>김레몬
-                                                <button
-                                                    class="btn btn-primary ml-2">진료시작</button>
+                                            <td>
+                                                <c:out value="${info.patientName}" /><button class="btn btn-primary ml-2" onclick="nonFaceStart();">진료시작</button>
                                             </td>
                                         </tr>
                                         <tr>
                                             <th>성별</th>
-                                            <td>남</td>
+                                            <td>
+                                                <c:if test="${info.gender eq 'M'}">
+                                                    남
+                                                </c:if>
+                                                <c:if test="${info.gender ne 'M'}">
+                                                    여
+                                                </c:if>
+                                            </td>
                                             <th>생년월일</th>
-                                            <td>1975년 8월 8일</td>
+                                            <td>
+                                                <c:out value="${info.jumin}" />
+                                            </td>
                                         </tr>
                                         <tr>
                                             <th>연락처</th>
-                                            <td>010-1234-1234</td>
+                                            <td>
+                                                <c:out value="${info.patientPhone}" />
+                                            </td>
                                             <th>보호자 연락처</th>
-                                            <td>010-1234-1234</td>
+                                            <td>
+                                                <c:out value="${info.guardianPhone}" />
+                                            </td>
                                         </tr>
                                         <tr>
                                             <th>증상시작일</th>
-                                            <td>2020-10-08</td>
+                                            <td>
+                                                <c:out value="${info.symptomStartDate}" />
+                                            </td>
                                             <th>확진일</th>
-                                            <td>2020-10-09</td>
+                                            <td>
+                                                <c:out value="${info.confirmationDate}" />
+                                            </td>
                                         </tr>
                                         <tr>
-                                            <th>격리해제일</th>
+                                            <th>격리해제 예정일</th>
                                             <td colspan="3">
-                                                2020-10-25</td>
+                                                <c:out value="${info.disisolationDate}" />
+                                            </td>
                                         </tr>
                                         <tr>
-                                            <th>기저질환</th>
-                                            <td>무</td>
+                                            <th>최근 약복용<br />(최근 24시간 이내)</th>
+                                            <td>
+                                                <c:choose>
+                                                    <c:when test="${info.drugYn eq 'Y'}">
+                                                        복용 (<c:out value="${info.drugContent}" />)
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        미복용
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </td>
                                             <th>임신</th>
-                                            <td>무</td>
+                                            <td>
+                                                <c:choose>
+                                                    <c:when test="${info.pregnancyStatus eq 'N'}">
+                                                        무
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        유 (<c:out value="${info.pregnancyWeek}주차" />)
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </td>
                                         </tr>
                                         <tr>
-                                            <th rowspan="2">입실당시 증상</th>
-                                            <td colspan="3">발열
-                                                (37.5℃ 이상, 입실 당시 체온 - 우
-                                                : 37.8℃ / - 좌 : 37.9℃ ),
-                                                기침, 근육통, 피로, 식욕감소</td>
+                                            <th rowspan="2">기저질환 여부</th>
+                                            <td colspan="3">
+                                                <c:choose>
+                                                    <c:when test="${info.basalDiseaseYn eq 'Y'}">
+                                                        유
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        무
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </td>
                                         </tr>
                                         <tr>
                                             <td colspan="3">
-                                                <table class="table">
-                                                    <colgroup>
-                                                        <col
-                                                            style="width: 15%">
-                                                        <col
-                                                            style="width: 18%">
-                                                        <col
-                                                            style="width: 15%">
-                                                        <col
-                                                            style="width: 18%">
-                                                        <col
-                                                            style="width: 15%">
-                                                        <col
-                                                            style="width: 18%">
-                                                    </colgroup>
-                                                    <tr>
-                                                        <th>중증도분류</th>
-                                                        <td>하</td>
-                                                        <th>산소포화도</th>
-                                                        <td>90%</td>
-                                                        <th>흉부 X선
-                                                            결과</th>
-                                                        <td>정상</td>
-                                                    </tr>
-                                                </table>
+                                                <c:if test="${info.highBloodPressureCheck eq 'Y'}">, 고혈압</c:if>
+                                                <c:if test="${info.lowBloodPressureCheck eq 'Y'}">, 저혈압</c:if>
+                                                <c:if test="${info.organTransplantCheck eq 'Y'}">, 장기이식(신장, 간 등)</c:if>
+                                                <c:if test="${info.diabetesCheck eq 'Y'}">, 당뇨</c:if>
+                                                <c:if test="${info.respiratoryDiseaseCheck eq 'Y'}">, 호흡기질환</c:if>
+                                                <c:if test="${info.immunologicalDiseaseCheck eq 'Y'}">, 면역질환(류마티스 등)</c:if>
+                                                <c:if test="${info.heartDisease eq 'Y'}">, 심장질환</c:if>
+                                                <c:if test="${info.liverDisease eq 'Y'}">, 간질환</c:if>
+                                                <c:if test="${info.operation eq 'Y'}">, 수술(<c:out value="${info.operationContent}" />)</c:if>
+                                                <c:if test="${info.allergyCheck eq 'Y'}">, 알레르기</c:if>
+                                                <c:if test="${info.kidneyDisease eq 'Y'}">, 신장질환</c:if>
+                                                <c:if test="${info.cancerCheck eq 'Y'}">, 암(<c:out value="${info.cancerName}" />)</c:if>
+                                                <c:if test="${info.ectCheckDisease eq 'Y'}">, 기타(<c:out value="${info.etcContentDisease}" />)</c:if>
                                             </td>
                                         </tr>
                                         <tr>
-                                            <th>상태 및 특이사항</th>
-                                            <td colspan="3">없음</td>
+                                            <th>현재 증상<br />(입소 당시)</th>
+                                            <td colspan="3">
+                                                <c:if test="${info.feverCheck eq 'Y'}">, 열감(열나는느낌)</c:if>
+                                                <c:if test="${info.coughCheck eq 'Y'}">, 기침</c:if>
+                                                <c:if test="${info.colic eq 'Y'}">, 복통(배아픔)</c:if>
+                                                <c:if test="${info.coldFitCheck eq 'Y'}">, 오한(추운 느낌)</c:if>
+                                                <c:if test="${info.sputumCheck eq 'Y'}">, 가래</c:if>
+                                                <c:if test="${info.ocinCheck eq 'Y'}">, 오심(구역질)</c:if>
+                                                <c:if test="${info.chestPain eq 'Y'}">, 흉통</c:if>
+                                                <c:if test="${info.noseCheck eq 'Y'}">, 콧물 또는 코 막힘</c:if>
+                                                <c:if test="${info.vomitingCheck eq 'Y'}">, 구토</c:if>
+                                                <c:if test="${info.musclePainCheck eq 'Y'}">, 근육통(몸살)</c:if>
+                                                <c:if test="${info.soreThroatCheck eq 'Y'}">, 인후통(목 아픔)</c:if>
+                                                <c:if test="${info.diarrheaCheck eq 'Y'}">, 설사</c:if>
+                                                <c:if test="${info.headacheCheck eq 'Y'}">, 두통(머리아픔)</c:if>
+                                                <c:if test="${info.dyspneaCheck eq 'Y'}">, 호흡곤란(숨가쁨)</c:if>
+                                                <c:if test="${info.fatigueCheck eq 'Y'}">, 권태감(피곤함)</c:if>
+                                                <c:if test="${info.ectCheckSymptom eq 'Y'}">, 기타(<c:out value="${info.etcContentSymptom}" />)</c:if>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <th>
+                                                체온
+                                            </th>
+                                            <td>
+                                                <c:out value="우측 ${info.feverRight}℃ /  좌측  ${info.feverRight}℃" />
+                                            </td>
+                                            <th>
+                                                맥박수
+                                            </th>
+                                            <td>
+                                                <c:out value="${info.pulseRate} 회/분" />
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <th>
+                                                호흡수
+                                            </th>
+                                            <td>
+                                                <c:out value="${info.respirationRate} 회/분" />
+                                            </td>
+                                            <th>
+                                                혈압
+                                            </th>
+                                            <td>
+                                            <c:out value="수축기 ${info.bloodPressureLevelCon} mmHg  /  이완기 ${info.bloodPressureLevelRel} mmHg" />
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <th>
+                                                산소포화도
+                                            </th>
+                                            <td colspan="3">
+                                                <c:out value="${info.oxygenSaturation} %" />
+                                            </td>
                                         </tr>
                                     </table>
                                     <div class="row mt-3">
                                         <div class="col-12">
                                             <div class="text-right">
-                                                <button
-                                                    class="btn btn-warning w150"
-                                                    onclick="location.href='./privacy';">비밀번호
-                                                    변경</button>
-                                                <button
-                                                    class="btn btn-secondary w100"
-                                                    onclick="location.href='./edit';">정보수정</button>
-                                                <button
-                                                    class="btn btn-primary w100"
-                                                    onclick="location.href='./list';">확인</button>
+                                                <button class="btn btn-primary w100">수정</button>
+                                                <button class="btn btn-primary w100" onclick="location.href='./list'">확인</button>
                                             </div>
                                         </div>
                                     </div>

+ 12 - 10
src/main/webapp/WEB-INF/jsp/patient/new.jsp

@@ -91,6 +91,9 @@ $( function(){
             },
             guardianPhone : {
                 phoneValid : true
+            },
+            jumin : {
+                date : true
             }
         },
         messages : {
@@ -117,7 +120,7 @@ $( function(){
             }
         },
         submitHandler: function(form) {
-//             form.submit();
+            form.submit();
         }
     });
 });
@@ -135,7 +138,7 @@ $( function(){
                     <!-- 환자관리 : 신규환자 등록 START -->
                     <div class="row">
                         <div class="col-12 col-lg-6">
-                            <h1 class="h3 mb-3">환자정보</h1>
+                            <h1 class="h3 mb-3">환자정보등록</h1>
                         </div>
                         <div class="col-12 col-lg-6  text-right">
                             <nav aria-label="breadcrumb">
@@ -162,8 +165,9 @@ $( function(){
                                     
                                     <c:if test="${centerCount > 0}">
                                         <c:set var="now" value="<%=new java.util.Date()%>" />
+                                        <c:set var="action" value="/patient/new/insert" />
                                         
-                                        <form id="patientForm" action="/patient/new/insert">
+                                        <form id="patientForm" action="${action}">
                                             <table class="table mobile-table">
                                                 <colgroup>
                                                     <col style="width:15%">
@@ -197,7 +201,7 @@ $( function(){
                                                             <div class="col-3">
                                                                 <select class="custom-select hospitalizationDate" id="hospitalizationDateMin">
                                                                       <option value="" selected="">분</option>
-                                                                      <c:forEach var="i" begin="0" end="60" step="1">
+                                                                      <c:forEach var="i" begin="0" end="59" step="1">
                                                                           <option value="${i}" <c:if test="${sysMin eq i}">selected="selected"</c:if>>${i} 분</option>
                                                                       </c:forEach>
                                                                 </select>
@@ -333,7 +337,7 @@ $( function(){
                                                         </label>
                                                         <label class="form-check form-check-inline">
                                                                 <select class="custom-select" name="pregnancyWeek" id="pregnancyWeek">
-                                                                      <option selected="">임신 주차</option>
+                                                                      <option value="" selected="">임신 주차</option>
                                                                       <c:forEach var="p" begin="1" end="40" step="1">
                                                                           <option value="${p}">${p} 주</option>
                                                                       </c:forEach>
@@ -412,7 +416,7 @@ $( function(){
                                                     <td colspan="3" class="basalDisease">
                                                         <label class="form-check form-check-inline label-readonly-check">
                                                             <input class="form-check-input" name="cancerCheck" type="checkbox" value="Y">
-                                                            <span class="form-check-label">암 ( <input type="text" name="cancerCheck" class="form-control form-control-sm w150"> )</span>
+                                                            <span class="form-check-label">암 ( <input type="text" name="cancerContent" class="form-control form-control-sm w150"> )</span>
                                                         </label>
                                                         <label class="form-check form-check-inline label-readonly-check">
                                                             <input class="form-check-input" name="etcCheckBasal" type="checkbox" value="Y">
@@ -519,8 +523,6 @@ $( function(){
                                                         <input type="text" class="form-control form-control-sm w50" name="bloodPressureLevelCon">)mmHg  
                                                         /  이완기 (
                                                         <input type="text" class="form-control form-control-sm w50" name="bloodPressureLevelRel">)mmHg
-                                                        
-                                                        <input type="text" name="bloodPressureLevel">
                                                     </td>
                                                 </tr>
                                                 <tr>
@@ -533,8 +535,8 @@ $( function(){
                                             <div class="row mt-3">
                                                 <div class="col-12">
                                                     <div class="text-right">
-                                                        <button class="btn btn-outline-primary w100">취소</button>
-                                                        <button type="submit" class="btn btn-primary w100">저장</button>
+                                                        <button class="btn btn-outline-primary w100" onclick="history.back();">취소</button>
+                                                        <button type="submit" class="btn btn-primary w100">등록</button>
                                                     </div>
                                                 </div>
                                             </div>