| 
					
				 | 
			
			
				@@ -91,11 +91,22 @@ public class EmrServer { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return emrToTree(data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 获取 整个医院模板 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public List<JSONObject> wholeHospitalTemplate() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         JSONArray data = emr.getEmrTree(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return emrToTree(data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 电子病历转成树状图 二次封装 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @param data 模板数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @return 返回 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public List<JSONObject> emrToTree(JSONArray data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<JSONObject> tree = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (data.isEmpty()) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -105,6 +116,12 @@ public class EmrServer { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return tree; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 电子病历转成树状图 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @param data 电子病历 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @param tree 树 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private static void emrArrToTree(JSONArray data, List<JSONObject> tree) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Map<String, JSONObject> map = new HashMap<>(data.size()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (int i = 0; i < data.size(); i++) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -127,6 +144,11 @@ public class EmrServer { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 获取电子病历的片段 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @return 树 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public ResultVo<List<JSONObject>> getSnippetTree() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         JSONArray data = emr.getSnippetTree(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<JSONObject> tree = new ArrayList<>(); 
			 |