| 
					
				 | 
			
			
				@@ -59,10 +59,11 @@ public interface EmrPatientDao { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     Integer whetherThereIsAMedicalRecord(@Param("docmentId") String docmentId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Insert("insert into emr_patient_data (pat_no, times, emr_document_id," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            " emr_category_code, emr_name,create_id,name,parent,refer_physician,consult_physician,dept_director) " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            " emr_category_code, emr_name,create_id,name,parent,refer_physician,consult_physician,dept_director , " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            " emr_data_element) " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "values (#{patNo},#{times},#{emrDocumentId}," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "#{emrCategoryCode},#{emrName},#{createId},#{name},#{parent},#{referPhysician},#{consultPhysician},#{deptDirector})") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Options(useGeneratedKeys = true, keyColumn = "id", keyProperty = "id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "#{emrCategoryCode},#{emrName},#{createId},#{name},#{parent},#{referPhysician},#{consultPhysician},#{deptDirector}, " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "#{emrDataElementStr})") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     void emrInsertForTheFirstTime(EmrPatientData param); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Delete("delete emr_progress_note where document_id = #{documentId} ") 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -84,7 +85,8 @@ public interface EmrPatientDao { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Update("update emr_patient_data " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "set name    = #{name}, " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "    modify_date = getdate() , " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "    modify_id   = #{createId} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "    modify_id   = #{createId} , " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "    emr_data_element = #{emrDataElementStr} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "where pat_no = #{patNo} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "  and times = #{times} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "  and emr_document_id = #{emrDocumentId} ") 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -161,7 +163,7 @@ public interface EmrPatientDao { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     List<String> getDocumentIdByPatietn(String patNo, int times, String categoryCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Select("select data_element from emr_data_element where pat_no = #{patNo} and times = #{times} ") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    String getEmrPatientData(@Param("patNo") String patNo,@Param("times") int times); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    String getEmrPatientData(@Param("patNo") String patNo, @Param("times") int times); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Select("select top 1 rtrim(a.name)                                                                                          as xm, " + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -540,6 +542,7 @@ public interface EmrPatientDao { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "where inpatient_no = #{patNo} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "  and admiss_times = #{times}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     List<OpRecord> getOpRecordList(String patNo, Integer times); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Select(" select *  from emr_patient_data where pat_no=#{patNo} and del_flag=0") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     List<MzEmrPatientData> selectDataByPatNo(String patNo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |