|
|
@@ -29,6 +29,7 @@ var timer;
|
|
|
var ksjzType = null;
|
|
|
|
|
|
$(function () {
|
|
|
+ initMzOrderTypeSelect();
|
|
|
initGenderSelect();
|
|
|
iniAdmissStatus();
|
|
|
initListDeptSelect();
|
|
|
@@ -1539,6 +1540,10 @@ function clearUser(flag) {
|
|
|
$("#first").next().click();
|
|
|
$("#patientHisData").text("");
|
|
|
if (flag) {
|
|
|
+ $("#mzReqTypeName").text(null);
|
|
|
+ $("#mzReqType").val(null);
|
|
|
+ $('#mzOrderTypeSelect').val('1');
|
|
|
+ $('#mzOrderTypeSelect').selectpicker('refresh');
|
|
|
$("#transferTreatment").css("display", "none");
|
|
|
$("#consultation").css("display", "none");
|
|
|
$("#mzfzSerialNoInClick").val(null);
|
|
|
@@ -2126,12 +2131,33 @@ function cmrCreate() {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+var curOpspDiseCode =null;
|
|
|
+var curOpspDiseName =null;
|
|
|
+
|
|
|
function openFetchSpcSlwinfoModal() {
|
|
|
$("#fetchSpcSlwinfoModal").modal();
|
|
|
$("#fetchSpcSlwinfoTable").html(null);
|
|
|
+ clearOpspDiseData();
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 清除特门数据
|
|
|
+ */
|
|
|
+function clearOpspDiseData() {
|
|
|
+ curOpspDiseCode =null;
|
|
|
+ curOpspDiseName =null;
|
|
|
visitMtCardResult = null;
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * 关闭门特窗口
|
|
|
+ */
|
|
|
+function closeFetchSpcSlwinfoModal() {
|
|
|
+ $("#fetchSpcSlwinfoModal").modal("hide");
|
|
|
+ clearOpspDiseData();
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 特门详情
|
|
|
* @param patientId
|
|
|
@@ -2170,7 +2196,14 @@ function fetchSpcSlwinfo() {
|
|
|
if (ideFixmedinsName == null || ideFixmedinsName == "null") {
|
|
|
ideFixmedinsName = "";
|
|
|
}
|
|
|
- $("<tr><td>" + begndate + "</td><td>" + enddate + "</td><td>" + opspDiseCode + "</td><td>" + opspDiseName + "</td><td>" + ideFixmedinsName + "</td></tr>").appendTo("#fetchSpcSlwinfoTable");
|
|
|
+ $("<tr data-target-opspDiseCode='" + opspDiseCode + "' data-target-opspDiseName='" + opspDiseName + "' data-target-ideFixmedinsName='" + ideFixmedinsName + "'><td>" + begndate + "</td><td>" + enddate + "</td><td>" + opspDiseCode + "</td><td>" + opspDiseName + "</td><td>" + ideFixmedinsName + "</td></tr>").appendTo("#fetchSpcSlwinfoTable").bind('click',function () {
|
|
|
+ $("#fetchSpcSlwinfoModal").modal("hide");
|
|
|
+ curOpspDiseCode = $(this).attr("data-target-opspDiseCode");
|
|
|
+ curOpspDiseName = $(this).attr("data-target-opspDiseName");
|
|
|
+ //设置特殊门诊值
|
|
|
+ $("#mzOrderTypeSelect").val('3')
|
|
|
+ $('#mzOrderTypeSelect').selectpicker('refresh');
|
|
|
+ });
|
|
|
}
|
|
|
} else {
|
|
|
errorMesage(res);
|
|
|
@@ -2224,6 +2257,7 @@ function readVisitPatientCard() {
|
|
|
}
|
|
|
if (res.code == 200) {
|
|
|
visitMtCardResult = res.data
|
|
|
+ fetchSpcSlwinfo()
|
|
|
} else {
|
|
|
errorMesage(res);
|
|
|
}
|
|
|
@@ -2288,6 +2322,7 @@ function realClinicalReception(patientId, serialNo, reqType) {
|
|
|
}
|
|
|
if (res.code == 0) {
|
|
|
if (res.data != null) {
|
|
|
+ setMzReqType(null,null,reqType);
|
|
|
var mzPatientMi = res.data;
|
|
|
setMzPatientInfo(mzPatientMi);
|
|
|
setMzSmtz(res);
|
|
|
@@ -2343,6 +2378,13 @@ function queryInsuinfo(patientId) {
|
|
|
if (ybCode != null && ybCode != "" && ybCode.length > 0) {
|
|
|
$("#zgmztczf").selectpicker('val', 1);
|
|
|
$("#zgmztczf").selectpicker('refresh');
|
|
|
+ if($("#mzOrderTypeSelect").val() !='4'){
|
|
|
+ $("#mzOrderTypeSelect").selectpicker('val', '2');
|
|
|
+ $("#mzOrderTypeSelect").selectpicker('refresh');
|
|
|
+ }else {
|
|
|
+ $("#zgmztczf").selectpicker('val', 0);
|
|
|
+ $("#zgmztczf").selectpicker('refresh');
|
|
|
+ }
|
|
|
postAjaxJsonHttpRequst("/thmz/queryVisitTypeName",{patientId:patientId},true,function (res) {
|
|
|
if(res.code ==0){
|
|
|
if(!stringIsBlank(res.data)){
|
|
|
@@ -2477,6 +2519,7 @@ function clearWorkSpaceExcludeUser(source) {
|
|
|
clearApidAcceptsModal();
|
|
|
clearTurnToConsultationInput();
|
|
|
clearZgtczfInput();
|
|
|
+ clearOpspDiseData();
|
|
|
clearExpContentRequired();
|
|
|
gropuIdAndOrderNoMap = null;
|
|
|
//prevCategoriesFlag = null;
|
|
|
@@ -5930,6 +5973,12 @@ function saveChineseMedicine(calculateTotalAmountFlag) {
|
|
|
errorMesageSimaple("未选择任何药品!");
|
|
|
return;
|
|
|
}
|
|
|
+ //颗粒 剂量只能为整数
|
|
|
+ if(zyClassType == '83' && !(/(^[1-9]\d*$)/.test(drugWin))){
|
|
|
+ errorMesageSimaple("颗粒剂处方剂量只能为大于等于1的正整数!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
var html = '<div class="form-group" style="float: left;">';
|
|
|
html += chineseMedicineNamme;
|
|
|
if (zyInstruction != null && zyInstruction != '') {
|
|
|
@@ -7875,6 +7924,7 @@ function loadZlItemList(event) {
|
|
|
$("#zlItem").val(row.name);
|
|
|
$("#zlItem").blur();
|
|
|
$("#zlItemPrice").val(row.chargeAmount);
|
|
|
+ zlItemPriceIsReadonly(row.chargeAmount);
|
|
|
$("#chargeUnit").val(row.specification);
|
|
|
$("#zl_current_code").val(row.code);
|
|
|
$("#itemQuantity").val(1);
|
|
|
@@ -7891,6 +7941,17 @@ function loadZlItemList(event) {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * 诊疗单价输入框是否只读
|
|
|
+ */
|
|
|
+function zlItemPriceIsReadonly(val) {
|
|
|
+ if(val !=null && Number(val) > 0 ){
|
|
|
+ $("#zlItemPrice").attr("readonly","readonly")
|
|
|
+ }else {
|
|
|
+ $("#zlItemPrice").removeAttr("readonly")
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 诊疗与医技选中
|
|
|
@@ -9255,6 +9316,10 @@ function getParamsForpPrescription(type) {
|
|
|
'"opRecordList": [],' +
|
|
|
'"patientAllergenInfoList": [],' +
|
|
|
'"zgmztczf":"",' +
|
|
|
+ '"opspDisecode":"",' +
|
|
|
+ '"opspDiseName":"",' +
|
|
|
+ '"reqType":"",' +
|
|
|
+ '"orderType":"",' +
|
|
|
'"grzhzf":"",' +
|
|
|
'"readCardResult":"",' +
|
|
|
'"readCardType":"01"}');
|
|
|
@@ -9319,6 +9384,11 @@ function getParamsForpPrescription(type) {
|
|
|
jsonData.grzhzf = $("#grzhzf").val();
|
|
|
jsonData.readCardResult = $("#readCardResult").val();
|
|
|
|
|
|
+ jsonData.reqType = $("#mzReqType").val();
|
|
|
+ jsonData.orderType = $("#mzOrderTypeSelect").val();
|
|
|
+ jsonData.opspDisecode = curOpspDiseCode;
|
|
|
+ jsonData.opspDiseName = curOpspDiseName;
|
|
|
+
|
|
|
//设置过敏源
|
|
|
var zdAllergen = $("#zdAllergen").val();
|
|
|
var ypDitList = $("#ypDitList").val();
|
|
|
@@ -9465,11 +9535,12 @@ function getParamsForpPrescription(type) {
|
|
|
//执行科室
|
|
|
var execUnit = $(zlTabContents[i]).find("input.temporary_items_execUnit").val();
|
|
|
//诊疗,放入药品类型中入库,因为诊疗是与药品一样直接入明细库,但是是与医技在同一处方开立页面开立
|
|
|
- tempJson = JSON.parse('{"chargeItemCode": "","serial": "","quantity": "1","drugQuan": "1","drugUnit": "","frequency": "","orderDays": "1","paySelf": "0","drugWin": "1","instructionCode":"","instructionText":"","orderNo":"","groupOrder":"","supplyCode":"","cyJssm":"","cyDj":"","cyFysm":"","tryFlag":"0","groupNo":"00","execDept":""}');
|
|
|
+ tempJson = JSON.parse('{"unitPrice": "0","chargeItemCode": "","serial": "","quantity": "1","drugQuan": "1","drugUnit": "","frequency": "","orderDays": "1","paySelf": "0","drugWin": "1","instructionCode":"","instructionText":"","orderNo":"","groupOrder":"","supplyCode":"","cyJssm":"","cyDj":"","cyFysm":"","tryFlag":"0","groupNo":"00","execDept":""}');
|
|
|
tempJson.chargeItemCode = $(zlTabContents[i]).find("input.temporary_items_code").val();
|
|
|
tempJson.instructionText = $(zlTabContents[i]).find("input.temporary_items_remark").val();
|
|
|
tempJson.quantity = $(zlTabContents[i]).find("input.temporary_items_totalNumZl").val();
|
|
|
tempJson.drugQuan = $(zlTabContents[i]).find("input.temporary_items_itemQuantity").val();
|
|
|
+ tempJson.zlUnitPrice = $(zlTabContents[i]).find("input.temporary_items_amount").val();
|
|
|
//因为收费表里的单位长度限制,无法存入库
|
|
|
//tempJson.drugUnit = $(zlTabContents[i]).find("input.temporary_items_desc_value").val();
|
|
|
tempJson.frequency = $(zlTabContents[i]).find("input.temporary_items_orderFrequencyZl").val();
|
|
|
@@ -9952,6 +10023,7 @@ function getMzPrescriptionVoUnPaidCommon(patientId, times, clnicId) {
|
|
|
}
|
|
|
if (res.code == 0) {
|
|
|
clearWorkSpace();
|
|
|
+ setMzReqType(patientId,times,null)
|
|
|
setMzPatientInfo(res.mzPatientMi);
|
|
|
editPrescription(res.data, 0)
|
|
|
//修改患者的时候,将原纪录的就诊记录id带上,并借用分诊流水号字段传参
|
|
|
@@ -10120,6 +10192,7 @@ function repeatAcceptsCommon(patientId, times, clnicId) {
|
|
|
}
|
|
|
if (res.code == 0) {
|
|
|
clearWorkSpace();
|
|
|
+ setMzReqType(patientId,times,null);
|
|
|
setMzPatientInfo(res.mzPatientMi);
|
|
|
editPrescription(res.data, 0)
|
|
|
//修改患者的时候,将原纪录的就诊记录id带上,并借用分诊流水号字段传参
|
|
|
@@ -13195,12 +13268,88 @@ function initEmployee() {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * 设置挂号号别
|
|
|
+ * @param patientId
|
|
|
+ * @param times
|
|
|
+ * @param reqType
|
|
|
+ */
|
|
|
+function setMzReqType(patientId,times,reqType) {
|
|
|
+ if(stringIsBlank(reqType)){
|
|
|
+ postAjaxJsonHttpRequst("/thmz/queryMzOrderDetails",{patientId:patientId,times:times},true,function (res) {
|
|
|
+ if(res.code == 0 && res.data != null){
|
|
|
+ $("#mzReqTypeName").text(res.data.reqTypeName)
|
|
|
+ $("#mzReqType").val(res.data.reqType)
|
|
|
+ if(res.data.reqType == '45') {
|
|
|
+ $("#mzOrderTypeSelect").val('4');
|
|
|
+ $('#mzOrderTypeSelect').selectpicker('refresh');
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ getAjaxRequst("/thmz/getMzChargeTypeByCode",{code:reqType},true,function (res) {
|
|
|
+ if(res.code == 0 && res.data != null){
|
|
|
+ $("#mzReqType").val(reqType)
|
|
|
+ $("#mzReqTypeName").text(res.data.name)
|
|
|
+ if(reqType == '45'){
|
|
|
+ $("#mzOrderTypeSelect").val('4');
|
|
|
+ $('#mzOrderTypeSelect').selectpicker('refresh');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 选择处方类型进行效验
|
|
|
+ */
|
|
|
+function verifyMzOrderType() {
|
|
|
+ let mzOrderTypeSelectVal = $("#mzOrderTypeSelect").val();
|
|
|
+ if(mzOrderTypeSelectVal == '3'){
|
|
|
+ if(stringIsBlank(curOpspDiseCode)){
|
|
|
+ errorMesageSimaple('不是特门病人,请先点击[查询特门]并选中特门编码!')
|
|
|
+ $("#mzOrderTypeSelect").val('1');
|
|
|
+ $('#mzOrderTypeSelect').selectpicker('refresh');
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let mzReqTypeVal = $("#mzReqType").val()
|
|
|
+ if(mzOrderTypeSelectVal == '4' && mzReqTypeVal != '45'){
|
|
|
+ errorMesageSimaple('当前病人不是GCP实验类型,不能选择该选项!')
|
|
|
+ $("#mzOrderTypeSelect").val('1');
|
|
|
+ $('#mzOrderTypeSelect').selectpicker('refresh');
|
|
|
+ return
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 初始化门诊处方类型下拉框
|
|
|
+ */
|
|
|
+function initMzOrderTypeSelect() {
|
|
|
+ getAjaxRequst("/thmz/queryMzOrderType",{},true,function (res) {
|
|
|
+ let html = ''
|
|
|
+ $.each(res.data, function (commentIndex, comment) {
|
|
|
+ html += '<option value="' + comment.code + '">' + comment.name + '</option>';
|
|
|
+ });
|
|
|
+ $('#mzOrderTypeSelect').empty();
|
|
|
+ $('#mzOrderTypeSelect').html(html);
|
|
|
+ $('#mzOrderTypeSelect').selectpicker('destroy').selectpicker('refresh');
|
|
|
+ $('#mzOrderTypeSelect').val('1');
|
|
|
+ $('#mzOrderTypeSelect').selectpicker('refresh');
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 选择门诊统筹支付时校验门诊诊断是否是标准诊断,校验医生是否具有医保编码
|
|
|
*/
|
|
|
function verifyInsuranceInfo() {
|
|
|
var zgmztczf = $("#zgmztczf").val();
|
|
|
if (zgmztczf != null && (zgmztczf == 1 || zgmztczf == "1")) {
|
|
|
+ $('#mzOrderTypeSelect').val('2');
|
|
|
+ $('#mzOrderTypeSelect').selectpicker('refresh');
|
|
|
postAjaxJsonHttpRequst("/thmz/queryVisitTypeName",{patientId:$("#patientId").text()},true,function (res) {
|
|
|
if(res.code ==0){
|
|
|
if(!stringIsBlank(res.data)){
|
|
|
@@ -13229,6 +13378,11 @@ function verifyInsuranceInfo() {
|
|
|
// $("#zgmztczf").selectpicker('refresh');
|
|
|
return false;
|
|
|
}
|
|
|
+ }else {
|
|
|
+ if($('#mzOrderTypeSelect').val() =='2'){
|
|
|
+ $('#mzOrderTypeSelect').val('1');
|
|
|
+ $('#mzOrderTypeSelect').selectpicker('refresh');
|
|
|
+ }
|
|
|
}
|
|
|
return true;
|
|
|
}
|