<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="utf-8"%>
<%@include file="/WEB-INF/ehr/commons/jsp/commonInclude.jsp" %>

<div class="m-form-inline">
    <div class="m-form-group">
        <label>搜索条件：</label>
        <div class="m-form-control">
            <input type="text" id="c1" />
            <div id="divText"></div>
        </div>
    </div>
    <div class="m-form-group">
        <label>过滤条件：</label>
        <div class="m-form-control">
            <input type="text" id="homeCondition" />
        </div>
    </div>
</div>

<script>
    $(function () {
        $("#c1").ligerSearch({onClick:function(value){
            $('#divText').html($('#homeCondition').ligerCondition('getValue'));
        }});
        var data = [{"code":"HDSA00_01_009","text":"本人姓名","type":"VARCHAR","dict":"0"},{"code":"HDSA00_01_010","text":"联系人姓名","type":"VARCHAR","dict":"0"},{"code":"HDSA00_01_011","text":"性别代码","type":"VARCHAR","dict":"4"},{"code":"HDSA00_01_012","text":"出生日期","type":"DATE","dict":"0"},{"code":"HDSA00_01_014","text":"民族","type":"VARCHAR","dict":"5"},{"code":"HDSA00_01_015","text":"婚姻状况代码","type":"VARCHAR","dict":"7"},{"code":"HDSA00_01_017","text":"身份证件号码","type":"VARCHAR","dict":"0"},{"code":"HDSA00_01_018","text":"常住地址户籍标识","type":"NUMERIC","dict":"0"},{"code":"HDSA00_01_019","text":"本人电话号码","type":"VARCHAR","dict":"0"},{"code":"HDSA00_01_020","text":"联系人电话号码","type":"VARCHAR","dict":"0"},{"code":"HDSA00_01_022","text":"户籍地址-省（自治区、直辖市）","type":"VARCHAR","dict":"0"},{"code":"HDSA00_01_023","text":"户籍地址=市（地区、州）","type":"VARCHAR","dict":"0"},{"code":"HDSA00_01_025","text":"户籍地址-乡（镇、街道办事处）","type":"VARCHAR","dict":"0"},{"code":"HDSA00_01_028","text":"户籍地址邮政编码","type":"VARCHAR","dict":"0"},{"code":"HDSA00_01_036","text":"工作单位名称","type":"VARCHAR","dict":"0"},{"code":"HDSA00_01_038","text":"职业类别代码","type":"VARCHAR","dict":"8"},{"code":"HDSA00_01_041","text":"医疗保险类别代码","type":"VARCHAR","dict":"258"},{"code":"HDSA00_01_050","text":"过敏源","type":"VARCHAR","dict":"191"},{"code":"PATIENT_ID","text":"病人ID","type":"VARCHAR","dict":"0"}];

        //初始化条件选择控件
        $('#homeCondition').ligerCondition({
            fields:data,
            stdDictUrl:"${contextRoot}/std/getDictByScheme",
            stdDictParms:{version:'569f253c1cb3'},
            value:'[{andOr:" AND ",field:"HDSA00_01_009",condition:" LIKE ",value:"的水电费"},{andOr:" AND ",field:"HDSA00_01_011",condition:" IN ",value:"0,2"},{andOr:" AND ",field:"HDSA00_01_012",condition:" = ",value:"2016-02-16"}]'
        });


    });
</script>