|
|
@@ -974,6 +974,33 @@ function realClinicalReception(patientId) {
|
|
|
function clearWorkSpace() {
|
|
|
//TODO
|
|
|
clearUser();
|
|
|
+ $("#symptom").val(null);
|
|
|
+ $("#emrHpi").val(null);
|
|
|
+ $("#emrPs").val(null);
|
|
|
+ $("#personalHistory").val(null);
|
|
|
+ $("#familyHistory").val(null);
|
|
|
+
|
|
|
+ $("#obstericalHistory").val(null);
|
|
|
+ $("#weight").val(null);
|
|
|
+ $("#temperature").val(null);
|
|
|
+ $("#sphygmus").val(null);
|
|
|
+ $("#breathe").val(null);
|
|
|
+ $("#pressure_high").val(null);
|
|
|
+ $("#pressure_floor").val(null);
|
|
|
+ $("#pressure_high_left").val(null);
|
|
|
+ $("#pressure_floor_left").val(null);
|
|
|
+ $("#otherCheck").val(null);
|
|
|
+ $("#diagnoseValue").val(null);
|
|
|
+ $("#diagnoseTags").html(null);
|
|
|
+
|
|
|
+ clearWesternMedicine(true);
|
|
|
+ clearChineseMedicine();
|
|
|
+ clearJyJcItem();
|
|
|
+ initNavTabs(0);
|
|
|
+ initNavTabs(1);
|
|
|
+ initNavTabs(2);
|
|
|
+ $("#totalAmount").text(0);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -1468,6 +1495,8 @@ function saveWesternMedicine() {
|
|
|
var currentCode = $("#current_code").val();
|
|
|
//当前药品规格
|
|
|
var currentSerial = $("#current_serial").val();
|
|
|
+ //当前药房编码
|
|
|
+ var currentGroupNo = $("#current_groupNo").val();
|
|
|
//用法编码
|
|
|
var supplyType = $("#supplyType").val();
|
|
|
//用法描述
|
|
|
@@ -1477,7 +1506,7 @@ function saveWesternMedicine() {
|
|
|
//处方实际单次使用剂量
|
|
|
var drugWin = $("#drugWin").val();
|
|
|
//剂量单位
|
|
|
- var drugWinUnit = $("#drugWinUnit").val();
|
|
|
+ var drugWinUnit = $('#drugWinUnit option:selected').text();
|
|
|
//天数
|
|
|
var dayNum = $("#dayNum").val();
|
|
|
//频次编码
|
|
|
@@ -1494,10 +1523,30 @@ function saveWesternMedicine() {
|
|
|
var totalRetprice = parseFloat($("#totalRetprice").val());
|
|
|
//单价
|
|
|
var packRetprice = $("#packRetprice").val();
|
|
|
+ //皮试
|
|
|
+ var tryFlag = $("#tryFlag").parent().hasClass("checked");
|
|
|
if (currentCode == null || currentCode == '') {
|
|
|
errorMesageSimaple("未选择任何药品!");
|
|
|
return;
|
|
|
}
|
|
|
+ if(drugWin==null || drugWin==""){
|
|
|
+ errorMesageSimaple("剂量为空!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(dayNum==null || dayNum==""){
|
|
|
+ errorMesageSimaple("天数为空!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(orderFrequency==null || orderFrequency==""){
|
|
|
+ errorMesageSimaple("频次为空!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(currentGroupNo!='91'){
|
|
|
+ if(supplyType==null || supplyType==""){
|
|
|
+ errorMesageSimaple("用法为空!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
var html = '<div class="form-group">';
|
|
|
html += groupId + '. ';
|
|
|
html += westernMedicineNamme + ' ';
|
|
|
@@ -1507,6 +1556,9 @@ function saveWesternMedicine() {
|
|
|
html += '用法:' + supplyTypeText + ' ';
|
|
|
html += '频次:' + orderFrequencyText + ' ';
|
|
|
html += dayNum + '天 ';
|
|
|
+ if(tryFlag=="true" || tryFlag==true){
|
|
|
+ html += '皮试 ';
|
|
|
+ }
|
|
|
if (medicalAdvice != null && medicalAdvice != '') {
|
|
|
html += '医嘱:' + medicalAdvice;
|
|
|
}
|
|
|
@@ -1519,7 +1571,7 @@ function saveWesternMedicine() {
|
|
|
html += '<input type="hidden" class="temporary_items_westernMedicineNamme" value="' + westernMedicineNamme + '"/>';
|
|
|
html += '<input type="hidden" class="temporary_items_drugWinDb" value="' + drugWinDb + '"/>';
|
|
|
html += '<input type="hidden" class="temporary_items_drugWin" value="' + drugWin + '"/>';
|
|
|
- html += '<input type="hidden" class="temporary_items_drugWinUnit" value="' + drugWinUnit + '"/>';
|
|
|
+ html += '<input type="hidden" class="temporary_items_drugWinUnit" value="' + $("#drugWinUnit").val() + '"/>';
|
|
|
html += '<input type="hidden" class="temporary_items_gross" value="' + gross + '"/>';
|
|
|
html += '<input type="hidden" class="temporary_items_packUnit" value="' + packUnit + '"/>';
|
|
|
html += '<input type="hidden" class="temporary_items_supplyType" value="' + supplyType + '"/>';
|
|
|
@@ -1527,6 +1579,7 @@ function saveWesternMedicine() {
|
|
|
html += '<input type="hidden" class="temporary_items_dayNum" value="' + dayNum + '"/>';
|
|
|
html += '<input type="hidden" class="temporary_items_medicalAdvice" value="' + medicalAdvice + '"/>';
|
|
|
html += '<input type="hidden" class="temporary_items_packRetprice" value="' + packRetprice + '"/>';
|
|
|
+ html += '<input type="hidden" class="temporary_items_tryFlag" value="' + tryFlag + '"/>';
|
|
|
html += '</div>';
|
|
|
|
|
|
var tableId = $("#xyTab li.active").find("a").attr("href");
|
|
|
@@ -1691,6 +1744,12 @@ function editWesternMedicine(obj) {
|
|
|
$("#totalRetprice").val($(parentObject).find("input.temporary_items_amount").val());
|
|
|
//单价
|
|
|
$("#packRetprice").val($(parentObject).find("input.temporary_items_packRetprice").val());
|
|
|
+ //皮试
|
|
|
+ var tryFlag=$(parentObject).find("input.temporary_items_tryFlag").val();
|
|
|
+ if(tryFlag==true || tryFlag=="true"){
|
|
|
+ $("#tryFlag").parent().addClass("checked");
|
|
|
+ $("#tryFlag").parent().parent().parent().removeClass("hide").addClass("in");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -1754,6 +1813,8 @@ function saveJyJcItem() {
|
|
|
var currentCode = $("#current_code").val();
|
|
|
//当前项目价格
|
|
|
var jcjyItemPrice = $("#jcjyItemPrice").val();
|
|
|
+ //描述
|
|
|
+ var chargeUnit = $("#chargeUnit").val();
|
|
|
//备注
|
|
|
var remark = $("#remark").val();
|
|
|
if (currentCode == null || currentCode == '') {
|
|
|
@@ -1763,6 +1824,9 @@ function saveJyJcItem() {
|
|
|
var html = '<div class="form-group">';
|
|
|
html += '<span class="jcjyItemGroupId">' + groupId + '</span>. '
|
|
|
html += jcJyItem + ' ';
|
|
|
+ if (chargeUnit != null && chargeUnit != '') {
|
|
|
+ html += '描述:' + chargeUnit;
|
|
|
+ }
|
|
|
if (remark != null && remark != '') {
|
|
|
html += '备注:' + remark;
|
|
|
}
|
|
|
@@ -1911,6 +1975,9 @@ function clearWesternMedicine(flag) {
|
|
|
$("#totalRetprice").val(null);
|
|
|
//医嘱
|
|
|
$("#medicalAdvice").val(null);
|
|
|
+ //皮试
|
|
|
+ $("#tryFlag").parent().removeClass('checked');
|
|
|
+ $("#tryFlag").parent().parent().parent().removeClass("in").addClass("hide");
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -2905,8 +2972,8 @@ function loadDiagnose(value) {
|
|
|
function fitDiagnoseValue(value, code) {
|
|
|
var html = '';
|
|
|
var childrenNum = $("#diagnoseTags").children().length;
|
|
|
- if (childrenNum == 3) {
|
|
|
- errorMesageSimaple("最多填写三个诊断!");
|
|
|
+ if (childrenNum == 10) {
|
|
|
+ errorMesageSimaple("最多填写十个诊断!");
|
|
|
return;
|
|
|
}
|
|
|
if (childrenNum == 0) {
|
|
|
@@ -3661,69 +3728,67 @@ function initNavTabs(index) {
|
|
|
paneId = "zlcf_1";
|
|
|
cfdesc='医技与诊疗';
|
|
|
}
|
|
|
- if ($("#" + tabId).children().length == 0) {
|
|
|
- $("#" + tabId).append('<li class="active"><a href="#' + paneId + '" role="tab" data-toggle="tab">处方一 <small class="cfdesc">('+cfdesc+')</small></a></li>');
|
|
|
- var html = '<div class="tab-pane fade in active" id="' + paneId + '" style="height: 100%;min-height: 285px;position: relative;">';
|
|
|
- html += '<input class="current_groupNo" type="hidden"/>';
|
|
|
- html += ' <div class="cf_content rb_item" style="height: 250px;padding-top: 5px;"></div>' +
|
|
|
- ' <div style="height: 30px;border-top: 1px solid #ddd;width: 100%;position: absolute;bottom:0;padding-top: 10px;">';
|
|
|
- html += '<div style="width: 460px;">'
|
|
|
- if (index == 1) {
|
|
|
- html += ' <div style="width: 130px;float: left;">' +
|
|
|
- ' <label class="my_label_2">付数:</label>' +
|
|
|
- ' <input type="text" class="form-control my_label_input_2 zyfs"' +
|
|
|
- ' placeholder="请输入" style="padding-left: 10px;" onchange="calculateZyAmount()" value="1">' +
|
|
|
- ' </div>';
|
|
|
- html += '<div style="width: 130px;float: left;">' +
|
|
|
- ' <label class="my_label_2">频次:</label>' +
|
|
|
- ' <div style="width: 85px;float: right;">' +
|
|
|
- ' <select class="form-control selectpicker show-tick zy_orderFrequency"' +
|
|
|
- ' title="请选择" data-live-search="true" onchange="calculate()" id="zy_orderFrequency_1">' +
|
|
|
- ' </select>' +
|
|
|
- ' </div>' +
|
|
|
- ' </div>';
|
|
|
- html += '<div style="width: 180px;float: left;">' +
|
|
|
- ' <label class="my_label_2">用法:</label>' +
|
|
|
- ' <div style="width: 135px;float: left;">' +
|
|
|
- ' <select class="form-control selectpicker show-tick useType"' +
|
|
|
- ' title="请选择" id="useType_1">' +
|
|
|
- ' </select>' +
|
|
|
- ' </div>' +
|
|
|
- ' </div>';
|
|
|
- html += '</div><div style="width: 460px;">'
|
|
|
- html += '<input id="singleAmount" type="hidden"/>';
|
|
|
- }
|
|
|
- html += '<div style="width: 130px;float: left;padding-left: 7px;padding-top: 8px;">金额:<span class="cf_amount">0.0</span><span>元</span></div>';
|
|
|
- if (index == 1) {
|
|
|
- html += '<div style="width: 130px;float: left;">' +
|
|
|
- ' <label class="my_label_2">液型:</label>' +
|
|
|
- ' <div style="width: 85px;float: right;">' +
|
|
|
- ' <select class="form-control selectpicker show-tick water" >' +
|
|
|
- ' </select>' +
|
|
|
- ' </div>' +
|
|
|
- ' </div>';
|
|
|
- html += ' <div style="width: 180px;float: left;">' +
|
|
|
- ' <label class="my_label_2">煎法:</label>' +
|
|
|
- ' <div style="width: 135px;float: left;">' +
|
|
|
- ' <select class="form-control selectpicker show-tick zy_supplyType"' +
|
|
|
- ' title="请选择" id="zy_supplyType_1">' +
|
|
|
- ' </select>' +
|
|
|
- ' </div>' +
|
|
|
- ' </div>';
|
|
|
- }
|
|
|
- html += '</div></div></div>'
|
|
|
- $("#" + tabContentId).append(html);
|
|
|
- if (index == 1) {
|
|
|
- var useType = '<option value="饭前温服">饭前温服</option><option value="饭后温服">饭后温服</option><option value="饭前凉服">饭前凉服</option><option value="饭后凉服">饭后凉服</option><option value="顿服">顿服</option><option value="冲服">冲服</option><option value="外用">外用</option>';
|
|
|
- $('.useType').html(useType);
|
|
|
- $('.useType').selectpicker('refresh');
|
|
|
- var water = '<option value="加凉水">加凉水</option><option value="加温水">加温水</option><option value="加开水">加开水</option><option value="加冰水">加冰水</option><option value="加糖水">加糖水</option>';
|
|
|
- $('.water').html(water);
|
|
|
- $('.water').selectpicker('refresh');
|
|
|
- initOrderFrequencys("zy_orderFrequency_1");
|
|
|
- initZySupplyTypes("zy_supplyType_1");
|
|
|
+ $("#" + tabId).html('<li class="active"><a href="#' + paneId + '" role="tab" data-toggle="tab">处方一 <small class="cfdesc">('+cfdesc+')</small></a></li>');
|
|
|
+ var html = '<div class="tab-pane fade in active" id="' + paneId + '" style="height: 100%;min-height: 285px;position: relative;">';
|
|
|
+ html += '<input class="current_groupNo" type="hidden"/>';
|
|
|
+ html += ' <div class="cf_content rb_item" style="height: 250px;padding-top: 5px;"></div>' +
|
|
|
+ ' <div style="height: 30px;border-top: 1px solid #ddd;width: 100%;position: absolute;bottom:0;padding-top: 10px;">';
|
|
|
+ html += '<div style="width: 460px;">'
|
|
|
+ if (index == 1) {
|
|
|
+ html += ' <div style="width: 130px;float: left;">' +
|
|
|
+ ' <label class="my_label_2">付数:</label>' +
|
|
|
+ ' <input type="text" class="form-control my_label_input_2 zyfs"' +
|
|
|
+ ' placeholder="请输入" style="padding-left: 10px;" onchange="calculateZyAmount()" value="1">' +
|
|
|
+ ' </div>';
|
|
|
+ html += '<div style="width: 130px;float: left;">' +
|
|
|
+ ' <label class="my_label_2">频次:</label>' +
|
|
|
+ ' <div style="width: 85px;float: right;">' +
|
|
|
+ ' <select class="form-control selectpicker show-tick zy_orderFrequency"' +
|
|
|
+ ' title="请选择" data-live-search="true" onchange="calculate()" id="zy_orderFrequency_1">' +
|
|
|
+ ' </select>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>';
|
|
|
+ html += '<div style="width: 180px;float: left;">' +
|
|
|
+ ' <label class="my_label_2">用法:</label>' +
|
|
|
+ ' <div style="width: 135px;float: left;">' +
|
|
|
+ ' <select class="form-control selectpicker show-tick useType"' +
|
|
|
+ ' title="请选择" id="useType_1">' +
|
|
|
+ ' </select>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>';
|
|
|
+ html += '</div><div style="width: 460px;">'
|
|
|
+ html += '<input id="singleAmount" type="hidden"/>';
|
|
|
+ }
|
|
|
+ html += '<div style="width: 130px;float: left;padding-left: 7px;padding-top: 8px;">金额:<span class="cf_amount">0.0</span><span>元</span></div>';
|
|
|
+ if (index == 1) {
|
|
|
+ html += '<div style="width: 130px;float: left;">' +
|
|
|
+ ' <label class="my_label_2">液型:</label>' +
|
|
|
+ ' <div style="width: 85px;float: right;">' +
|
|
|
+ ' <select class="form-control selectpicker show-tick water" >' +
|
|
|
+ ' </select>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>';
|
|
|
+ html += ' <div style="width: 180px;float: left;">' +
|
|
|
+ ' <label class="my_label_2">煎法:</label>' +
|
|
|
+ ' <div style="width: 135px;float: left;">' +
|
|
|
+ ' <select class="form-control selectpicker show-tick zy_supplyType"' +
|
|
|
+ ' title="请选择" id="zy_supplyType_1">' +
|
|
|
+ ' </select>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>';
|
|
|
+ }
|
|
|
+ html += '</div></div></div>'
|
|
|
+ $("#" + tabContentId).html(html);
|
|
|
+ if (index == 1) {
|
|
|
+ var useType = '<option value="饭前温服">饭前温服</option><option value="饭后温服">饭后温服</option><option value="饭前凉服">饭前凉服</option><option value="饭后凉服">饭后凉服</option><option value="顿服">顿服</option><option value="冲服">冲服</option><option value="外用">外用</option>';
|
|
|
+ $('.useType').html(useType);
|
|
|
+ $('.useType').selectpicker('refresh');
|
|
|
+ var water = '<option value="加凉水">加凉水</option><option value="加温水">加温水</option><option value="加开水">加开水</option><option value="加冰水">加冰水</option><option value="加糖水">加糖水</option>';
|
|
|
+ $('.water').html(water);
|
|
|
+ $('.water').selectpicker('refresh');
|
|
|
+ initOrderFrequencys("zy_orderFrequency_1");
|
|
|
+ initZySupplyTypes("zy_supplyType_1");
|
|
|
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -3801,17 +3866,27 @@ function fitWesternMedicine(res) {
|
|
|
if (res.data.weight != null) {
|
|
|
$("#drugWin").val(res.data.weight);
|
|
|
$("#drugWinDb").val(res.data.weight);
|
|
|
- drugWinHtml = '<option value="' + res.data.weighUnitDesc + '" desc="' + res.data.weight + '">' + res.data.weighUnitDesc + '</option>';
|
|
|
- index = res.data.weighUnitDesc;
|
|
|
+ drugWinHtml = '<option value="' + res.data.weighUnit + '" desc="' + res.data.weight + '">' + res.data.weighUnitDesc + '</option>';
|
|
|
+ index = res.data.weighUnit;
|
|
|
}
|
|
|
if (res.data.volum != null) {
|
|
|
if ($("#drugWin").val() == null || $("#drugWin").val() == '') {
|
|
|
$("#drugWin").val(res.data.volum);
|
|
|
$("#drugWinDb").val(res.data.volum);
|
|
|
}
|
|
|
- drugWinHtml += '<option value="' + res.data.volUnitDesc + '" desc="' + res.data.volum + '">' + res.data.volUnitDesc + '</option>';
|
|
|
+ drugWinHtml += '<option value="' + res.data.volUnit + '" desc="' + res.data.volum + '">' + res.data.volUnitDesc + '</option>';
|
|
|
if (index == null) {
|
|
|
- index = res.data.volUnitDesc;
|
|
|
+ index = res.data.volUnit;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (res.data.miniUnit != null && res.data.miniUnit !="") {
|
|
|
+ if ($("#drugWin").val() == null || $("#drugWin").val() == '') {
|
|
|
+ $("#drugWin").val(1);
|
|
|
+ $("#drugWinDb").val(1);
|
|
|
+ }
|
|
|
+ drugWinHtml += '<option value="' + res.data.miniUnit + '" desc="1">' + res.data.miniUnitDesc + '</option>';
|
|
|
+ if (index == null) {
|
|
|
+ index = res.data.miniUnit;
|
|
|
}
|
|
|
}
|
|
|
$('#drugWinUnit').html(drugWinHtml);
|
|
|
@@ -3837,6 +3912,19 @@ function fitWesternMedicine(res) {
|
|
|
$("#packSize").val(res.data.packSize);
|
|
|
$("#current_code").val(res.data.code);
|
|
|
$("#current_serial").val(res.data.serial);
|
|
|
+ //天数
|
|
|
+ $("#dayNum").selectpicker('val', 1);
|
|
|
+ $('#dayNum').selectpicker('refresh');
|
|
|
+ //频次编码
|
|
|
+ $("#orderFrequency").selectpicker('val', "ONCE");
|
|
|
+ $('#orderFrequency').selectpicker('refresh');
|
|
|
+ if(res.data.psFlag!=null && (res.data.psFlag==1 || res.data.psFlag=="1")){
|
|
|
+ $("#tryFlag").parent().addClass("checked");
|
|
|
+ $("#tryFlag").parent().parent().parent().removeClass("hide").addClass("in");
|
|
|
+ }else {
|
|
|
+ $("#tryFlag").parent().removeClass("checked");
|
|
|
+ $("#tryFlag").parent().parent().parent().removeClass("in").addClass("hide");
|
|
|
+ }
|
|
|
calculate();
|
|
|
}
|
|
|
|
|
|
@@ -3895,7 +3983,7 @@ function calculate() {
|
|
|
//拆零总量
|
|
|
var scatteredTotalNum = Multiply(Multiply(dayNum, drugWin), times);
|
|
|
//整包装的数量
|
|
|
- var totalNum = Division(scatteredTotalNum, Multiply(packSize, drugWinDb)).toFixed(0);
|
|
|
+ var totalNum = Math.ceil(Division(scatteredTotalNum, Multiply(packSize, drugWinDb)));
|
|
|
$("#gross").val(totalNum);
|
|
|
$("#totalRetprice").val(Multiply(totalNum, packRetprice).toFixed(2));
|
|
|
}
|