소스 검색

update dtp档案管理

wangshuangpan 3 주 전
부모
커밋
c93e274349

+ 7 - 0
health-admin/src/main/java/com/bzd/web/controller/dtp/PharmaceuticalServiceController.java

@@ -103,6 +103,13 @@ public class PharmaceuticalServiceController extends BaseController {
         if(StringUtils.isNotNull(updatePatientBasicInfo)){
             PageData BasicpageData = (PageData) updatePatientBasicInfo;
             mmap.putAll(BasicpageData);
+            pd.put("archiveId", Id);
+            List<PageData>  records =pharmaceuticalService.findrecordsByarchiveId(pd);
+            mmap.put("recordsData",records);
+            List<PageData>  history =  pharmaceuticalService.findhistoryByarchiveId(pd);
+            mmap.put("historyData",history);
+            List<PageData>  contacts =  pharmaceuticalService.findcontactsByarchiveId(pd);
+            mmap.put("contactsData",contacts);
         }
         mmap.putAll(pageData);
         return prefix_archives + "/archivesEdit";

+ 41 - 0
health-admin/src/main/resources/templates/dtp/archives/archivesEdit.html

@@ -1402,6 +1402,7 @@
     });
       //初始化加载
      if(formSubmitted){
+         debugger
         //基本信息页面1
         function populateSelections(insuranceList) {
             var insurances = insuranceList.split(',');
@@ -1434,6 +1435,46 @@
          $('#insurance').on('change', function() {
              updateSelectedValues();
          });
+         /*<![CDATA[*/
+         var contactsData  = /*[[${contactsData}]]*/ '';
+         /*]]>*/
+         // 遍历数据并动态生成表格行
+         contactsData.forEach(function(item, index) {
+             var row = '<tr>' +
+                 '<td>' + (index + 1) + '</td>' +
+                 '<td>' + item.contactPhone + '</td>' +
+                 '<td>' + item.contactName + '</td>' +
+                 '<td>' + item.contactRelationship + '</td>' +
+                 '<td><button onclick="deleteRow(this)">删除</button></td>' +
+                 '</tr>';
+             $('#relationTableBody').append(row);
+         });
+         /*<![CDATA[*/
+         var recordsData  = /*[[${recordsData}]]*/ '';
+         /*]]>*/
+         // 遍历数据并动态生成表格行
+         recordsData.forEach(function(item, index) {
+             var row = '<tr>' +
+                 '<td>' + (index + 1) + '</td>' +
+                 '<td>' + item.medicationDescription + '</td>' +
+                 '<td>' + item.medicationType + '</td>' +
+                 '<td><button onclick="deleteRow(this)">删除</button></td>' +
+                 '</tr>';
+             $('#yyqkTableBody').append(row);
+         });
+         /*<![CDATA[*/
+         var historyData  = /*[[${historyData}]]*/ '';
+         /*]]>*/
+         // 遍历数据并动态生成表格行
+         historyData.forEach(function(item, index) {
+             var row = '<tr>' +
+                 '<td>' + (index + 1) + '</td>' +
+                 '<td>' + item.disease + '</td>' +
+                 '<td>' + item.member + '</td>' +
+                 '<td><button onclick="deleteRow(this)">删除</button></td>' +
+                 '</tr>';
+             $('#familyHistoryTableBody').append(row);
+         });
      }
     // 绑定事件监听,当复选框状态改变时更新错误提示
     $('input[name="insurance2"]').on('change', function() {

+ 12 - 0
health-system/src/main/java/com/bzd/system/service/PharmaceuticalService.java

@@ -180,6 +180,18 @@ public class PharmaceuticalService {
         return daoSupport.update("PharmaceuticalServiceMapper.updateArchives", pd);
     }
 
+    public List<PageData> findrecordsByarchiveId(PageData pd) throws Exception{
+        return (List<PageData>) daoSupport.findForList("PharmaceuticalServiceMapper.findrecordsByarchiveId", pd);
+
+    }
+    public List<PageData> findhistoryByarchiveId(PageData pd) throws Exception{
+        return (List<PageData>) daoSupport.findForList("PharmaceuticalServiceMapper.findhistoryByarchiveId", pd);
+
+    }
+    public List<PageData> findcontactsByarchiveId(PageData pd) throws Exception{
+        return (List<PageData>) daoSupport.findForList("PharmaceuticalServiceMapper.findcontactsByarchiveId", pd);
+
+    }
     public List<PageData> findFollowUpList(PageData pd) throws Exception{
         return (List<PageData>) daoSupport.findForList("PharmaceuticalServiceMapper.selectFollowUpList", pd);
 

+ 10 - 0
health-system/src/main/resources/mapper/pmServiceMapper/PharmaceuticalServiceMapper.xml

@@ -1254,6 +1254,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		WHERE id = #{id}
 	</update>
 
+	<select id="findhistoryByarchiveId" parameterType="pd" resultType="pd">
+		SELECT * FROM s_dtp_ysfw_family_history WHERE 1=1 and archiveId = #{archiveId}
+	</select>
+	<select id="findrecordsByarchiveId" parameterType="pd" resultType="pd">
+		SELECT * FROM s_dtp_ysfw_medication_records WHERE 1=1 and archiveId = #{archiveId}
+	</select>
+	<select id="findcontactsByarchiveId" parameterType="pd" resultType="pd">
+		SELECT * FROM s_dtp_ysfw_contacts WHERE 1=1 and archiveId = #{archiveId}
+	</select>
+
 	<!--家族病史表信息查询-->
 	<select id="selectFamilyHistories" parameterType="pd" resultType="pd">
 		SELECT * FROM s_dtp_ysfw_family_history WHERE 1=1