|
@@ -8,6 +8,7 @@ var groupIdMap = null;
|
|
|
$(function () {
|
|
|
initGenderSelect();
|
|
|
initResponceTypeSelect();
|
|
|
+ initTemplateTypeSelect();
|
|
|
initZyClassTypeSelect();
|
|
|
initInstructionSelect();
|
|
|
setSelectSize();
|
|
@@ -99,7 +100,7 @@ $(function () {
|
|
|
/**
|
|
|
* 接诊
|
|
|
*/
|
|
|
- $("#saveapidAccepts1").on("click", function (t) {
|
|
|
+ $("#clinicalReception").on("click", function (t) {
|
|
|
var patientIdDb = $("#patientIdDb").val();
|
|
|
if (patientIdDb == null || patientIdDb == "") {
|
|
|
errorMesageSimaple("当前未选择病人,无法接诊");
|
|
@@ -110,6 +111,29 @@ $(function () {
|
|
|
$("#rapidAcceptsModal").modal("hide");
|
|
|
});
|
|
|
|
|
|
+ /**
|
|
|
+ * 存为范本
|
|
|
+ */
|
|
|
+ $("#saveapidAccepts").on("click", function (t) {
|
|
|
+ var symptom = $("#symptom").val();
|
|
|
+ if (symptom == null || symptom == "") {
|
|
|
+ errorMesageSimaple("主诉不能为空!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var emrHpi = $("#emrHpi").val();
|
|
|
+ if (emrHpi == null || emrHpi == "") {
|
|
|
+ errorMesageSimaple("现病史不能为空!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var diagnoseValue = $("#diagnoseValue").val();
|
|
|
+ if (diagnoseValue == null || diagnoseValue == "") {
|
|
|
+ errorMesageSimaple("诊断不能为空!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $("#saveapidAcceptsModal").modal("show");
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 实例化智能问诊弹窗
|
|
|
*/
|
|
@@ -293,97 +317,7 @@ function contentMethod() {
|
|
|
' </button>' +
|
|
|
' <div style="height: calc(100% - 44px);border: 1px solid #DDDDDD;overflow-y: auto;margin-top: 5px;width: 100%;">' +
|
|
|
' <form class="form-horizontal form-label-left mz-fixed-form" novalidate autocomplete="off"' +
|
|
|
- ' style="height: 100%;overflow-y: auto;width: 100%;">' +
|
|
|
- ' <div class="item form-group thmz_alert" style="padding: 10px 0;width: 100%;">' +
|
|
|
- ' <div title="急性上呼吸道感染"' +
|
|
|
- ' style="margin-left: 10px!important;float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: 100px;">' +
|
|
|
- ' 急性上呼吸道感染' +
|
|
|
- ' </div>' +
|
|
|
- ' <div style="float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 160px);"' +
|
|
|
- ' title="肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多">诊断:<a' +
|
|
|
- ' style="cursor: pointer; color: #2e69eb;"' +
|
|
|
- ' onclick="medicalModelModal(1)">肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多</a>' +
|
|
|
- ' </div>' +
|
|
|
- ' <div style="float: left;width: 36px;cursor: pointer;" onclick="medicalModelModal(1)"><img' +
|
|
|
- ' src="/thmz/css/bootstrap/bootstrap-icons-1.5.0/cursor-fill.svg"' +
|
|
|
- ' style="margin-left: 10px!important;vertical-align: -.15em;margin-right: 10px!important;"/>' +
|
|
|
- ' </div>' +
|
|
|
- ' </div>' +
|
|
|
- ' <div class="item form-group thmz_alert" style="padding: 10px 0;width: 100%;">' +
|
|
|
- ' <div title="急性上呼吸道感染"' +
|
|
|
- ' style="margin-left: 10px!important;float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: 100px;">' +
|
|
|
- ' 急性上呼吸道感染' +
|
|
|
- ' </div>' +
|
|
|
- ' <div style="float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 160px);"' +
|
|
|
- ' title="肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多">诊断:<a' +
|
|
|
- ' style="cursor: pointer; color: #2e69eb;"' +
|
|
|
- ' onclick="medicalModelModal(1)">肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多</a>' +
|
|
|
- ' </div>' +
|
|
|
- ' <div style="float: left;width: 36px;cursor: pointer;" onclick="medicalModelModal(1)"><img' +
|
|
|
- ' src="/thmz/css/bootstrap/bootstrap-icons-1.5.0/cursor-fill.svg"' +
|
|
|
- ' style="margin-left: 10px!important;vertical-align: -.15em;margin-right: 10px!important;"/>' +
|
|
|
- ' </div>' +
|
|
|
- ' </div>' +
|
|
|
- ' <div class="item form-group thmz_alert" style="padding: 10px 0;width: 100%;">' +
|
|
|
- ' <div title="急性上呼吸道感染"' +
|
|
|
- ' style="margin-left: 10px!important;float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: 100px;">' +
|
|
|
- ' 急性上呼吸道感染' +
|
|
|
- ' </div>' +
|
|
|
- ' <div style="float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 160px);"' +
|
|
|
- ' title="肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多">诊断:<a' +
|
|
|
- ' style="cursor: pointer; color: #2e69eb;"' +
|
|
|
- ' onclick="medicalModelModal(1)">肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多</a>' +
|
|
|
- ' </div>' +
|
|
|
- ' <div style="float: left;width: 36px;cursor: pointer;" onclick="medicalModelModal(1)"><img' +
|
|
|
- ' src="/thmz/css/bootstrap/bootstrap-icons-1.5.0/cursor-fill.svg"' +
|
|
|
- ' style="margin-left: 10px!important;vertical-align: -.15em;margin-right: 10px!important;"/>' +
|
|
|
- ' </div>' +
|
|
|
- ' </div>' +
|
|
|
- ' <div class="item form-group thmz_alert" style="padding: 10px 0;width: 100%;">' +
|
|
|
- ' <div title="急性上呼吸道感染"' +
|
|
|
- ' style="margin-left: 10px!important;float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: 100px;">' +
|
|
|
- ' 急性上呼吸道感染' +
|
|
|
- ' </div>' +
|
|
|
- ' <div style="float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 160px);"' +
|
|
|
- ' title="肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多">诊断:<a' +
|
|
|
- ' style="cursor: pointer; color: #2e69eb;"' +
|
|
|
- ' onclick="medicalModelModal(1)">肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多</a>' +
|
|
|
- ' </div>' +
|
|
|
- ' <div style="float: left;width: 36px;cursor: pointer;" onclick="medicalModelModal(1)"><img' +
|
|
|
- ' src="/thmz/css/bootstrap/bootstrap-icons-1.5.0/cursor-fill.svg"' +
|
|
|
- ' style="margin-left: 10px!important;vertical-align: -.15em;margin-right: 10px!important;"/>' +
|
|
|
- ' </div>' +
|
|
|
- ' </div>' +
|
|
|
- ' <div class="item form-group thmz_alert" style="padding: 10px 0;width: 100%;">' +
|
|
|
- ' <div title="急性上呼吸道感染"' +
|
|
|
- ' style="margin-left: 10px!important;float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: 100px;">' +
|
|
|
- ' 急性上呼吸道感染' +
|
|
|
- ' </div>' +
|
|
|
- ' <div style="float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 160px);"' +
|
|
|
- ' title="肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多">诊断:<a' +
|
|
|
- ' style="cursor: pointer; color: #2e69eb;"' +
|
|
|
- ' onclick="medicalModelModal(1)">肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多</a>' +
|
|
|
- ' </div>' +
|
|
|
- ' <div style="float: left;width: 36px;cursor: pointer;" onclick="medicalModelModal(1)"><img' +
|
|
|
- ' src="/thmz/css/bootstrap/bootstrap-icons-1.5.0/cursor-fill.svg"' +
|
|
|
- ' style="margin-left: 10px!important;vertical-align: -.15em;margin-right: 10px!important;"/>' +
|
|
|
- ' </div>' +
|
|
|
- ' </div>' +
|
|
|
- ' <div class="item form-group thmz_alert" style="padding: 10px 0;width: 100%;">' +
|
|
|
- ' <div title="急性上呼吸道感染"' +
|
|
|
- ' style="margin-left: 10px!important;float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: 100px;">' +
|
|
|
- ' 急性上呼吸道感染' +
|
|
|
- ' </div>' +
|
|
|
- ' <div style="float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 160px);"' +
|
|
|
- ' title="肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多">诊断:<a' +
|
|
|
- ' style="cursor: pointer; color: #2e69eb;"' +
|
|
|
- ' onclick="medicalModelModal(1)">肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多</a>' +
|
|
|
- ' </div>' +
|
|
|
- ' <div style="float: left;width: 36px;cursor: pointer;" onclick="medicalModelModal(1)"><img' +
|
|
|
- ' src="/thmz/css/bootstrap/bootstrap-icons-1.5.0/cursor-fill.svg"' +
|
|
|
- ' style="margin-left: 10px!important;vertical-align: -.15em;margin-right: 10px!important;"/>' +
|
|
|
- ' </div>' +
|
|
|
- ' </div>' +
|
|
|
+ ' style="height: 100%;overflow-y: auto;width: 100%;" id="TemplateData">' +
|
|
|
' </form>' +
|
|
|
' </div>' +
|
|
|
' </div>';
|
|
@@ -393,6 +327,7 @@ function contentMethod() {
|
|
|
fitEmrHpiData();
|
|
|
fitEmrPsData();
|
|
|
fitDiagnoseData();
|
|
|
+ fitTemplateData();
|
|
|
}, 100);
|
|
|
|
|
|
// setTimeout(function () {
|
|
@@ -571,6 +506,61 @@ function fitRecommendData(paramsType) {
|
|
|
}
|
|
|
|
|
|
|
|
|
+/**
|
|
|
+ * 设置医疗范文方法
|
|
|
+ */
|
|
|
+function fitTemplateData() {
|
|
|
+ var popoverId = $("#box-arrow-left").attr("aria-describedby");
|
|
|
+ if (!$("#" + popoverId).hasClass("in")) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var emptyHtml = '<img src="/thmz/images/no-recommend.png" style="height: 120px;position: absolute;top: 50%;transform: translateY(-50%);margin-left: -30px;">';
|
|
|
+ $.ajax({
|
|
|
+ type: "GET",
|
|
|
+ url: '/thmz/getTemplate',
|
|
|
+ contentType: "application/json;charset=UTF-8",
|
|
|
+ dataType: "json",
|
|
|
+ async: false,
|
|
|
+ headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
+ success: function (res) {
|
|
|
+ if (res == '401' || res == 401) {
|
|
|
+ window.location.href = '/thmz/login/view'
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (res.code == 0) {
|
|
|
+ var html = '';
|
|
|
+ var data = res.data;
|
|
|
+ if (data == null || data.length == 0) {
|
|
|
+ html += emptyHtml;
|
|
|
+ } else {
|
|
|
+ for (var i = 0; i < data.length; i++) {
|
|
|
+ var template = data[i];
|
|
|
+ html += ' <div class="item form-group thmz_alert" style="padding: 10px 0;width: 100%;">';
|
|
|
+ html += ' <div title="' + template.name + '"';
|
|
|
+ html += ' style="margin-left: 10px!important;float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: 100px;">';
|
|
|
+ html += template.name;
|
|
|
+ html += ' </div>';
|
|
|
+ html += ' <div style="float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 160px);"';
|
|
|
+ html += ' title="' + template.icdText + '">诊断:<a';
|
|
|
+ html += ' style="cursor: pointer; color: #2e69eb;"';
|
|
|
+ html += ' onclick="medicalModelModal(' + template.id + ')">' + template.icdText + '</a>';
|
|
|
+ html += ' </div>';
|
|
|
+ html += ' <div style="float: left;width: 36px;cursor: pointer;" onclick="medicalModelModal(' + template.id + ')"><img';
|
|
|
+ html += ' src="/thmz/css/bootstrap/bootstrap-icons-1.5.0/cursor-fill.svg"';
|
|
|
+ html += ' style="margin-left: 10px!important;vertical-align: -.15em;margin-right: 10px!important;"/>';
|
|
|
+ html += ' </div>';
|
|
|
+ html += ' </div>';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $("#TemplateData").html(html);
|
|
|
+ } else {
|
|
|
+ errorMesage(res);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 清空快速接诊弹窗
|
|
|
*/
|
|
@@ -1042,7 +1032,7 @@ function clearWorkSpace() {
|
|
|
initNavTabs(1);
|
|
|
initNavTabs(2);
|
|
|
$("#totalAmount").text(0);
|
|
|
-
|
|
|
+ clearApidAcceptsModal();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -1058,6 +1048,99 @@ function visitingDetailModal(id) {
|
|
|
* @param id
|
|
|
*/
|
|
|
function medicalModelModal(id) {
|
|
|
+ $.ajax({
|
|
|
+ type: "GET",
|
|
|
+ url: '/thmz/getTemplateById?id=' + id,
|
|
|
+ contentType: "application/json;charset=UTF-8",
|
|
|
+ dataType: "json",
|
|
|
+ async: false,
|
|
|
+ headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
+ success: function (res) {
|
|
|
+ if (res == '401' || res == 401) {
|
|
|
+ window.location.href = '/thmz/login/view'
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (res.code == 0) {
|
|
|
+ var jsonData = JSON.parse(res.data.templateData);
|
|
|
+ $("#vmedicalModelName").text(res.data.name);
|
|
|
+ $("#zsTemplate").html(jsonData.mzBlRecord.emrChiefComplaint);
|
|
|
+ $("#xbsTemplate").html(jsonData.mzBlRecord.emrHpi);
|
|
|
+ var icdText = res.data.icdText;
|
|
|
+ if (icdText != null) {
|
|
|
+ var arr = icdText.split(",");
|
|
|
+ var html = "";
|
|
|
+ for (var i = 0; i < arr.length; i++) {
|
|
|
+ if (i == 0) {
|
|
|
+ html += ' <div class="tagZdy tagZdy-back">';
|
|
|
+ } else {
|
|
|
+ html += ' <div class="tagZdy tagZdy-back-green">';
|
|
|
+ }
|
|
|
+ html += arr[i];
|
|
|
+ html += '</div>';
|
|
|
+ }
|
|
|
+ $("#zdTemplate").html(html);
|
|
|
+ }
|
|
|
+ var emrProcess=jsonData.mzBlRecord.emrProcess;
|
|
|
+ if(emrProcess!=null){
|
|
|
+ var xy = emrProcess.substring(emrProcess.indexOf("西药治疗:")+5,emrProcess.indexOf("中药治疗:"));
|
|
|
+ var arr = xy.split("_");
|
|
|
+ if(arr!=null && arr.length>0){
|
|
|
+ var xyhtml="";
|
|
|
+ for(var i=0;i<arr.length;i++){
|
|
|
+ xyhtml+="<div>";
|
|
|
+ xyhtml+=arr[i];
|
|
|
+ xyhtml+="</div>";
|
|
|
+ }
|
|
|
+ $("#xyzlContent").html(xyhtml);
|
|
|
+ $("#xyzlTitle").removeClass("hide").addClass("in");
|
|
|
+ }else {
|
|
|
+ $("#xyzlTitle").removeClass("in").addClass("hide");
|
|
|
+ }
|
|
|
+ var zy = emrProcess.substring(emrProcess.indexOf("中药治疗:")+5,emrProcess.indexOf("医技与诊疗:"));
|
|
|
+ var zyArr = zy.split("_");
|
|
|
+ if(zyArr!=null && zyArr.length>0){
|
|
|
+ var zyhtml="";
|
|
|
+ for(var i=1;i<zyArr.length;i++){
|
|
|
+ zyhtml+="<div>";
|
|
|
+ zyhtml+=zyArr[i];
|
|
|
+ zyhtml+="</div>";
|
|
|
+ }
|
|
|
+ var zyfs =zyArr[0].substring(zyArr[0].indexOf("付数:")+3);
|
|
|
+ if(zyfs!=null && zyfs!=""){
|
|
|
+ zyhtml+=" <div>";
|
|
|
+ zyhtml+=' <div style="text-indent: 2em;">';
|
|
|
+ zyhtml+=' <div>';
|
|
|
+ zyhtml+='x<span>';
|
|
|
+ zyhtml+=zyfs;
|
|
|
+ zyhtml+='</span> 付</div></div></div>';
|
|
|
+ }
|
|
|
+ $("#zyzlContent").html(zyhtml);
|
|
|
+ $("#zyzlTitle").removeClass("hide").addClass("in");
|
|
|
+
|
|
|
+
|
|
|
+ }else {
|
|
|
+ $("#zyzlTitle").removeClass("in").addClass("hide");
|
|
|
+ }
|
|
|
+ var zlyj = emrProcess.substring(emrProcess.indexOf("医技与诊疗:")+6);
|
|
|
+ var zlyjArr = zlyj.split("_");
|
|
|
+ if(zlyjArr!=null && zlyjArr.length>0){
|
|
|
+ var zlyjhtml="";
|
|
|
+ for(var i=0;i<zlyjArr.length;i++){
|
|
|
+ zlyjhtml+="<div>";
|
|
|
+ zlyjhtml+=zlyjArr[i];
|
|
|
+ zlyjhtml+="</div>";
|
|
|
+ }
|
|
|
+ $("#zlyjContent").html(zlyjhtml);
|
|
|
+ $("#zlyjTitle").removeClass("hide").addClass("in");
|
|
|
+ }else {
|
|
|
+ $("#zlyjTitle").removeClass("in").addClass("hide");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ errorMesage(res);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
$("#medicalModelModal").modal();
|
|
|
}
|
|
|
|
|
@@ -1196,6 +1279,10 @@ function initGenderSelect() {
|
|
|
$('#rapidAcceptsUserGender').selectpicker('refresh');
|
|
|
$('#editUserGender').html(gender);
|
|
|
$('#editUserGender').selectpicker('refresh');
|
|
|
+ //医疗范文状态
|
|
|
+ var templateStatus = '<option value="0">启用</option><option value="1">停用</option>';
|
|
|
+ $('#templateStatus').html(templateStatus);
|
|
|
+ $('#templateStatus').selectpicker('refresh');
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -1233,19 +1320,41 @@ function initResponceTypeSelect() {
|
|
|
$('#patientsNature').selectpicker('refresh');
|
|
|
$('#editUserPatientsNature').selectpicker('refresh');
|
|
|
} else {
|
|
|
- new PNotify({
|
|
|
- title: '错误提示',
|
|
|
- text: res.message,
|
|
|
- type: 'error',
|
|
|
- hide: false,
|
|
|
- styling: 'bootstrap3'
|
|
|
- });
|
|
|
+ errorMesage(res);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
+/**
|
|
|
+ * 初始化医疗范文类型下拉选
|
|
|
+ */
|
|
|
+function initTemplateTypeSelect() {
|
|
|
+ $.ajax({
|
|
|
+ type: "GET",
|
|
|
+ url: '/thmz/getTemplateTypes',
|
|
|
+ contentType: "application/json;charset=UTF-8",
|
|
|
+ dataType: "json",
|
|
|
+ headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
+ success: function (res) {
|
|
|
+ if (res == '401' || res == 401) {
|
|
|
+ window.location.href = '/thmz/login/view'
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (res.code == 0) {
|
|
|
+ res.data.forEach(function (item) {
|
|
|
+ var html = '<option value="' + item.code + '">' + item.name + '</option>';
|
|
|
+ $('#templateType').append(html);
|
|
|
+ });
|
|
|
+ $('#templateType').selectpicker('refresh');
|
|
|
+ } else {
|
|
|
+ errorMesage(res);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* 初始科室下拉选
|
|
|
* @param ampm 时间段区间
|
|
@@ -1842,8 +1951,8 @@ function editWesternMedicine(obj) {
|
|
|
$('#groupId').selectpicker('refresh');
|
|
|
//药品名称
|
|
|
$("#western_medicine_name").val($(parentObject).find("input.temporary_items_westernMedicineNamme").val());
|
|
|
- var code=$(parentObject).find("input.temporary_items_code").val();
|
|
|
- var serial=$(parentObject).find("input.temporary_items_serial").val();
|
|
|
+ var code = $(parentObject).find("input.temporary_items_code").val();
|
|
|
+ var serial = $(parentObject).find("input.temporary_items_serial").val();
|
|
|
//当前药品编码
|
|
|
$("#current_code").val(code);
|
|
|
//当前药品规格
|
|
@@ -2201,7 +2310,7 @@ function clearWesternMedicine(flag) {
|
|
|
//皮试
|
|
|
$("#tryFlag").parent().removeClass('checked');
|
|
|
$("#tryFlag").parent().parent().parent().removeClass("in").addClass("hide");
|
|
|
- $("#gross").attr("readonly","readonly");
|
|
|
+ $("#gross").attr("readonly", "readonly");
|
|
|
}
|
|
|
|
|
|
|
|
@@ -3538,7 +3647,7 @@ function checkYpInfo(code, serial, groupNo) {
|
|
|
$("#messageButton").off("click").on("click", function (t) {
|
|
|
$("#messageModal").modal("hide");
|
|
|
refreshNavTabs(0, groupNo);
|
|
|
- fitWesternMedicine(res,groupNo);
|
|
|
+ fitWesternMedicine(res, groupNo);
|
|
|
});
|
|
|
//当前编辑的处方与选中的品类非同一处方能保存的
|
|
|
} else if (currentGroupNo != null && currentGroupNo != '' && groupNo != currentGroupNo) {
|
|
@@ -3554,7 +3663,7 @@ function checkYpInfo(code, serial, groupNo) {
|
|
|
$("#xyTab").find("a[href='#" + parentId + "']").off("click").tab('show');
|
|
|
//因为存在没有满5个的处方页,直接保存到该页
|
|
|
needAddTable = false;
|
|
|
- fitWesternMedicine(res,groupNo);
|
|
|
+ fitWesternMedicine(res, groupNo);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -3576,7 +3685,7 @@ function checkYpInfo(code, serial, groupNo) {
|
|
|
$("#messageButton").off("click").on("click", function (t) {
|
|
|
$("#messageModal").modal("hide");
|
|
|
refreshNavTabs(0, groupNo);
|
|
|
- fitWesternMedicine(res,groupNo);
|
|
|
+ fitWesternMedicine(res, groupNo);
|
|
|
});
|
|
|
}
|
|
|
//当前编辑的处方非普通西药处方
|
|
@@ -3597,7 +3706,7 @@ function checkYpInfo(code, serial, groupNo) {
|
|
|
// cfdesc='诊疗';
|
|
|
// }
|
|
|
$("#xyTab li.active").find("a").find("small.cfdesc").text("(" + cfdesc + ")");
|
|
|
- fitWesternMedicine(res,groupNo);
|
|
|
+ fitWesternMedicine(res, groupNo);
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
@@ -4187,7 +4296,7 @@ function refreshNavTabs(index, groupNo) {
|
|
|
* @param res
|
|
|
* @param groupNo
|
|
|
*/
|
|
|
-function fitWesternMedicine(res,groupNo) {
|
|
|
+function fitWesternMedicine(res, groupNo) {
|
|
|
$("#western_medicine_name").val(res.data.name);
|
|
|
$("#western_medicine_name").blur();
|
|
|
var drugWinHtml = '';
|
|
@@ -4260,11 +4369,11 @@ function fitWesternMedicine(res,groupNo) {
|
|
|
$("#tryFlag").parent().removeClass("checked");
|
|
|
$("#tryFlag").parent().parent().parent().removeClass("in").addClass("hide");
|
|
|
}
|
|
|
- if(groupNo=="91"){
|
|
|
+ if (groupNo == "91") {
|
|
|
//医材
|
|
|
$("#gross").removeAttr("readonly")
|
|
|
- }else {
|
|
|
- $("#gross").attr("readonly","readonly");
|
|
|
+ } else {
|
|
|
+ $("#gross").attr("readonly", "readonly");
|
|
|
}
|
|
|
calculate();
|
|
|
|
|
@@ -4308,7 +4417,7 @@ function calculate() {
|
|
|
if (currentGroupNo == '71') {
|
|
|
return;
|
|
|
}
|
|
|
- dayNum=1;
|
|
|
+ dayNum = 1;
|
|
|
}
|
|
|
if (drugWin == null || drugWin === "") {
|
|
|
if (currentGroupNo == '71') {
|
|
@@ -4356,7 +4465,6 @@ function calculateSimple() {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 根据中药付数计算金额
|
|
|
*/
|
|
@@ -5087,12 +5195,21 @@ function getParamsForOrescription() {
|
|
|
var orderNo = 0;
|
|
|
//西药设置
|
|
|
if (xyTabContents != null && xyTabContents.length > 0) {
|
|
|
+ emrProcess += "西药治疗:"
|
|
|
for (var i = 0; i < xyTabContents.length; i++) {
|
|
|
var formGroups = $(xyTabContents[i]).find("div.form-group");
|
|
|
if (formGroups != null && formGroups.length > 0) {
|
|
|
+ if (i != 0 && i != xyTabContents.length - 1) {
|
|
|
+ emrProcess += "_";
|
|
|
+ }
|
|
|
for (var j = 0; j < formGroups.length; j++) {
|
|
|
- var cfAmount=$(xyTabContents[i]).find("span.cf_amount").parent().text();
|
|
|
- emrProcess += $(xyTabContents[i]).text().replace(cfAmount,"") + " ";
|
|
|
+ // var cfAmount = $(xyTabContents[i]).find("span.cf_amount").parent().text();
|
|
|
+ // emrProcess += $(formGroups[j]).text().replace(cfAmount, "") + "-";
|
|
|
+ if (j == formGroups.length - 1) {
|
|
|
+ emrProcess += $(formGroups[j]).text();
|
|
|
+ } else {
|
|
|
+ emrProcess += $(formGroups[j]).text() + "_";
|
|
|
+ }
|
|
|
var tempJson = JSON.parse('{"chargeItemCode": "","serial": "","quantity": "","drugQuan": "","drugUnit": "","frequency": "","orderDays": "","paySelf": "0","drugWin": "1","instructionCode":"","instructionText":"","orderNo":"","groupOrder":"","supplyCode":"","cyJssm":"","cyDj":"","cyFysm":"","tryFlag":"0"}');
|
|
|
tempJson.chargeItemCode = $(formGroups[j]).find("input.temporary_items_code").val();
|
|
|
tempJson.serial = $(formGroups[j]).find("input.temporary_items_serial").val();
|
|
@@ -5119,16 +5236,24 @@ function getParamsForOrescription() {
|
|
|
//中草药
|
|
|
var zyTabContents = $("#zyTabContent").find("div.form-group");
|
|
|
if (zyTabContents != null && zyTabContents.length > 0) {
|
|
|
+ emrProcess += "中药治疗:"
|
|
|
orderNo++;
|
|
|
+ var zyfs=$("input.zyfs").val();
|
|
|
+ emrProcess+="付数"+zyfs+"_";
|
|
|
for (var i = 0; i < zyTabContents.length; i++) {
|
|
|
- var cfAmount=$(zyTabContents[i]).find("span.cf_amount").parent().text();
|
|
|
- emrProcess += $(zyTabContents[i]).text().replace(cfAmount,"") + " ";
|
|
|
+ // var cfAmount = $(zyTabContents[i]).find("span.cf_amount").parent().text();
|
|
|
+ // emrProcess += $(zyTabContents[i]).text().replace(cfAmount, "") + "-";
|
|
|
+ if (i == zyTabContents.length - 1) {
|
|
|
+ emrProcess += $(zyTabContents[i]).text();
|
|
|
+ } else {
|
|
|
+ emrProcess += $(zyTabContents[i]).text() + "_";
|
|
|
+ }
|
|
|
var tempJson = JSON.parse('{"chargeItemCode": "","serial": "","quantity": "","drugQuan": "","drugUnit": "g","frequency": "","orderDays": "1","paySelf": "0","drugWin": "","instructionCode":"","instructionText":"","orderNo":"1","groupOrder":"1","supplyCode":"","cyJssm":"","cyDj":"","cyFysm":"","tryFlag":"0"}');
|
|
|
tempJson.chargeItemCode = $(zyTabContents[i]).find("input.temporary_items_code").val();
|
|
|
tempJson.serial = $(zyTabContents[i]).find("input.temporary_items_serial").val();
|
|
|
tempJson.quantity = $(zyTabContents[i]).find("input.temporary_items_drugWin").val();
|
|
|
tempJson.drugQuan = $(zyTabContents[i]).find("input.temporary_items_drugWin").val();
|
|
|
- tempJson.drugWin = $("input.zyfs").val();
|
|
|
+ tempJson.drugWin =zyfs;
|
|
|
tempJson.frequency = $("#zy_orderFrequency_1").val();
|
|
|
tempJson.instructionCode = $(zyTabContents[i]).find("input.temporary_items_zyInstruction").val();
|
|
|
tempJson.instructionText = $(zyTabContents[i]).find("input.temporary_items_zyInstructionText").val();
|
|
@@ -5142,14 +5267,20 @@ function getParamsForOrescription() {
|
|
|
//设置诊疗与医技
|
|
|
var zlTabContents = $("#zlTabContent").find("div.form-group");
|
|
|
if (zlTabContents != null && zlTabContents.length > 0) {
|
|
|
+ emrProcess += "医技与诊疗:"
|
|
|
orderNo++;
|
|
|
for (var i = 0; i < zlTabContents.length; i++) {
|
|
|
- var cfAmount=$(zlTabContents[i]).find("span.cf_amount").parent().text();
|
|
|
- emrProcess += $(zlTabContents[i]).text().replace(cfAmount,"") + " ";
|
|
|
+ // var cfAmount = $(zlTabContents[i]).find("span.cf_amount").parent().text();
|
|
|
+ // emrProcess += $(zlTabContents[i]).text().replace(cfAmount, "") + "-";
|
|
|
+ if (i == zlTabContents.length - 1) {
|
|
|
+ emrProcess += $(zlTabContents[i]).text();
|
|
|
+ } else {
|
|
|
+ emrProcess += $(zlTabContents[i]).text() + "_";
|
|
|
+ }
|
|
|
if (emrFzjc == null) {
|
|
|
- emrFzjc = $(zlTabContents[i]).text().replace(cfAmount,"");
|
|
|
+ emrFzjc = $(zlTabContents[i]).text();
|
|
|
} else {
|
|
|
- emrFzjc += "," + $(zlTabContents[i]).text().replace(cfAmount,"");
|
|
|
+ emrFzjc += "," + $(zlTabContents[i]).text();
|
|
|
}
|
|
|
var tempJson = null;
|
|
|
//项目类型
|
|
@@ -5199,28 +5330,102 @@ function getParamsForOrescription() {
|
|
|
* 保存处方
|
|
|
*/
|
|
|
function savePrescription() {
|
|
|
- var jsonData = getParamsForOrescription();
|
|
|
- $.ajax({
|
|
|
- type: "POST",
|
|
|
- url: '/thmz/savePrescription',
|
|
|
- contentType: "application/json;charset=UTF-8",
|
|
|
- dataType: "json",
|
|
|
- data: JSON.stringify(jsonData),
|
|
|
- headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
- success: function (res) {
|
|
|
- if (res == '401' || res == 401) {
|
|
|
- window.location.href = '/thmz/login/view'
|
|
|
- return;
|
|
|
+ $("#messageModal").modal();
|
|
|
+ $("#messageContent").html("确认保存处方吗?");
|
|
|
+ $("#messageButton").on("click", function (t) {
|
|
|
+ $("#messageModal").modal("hide");
|
|
|
+ var jsonData = getParamsForOrescription();
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ url: '/thmz/savePrescription',
|
|
|
+ contentType: "application/json;charset=UTF-8",
|
|
|
+ dataType: "json",
|
|
|
+ data: JSON.stringify(jsonData),
|
|
|
+ headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
+ success: function (res) {
|
|
|
+ if (res == '401' || res == 401) {
|
|
|
+ window.location.href = '/thmz/login/view'
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (res.code == 0) {
|
|
|
+ successMesage(res);
|
|
|
+ clearWorkSpace();
|
|
|
+ loadInClinicTableList();
|
|
|
+ loadClinicTableList();
|
|
|
+ } else {
|
|
|
+ errorMesage(res);
|
|
|
+ }
|
|
|
}
|
|
|
- if (res.code == 0) {
|
|
|
- successMesage(res);
|
|
|
- clearWorkSpace();
|
|
|
- loadInClinicTableList();
|
|
|
- loadClinicTableList();
|
|
|
- } else {
|
|
|
- errorMesage(res);
|
|
|
+ });
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 保存医疗范文
|
|
|
+ */
|
|
|
+function saveapidAccepts() {
|
|
|
+ var templateName = $("#templateName").val();
|
|
|
+ if (templateName == null || templateName == "") {
|
|
|
+ errorMesageSimaple("范文名称不能为空!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var templateType = $("#templateType").val();
|
|
|
+ if (templateType == null || templateType == "") {
|
|
|
+ errorMesageSimaple("范文类型不能为空!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var templateStatus = $("#templateStatus").val();
|
|
|
+ if (templateStatus == null || templateStatus == "") {
|
|
|
+ errorMesageSimaple("范文状态不能为空!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $("#saveapidAcceptsModal").modal("hide");
|
|
|
+ $("#messageModal").modal();
|
|
|
+ $("#messageContent").html("确认保存医疗范文吗?");
|
|
|
+ $("#messageButton").on("click", function (t) {
|
|
|
+ $("#messageModal").modal("hide");
|
|
|
+ var jsonData = getParamsForOrescription();
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ url: '/thmz/saveTemplate',
|
|
|
+ contentType: "application/json;charset=UTF-8",
|
|
|
+ dataType: "json",
|
|
|
+ data: JSON.stringify({
|
|
|
+ "id": $("#templateId").val(),
|
|
|
+ "name": templateName,
|
|
|
+ "icdText": jsonData.icdText,
|
|
|
+ "templateType": templateType,
|
|
|
+ "templateStatus": templateStatus,
|
|
|
+ "templateData": JSON.stringify(jsonData)
|
|
|
+ }),
|
|
|
+ headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
+ success: function (res) {
|
|
|
+ if (res == '401' || res == 401) {
|
|
|
+ window.location.href = '/thmz/login/view'
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (res.code == 0) {
|
|
|
+ successMesage(res);
|
|
|
+ clearWorkSpace();
|
|
|
+ } else {
|
|
|
+ $("#saveapidAcceptsModal").modal();
|
|
|
+ errorMesage(res);
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
+ });
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * 清空医疗范文模块内容
|
|
|
+ */
|
|
|
+function clearApidAcceptsModal() {
|
|
|
+ $("#templateId").val(null);
|
|
|
+ $("#templateName").val(null);
|
|
|
+ $("#templateType").selectpicker('val', 0);
|
|
|
+ $("#templateType").selectpicker('refresh');
|
|
|
+ $("#templateStatus").selectpicker('val', 0);
|
|
|
+ $("#templateStatus").selectpicker('refresh');
|
|
|
+}
|
|
|
+
|