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

 

<font __transmart="">List of articles</font>

<font __transmart="">Introduction</font>

<font __transmart="">List of articles</font>

<font __transmart="">I. Development of technologies and tools</font>

<font __transmart="">II. Development Path and Relevant Codes</font>

<font __transmart="">1. database</font>

<font __transmart="">2. Preparatory work</font>

<font __transmart="">3. Steps associated with developing an interface</font>

<font __transmart="">4. Presentation of achievements</font>

<font __transmart="">Summary</font>

 

<font __transmart="">This article will show the CRUD operations related to IRIS in a simple page:</font>

<font __transmart="">Yes, I plan to reconstruct the Production page of IRIS to show the results I have developed:</font>

呃の  <font __transmart="">It's like a dime, ha ha</font>


<font __transmart="">I. Development of technologies and tools</font>

<font __transmart="">If you want to do a good job, you must first use your tools:</font>

<font __transmart="">Back End: </font><font __transmart="">HealthConnect+Global</font>
<font __transmart="">Front End: </font><font __transmart="">vue</font>

<font __transmart="">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</font>

<font __transmart="">II. Development Path and Relevant Codes</font>

<font __transmart="">1.</font><font __transmart="">database</font>

<font __transmart="">First, we find the related tables of Production, which are: Ens_Config.Item and Ens_Config.Production, as shown in the figure</font>

<font __transmart="">So the idea of the code is very clear. Add, delete, modify and query [Ens_Config. Item]. Query [Ens_Config. Production]</font>

<font __transmart="">2.</font><font __transmart="">Preparatory work</font>

<font __transmart="">We have to do some preparatory work before the formal development: such as an open gateway</font>

<font __transmart="">·</font>        <font __transmart="">Create an API class, as shown in the figure:</font>

<font __transmart="">·</font>       Enter the HealthConnect management page: System Management - Security - Application - Web Application, as shown in the figure

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

<font __transmart="">·</font>        <font __transmart="">Give a [</font><font __transmart="">ALL</font><font __transmart="">] 's role</font>

<font __transmart="">Test it:</font>

<font __transmart="">So far, we've opened the first </font><font __transmart="">Api interface</font><font __transmart="">, but also open the gateway for our programs.</font>

<font __transmart="">3.</font><font __transmart="">Steps related to interface developmen</font>

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

<font __transmart="">(1) Define entity class</font>

  • <font __transmart="">Production </font><font __transmart="">Entity:</font><font __transmart="">Production</font>
  • <font __transmart="">Production </font><font __transmart="">Component Entity: Items</font>
  • <font __transmart="">(2) Organization </font><font __transmart="">SQL</font><font __transmart="">(Only the query component is shown</font><font __transmart="">list</font><font __transmart="">)</font>

    <font __transmart="">Here we need dynamic SQL Here 's what the code says:</font>

    <font __transmart="">(3) Write a method to return a result set</font>

  • <font __transmart="">The method of processing and returning results is written in BO</font>
  • <font __transmart="">Test the BO after writing it</font>

    <font __transmart="">No problem!!!</font>

    <font __transmart="">(</font>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.<font __transmart="">)</font>

  • <font __transmart="">Write a forwarded</font><font __transmart="">BS</font><font __transmart="">:</font>
  • <font __transmart="">Just forward the message and do nothing, deploy to </font><font __transmart="">Production</font><font __transmart="">, as shown in the figure:</font>

    <font __transmart="">(4) Organization return, provision</font><font __transmart="">restful</font>

    <font __transmart="">The method of how to open the url has been provided in the previous article, and the direct screenshot here is omitted:</font>

    <font __transmart="">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</font>

    <font __transmart="">Test it:</font>

    <font __transmart="">Success!!!</font>

    <font __transmart="">Along these lines, I went on to write other related interfaces:</font>

    <font __transmart="">I wrote a simple front end, shown below.</font>

    <font __transmart="">4.</font><font __transmart="">Presentation of achievements</font>

    <font __transmart="">·</font>        <font __transmart="">First, it must be the display of the production interface:</font>

    <font __transmart="">·</font>        <font __transmart="">When the mouse is placed on the component, the relevant information will be displayed in a floating frame</font>

    <font __transmart="">·</font>        <font __transmart="">Double-click to enter the editing page, which can be saved, and the component switch is also being edited</font>

    <font __transmart="">·</font>        <font __transmart="">Click Close to close the home page Production</font>

    <font __transmart="">·</font>        <font __transmart="">The drop-down list can display the Production list under this namespace:</font>

    <font __transmart="">·</font>        <font __transmart="">Select the corresponding production name and click Start to start the corresponding Production:</font>


    <font __transmart="">Summary</font>

    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