Article
· Oct 18, 2022 4m read

How IRIS performs CRUD operations

preface

Since the contact with IRIS, it has been used most in hospitals as an ESB integration engine, as a link in the hospital's integration platform+data center. However, you can also develop some restful pis to be used as the backend of front end and back end separation projects

 

List of articles

Introduction

List of articles

I. Development of technologies and tools

II. Development Path and Relevant Codes

1. database

2. Preparatory work

3. Steps associated with developing an interface

4. Presentation of achievements

Summary

 

This article will show the CRUD operations related to IRIS in a simple page:

Yes, I plan to reconstruct the Production page of IRIS to show the results I have developed:

呃の  It's like a dime, ha ha


I. Development of technologies and tools

If you want to do a good job, you must first use your tools:

Back End: HealthConnect+Global
Front End: vue

Use the Rest API interface developed by %CSP. REST of IRIS. The front-end uses vue to simply display the interface related content. You can edit and add components to control the start, stop and update detection status of production

II. Development Path and Relevant Codes

1.database

First, we find the related tables of Production, which are: Ens_Config.Item and Ens_Config.Production, as shown in the figure

So the idea of the code is very clear. Add, delete, modify and query [Ens_Config. Item]. Query [Ens_Config. Production]

2.Preparatory work

We have to do some preparatory work before the formal development: such as an open gateway

·        Create an API class, as shown in the figure:

·       Enter the HealthConnect management page: System Management - Security - Application - Web Application, as shown in the figure

·  To create a new web application, I define the class controlled by the api in the [/api] code as BKIP.Rest.api

·        Give a [ALL] 's role

Test it:

So far, we've opened the first Api interface, but also open the gateway for our programs.

3.Steps related to interface developmen

     Interface development is divided into four steps: defining entity classes, organizing SQL, writing methods to receive result sets, organizing returns, and providing restfu

(1) Define entity class

  • Production Entity:Production

  • Production Component Entity: Items

(2) Organization SQL(Only the query component is shownlist

Here we need dynamic SQL Here 's what the code says:

(3) Write a method to return a result set

  • The method of processing and returning results is written in BO

Test the BO after writing it

No problem!!!

(In fact, this step of executing SQL includes getting the result set editing method, which can be directly written to a REST class. Why do you choose this? The [Visual Tracing] function of HealthConnect is very useful. If I forward the interface from BS – BO, is it convenient for debugging? Of course, this is also because IRIS has not yet found a very suitable DeBUG method.)

  • Write a forwardedBS

Just forward the message and do nothing, deploy to Production, as shown in the figure:

(4) Organization return, provisionrestful

The method of how to open the url has been provided in the previous article, and the direct screenshot here is omitted:

The idea of writing this Rest interface: provide a restful interface to receive JSON, objectify JSON to BS –>BO, convert the returned object into JSON and return it to the upstream. The core source code is shown in the figure below

Test it:

Success!!!

Along these lines, I went on to write other related interfaces:

I wrote a simple front end, shown below.

4.Presentation of achievements

·        First, it must be the display of the production interface:

·        When the mouse is placed on the component, the relevant information will be displayed in a floating frame

·        Double-click to enter the editing page, which can be saved, and the component switch is also being edited

·        Click Close to close the home page Production

·        The drop-down list can display the Production list under this namespace:

·        Select the corresponding production name and click Start to start the corresponding Production:


Summary

The above is the end of the new, modified, deleted and queried functions of IRIS to be demonstrated today. The main demonstration is an idea of background interface development, and of course, there are many other ways and methods, which are only shared here. I've seen it all. If you think it's good, please give me some praise! be deeply grateful

 

Discussion (4)2
Log in or sign up to continue