Tuesday, August 8, 2017

Diving into the OpenIZ SDK

The Edmonton release of OpenIZ is fast approaching and there are now several iterations of the previews on our downloads page. Many have started to ask how to get started with developing OpenIZ applets and how to debug them. This post will hopefully provide a brief overview of what is in the new SDK.

For this post, I'm going to be using the Community Technology Preview (CTP) 4 of the OpenIZ SDK. This will be released around Aug 11, 2017. Once installed, you'll notice a new program group (or new icons in the existing Open Immunize program group):


Business Rule Debugger

The business rule debugger does exactly what it claims. It allows you to debug basic business rules on your system. The current iteration of the business rule debugger requires you to create an openiz.exe.config which is required to debug server side execution of business rules. In CTP 5 we plan to make this requirement optional by providing the SQLite version of storage by default.

Clinical Protocol Debugger

The clinical protocol debugger is used to debug the clinical protocols you can create in your application. It functions in an identical manner to the business rules debugger and also requires an openiz.exe.config file to be present (in the current version). There is a tutorial on how to write these business rules on the github page, it also introduces the debugger.

Log Viewer

The log viewer is a tool that can be used to easily sift through the sometimes large log files that OpenIZ and OpenIZ Disconnected Client generate. It provides basic search functionality, filtering by source of the log and also allows you to look at "thread neighbors" (that is, log entries which were generated by the same thread only, so you can follow). 

Brain Bug

The brain bug tool provides a series of utilities that allow you to easily extract android data from tablets (yes it is named after the Starship Troopers "brain bug"). Using the brainbug tool you can easily extract adb backups on windows (not that easy since the backups are zlib compressed and aligned). 

Applet Compiler 

The applet compiler is used to compile your applet source code into a single PAK file which can then be uploaded to an active OpenIZ server and tested. The applet compiler allows for the generation of unsigned, and signed pak files using a variety of compression schemes (depending on the size of your applet source).

Mini IMS

The Mini IMS is a tool that allows you to easily debug your applet source code in an environment that exactly mimics the tablet and disconnected clients. Here, there is no need to compile your code into a PAK file, rather the Mini-IMS will simply read the directory structure of your applet source code as though it were compiled. 

A few things to note with the Mini IMS, first is that you should never accept updates when prompted (it will clobber the session loaded files). 

No comments:

Post a Comment

OpenIZ 2.0 / SanteDB Announcement

Well, it has been quite some time since the last OpenIZ blog post, and that is because we've been quite busy rolling our lessons learned...