Index: ssts-userecord/src/main/java/com/forgon/disinfectsystem/useRecord/service/UseRecordManagerImpl.java =================================================================== diff -u -r17496 -r17544 --- ssts-userecord/src/main/java/com/forgon/disinfectsystem/useRecord/service/UseRecordManagerImpl.java (.../UseRecordManagerImpl.java) (revision 17496) +++ ssts-userecord/src/main/java/com/forgon/disinfectsystem/useRecord/service/UseRecordManagerImpl.java (.../UseRecordManagerImpl.java) (revision 17544) @@ -721,6 +721,19 @@ if (!StringUtils.equals(originalRemark, remark)) { curUseRecord.setRemark(remark); } + + //operationScheduleId + String originalOperationScheduleId = original.getOperationScheduleId(); + String operationScheduleId = modified.getOperationScheduleId(); + if (!StringUtils.equals(originalOperationScheduleId, operationScheduleId)) { + curUseRecord.setOperationScheduleId(operationScheduleId); + } + + //operationTime + curUseRecord.setOperationTime(modified.getOperationTime()); + + //visitId + curUseRecord.setVisitId(modified.getVisitId()); } private void saveUseRecord_internal(UseRecord modified) { Index: ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordForm.js =================================================================== diff -u -r17512 -r17544 --- ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordForm.js (.../useRecordForm.js) (revision 17512) +++ ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordForm.js (.../useRecordForm.js) (revision 17544) @@ -115,6 +115,11 @@ var barcode = top.Ext.getCmp('tempBarcode').getValue(); top.Ext.getCmp('tempBarcode').setValue(''); if (barcode != '') { + //对扫描的条码进行去前辍处理(如中大附一的扫描枪扫描我们的条码010035998,实际上有可能读到的信息为{z#xy*984},Q,010035998) + if(barcode.indexOf(",")){ + var barcodeArray = barcode.split(","); + barcode = barcodeArray[barcodeArray.length - 1]; + } if (checkBarcodeIsExist(barcode)) { showResult('条码为:' + barcode + '的物品已在当前扫描物品里!'); top.Ext.getCmp('tempBarcode').setValue(''); @@ -232,30 +237,94 @@ } } +/** + * 将病人显示到对应使用记录的表单上 + * @param patientInfo 病人信息json对象 + * 示例:{ + * clinicNumber:"", + * hospitalNumber:"", + * patientName:"", + * patientAge:"", + * patientIDCard:"", + * patientSex:"", + * bedNumber:"", + * doctorName:"", + * operation:"", + * roomNumber:"", + * visitId:"", + * opRoomId:"", + * remark:"", + * circuitNurse:"", + * washHandNurse:"", + * specialInfection:"", + * operationScheduleId:"", + * operationTime:"" + * } + */ function showPatientInfo(patientInfo){ - top.Ext.getCmp('patientName').setValue(patientInfo.patientName); - top.Ext.getCmp('patientAge').setValue(patientInfo.patientAge); - top.Ext.getCmp('patientIDCard').setValue(patientInfo.patientIDCard); - if(patientInfo.patientSex == '男'){ - top.Ext.getCmp('patientSex').setValue('男'); - }else if(patientInfo.patientSex == '女'){ - top.Ext.getCmp('patientSex').setValue('女'); - }else{ - top.Ext.getCmp('patientSex').setValue(''); + if(patientInfo){ + if(patientInfo.clinicNumber){ + top.Ext.getCmp('treatmentNum').setValue(patientInfo.clinicNumber); + } + if(patientInfo.hospitalNumber){ + top.Ext.getCmp('hospitalNum').setValue(patientInfo.hospitalNumber); + } + if(patientInfo.patientName){ + top.Ext.getCmp('patientName').setValue(patientInfo.patientName); + } + if(patientInfo.patientAge){ + top.Ext.getCmp('patientAge').setValue(patientInfo.patientAge); + } + if(patientInfo.patientIDCard){ + top.Ext.getCmp('patientIDCard').setValue(patientInfo.patientIDCard); + } + if(patientInfo.patientSex){ + if(patientInfo.patientSex == '男'){ + top.Ext.getCmp('patientSex').setValue('男'); + }else if(patientInfo.patientSex == '女'){ + top.Ext.getCmp('patientSex').setValue('女'); + }else{ + top.Ext.getCmp('patientSex').setValue(''); + } + } + if(patientInfo.bedNumber){ + top.Ext.getCmp('bedNumber').setValue(patientInfo.bedNumber); + } + if(patientInfo.doctorName){ + top.Ext.getCmp('doctorName').setValue(patientInfo.doctorName); + } + if(patientInfo.operation){ + top.Ext.getCmp('operation').setValue(patientInfo.operation); + } + if(patientInfo.roomNumber){ + top.Ext.getCmp('roomNumber').setValue(patientInfo.roomNumber); + } + if(patientInfo.visitId){ + top.Ext.getCmp('visitId').setValue(patientInfo.visitId); + } + if(patientInfo.remark){ + top.Ext.getCmp('remark').setValue(patientInfo.remark); + } + if(patientInfo.circuitNurse){ + top.Ext.getCmp('circuitNurse').setValue(patientInfo.circuitNurse); + } + if(patientInfo.washHandNurse){ + top.Ext.getCmp('washHandNurse').setValue(patientInfo.washHandNurse); + } + if(patientInfo.specialInfection){ + top.Ext.getCmp('specialInfection').setValue(patientInfo.specialInfection); + } + if(patientInfo.opRoomId){ + top.Ext.getCmp('operationRoom').setValue(patientInfo.opRoomId); + } + if(patientInfo.operationTime){ + //把所有的减号替换成/ + top.Ext.getCmp('operationTime').setValue(new Date(patientInfo.operationTime.replace(/-/g,"/"))); + } + if(patientInfo.operationScheduleId){ + top.Ext.getCmp('operationScheduleId').setValue(patientInfo.operationScheduleId); + } } - top.Ext.getCmp('bedNumber').setValue(patientInfo.bedNumber); - top.Ext.getCmp('doctorName').setValue(patientInfo.doctorName); - top.Ext.getCmp('operation').setValue(patientInfo.operation); - top.Ext.getCmp('roomNumber').setValue(patientInfo.roomNumber); - top.Ext.getCmp('visitId').setValue(patientInfo.visitId); - top.Ext.getCmp('operationRoom').setValue(patientInfo.opRoomId); - top.Ext.getCmp('remark').setValue(patientInfo.remark); - top.Ext.getCmp('circuitNurse').setValue(patientInfo.circuitNurse); - top.Ext.getCmp('washHandNurse').setValue(patientInfo.washHandNurse); - top.Ext.getCmp('specialInfection').setValue(patientInfo.specialInfection); - if(patientInfo.hospitalNumber){ - top.Ext.getCmp('hospitalNum').setValue(patientInfo.hospitalNumber); - } } // 获取扫描的物品所有条码 @@ -400,11 +469,12 @@ top.Ext.getCmp('depart').enable(); setFormParams(formObj.form, [ 'id', 'washHandNurse','circuitNurse', 'operationRoom','treatmentNum', 'hospitalNum', 'patientName','patientAge', 'patientSex', 'roomNumber', - 'bedNumber', 'patientIDCard', 'doctorName','operationName','specialInfection', 'remark' ]); - // 设置表单上的item参数 + 'bedNumber', 'patientIDCard', 'doctorName','operationName','specialInfection','operationTime','operationScheduleId', 'remark' ]); + // 设置表单上的item参数(因为struts2版本会对前台传过来日期的时分秒部分截掉,所以手术时间需要单独传) setFormItems(tousseInstanceStore); formObj.form.submit( { url : WWWROOT + '/disinfectSystem/useRecordAction!saveUseRecord2.do', + params : {operationTimeStr : top.Ext.getCmp("operationTime").getRawValue()}, method : 'POST', waitMsg : '正在保存数据,请稍候', waitTitle : '提交表单', @@ -518,7 +588,7 @@ top.Ext.getCmp('depart').enable(); setFormParams(formObj.form, [ 'id', 'washHandNurse','circuitNurse', 'operationRoom','treatmentNum', 'hospitalNum', 'patientName','patientAge', 'patientSex', 'roomNumber', - 'bedNumber', 'patientIDCard', 'doctorName','operationName','specialInfection', 'remark' ]); + 'bedNumber', 'patientIDCard', 'doctorName','operationName','specialInfection','operationTime','operationScheduleId', 'remark' ]); // 设置表单上的item参数 setFormItems(tousseInstanceStore); formObj.form.submit( { @@ -1281,16 +1351,41 @@ anchor : '98%' }] },{ + layout : 'form', + columnWidth : 0.33, + items : [{ + xtype : 'textfield', + fieldLabel : '手术单号', + maxLength : '16', + id : 'operationScheduleId', + name : 'operationScheduleId', + allowBlank : true, + anchor : '96%' + }] + },{ + layout : 'form', + columnWidth : 0.33, + items : [{ + xtype : 'datefieldWithMin', + fieldLabel : '手术时间', + id : 'operationTime', + name : 'operationTime', + altFormats:'Y-m-d|Y-n-j|y-n-j|y-m-j|y-m-d|y-n-d|Y-n-d|Y-m-j|Ymd|Ynj|ynj|ymj|ymd|ynd|Ynd|Ymj|Y/m/d|Y/n/j|y/n/j|y/m/j|y/m/d|y/n/d|Y/n/d|Y/m/j', + format : 'Y-m-d H:i', + readOnly : true, + width : 150 + }] + },{ layout : 'form', columnWidth : 0.33, items : [{ - xtype : 'textfield', + xtype : 'numberfield', fieldLabel : '住院次数', id : 'visitId', name : 'visitId', allowBlank : true, - anchor : '95%' + anchor : '96%' }] },{ @@ -1554,6 +1649,7 @@ top.Ext.getCmp('enteringTime').setValue(formatDateYear(action.result.data.enteringDate)); top.Ext.getCmp('reviewTime').setValue(formatDateYear(action.result.data.reviewTime)); top.Ext.getCmp('applicationTime').setValue(formatDateYear(action.result.data.applicationTime)); + top.Ext.getCmp('operationTime').setValue(formatDateYear(action.result.data.operationTime)); top.Ext.getCmp('tempBarcode').focus(true); // 保存原始数据,只需要保存需要修改的属性 Index: ssts-web/src/main/webapp/disinfectsystem/config/hzszxrmyy/config.js =================================================================== diff -u -r17503 -r17544 --- ssts-web/src/main/webapp/disinfectsystem/config/hzszxrmyy/config.js (.../config.js) (revision 17503) +++ ssts-web/src/main/webapp/disinfectsystem/config/hzszxrmyy/config.js (.../config.js) (revision 17544) @@ -53,5 +53,7 @@ //启用发货汇总单查看功能 enableDeliverySummaryView : true, //是否启用从发货管理页面跳转到明细核算月报的功能 - enableRedirectInvoiceItemView : true + enableRedirectInvoiceItemView : true, + //外来器械拆分小包名称带总拆包数量 + nameIncludeSplitTotalAmountForSplitForeignTousse : true } \ No newline at end of file Index: ssts-datasync/src/main/java/com/forgon/disinfectsystem/datasynchronization/model/PatientInfoVO.java =================================================================== diff -u -r15223 -r17544 --- ssts-datasync/src/main/java/com/forgon/disinfectsystem/datasynchronization/model/PatientInfoVO.java (.../PatientInfoVO.java) (revision 15223) +++ ssts-datasync/src/main/java/com/forgon/disinfectsystem/datasynchronization/model/PatientInfoVO.java (.../PatientInfoVO.java) (revision 17544) @@ -53,14 +53,19 @@ private String serialNumber; /** - * 住院次数(中山市中医院黄工提出,since 2016-05-13) + * 住院次数(最早由中山市中医院黄工提出,since 2016-05-13) */ private Long visitId; /** * 手术间(东华接口住院病人返回的属性,对应使用记录的operationRoom属性) */ private String opRoomId; + + /** + * 手术申请单号(惠州中心人民医院提出:陈林炜 since:20170329) + */ + private String operationScheduleId; /** * 备注 @@ -245,6 +250,14 @@ this.opRoomId = opRoomId; } + public String getOperationScheduleId() { + return operationScheduleId; + } + + public void setOperationScheduleId(String operationScheduleId) { + this.operationScheduleId = operationScheduleId; + } + @Override public void setNeedTranscoding(String needTranscoding) { logger.debug("set病人转码信息needTranscoding:" + needTranscoding); Index: ssts-userecord/src/main/java/com/forgon/disinfectsystem/useRecord/action/UseRecordAction.java =================================================================== diff -u -r17543 -r17544 --- ssts-userecord/src/main/java/com/forgon/disinfectsystem/useRecord/action/UseRecordAction.java (.../UseRecordAction.java) (revision 17543) +++ ssts-userecord/src/main/java/com/forgon/disinfectsystem/useRecord/action/UseRecordAction.java (.../UseRecordAction.java) (revision 17544) @@ -2,13 +2,15 @@ import java.io.IOException; import java.io.PrintWriter; +import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; +import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import net.sf.json.JSONArray; @@ -46,6 +48,7 @@ import com.forgon.systemsetting.service.HttpOptionManager; import com.forgon.tools.StrutsParamUtils; import com.forgon.tools.StrutsResponseUtils; +import com.forgon.tools.date.DateTools; import com.forgon.tools.db.DatabaseUtil; import com.forgon.tools.hibernate.ObjectDao; import com.forgon.tools.json.JSONUtil; @@ -274,7 +277,16 @@ JSONObject json = JSONUtil.buildJsonObject(false); try { String id = StrutsParamUtils.getPraramValue("id", ""); + //因为struts2版本会对前台传过来日期的时分秒部分截掉,所以手术时间需要单独传,然后解析出来 + String operationTimeStr = StrutsParamUtils.getPraramValue("operationTimeStr", ""); UseRecord modified = useRecord; + if(StringUtils.isNotBlank(operationTimeStr)){ + try{ + modified.setOperationTime(DateTools.convertTime(operationTimeStr, new SimpleDateFormat(DateTools.COMMON_DATE_HM))); + }catch(Exception e){ + + } + } if (StringUtils.isNotBlank(id)) { UseRecord original = buildUseRecordOriginalParamsForUpdate(); buildUseRecordParamsForUpdate( modified); Index: ssts-web/src/main/resources/config/hzszxrmyy/mybatis/FindPatientInfoByHospitalNumMapper.xml =================================================================== diff -u -r15386 -r17544 --- ssts-web/src/main/resources/config/hzszxrmyy/mybatis/FindPatientInfoByHospitalNumMapper.xml (.../FindPatientInfoByHospitalNumMapper.xml) (revision 15386) +++ ssts-web/src/main/resources/config/hzszxrmyy/mybatis/FindPatientInfoByHospitalNumMapper.xml (.../FindPatientInfoByHospitalNumMapper.xml) (revision 17544) @@ -13,8 +13,16 @@ h.patientSex as patientSex, h.patientIDCard as patientIDCard, h.doctorName as doctorName, - h.operation as operation - FROM mid.CSSD_HospitalNumber h + h.operation as operation, + ADMISSION_NUM as visitId, + to_char(SCHEDULE_ID) as operationScheduleId, + to_char(OPERATIONTIME,'yyyy-mm-dd hh24:mi:ss') as operationTime, + SEARIALNUMBER as serialNumber, + PATIENTAREA as patientArea, + ROOMNUMBER as roomNumber, + BEDNUMBER as bedNumber, + REMARK as remark + FROM CSSD_HospitalNumber h WHERE h.hospitalNumber = #{hospitalNum} ]]> Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/useRecord/UseRecord.java =================================================================== diff -u -r16890 -r17544 --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/useRecord/UseRecord.java (.../UseRecord.java) (revision 16890) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/useRecord/UseRecord.java (.../UseRecord.java) (revision 17544) @@ -115,6 +115,16 @@ private String remark;//备注 + /** + * 手术申请单号(惠州中心人民医院提出:陈林炜 since:20170329) + */ + private String operationScheduleId; + + /** + * 手术时间 + */ + private Date operationTime; + private List tousseInstanceList;// 用于页面传参 private List diposableGoodsItems; @@ -358,6 +368,22 @@ this.visitId = visitId; } + public String getOperationScheduleId() { + return operationScheduleId; + } + + public void setOperationScheduleId(String operationScheduleId) { + this.operationScheduleId = operationScheduleId; + } + + public Date getOperationTime() { + return operationTime; + } + + public void setOperationTime(Date operationTime) { + this.operationTime = operationTime; + } + @Transient public boolean isUnaudited() { if (StringUtils.equals(STATUS_UNAUDITED, status)) {