Bluemix and Business Intelligence Bi (SMART healthcare scenario)

Source: Internet
Author: User

Prologue: Preface

Wisdom Medical English abbreviation WIT120, is the recent rise of the exclusive medical terminology, through the creation of health records regional medical information platform, the use of the most advanced internet of things technology, to achieve patient and medical personnel, medical institutions, medical equipment, the interaction between patients and gradually achieve information.


In this process, the data generated by medical equipment will be very large, we commonly include blood pressure, blood oxygen data, body temperature, flow, snoring, heart rate, ventilation, BMP information, in addition, some of the equipment itself is very important, including pressure, switch machine time, delay time, power off alarm, mode, Device ID, etc., this information is transmitted to the data center via the Internet of Things (and, of course, other means), resulting in a unified analysis of the Big data analytics platform to provide doctors, experts and even sick people to analyze and view.


This blog post will attempt to use Bluemix as an overall platform to deploy information acquisition applications, database applications, and analytics applications on the platform, culminating in simulation analysis.



The first part of Bluemix uses

The use of Bluemix and the associated demo sample will not be mentioned in this blog post, and if you are not familiar with the use of Bluemix, you can refer to the following links:

"15 Best Bluemix Tutorials"

Http://www.ibm.com/developerworks/cn/cloud/library/cl-bestoflbluemix2014/index.html

The tutorials above should take you to the new world of Bluemix.

In this section, you must ensure the following:

1) Sign up for a Bluemix account and be able to log in to view personal space

2) familiar with Java programming language, able to write simple Java program


Part II Bluemix app creation
1. Create a workspace

First we need to sign in to Bluemix, and in the dashboard panel we can create workspaces, for example, I created a workspace called "Demo":

2. Create an application

Then create the application in this demo space:

3. Select the Application template

Then you select the application template:


Here we choose the Web application.

4. Select Launcher

And then we select the Launcher, and here we choose Liberty for Java


5. Naming the application

Next we will name our application, here we temporarily named: cognos6647 (You can arbitrarily adjust to your favorite name.)

6. Complete the application creation

After the application is created, you can see the prompt "Your application is ready: http://cognos6647.mybluemix.net/" as shown in:

You can open the link:

If the page prompts "Hi world! "means that your application has been created successfully and then we are ready to go to our app.


Part three creating a database service

In this section we will be divided into two parts to explain:

The first is to add the MongoDB or Mongolab service, which is for subsequent creation of the DB instance required to support the reporting service. The following are the steps:

1. Adding a database service

Click "Add Service or API" in my dashboard,



Then go to the service selection area and select the Data management Category:


The MongoDB service is then selected in the Service category on the right:

(Of course, there are a lot of choices here, we can choose their most familiar, such as MySQL, PostgreSQL and so on.)


Enter the configuration interface of MongoDB:


Set the appropriate service name (here we are random), click "Create" to:

This will remind you to "recompile the packaged application" and select "Recompile package" (Wait for package release):



2. Adding a SQL DB instance

Continue to the application dashboard interface, continue to "Add Service or API" (omitted here), and then continue to select the category "Data Management", where you select "SQL Database"


Enter the SQL Database configuration interface (mainly the service name and the choice of the package, by default):


Click "Create" and you will also be reminded to "recompile packaged applications" and select "Recompile package" (Wait for package release, as above, omitted here).


3. View Environment variables

Back in the dashboard, in Liberty Forjava we can click on "Environment variables" to see that the environment variable (vcap_services) has more information about the database just configured:



Part IV write and deploy the application 1. Database initialization

In this section I created a Dbutil.java program for the Java API initialization database, which is actually equivalent to the database classes we use frequently in Web applications.

1) Initialization parameters

2) Get the environment variables and make judgments

3) connect to the database

4) Create a table

5) Inserting data

2. Table creation

After the database creation is complete, we create a few more tables.

" Table I " Sample_data_detail

This table is used to store the data collected by the ventilator, including the user's leak, pressure, BPM, etc.

Field name

Type

Note

mac_id

VARCHAR

Breathing machine number

Leak_value

Number

Leakage value

Pressure_value

Number

Pressure value

Bpm_value

Number

BPM value

Create_time

VARCHAR

Recording time

" table two " Time_dem

This table is used as the Time dimension table, mainly for the association "table One" for multidimensional Analysis (can drill, slice, rotate analysis, etc.)

Field name

Type

Note

Year

VARCHAR

Years

MONTH

VARCHAR

Month

Day

VARCHAR

Day

DATE

DATE

Date

Date_time

VARCHAR

Primary key

When creating a table, call the CreateTable method in Dbutil directly.


Note: Here I only use a time dimension, mainly the demonstration is convenient, later can add other related dimensions, then the effect should be better.

3. Insert data and data query

After the database table has been built normally, we execute the data Insert command and the Data Query command to confirm the database connection condition.

You only need to call the InsertData method in Dbutil when inserting data.

Part V Application Commissioning

Once the above code is complete, we will apply the deployment and perform the commissioning. The steps are as follows:

1. Packaging

This is packaged with ant, as shown in:


Right-Build.xml Select "Run as–" Ant build. When done, prompt as follows:

2. Upload Deployment

The upload process is not discussed here, using the CF tool for deployment.

The core commands are:

CF push <app_name>-p Webstarterapp.war

You crossing try it yourself.



Part VI creates a Cognos service 1. Add embeddable Reporting Service

In Bluemix, you actually use the Bluemix embeddable Reporting service to achieve the report functionality of Cognos.

As part of the creation of the database service, in the service provided by Bluemix, we can see in the category "Business analysis" that there is a service called "Embeddable Reporting" and select the service:

Similarly, in the "embeddablereporting" configuration window, configure the appropriate service name:

2. Collecting Environment variables

Once we have created the Cognos service, we can see the following information in the environment variables as well as SQL:



Part VII configures the Cognos service 1. Open the Embeddable Reporting console

Once the Cognos service is created, we need to configure it accordingly.

Back to the Dashboard interface, you can see the "embeddable Reporting" service we added in the service bar, click to enter:

Click on the "LAUNCH" button to open the Embeddablereporting console:

Click "Connect" in the console to open the connection configuration:

On this page, enter the URI in the environment variable when you configured MongoDB, and then click "Update", at which point the console will display the * number as shown, indicating that the connection has been established:



2. Create a new application

1) Click on the * number above and enter a name and description in the pop-up create new application hint

2) Configure the data source

Click "Continue" to enter the data source configuration interface

Enter the appropriate parameters (these parameters are mentioned in the fifth section when adding a database service can be viewed in an environment variable).

3) Modify the data source/view data source

When you're done configuring, you'll see information about the app you created:

At this point, you can click Data source in the folder icon to modify and view the DataSource:

Here you can see the data source name is: DataSource, in order to facilitate the subsequent application, we temporarily changed to "Cgds" (cognos datasource abbreviation, haha o (∩_∩) o)

3. Configure Visualization Bundles

This section is primarily a visual correlation configuration, as shown in:

4. Create the report

1) Stand-alone folder symbol opens the Report tab

2) Click the "*" sign to configure the report:

Enter Report Name

3) Report Configuration

Set up the package for the report and the associated description.

Part VIII using Cognos for data analysis

This part is actually the final show, can have a variety of effects:

1) Pie chart

2) Bar chart

3) Instrument panel

In fact, for the data that the ventilator uploads, I'm looking at the evolution of the data from the perspective of time in this example to understand the patient's situation.

For example:

Because this time only as a demo, the amount of data is relatively small, the graphic display may not be very rich, but mainly to show such a process, so also ask you crossing forgive me.

Conclusion

Summary: In fact, throughout the process I am not very confident, do not confirm that Bluemix support what I want to achieve, and then in the process of writing this blog also consulted a lot of predecessors, and consulted the relevant IBM Bluemix tutorials. I believe that bluemix can bring some fresh elements to the developers, the key is that we dare to try, dare to innovate.

Bluemix and Business Intelligence Bi (SMART healthcare scenario)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.