[Deprecated] PAM Test Automation

 

Warning: This documentation is out-dated, newest version of the documentation is available at https://gazelle.ihe.net/gazelle-documentation

 

The Patient Manager tool has an automation feature named PAM Test Automation. It is available through the PAM section, under the Automation menu. This automaton aims to handle all events of the ITI-31 transaction, sequentially following an order described by a state diagram. The accepted diagram must be in the graphml format and edited with the yEd software.

 


3 pages are defined in this tool:

  1. Execution logs: Display logs results of a graph execution

  2. Available automated tests: graphs that are used in an automaton execution

  3. Run automaton: Graph execution

 

    1. Execution logs

 

 

The logs page displays the results of the various executions done with the automaton. You can filter with the search criteria on the top of the page.

To display a graph execution, click on the corresponding view icon.

From this page, you can visualize the HL7 message request and response in different views (XML, Tree, ER7, RAW) and display the validation details.

 

 

    1. Available automated tests



This page is dedicated to the display and edit of graph. In the list page, you can see all the graphs. You can create a new graph by clicking on the “Create new graph” button or edit an existing one by clicking on the pencil icon.

As an admin, if you click on the green circle, the graph will be disabled, that means that you can’t use it in a new graph execution. If the disabled graph is never used, he can also be deleted by clicking on the trash icon. A disabled graph which has already be used can’t be deleted. If you want to do it, you first need to delete execution logs related to this graph.



When you create a new graph, you need to import a graphml file describing the PAM events you want to support from a list of authorized events which is displayed at the top of the page; basically, they are those supported by the Patient Encounter Supplier section of the tool.

The graph needs to be edited with the yEd software, otherwise it’s not guaranteed that the imported file will work properly.

Moreover, the patients statuses must be named from the following list :

  • No_Encounter

  • Outpatient

  • Inpatient

  • Preadmit

  • Preadmit_R

  • Preadmit_I

  • Preadmit_O

  • Temporary_Leave

  • Emergency

The easiest way to create your own working graph is to download an already working one, and edit it with yEd by changing the events.

You also have to add a image to help people with understanding how the state diagram is done. One solution is to take a screenshot of the diagram from the yEd software.

    1. Run automaton

The last page is devoted to the execution of the automaton. You need to complete these differents steps to run the automaton properly :

  1. Select a graph under the Workflow panel. It defines which events will be executed and from which patient’s statuses they can be processed. When selected, a preview of the automaton is available in the right-sided panel. You can zoom on the preview by clicking on the full-screen icon, By default, the automaton stops running when all the patients statuses are reached at least once. However, you can tick the Full movements coverage checkbox to ensure the automaton only stops when all events are processed.

  1. The second step is to select the System Under Test (SUT). You can refer to the section 2.3 to configure a SUT.

  1. You then need to generate a new patient with the DDS tool. You can select information or let the automaton randomly fill patient data. If you are not satisfied with some information generated by the automaton, you can still click on the “Edit Patient Informations” button to manually change patient data.

  1. Select the encounter associated with the patient, as for the patient information, you can either manually fill the encounter or click on the “Fill the encounter with random data” to let the automaton fills the encounter.

  2. Click on the Run automaton button



 

 

The tests results are displayed in real time. When the automaton is processing, you don’t have to stay on the page, you can leave it, the tests results will appear on the “Execution logs” page when the process will be over. This process can be quite long and obviously depends on how many messages are needed to stop the automaton. Moreover, if you use the full movements coverage mode, it is even longer.

 

For example, this graph above with 9 patient statused and 38 movements needs an average of 400 messages for the automaton to stop with the Full movements coverage mode. The time between 2 messages being process being approximately of 1,75s, you need to wait 12 minutes for the process to be done, in average.

    1. Editing graph with YED Software



To generate a valid graphml file you need to use Yed. It’s quite simple to edit it. You can add edges from a state to another state. The labels must be named with the event name (ex : A21). The initial event which link the start state to another state must be called “ini”.

 

As stated before, the easiest way to make a valid graph is to edit a valid one and change the edges, then save the graph.



Your graph can be oriented with what are called “guards”. Guards are parameters which can be set or evaluated when passing into an edge.

Here is the way of affecting a value to a variable when passing through an edge :

 

 

Here is the way of saying that the A11 edge can be reached only under conditions :

 

If your graph is not valid because of unsupported events, a message will be displayed when you try to upload it in Patient manager. However, be careful, it’s not impossible that your graph is invalid for another reason but is accepted by Patient manager and still can be uploaded.