Bladeren bron

건강정보기록 영문 표기

huiwon.seo 4 jaren geleden
bovenliggende
commit
a45aee36bc

+ 8 - 3
src/main/java/com/lemon/lifecenter/controller/MobileHealthController.java

@@ -1,5 +1,8 @@
 package com.lemon.lifecenter.controller;
 
+import java.net.MalformedURLException;
+import java.net.URL;
+
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
@@ -44,9 +47,11 @@ public class MobileHealthController extends LifeCenterController {
             @RequestParam( value="phrTypeAnother", required=false, defaultValue="" ) String phrTypeAnother,
             @RequestParam( value="phrValueAnother", required=false, defaultValue="" ) String phrValueAnother,
             @RequestParam( value="phrValueAnother2", required=false, defaultValue="" ) String phrValueAnother2,
-            HttpServletRequest request, HttpServletResponse response ) {
+            HttpServletRequest request, HttpServletResponse response ) throws MalformedURLException {
         String patientName = LifeCenterSessionController.getSession( request, "sesMName" );
         int patientIdx     = Integer.valueOf( LifeCenterSessionController.getSession( request, "sesMpIdx" ) );
+        String referer  = request.getHeader( "Referer" );
+        String path = new URL( referer ).getPath();
         
         if( pdto.getPhrType().equals( "symptom" ) ) {
             
@@ -75,8 +80,8 @@ public class MobileHealthController extends LifeCenterController {
             }
         }
         
-        LifeCenterFunction.scriptMessage(response, "alert('기록되었습니다');location.href='/mobile/menu';" );
-        return "/common/black";
+        LifeCenterFunction.scriptMessage(response, "alert('기록이 정상적으로 저장되었습니다.');location.href='"+path+"';" );
+        return "/common/blank";
     }
     
 }

+ 1 - 1
src/main/webapp/WEB-INF/jsp/mobile/health/health1.jsp

@@ -16,7 +16,7 @@ $( function(){
             var temperature = $.trim( $( "input[name='temperature']" ).val() );
             
             if( temperature.length == 0 ) {
-                $( "div.error-msg" ).text( "체온을 입력해주세요" );
+                $( "div.error-msg" ).text( "체온을 입력해주세요 (Please enter your body temperature)" );
             } else {
                 $( "#phrValue" ).val( temperature );
                 form.submit();

+ 3 - 3
src/main/webapp/WEB-INF/jsp/mobile/health/health2.jsp

@@ -22,11 +22,11 @@ $( function(){
             
             //혈압
             if( pulseRate.length == 0 ) {
-                $( "div.error-msg" ).text( "맥박수를 입력해주세요" );
+                $( "div.error-msg" ).text( "맥박수를 입력해주세요 (Please enter your heart rate)" );
             } else if( bloodPressure.length == 0 ) {
-                $( "div.error-msg" ).text( "수축기 혈압을 입력해주세요" );
+                $( "div.error-msg" ).text( "수축기 혈압을 입력해주세요 (Please enter your systolic blood pressure)" );
             } else if( bloodPressure2.length == 0 ) {
-                $( "div.error-msg" ).text( "이완기 혈압을  입력해주세요" );
+                $( "div.error-msg" ).text( "이완기 혈압을  입력해주세요  (Please enter your diastole blood pressure)" );
             } else {
                 $( "#phrValue" ).val( pulseRate );
                 $( "#phrValueAnother" ).val( bloodPressure );

+ 1 - 1
src/main/webapp/WEB-INF/jsp/mobile/health/health3.jsp

@@ -16,7 +16,7 @@ $( function(){
             var oxygenSaturation = $.trim( $( "input[name='oxygenSaturation']" ).val() );
             
             if( oxygenSaturation.length == 0 ) {
-                $( "div.error-msg" ).text( "산소포화도 % 를 입력하세요" );
+                $( "div.error-msg" ).text( "산소포화도 % 를 입력하세요 (Please enter your oxygen saturation)" );
             } else {
                 $( "#phrValue" ).val( oxygenSaturation );
                 

+ 1 - 1
src/main/webapp/WEB-INF/jsp/mobile/health/health4.jsp

@@ -16,7 +16,7 @@ $( function(){
             var bloodSugar = $.trim( $( "input[name='bloodSugar']" ).val() );
             
             if( bloodSugar.length == 0 ) {
-                $( "div.error-msg" ).text( "혈당을 입력해주세요" );
+                $( "div.error-msg" ).text( "혈당을 입력해주세요 (Please enter your blood sugar)" );
             } else {
                 $( "#phrValue" ).val( bloodSugar );
                 form.submit();

+ 7 - 7
src/main/webapp/WEB-INF/jsp/mobile/health/health5.jsp

@@ -6,14 +6,12 @@
 <script>
 $( function(){
     $( "#healthForm" ).validate({
-        onkeyup: function( element, event ) {
-//             $( "div.error-msg" ).text( "" );
-        },
-        onfocusout: function (element) {
-//             $( "div.error-msg" ).text( "" );
-        },
         submitHandler: function(form) {
-        	form.submit();
+            if( $( "#healthForm" ).find( "input[type='checkbox']:checked" ).length == 0 ) {
+                $( "div.error-msg" ).text( "한 개 이상의 증상을 입력하셔야 합니다. (Please enter at least one symptom)" );
+            } else {
+                form.submit();
+            }
         }
     });
     
@@ -140,6 +138,8 @@ $( function(){
                     </div>
                 </div>
                 
+                <div class="error-msg tac mt20 error"></div>
+                
                 <div class="btn_group">
                     <ul>
                         <li>

+ 40 - 6
src/main/webapp/WEB-INF/jsp/mobile/nonface/nonface.jsp

@@ -5,15 +5,49 @@
 <jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
 <script type="text/javascript">
 $( function() {
-    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();
+//     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();
+    var param = { type : "command",
+    		functionType : "popUpBrowsing",
+    		value : {
+    			url : "https://lemon.medihere.com/app/vc",
+    			method : "POST",
+    			parameters : $( "#nonface" ).serialize()
+    		}
+        }
+    
+    console.log( stringifyJson( param ) );
+    toNative( param );
 });
+
+function toNative( reqParam ){
+    try {
+        var data = stringifyJson( reqParam );
+        if( isMobile() ){
+            // 앱이 안드로이드일 경우
+            if( checkDevice() == "android" ){
+                window.Android.toNative( data );
+            } else if( checkDevice() == "ios" ){
+                data = "jscall://toNative?" + data;
+                location.href = data;
+            }
+        }else{
+            alert("App에서만 사용가능한 기능입니다.");
+        }
+    } catch (e) {
+//         self.log(e,"mcare_mobile_toNative");
+    }
+};
+
+function stringifyJson(jsonObj,replacer,space){
+    return JSON.stringify(jsonObj,replacer,space);
+}
 </script>
 </head>
 <body>