123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>TODO supply a title</title>
- {include file="../application/manage/view/commons/headers.html" }
- <script >
-
- // 编辑窗口
- var $editWin;
- var editWinHeight=$(window).height()-35;
- var editWinWidth=$(window).width()*0.98;
-
- $(function(){
- $editWin = $('#edit-window').window({
- title: '诊断信息查看',
- width: editWinWidth,height: editWinHeight,
- top: ($(window).height() -editWinHeight ) /2 ,
- left: ($(window).width() -editWinWidth ) /2 ,
- shadow: true,modal: true,
- iconCls: 'icon-edit',closed: true,resizable:true,
- minimizable: false,maximizable: true,collapsible: false
- });
-
- });
-
- $(window).resize(function() {
- editWinWidth=$(window).width()*0.98;
- $('#edit-window').window('resize',{
- width: editWinWidth,height: editWinHeight
- });
- });
-
- function dateFormatter(date){
- if(typeof date=="undefined"){ return "--"; }
- return new Date(date).format("yy-MM-dd hh:mm");
- }
-
- function statusFormatter(status){
- if(status=="1"){
- return "正常";
- }else if(status=="0"){
- return "屏蔽";
- }else{
- return "非正常";
- }
- }
-
- function insFormatter(id,row){
- for(var i=0;i<institutionsData.length;i++){
- var row=institutionsData[i];
- if(row.id==id){
- return row.name;
- }
- }
- return "<font color='#ccc' >顶级机构<font>";
- }
-
- function commandsFormatter(id,row){
- var cmdEdit="<a href='#' onclick=\"javascript:showEditWin('"+row.id+"');\" >编辑</a> ";
- cmdEdit+="<a href='#' onclick=\"javascript:deleteRow('"+row.id+"');\" >删除</a>";
- return cmdEdit;
- }
-
- var exsmap={ "1":"登记", "2":"开始检查","3":"检查完毕","4":"申请","5":"驳回", "6":"接收", "7":"初步报告", "8":"审核报告", "9":"确认" };
- // 流程名称
- function examStatusFormatter(flowNum){
- var val= exsmap[flowNum];
- if(val==null){
- return flowNum;
- }else{
- return val;
- }
- }
-
- function statusFormatter(status){
- if(status=="0"){
- return "屏蔽";
- }else if(status=="1"){
- return "正常";
- }else{
- return status;
- }
- }
-
- function pfromFormatter(source){
- if(source=="1"){
- return "门诊";
- }else if(source=="2"){
- return "住院";
- }else if(source=="3"){
- return "外来";
- }else{
- return source;
- }
- }
-
-
- $(function(){
-
- var height=$(document).height();
- $("#dg").height(height);
-
- $('#dg').datagrid({
- url:'/manage/exam/datas',
- idField:'id',method: 'get',rownumbers: true,showFooter: true,singleSelect:true,selectOnCheck:false,
- toolbar: '#tb',pageList: [dgRowSize,dgRowSize*2,50,100],pagination:true,pageSize:dgRowSize,
- frozenColumns:[[
- {field:'id',title:'ID',width:180 ,hidden:true },
- {field:'patient_id',title:'患者',width:"150",align:'left' },
- {field:'dept_id',title:'科室', hidden:true,width:100},
- {field:'dept_name',title:'科室名称',width:100},
- {field:'exam_datetime',title:'检查日期',width:115 , formatter:dateFormatter }, ]],
- columns:[[
- {field:'patient_num',title:'病历号',width:"120",align:'left'},
- {field:'accession_num',title:'科室检查号',width:100 },
- {field:'institution_id',title:'就诊医院', hidden:true,width:115 },
- {field:'institution_name',title:'就诊医院名称',width:135 },
- {field:'exam_class',title:'检查类别',width:150 },
- {field:'exam_sub_class',title:'检查子类',width:60 },
- {field:'exam_project',title:'项目',width:115 },
- {field:'device',title:'检查设备',width:115 },
- {field:'body_part',title:'检查部位',width:115 },
- {field:'exam_method',title:'检查方法',width:115 },
- {field:'clin_dept_id',title:'送诊科室',width:115 },
- {field:'technician',title:'技师', hidden:true,width:115 },
- {field:'technician_name',title:'技师',width:115 },
- {field:'clin_doctors',title:'送诊医生', hidden:true,width:115 },
- {field:'clin_doctors_name',title:'送诊医生',width:115 },
- {field:'patient_source',title:'患者来源',width:115 , formatter:pfromFormatter },
- {field:'req_doctor',title:'申请医生', hidden:true,width:115 },
- {field:'req_doctor_name',title:'申请医生',width:115 },
- {field:'req_datetime',title:'申请时间',width:115 },
- {field:'register',title:'登记人员', hidden:true,width:115 },
- {field:'register_name',title:'登记人员',width:115 },
- {field:'register_datetime',title:'登记时间',width:115 , formatter:dateFormatter },
- {field:'exam_status',title:'检查流程状态',width:115 , formatter:examStatusFormatter },
- {field:'createdAt',title:'创建时间',width:115 , formatter:dateFormatter },
- {field:'pay_status',title:'支付状态',width:115 },
- {field:'status',title:'数据状态',width:115 , formatter:statusFormatter },
- {field:'grid_commands',title:'操作',align: 'center',width:100 },
- ]],
- onDblClickRow :function(rowIndex,rowData){
- showEditWin(rowData.id);
- },
- });
- });
-
- function reload(){
- var institution_id=$("#institution_id").combotree("getValue");
- var deptid=$("#dept_id").combobox("getValue");
- var patient_num=$("#patient_num").textbox("getValue");
- var accession_num=$("#accession_num").textbox("getValue");
-
- var queryParams = $('#dg').datagrid('options').queryParams;
- queryParams.insid=institution_id;
- queryParams.deptid=deptid;
- queryParams.patient_num=patient_num;
- queryParams.accession_num=accession_num;
-
- $('#dg').datagrid('options').queryParams=queryParams;
- $('#dg').datagrid("reload");
- }
-
- // 显示编辑窗口
- function showEditWin(id){
- if("undefined"== typeof id){
- $editWin.window('open');$('#editFrame').attr('src','/manage/exam/edit');
- }else{
- //$editWin.window('open');$('#editFrame').attr('src','/manage/exam/edit?id='+id);
- window.parent.openSupperWin('诊断信息查看','/manage/exam/edit?id='+id);
- }
- }
-
- function deleteRow(id){
- $.messager.confirm('Confirm','确定要删除这条记录吗?',function(r){
- if(r){
- $.ajax({
- url:"/manage/manager/delete",
- data:"ids="+id+"&t="+new Date(),
- success:function(rs){
- if(rs=="delete_ok"){
- alert("操作已成功!");
- document.location.reload();
- }else{
- alert("操作失败!");
- }
- }
- });
- }
- });
- }
-
- // 关闭编辑窗口
- function closeEditWin(isReload){
- $editWin.window('close');
- if(isReload=="reload"){
- document.location.reload();
- }
- }
-
- $(function(){
- $('#dept_id').combotree({
- required:true,multiple:false,editable:false,
- valueField:'id',textField:'name',panelWidth:250,
- url:"/manage/institution/insDept"
- });
- $('#institution_id').combotree({
- required:true,multiple:false,editable:false,
- valueField:'id',textField:'name',panelWidth:550,
- url:"/manage/institution/insCombobox",
- onChange:function(newVal,oldVal){
- var url="/manage/institution/insDept?insid="+newVal;
- $('#dept_id').combotree("setValue","");
- $('#dept_id').combotree("reload",url);
- }
- });
- });
-
- </script>
-
- </head>
- <body>
- <div id="dg" class="easyui-datagrid" style="width:100%;height:auto;" ></div>
- <div id="tb" class="editform" style="display: none; padding-top: 1px;">
- 所在机构:<input type="text" name="institution_id" id="institution_id" style="width:150px;" />
- 所在科室:<input type="text" name="dept_id" id="dept_id" style="width:100px;" />
- 病例号:<input type="text" id="patient_num" name="patient_num" class="easyui-textbox" style="width: 120px;" />
- 科室检查号:<input type="text" id="accession_num" name="accession_num" class="easyui-textbox" style="width: 120px;" />
- <a id="submit" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'" style="width: 80px" onclick="reload()" >查询</a>
-
- <a id="add" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add'" onclick="javascript:showEditWin()" style="width: 80px">添加</a>
- </div>
- <div id="edit-window" class="easyui-window" style="overflow: hidden" ><iframe src="about:blank" id="editFrame" style="width:100%;height:100%" frameborder="0" scrolling="yes" ></iframe></div>
-
- </body>
- </html>
|