|  | @@ -781,45 +781,7 @@ function queryUserInfoByCardNo() {
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  if (res.code == 0) {
 | 
	
		
			
				|  |  |                      if (res.data != null) {
 | 
	
		
			
				|  |  | -                        $("#cardNo").blur();
 | 
	
		
			
				|  |  | -                        $("#userName").val(res.data.name);
 | 
	
		
			
				|  |  | -                        $("#userName").blur();
 | 
	
		
			
				|  |  | -                        $("#userNameReadOnly").val(res.data.name);
 | 
	
		
			
				|  |  | -                        var age = jsGetAge(res.data.birthDayStr);
 | 
	
		
			
				|  |  | -                        if (age == null) {
 | 
	
		
			
				|  |  | -                            age = res.data.age;
 | 
	
		
			
				|  |  | -                        }
 | 
	
		
			
				|  |  | -                        $("#age").val(age);
 | 
	
		
			
				|  |  | -                        $("#age").blur();
 | 
	
		
			
				|  |  | -                        $("#gender").selectpicker('val', res.data.sex);
 | 
	
		
			
				|  |  | -                        $("#gender").selectpicker('refresh');
 | 
	
		
			
				|  |  | -                        $("#gender").blur();
 | 
	
		
			
				|  |  | -                        $("#birthDayReadonly").val(res.data.birthDayStr);
 | 
	
		
			
				|  |  | -                        $("#birthDayReadonly").attr("title", res.data.birthDayStr);
 | 
	
		
			
				|  |  | -                        $("#birthDay").val(res.data.birthDayStr);
 | 
	
		
			
				|  |  | -                        $("#birthDay").blur();
 | 
	
		
			
				|  |  | -                        $("#phoneNum").val(res.data.phoneNo);
 | 
	
		
			
				|  |  | -                        $("#phoneNum").attr("title", res.data.phoneNo);
 | 
	
		
			
				|  |  | -                        $("#phoneNum").blur();
 | 
	
		
			
				|  |  | -                        $("#patientsNature").selectpicker('val', res.data.responseType);//默认选中
 | 
	
		
			
				|  |  | -                        $('#patientsNature').selectpicker('refresh');
 | 
	
		
			
				|  |  | -                        $("#patientsNature").blur();
 | 
	
		
			
				|  |  | -                        $("#idCard").val(res.data.socialNo);
 | 
	
		
			
				|  |  | -                        $("#idCard").attr("title", res.data.socialNo);
 | 
	
		
			
				|  |  | -                        $("#idCard").blur();
 | 
	
		
			
				|  |  | -                        $("#address").val(res.data.address);
 | 
	
		
			
				|  |  | -                        $("#address").blur();
 | 
	
		
			
				|  |  | -                        $("#patientId").val(res.data.patientId);
 | 
	
		
			
				|  |  | -                        setAge();
 | 
	
		
			
				|  |  | -                        if (res.data.icCardNo != null && res.data.icCardNo != "") {
 | 
	
		
			
				|  |  | -                            $("#clearIcCardNo").show();
 | 
	
		
			
				|  |  | -                        }
 | 
	
		
			
				|  |  | -                        if (res.data.patientId != null && res.data.patientId != "") {
 | 
	
		
			
				|  |  | -                            $("#nucleicAcid").show();
 | 
	
		
			
				|  |  | -                            $("#editUser").show();
 | 
	
		
			
				|  |  | -                        }
 | 
	
		
			
				|  |  | -                        readonlyOrNot(true);
 | 
	
		
			
				|  |  | -                        $("#saveUser").hide();
 | 
	
		
			
				|  |  | +                        extracted(res);
 | 
	
		
			
				|  |  |                      } else {
 | 
	
		
			
				|  |  |                          $("#saveUser").show();
 | 
	
		
			
				|  |  |                          $("#newCardModal").modal();
 | 
	
	
		
			
				|  | @@ -1057,39 +1019,7 @@ function fillPatinet(patientId) {
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              if (res.code == 0) {
 | 
	
		
			
				|  |  |                  if (res.data != null) {
 | 
	
		
			
				|  |  | -                    $("#cardNo").val(res.data.icCardNo);
 | 
	
		
			
				|  |  | -                    $("#cardNo").attr("title", res.data.icCardNo);
 | 
	
		
			
				|  |  | -                    $("#cardNo").blur();
 | 
	
		
			
				|  |  | -                    $("#userName").val(res.data.name);
 | 
	
		
			
				|  |  | -                    $("#userName").blur();
 | 
	
		
			
				|  |  | -                    $("#userNameReadOnly").val(res.data.name);
 | 
	
		
			
				|  |  | -                    $("#age").val(res.data.age);
 | 
	
		
			
				|  |  | -                    $("#age").blur();
 | 
	
		
			
				|  |  | -                    $("#gender").selectpicker('val', res.data.sex);
 | 
	
		
			
				|  |  | -                    $("#gender").selectpicker('refresh');
 | 
	
		
			
				|  |  | -                    $("#gender").blur();
 | 
	
		
			
				|  |  | -                    $("#birthDayReadonly").val(res.data.birthDayStr);
 | 
	
		
			
				|  |  | -                    $("#birthDayReadonly").attr("title", res.data.birthDayStr);
 | 
	
		
			
				|  |  | -                    $("#birthDayReadonly").blur();
 | 
	
		
			
				|  |  | -                    $("#birthDay").val(res.data.birthDayStr);
 | 
	
		
			
				|  |  | -                    $("#birthDay").blur();
 | 
	
		
			
				|  |  | -                    $("#phoneNum").val(res.data.phoneNo);
 | 
	
		
			
				|  |  | -                    $("#phoneNum").attr("title", res.data.phoneNo);
 | 
	
		
			
				|  |  | -                    $("#phoneNum").blur();
 | 
	
		
			
				|  |  | -                    $("#patientsNature").selectpicker('val', res.data.responseType);//默认选中
 | 
	
		
			
				|  |  | -                    $('#patientsNature').selectpicker('refresh');
 | 
	
		
			
				|  |  | -                    $("#patientsNature").blur();
 | 
	
		
			
				|  |  | -                    $("#idCard").val(res.data.socialNo);
 | 
	
		
			
				|  |  | -                    $("#idCard").attr("title", res.data.socialNo);
 | 
	
		
			
				|  |  | -                    $("#idCard").blur();
 | 
	
		
			
				|  |  | -                    $("#address").val(res.data.address);
 | 
	
		
			
				|  |  | -                    $("#address").blur();
 | 
	
		
			
				|  |  | -                    $("#patientId").val(res.data.patientId);
 | 
	
		
			
				|  |  | -                    setAge();
 | 
	
		
			
				|  |  | -                    if (res.data.name != null && res.data.name != "") {
 | 
	
		
			
				|  |  | -                        $("#editUser").show();
 | 
	
		
			
				|  |  | -                    }
 | 
	
		
			
				|  |  | -                    readonlyOrNot(true);
 | 
	
		
			
				|  |  | +                    extracted(res);
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              } else {
 | 
	
		
			
				|  |  |                  new PNotify({
 | 
	
	
		
			
				|  | @@ -1105,6 +1035,49 @@ function fillPatinet(patientId) {
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +function extracted(res) {
 | 
	
		
			
				|  |  | +    $("#cardNo").val(res.data.icCardNo);
 | 
	
		
			
				|  |  | +    $("#cardNo").attr("title", res.data.icCardNo);
 | 
	
		
			
				|  |  | +    $("#cardNo").blur();
 | 
	
		
			
				|  |  | +    $("#userName").val(res.data.name);
 | 
	
		
			
				|  |  | +    $("#userName").blur();
 | 
	
		
			
				|  |  | +    $("#userNameReadOnly").val(res.data.name);
 | 
	
		
			
				|  |  | +    $("#age").val(res.data.age);
 | 
	
		
			
				|  |  | +    $("#age").blur();
 | 
	
		
			
				|  |  | +    $("#gender").selectpicker('val', res.data.sex);
 | 
	
		
			
				|  |  | +    $("#gender").selectpicker('refresh');
 | 
	
		
			
				|  |  | +    $("#gender").blur();
 | 
	
		
			
				|  |  | +    $("#birthDayReadonly").val(res.data.birthDayStr);
 | 
	
		
			
				|  |  | +    $("#birthDayReadonly").attr("title", res.data.birthDayStr);
 | 
	
		
			
				|  |  | +    $("#birthDayReadonly").blur();
 | 
	
		
			
				|  |  | +    $("#birthDay").val(res.data.birthDayStr);
 | 
	
		
			
				|  |  | +    $("#birthDay").blur();
 | 
	
		
			
				|  |  | +    $("#phoneNum").val(res.data.phoneNo);
 | 
	
		
			
				|  |  | +    $("#phoneNum").attr("title", res.data.phoneNo);
 | 
	
		
			
				|  |  | +    $("#phoneNum").blur();
 | 
	
		
			
				|  |  | +    $("#patientsNature").selectpicker('val', res.data.responseType);//默认选中
 | 
	
		
			
				|  |  | +    $('#patientsNature').selectpicker('refresh');
 | 
	
		
			
				|  |  | +    $("#patientsNature").blur();
 | 
	
		
			
				|  |  | +    $("#idCard").val(res.data.socialNo);
 | 
	
		
			
				|  |  | +    $("#idCard").attr("title", res.data.socialNo);
 | 
	
		
			
				|  |  | +    $("#idCard").blur();
 | 
	
		
			
				|  |  | +    $("#address").val(res.data.address);
 | 
	
		
			
				|  |  | +    $("#address").blur();
 | 
	
		
			
				|  |  | +    $("#patientId").val(res.data.patientId);
 | 
	
		
			
				|  |  | +    setAge();
 | 
	
		
			
				|  |  | +    $("#age").blur();
 | 
	
		
			
				|  |  | +    if (res.data.icCardNo != null && res.data.icCardNo != "") {
 | 
	
		
			
				|  |  | +        $("#clearIcCardNo").show();
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    if (res.data.patientId != null && res.data.patientId != "") {
 | 
	
		
			
				|  |  | +        $("#nucleicAcid").show();
 | 
	
		
			
				|  |  | +        $("#editUser").show();
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    readonlyOrNot(true);
 | 
	
		
			
				|  |  | +    $("#saveUser").hide();
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  /**
 | 
	
		
			
				|  |  |   * 将病人信息填入患者信息修改form
 | 
	
		
			
				|  |  |   * @param patinet
 |