<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('随访统计表新增')" />
    <th:block th:include="include :: ztree-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-role-add">
        <div class="row">
            <div class="col-sm-12">
                <div class="form-group">
                    <!--is-required 增加星号 显示为必填-->
                            <label class="col-sm-3 control-label">跟进人:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="follower" id="follower" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">年龄:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="age" id="age" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">性别:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="gender" id="gender" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">适应症:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="indication" id="indication" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">不良反应:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="adverseReaction" id="adverseReaction" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">用药状态:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="medicationStatus" id="medicationStatus" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">配合度:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="cooperationLevel" id="cooperationLevel" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">永久停药:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="permanentDiscontinuation" id="permanentDiscontinuation" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">暂停用药:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="temporarySuspension" id="temporarySuspension" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">既往治疗方案:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="previousTreatmentPlan" id="previousTreatmentPlan" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">目前治疗方案:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="currentTreatmentPlan" id="currentTreatmentPlan" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">生存期（天）:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="survivalPeriod" id="survivalPeriod" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">药品通用名:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="genericName" id="genericName" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">患者数:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="patientCount" id="patientCount" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">任务数:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="taskCount" id="taskCount" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                </div>
            </div>

        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: ztree-js" />
<script type="text/javascript">

    function submitHandler() {
        if ($.validate.form()) {
            add();
        }
    }

    function add() {
           var follower = $("input[name='follower']").val();
           var age = $("input[name='age']").val();
           var gender = $("input[name='gender']").val();
           var indication = $("input[name='indication']").val();
           var adverseReaction = $("input[name='adverseReaction']").val();
           var medicationStatus = $("input[name='medicationStatus']").val();
           var cooperationLevel = $("input[name='cooperationLevel']").val();
           var permanentDiscontinuation = $("input[name='permanentDiscontinuation']").val();
           var temporarySuspension = $("input[name='temporarySuspension']").val();
           var previousTreatmentPlan = $("input[name='previousTreatmentPlan']").val();
           var currentTreatmentPlan = $("input[name='currentTreatmentPlan']").val();
           var survivalPeriod = $("input[name='survivalPeriod']").val();
           var genericName = $("input[name='genericName']").val();
           var patientCount = $("input[name='patientCount']").val();
           var taskCount = $("input[name='taskCount']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "dtp/sdtpsjdcfollowupstatistics/sDtpSjdcFollowUpStatisticsAdd",
            data : {
                "follower": follower,
                "age": age,
                "gender": gender,
                "indication": indication,
                "adverseReaction": adverseReaction,
                "medicationStatus": medicationStatus,
                "cooperationLevel": cooperationLevel,
                "permanentDiscontinuation": permanentDiscontinuation,
                "temporarySuspension": temporarySuspension,
                "previousTreatmentPlan": previousTreatmentPlan,
                "currentTreatmentPlan": currentTreatmentPlan,
                "survivalPeriod": survivalPeriod,
                "genericName": genericName,
                "patientCount": patientCount,
                "taskCount": taskCount,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
