• 基于Android+JavaWeb的医疗信息(电子病历)检索管理系统


    目 录
    摘 要 I
    Abstract II
    第1章 绪论 1
    1.1 研究背景 1
    1.2 研究现状 1
    1.3 主要工作 2
    1.4 本文结构 3
    第2章 开发环境简介 4
    2.1 服务端开发环境简介 4
    2.2 客户端开发环境简介 4
    2.3 数据库简介 5
    2.4 SVN简介 5
    第3章 系统分析与设计 6
    3.1 系统分析 6
    3.2 系统设计 7
    第4章 系统实现 10
    4.1 Web服务端 10
    4.2 Android客户端 12
    第5章 系统测试 22
    5.1 软件测试的目的和原则 22
    5.2 测试方法 22
    5.3 功能测试 22
    第6章 总结与展望 24
    6.1 总结 24
    6.2 展望 24
    致 谢 26
    参考文献 27
    第3章 系统分析与设计
    3.1 系统分析
    3.1.1 业务流程
    如图3-1所示,整个系统分为三部分,分别为:Android客户端,Java服务端,MySQL数据库。用户通过Android客户端发出请求,Java服务端接收到客户端的请求后,进行相应的操作。如涉及数据操作,Java服务端则向MySQL数据库发送相应指令,对数据库的数据进行操作,并获取执行结果。最后,Java服务端将结果返回到Android客户端。
    在这里插入图片描述

    图3-1 系统业务流程图
    这种业务流程的优势在于各部分之间耦合度低,便于功能的组合、修改和扩展,较为灵活。
    3.1.2 功能需求
    该系统共包含如下6个模块,各模块功能需求如下:
    1)用户注册模块:新用户通过手机号和短信验证码注册账号;
    2)用户登录模块:用户通过手机号和密码登录系统,当用户勾选“记住密码”时,保存用户的登录信息,下次可免密登入系统;
    3)找回密码模块:用户通过手机号和短信验证码重置密码;
    4)病历信息管理模块:用于管理用户的个人病历信息,包括病历信息的查询、增加、修改和删除;
    5)处方信息管理模块:用于管理用户的个人处方信息,包括处方信息的查询、增加、修改和删除;
    6)医疗网站管理模块:用于保存用户常用的医疗服务网站,方便用户查询各种医疗信息。
    3.2 系统设计
    3.2.1 系统功能框图
    系统功能框图如图3-2所示。
    在这里插入图片描述

    图3-2 系统功能框图

    package com.rambler.healthymanager;
    
    import android.app.ActivityGroup;
    import android.content.Intent;
    import android.graphics.Color;
    import android.graphics.drawable.ColorDrawable;
    import android.net.Uri;
    import android.os.Bundle;
    import android.os.StrictMode;
    import android.view.Gravity;
    import android.view.KeyEvent;
    import android.view.LayoutInflater;
    import android.view.View;
    import android.view.View.OnClickListener;
    import android.view.ViewGroup;
    import android.view.Window;
    import android.view.WindowManager;
    import android.widget.ImageButton;
    import android.widget.LinearLayout;
    import android.widget.PopupWindow;
    import android.widget.TextView;
    
    import com.google.android.gms.appindexing.Action;
    import com.google.android.gms.appindexing.AppIndex;
    import com.google.android.gms.common.api.GoogleApiClient;
    
    import Comm.CommFunction;
    import Comm.SysApplication;
    
    public class MainActivity extends ActivityGroup implements OnClickListener {
    
        //ActivityGroup
        private LinearLayout bodyView;
        // TAB
        private LinearLayout mTabMedical;
        private LinearLayout mTabPrescription;
        private LinearLayout mTabSearch;
    //    private LinearLayout mTabRemind;
        // ImageButton
        private ImageButton mMedicalImg;
        private ImageButton mPrescriptionImg;
        private ImageButton mSearchImg;
        private ImageButton mRemindImg;
        //    private ImageButton mPictureImg;
        private ImageButton mAddImg;
    
        private TextView mMedicalText;
        private TextView mPrescriptionText;
        private TextView mSearchText;
    //    private TextView mRemindText;
    
        private TextView addMedicalText;
        private TextView addPrescriptionText;
        private TextView addSearchText;
    //    private TextView addScheduleText;
    //    private TextView addClockText;
        /**
         * ATTENTION: This was auto-generated to implement the App Indexing API.
         * See https://g.co/AppIndexing/AndroidStudio for more information.
         */
        private GoogleApiClient client;
        Intent intent = new Intent();
        // 通过标记跳转不同的页面,显示不同的菜单项
        private int flag = 0;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            requestWindowFeature(Window.FEATURE_NO_TITLE);
            setContentView(R.layout.activity_main);
            //添加当前activity到activityList
            SysApplication.getInstance().addActivity(this);
            //直接在main Thread 进行网络操作
            StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
                    .detectDiskReads().detectDiskWrites().detectNetwork()
                    .penaltyLog().build());
            StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
                    .detectLeakedSqlLiteObjects().detectLeakedClosableObjects()
                    .penaltyLog().penaltyDeath().build());
    
            initView();
            initEvents();
            // 显示标记页面
            showView(flag);
    
            // ATTENTION: This was auto-generated to implement the App Indexing API.
            // See https://g.co/AppIndexing/AndroidStudio for more information.
            client = new GoogleApiClient.Builder(this).addApi(AppIndex.API).build();
        }
    
        private void initEvents() {
            mTabMedical.setOnClickListener(this);
            mTabPrescription.setOnClickListener(this);
            mTabSearch.setOnClickListener(this);
    //        mTabRemind.setOnClickListener(this);
            //添加信息弹框
            mAddImg.setOnClickListener(this);
        }
    
        private void initView() {
    
            //ActivityGroup
            bodyView = (LinearLayout) findViewById(R.id.tab_body);
            // tabs
            mTabMedical = (LinearLayout) findViewById(R.id.id_tab_medical);
            mTabPrescription = (LinearLayout) findViewById(R.id.id_tab_prescription);
            mTabSearch = (LinearLayout) findViewById(R.id.id_tab_search);
    //        mTabRemind = (LinearLayout) findViewById(R.id.id_tab_remind);
            // ImageButton
            mMedicalImg = (ImageButton) findViewById(R.id.id_tab_medical_img);
            mPrescriptionImg = (ImageButton) findViewById(R.id.id_tab_prescription_img);
            mSearchImg = (ImageButton) findViewById(R.id.id_tab_search_img);
    //        mRemindImg = (ImageButton) findViewById(R.id.id_tab_remind_img);
    //        mPictureImg = (ImageButton) findViewById(R.id.top_picture);
            mAddImg = (ImageButton) findViewById(R.id.top_add);
            //TextView
            mMedicalText = (TextView) findViewById(R.id.id_tab_medical_text);
            mPrescriptionText = (TextView) findViewById(R.id.id_tab_prescription_text);
            mSearchText = (TextView) findViewById(R.id.id_tab_search_text);
    //        mRemindText = (TextView) findViewById(R.id.id_tab_remind_text);
        }
    
        @Override
        public void onClick(View v) {
            switch (v.getId()) {
                case R.id.id_tab_medical:
                    flag = 0;
                    showView(flag);
                    break;
                case R.id.id_tab_prescription:
                    flag = 1;
                    showView(flag);
                    break;
                case R.id.id_tab_search:
                    flag = 2;
                    showView(flag);
                    break;
    //            case R.id.id_tab_remind:
    //                flag = 3;
    //                showView(flag);
    //                break;
                //添加信息弹框
                case R.id.top_add:
                    showPopWindows(v, R.layout.tab_add_alert, 1);
                    break;
                case R.id.add_medical:
                    intent.setClass(MainActivity.this, UpdateMedicalActivity.class);
                    startActivity(intent);
                    break;
                case R.id.add_prescription:
                    intent.setClass(MainActivity.this, UpdatePrescriptionActivity.class);
                    startActivity(intent);
                    break;
                case R.id.add_search:
                    intent.setClass(MainActivity.this, UpdateSearchActivity.class);
                    startActivity(intent);
                    break;
    //            case R.id.add_schedule:
    //                intent.setClass(MainActivity.this, AddScheduleActivity.class);
    //                startActivity(intent);
    //                break;
    //            case R.id.add_clock:
    //                intent.setClass(MainActivity.this, AddClockActivity.class);
    //                startActivity(intent);
    //                break;
    
                default:
                    break;
            }
        }
    
        // 在主界面中显示其他界面
        public void showView(int flag) {
            switch (flag) {
                case 0:
                    bodyView.removeAllViews();
                    View v = getLocalActivityManager().startActivity("mTabMedical",
                            new Intent(MainActivity.this, TabMedicalActivity.class)).getDecorView();
                    mMedicalImg.setImageResource(R.drawable.tab_medical_pressed);
                    mMedicalText.setTextColor(getResources().getColor(R.color.colorTabFont));
                    mPrescriptionImg.setImageResource(R.drawable.tab_prescription_normal);
                    mPrescriptionText.setTextColor(getResources().getColor(R.color.colorWhite));
                    mSearchImg.setImageResource(R.drawable.tab_search_normal);
                    mSearchText.setTextColor(getResources().getColor(R.color.colorWhite));
    //                mRemindImg.setImageResource(R.drawable.tab_remind_normal);
    //                mRemindText.setTextColor(getResources().getColor(R.color.colorWhite));
    
                    bodyView.addView(v);
                    break;
                case 1:
                    bodyView.removeAllViews();
                    bodyView.addView(getLocalActivityManager().startActivity("mTabPrescription",
                            new Intent(MainActivity.this, TabPrescriptionActivity.class))
                            .getDecorView());
                    mMedicalImg.setImageResource(R.drawable.tab_medical_normal);
                    mMedicalText.setTextColor(getResources().getColor(R.color.colorWhite));
                    mPrescriptionImg.setImageResource(R.drawable.tab_prescription_pressed);
                    mPrescriptionText.setTextColor(getResources().getColor(R.color.colorTabFont));
                    mSearchImg.setImageResource(R.drawable.tab_search_normal);
                    mSearchText.setTextColor(getResources().getColor(R.color.colorWhite));
    //                mRemindImg.setImageResource(R.drawable.tab_remind_normal);
    //                mRemindText.setTextColor(getResources().getColor(R.color.colorWhite));
                    break;
                case 2:
                    bodyView.removeAllViews();
                    bodyView.addView(getLocalActivityManager().startActivity(
                            "mTabSearch", new Intent(MainActivity.this, TabSearchActivity.class))
                            .getDecorView());
                    mMedicalImg.setImageResource(R.drawable.tab_medical_normal);
                    mMedicalText.setTextColor(getResources().getColor(R.color.colorWhite));
                    mPrescriptionImg.setImageResource(R.drawable.tab_prescription_normal);
                    mPrescriptionText.setTextColor(getResources().getColor(R.color.colorWhite));
                    mSearchImg.setImageResource(R.drawable.tab_search_pressed);
                    mSearchText.setTextColor(getResources().getColor(R.color.colorTabFont));
    //                mRemindImg.setImageResource(R.drawable.tab_remind_normal);
    //                mRemindText.setTextColor(getResources().getColor(R.color.colorWhite));
                    break;
    //            case 3:
    //                bodyView.removeAllViews();
    //                bodyView.addView(getLocalActivityManager().startActivity(
    //                        "mTabRemind", new Intent(MainActivity.this, TabRemindActivity.class))
    //                        .getDecorView());
    //                mMedicalImg.setImageResource(R.drawable.tab_medical_normal);
    //                mMedicalText.setTextColor(getResources().getColor(R.color.colorWhite));
    //                mPrescriptionImg.setImageResource(R.drawable.tab_prescription_normal);
    //                mPrescriptionText.setTextColor(getResources().getColor(R.color.colorWhite));
    //                mSearchImg.setImageResource(R.drawable.tab_search_normal);
    //                mSearchText.setTextColor(getResources().getColor(R.color.colorWhite));
    //                mRemindImg.setImageResource(R.drawable.tab_remind_pressed);
    //                mRemindText.setTextColor(getResources().getColor(R.color.colorTabFont));
    //                break;
                default:
                    break;
            }
        }
    
        //弹框
        private void showPopWindows(View v, int layout, int flag) {
    
            /** pop view */
            View mPopView = LayoutInflater.from(this).inflate(layout, null);
            //初始化
            addMedicalText = (TextView) mPopView.findViewById(R.id.add_medical);
            addPrescriptionText = (TextView) mPopView.findViewById(R.id.add_prescription);
            addSearchText = (TextView) mPopView.findViewById(R.id.add_search);
    //        addScheduleText = (TextView) mPopView.findViewById(R.id.add_schedule);
    //        addClockText = (TextView) mPopView.findViewById(R.id.add_clock);
            //设置监听
            addMedicalText.setOnClickListener(this);
            addPrescriptionText.setOnClickListener(this);
            addSearchText.setOnClickListener(this);
    //        addScheduleText.setOnClickListener(this);
    //        addClockText.setOnClickListener(this);
    
            final PopupWindow mPopWindow = new PopupWindow(mPopView, ViewGroup.LayoutParams.WRAP_CONTENT,
                    ViewGroup.LayoutParams.WRAP_CONTENT, true);
            /** set */
            mPopWindow.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
            // 设置动画效果
            mPopWindow.setAnimationStyle(R.style.Animation_AppCompat_Dialog);
            WindowManager.LayoutParams params = this.getWindow().getAttributes();
            params.alpha = 0.7f;
            this.getWindow().setAttributes(params);
            //点击其他地方关闭
            mPopWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
                @Override
                public void onDismiss() {
                    WindowManager.LayoutParams lp = getWindow().getAttributes();
                    lp.alpha = 1f;
                    getWindow().setAttributes(lp);
                }
            });
            /** 获取弹窗的长宽度 */
            mPopView.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);
            /** 获取父控件的位置 */
            int[] location = new int[2];
            v.getLocationOnScreen(location);
            /** 显示位置 */
            if (flag == 0) {
                mPopWindow.showAtLocation(v, Gravity.NO_GRAVITY, v.getHeight(), v.getWidth());
            } else {
                mPopWindow.showAtLocation(v, Gravity.NO_GRAVITY, (location[0] - 2 * v.getHeight()), v.getWidth());
            }
            mPopWindow.update();
    
    //        final String copyTxt = (String) v.getTag();
    //        mPopView.findViewById(R.id.change_picture).setOnClickListener(new OnClickListener() {
    //
    //            @Override
    //            public void onClick(View v) {
    //
    //                copyToClip(copyTxt);
    //                if (mPopWindow != null) {
    //                    mPopWindow.dismiss();
    //                }
    //            }
    //        });
        }
    
        /**
         * 关闭窗口
         */
        private void closePopupWindow() {
    
        }
    
        @Override
        public void onStart() {
            super.onStart();
    
            // ATTENTION: This was auto-generated to implement the App Indexing API.
            // See https://g.co/AppIndexing/AndroidStudio for more information.
            client.connect();
            Action viewAction = Action.newAction(
                    Action.TYPE_VIEW, // TODO: choose an action type.
                    "Main Page", // TODO: Define a title for the content shown.
                    // TODO: If you have web page content that matches this app activity's content,
                    // make sure this auto-generated web page URL is correct.
                    // Otherwise, set the URL to null.
                    Uri.parse("http://host/path"),
                    // TODO: Make sure this auto-generated app URL is correct.
                    Uri.parse("android-app://com.rambler.healthymanager/http/host/path")
            );
            AppIndex.AppIndexApi.start(client, viewAction);
        }
    
        @Override
        public void onStop() {
            super.onStop();
    
            // ATTENTION: This was auto-generated to implement the App Indexing API.
            // See https://g.co/AppIndexing/AndroidStudio for more information.
            Action viewAction = Action.newAction(
                    Action.TYPE_VIEW, // TODO: choose an action type.
                    "Main Page", // TODO: Define a title for the content shown.
                    // TODO: If you have web page content that matches this app activity's content,
                    // make sure this auto-generated web page URL is correct.
                    // Otherwise, set the URL to null.
                    Uri.parse("http://host/path"),
                    // TODO: Make sure this auto-generated app URL is correct.
                    Uri.parse("android-app://com.rambler.healthymanager/http/host/path")
            );
            AppIndex.AppIndexApi.end(client, viewAction);
            client.disconnect();
        }
    
        @Override
        public boolean onKeyDown(int keyCode, KeyEvent event)
        {
            if(keyCode == KeyEvent.KEYCODE_BACK){
                //显示退出弹框
                new CommFunction().showDialog(MainActivity.this);
                return true;
            }
            return false;
        }
    }
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127
    • 128
    • 129
    • 130
    • 131
    • 132
    • 133
    • 134
    • 135
    • 136
    • 137
    • 138
    • 139
    • 140
    • 141
    • 142
    • 143
    • 144
    • 145
    • 146
    • 147
    • 148
    • 149
    • 150
    • 151
    • 152
    • 153
    • 154
    • 155
    • 156
    • 157
    • 158
    • 159
    • 160
    • 161
    • 162
    • 163
    • 164
    • 165
    • 166
    • 167
    • 168
    • 169
    • 170
    • 171
    • 172
    • 173
    • 174
    • 175
    • 176
    • 177
    • 178
    • 179
    • 180
    • 181
    • 182
    • 183
    • 184
    • 185
    • 186
    • 187
    • 188
    • 189
    • 190
    • 191
    • 192
    • 193
    • 194
    • 195
    • 196
    • 197
    • 198
    • 199
    • 200
    • 201
    • 202
    • 203
    • 204
    • 205
    • 206
    • 207
    • 208
    • 209
    • 210
    • 211
    • 212
    • 213
    • 214
    • 215
    • 216
    • 217
    • 218
    • 219
    • 220
    • 221
    • 222
    • 223
    • 224
    • 225
    • 226
    • 227
    • 228
    • 229
    • 230
    • 231
    • 232
    • 233
    • 234
    • 235
    • 236
    • 237
    • 238
    • 239
    • 240
    • 241
    • 242
    • 243
    • 244
    • 245
    • 246
    • 247
    • 248
    • 249
    • 250
    • 251
    • 252
    • 253
    • 254
    • 255
    • 256
    • 257
    • 258
    • 259
    • 260
    • 261
    • 262
    • 263
    • 264
    • 265
    • 266
    • 267
    • 268
    • 269
    • 270
    • 271
    • 272
    • 273
    • 274
    • 275
    • 276
    • 277
    • 278
    • 279
    • 280
    • 281
    • 282
    • 283
    • 284
    • 285
    • 286
    • 287
    • 288
    • 289
    • 290
    • 291
    • 292
    • 293
    • 294
    • 295
    • 296
    • 297
    • 298
    • 299
    • 300
    • 301
    • 302
    • 303
    • 304
    • 305
    • 306
    • 307
    • 308
    • 309
    • 310
    • 311
    • 312
    • 313
    • 314
    • 315
    • 316
    • 317
    • 318
    • 319
    • 320
    • 321
    • 322
    • 323
    • 324
    • 325
    • 326
    • 327
    • 328
    • 329
    • 330
    • 331
    • 332
    • 333
    • 334
    • 335
    • 336
    • 337
    • 338
    • 339
    • 340
    • 341
    • 342
    • 343
    • 344
    • 345
    • 346
    • 347
    • 348
    • 349
    • 350
    • 351
    • 352
    • 353
    • 354
    • 355
    • 356
    • 357
    • 358

    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

  • 相关阅读:
    RabbitMQ有什么优缺点
    vue3 兄弟组件传参mitt 插件
    申银万国期货通过ZStack Cube信创超融合一体机打造金融信创平台
    μC/OS-II---整理学习1
    JDBC再回顾
    Oracle 11g_FusionOS_安装文档
    实现分别在Linux、Docker、Kubernetes上安装部署Mysql、Redis、Nginx软件
    【MyBatis】MyBatis查询数据库
    【毕设选题】深度学习人体跌倒检测 -yolo 机器视觉 opencv python
    Python毕业设计选题推荐
  • 原文地址:https://blog.csdn.net/sheziqiong/article/details/126914755