Electronic medical records, whether BS or CS is used

Source: Internet
Author: User

Electronic medical records, whether BS or CS is used

Yuan Yongfu

2014-8-19

S Company, which went to develop medical software a few days ago, attended their internal technical discussion meetings. Their current electronic medical records are in B/S architecture. A group of people will discuss the feasibility of using C/S to reconstruct the electronic medical records system, which leads to the topic of this article: electronic medical records, whether B/S or C/S is used.

Whether the electronic medical records and other medical information systems use the B/S mode or the C/S mode. This is a basic technical problem that has long plagued Party A and Party B. It has been plagued in the past and is still plagued. It is estimated that it will be plagued in the future.

This problem can be solved by two tables. First, let's talk about the B/S mode.

The B/S mode is most praised for its ease of deployment, maintenance, and upgrade. This is an unparalleled advantage. Yijun's advantages cover hundreds of ugliness, and there are many excellent posts on the Internet, I sincerely agree with and praise it. Many times, if you use BS, it will be sunny.

For software development, B/S also has the advantage of modular program functions. To add a function, add a web page and write the server code. This operation has no impact on existing modules. Therefore, it is easy to make a clear hierarchy and a reasonable structure. [Yuan Yongfu original] can continuously control the changing system.

Thanks to the legendary Macromedia Company and the powerful Adobe Company, the static UI display function of B/S is very good. With the continuous development of technology, b/S dynamic UI display function is also gradually enhanced, such as http://fineui.com is a good example.

Sun Tzu's Art of War Cloud: "Those who do not know the harm of soldiers cannot do their best ". Likewise, those who do not know the dangers of technology cannot do their best. For medical information systems such as electronic medical records, B/S still has obvious defects. At this time, C/S programs still have considerable advantages. In this example, we will make a comparison.

>Page Status

Because of the stateless nature of B/S's basic HTTP protocol. This makes data exchange between pages in B/S more difficult. Data Exchange relies heavily on databases. Most status data needs to be stored and read repeatedly, increasing the amount of code. The business data links in the medical business process are intensive and complex, and it is still very difficult to use B/S for processing. I believe that the vast majority of programs have a deep understanding.

For the C/S program, it is very convenient to exchange data between various forms. Functions, attributes, and events between forms can be freely called each other and can process business data routing in a concise and elegant manner.

>Offline Operation Capability

The B/S program basically does not have the ability to run offline, and all operations must be performed online. If the program is disconnected, all data on the page is lost and the user experience is poor. I believe everyone has ever heard of it. For example, when I typed a post or sent an email, I had a hard time typing several hundred words. When I submitted it, I found that the Network was disconnected or the server was on the machine, if all the text is lost, it will be crazy.

The C/S program has the ability to run offline. [Yuan Yongfu original] when the network or server is unavailable, you can save user input data to the memory or temporary files, after the network environment is ready, upload again, which greatly improves the user experience than the B/S program.

>Browser compatibility

The browser compatibility problem is an old and difficult problem of the B/S program. In the past, it was a headache, but now it is still a headache in the future. There is a certain display gap between browsers of different companies or different versions of the same browser. For example, if the "save" button is placed at the bottom of the design, it can be displayed for IE8, but not for IE7, making the application system unavailable.

It is not reliable for customers to use a specified version of browser. The customer may run software products of multiple companies, and the browser versions that companies expect may be different. Conflicts may occur and it is a painful process to adapt one company to the other.

The C/S program does not have such browser compatibility issues, and the same program can be used for different versions of Windows systems with similar interfaces.

> IEEmbedded controls

Some users in medical software cannot use JS/DHTML, so they use the IE embedded controls. The most common is the electronic medical record editor controls.

All ie embedded controls are not stable. You need to configure the security settings of the browser and update the client controls. Some computers may not be able to automatically update the controls, manual updates are required, and various IE Plug-ins will affect each other. [Yuan Yongfu original] will also be affected by security software such as 360. At this time, the B/S system loses the advantages of simple deployment and easy updates.

In this case, it is better to use the C/S program.

>Local data cache

In Greek mythology, Sisyphus was punished by the great gods because they committed the law in heaven, and fell to the world to suffer. The punishment for him is to push a rock up the hill. Every day, SISYPHOS spent a lot of effort to push the rock to the top of the hill, and then go home to rest, but at night the stone will automatically roll down, so, the next day, I will push the rock to the mountains. In this way, sisiphus faces endless stone pushing.

Our B/s program is sometimes the repeated stone pushing of siphus. When using medical software, medical software needs to call a lot of dictionary-type data, such as inventory Drug List, ICD code, various medical technical terms, and available knowledge bases. These data records are thousands of records, however, the B/S page cannot be cached locally. Every time you refresh the page, you need to reload the dictionary data to increase the load on the server and affect the response speed of the software. Even if Javascript is used for dynamic loading, it is only a temporary solution. JS cannot cache local data because JS does not have the permission to access the local file system.

The C/S program can easily cache local data. In fact, all the c/s medical software I have seen will spend some time loading various Dictionary data at startup, in this way, the locally cached data is directly used during the operation, which can improve the response data of the program and reduce the workload of the server.

>Automatic Software Upgrade

The greatest advantage of the B/S program is the ease of deployment, implementation, and update and upgrade.

Although c/s is somewhat inferior in this aspect, it is also gradually improved with technological advances. I believe that the automatic installation and upgrade of C/S software are not a problem under the current technical conditions. This is a good proof of the rogue software that is flooded with networks. For example, the QQ client software is installed on almost every computer, which also solves the deployment and upgrade problems.

Currently, the vast majority of clients are Microsoft's Windows systems. Microsoft provides many underlying support for software deployment and upgrade, including the smartclient/clickone technology, [Yuan Yongfu original] These have greatly facilitated the automatic deployment and upgrade of C/S software.

>Running Performance

The current B/S program relies heavily on JS technology. The JS language runs in an interpreted manner and is flexible, but error-prone and slow. When there are too many JavaScript codes, such as S companies mentioned earlier, their JS Code accounts for 40%. At this time, the browser often reports a warning message about JS running timeout.

C/S programs use compiled languages and perform strict syntax checks and many errors can be found during the development and compilation stages, which improves the code running speed. Multi-threaded operations can be used to improve the user experience even if time-consuming operations are encountered.

>Code Specification

The client programming language of the B/S program is JS, and JS is object-oriented. It is not object-based. In addition, many companies pay attention to the quality of program code, but do not pay much attention to the quality of JS Code, as a result, JavaScript code is bloated and a large number of repeated codes appear.

The mainstream development organizations pay special attention to the standard programming languages of C/S, such as C #/Java, as well as specialized language specification check tools, in addition, the C/S programming language is mostly completely object-oriented, which can achieve code reuse and convenient refactoring. [Yuan Yongfu original] mainstream development organizations also pay attention to the accumulation and maintenance of code libraries.

>Internationalization

Internationalization is the multilingual version of the software. Such as the Simplified Chinese version, Traditional Chinese version, maintenance version, and English version of the electronic medical record system.

Currently, medical software products in China are basically not internationalized. However, qualified companies should consider internationalization of software products.

B/S software is difficult to internationalize the software, because the text on the Web page is hard-coded in HTML code, while maintaining the multilingual version of the web page is heavy, in addition, JS/DHTML is difficult to implement various versions of string resources.

C/S programs are relatively easy to internationalize the software. For example, for the winform of vs. net, you can configure resource files of multilingual versions in the design phase. For example:

This is a winform file in vs. net. Here dlgspecifypaste. AR. resx is a web resource file, dlgspecifypaste. en. resx is a resource file in English, dlgspecifypaste. resx is the default resource file in simplified Chinese, dlgspecifypaste. zh-TW.resx is a resource file in the Traditional Chinese version.

Using these resource files, [Yuan Yongfu original] allows the form to display content in different language versions in a language environment that is not used, but all of them share the same meaning.

The strings required in encoding can also be stored in the resource file to conveniently implement multilingual versions. In this way, the compilation result is a resource file of the main program with multiple language versions. It is easy to implement internationalization.

> User behavior
Some user behaviors cannot be well handled in B/S. The most common is to close the browser directly. Some browsers provide window close events, and JS can respond to these events for processing. However, there is a browser compatibility problem. In some cases, JS cannot respond to this event in Some browsers.
In addition, the pop-up window function is provided. The browser may block pop-up windows. The JS effect in the pop-up window may be different from that in the normal form. This requires a lot of time for debugging and configuration.
This problem does not occur for C/S programs.

From the above analysis, we can see that B/S is not perfect, and C/S also has its own advantages. In actual use, we should not make a one-size-fits-all decision.

-------Beyond B/SAnd C/S ----------

There is now a technology genre that is beyond the competition between B/S and C/S. I also support this school. I have been developing the UI Layer for a long time, so I will start with the UI Layer.

All medical software is a graphical user interface. For c/s programs, write C # code to call drawstring (), drawline (), drawimage () for B/S programs, the server writes code to output HTML code, and then sends it to the browser to explain the HTML code to "Draw" the user interface.

So it can be abstracted out that Programmers spend a lot of code to draw a graphical user interface, but some code outputs a graphic drawing command and some code outputs HTML code. But the ultimate goal is the same.

In addition, programmers also need to write a lot of code to make the graphical user interface and user interaction respond to events such as keydown/mouseclick. The code written by everyone is similar. The ultimate goal is the same.

According to this idea, B/S and C/S can be understood as follows:

C/s program

Database Server → application software → interface display information (commands such as drawstring) → Gui
For Windows

B/S Program

Database Server → application software → display information on the interface (HTML code) → GUI for Browser

The High logical similarity between the two can easily be associated with the high logical similarity of gravity and magnetic force in physics. Physics is seeking for unified field theory, so we can also seek for the unification of B/S and C/S.

Therefore, B/S and C/S display the user interface code, although the language is different, the code is executed in different places, but the logic is the same, so the logic can be completely unified. Similarly, for business logic execution, this is the theoretical basis for the unification of B/S and C/S. [Yuan Yongfu original] The specific forms can be Oop, AOP, and so on.

According to the unified theory of B/S and C/S, medical software can be divided into the following parts:

  1. Database server. SQL Server, Oracle, nosql, and so on.
  2. Business Logic execution layer. Code that executes the medical business logic. At this layer, the service functions are purely executed and there is no user interface. In addition, the B/S application should be safe with multiple threads.
  3. B/S server application layer. The Web server directly calls the business logic execution layer to implement business functions.
  4. Call the packaging layer remotely. Encapsulate the functions of the execution layer of the business logic layer to facilitate remote calls. This remote call is based on XML WebService or binary-based Java/. Net remoting.
  5. C/S client software. The client software calls the packaging layer remotely through the network to execute the business logic.

 

For this architecture model, if the business logic execution layer and the B/S server application layer are compiled together, it is a traditional B/S system; the compilation of the business logic execution layer and the C/S client software is a traditional C/S system. If the five parts are separated, B/S and C/S are supported at the same time, so that the software has powerful scalability and vitality.

Back to the author's old line, the electronic medical record editor. The editor control provides the winform and ASP. NET versions. Winform supports all functions. However, due to the current technical level, ASP. NET only supports read-only medical records, but cannot be edited or modified. Therefore, we recommend that you use the C/S mode when developing a conventional electronic medical record system. For Internet applications, such as the Public Security Platform, we also recommend the new B/S and C/S unified modes. Traditional B/S mode can be used for mobile applications.

Finally, I would like to sum up, [Yuan Yongfu original] Sun Tzu's Art of War also said: the army is like water. Comrade Xiaoping's white cat and black cat are the same. I think that developing software should also be "something like water", so you don't have to stick to rules such as B/S and C/S. Make the software suitable for the customer's needs, flexibly change the development strategy, and make the software that meets the customer's needs in the optimal path.

(Author profile: Yuan Yongfu, Microsoft MVP, Senior Software Development Expert, author of the book, working in Nanjing Duchang Information Technology Co., Ltd. (http://www.dcwriter.cn ), he is currently engaged in R & D of medical software components such as the electronic medical record editor and timeline. Blog website: http://www.cnblogs.com/xdesigner .]

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.