Greetings, dear community!
Looking ahead, I apologize to those who are awaiting novelty or revolutionary ideas. They are not here. But there is quite a good application system.
Decision support systems are now gaining momentum. And I will not dwell on the listing of methods of implementation. I will make a reservation only about the basic properties. I would very simplified and generalized to call these systems probabilistic. That is, they give recommendations with a certain probability using the accumulated and analyzed statistics. I will not say that it is bad. Theme BigData and Machine learning now in trend. Also, these systems operate on the black box principle. Therefore, it is not always possible to identify the validity of the work of the invented model.
I will try to describe a decision support system based on a few friends, some might say an archaic principle - let's call it conditionally evaluative. That is, the system models the principle of how a person actually acts - assesses the situation and makes a decision based on the assessment made in this particular situation. And not on generalized data.
The simplest example: you enter the room. Evaluate light or not. If it is dark, turn on the light and go into the room. If it is light, then immediately pass into the room. And a new assessment ...')
Simplified, about the same approach uses the solution I described. That is, no decision is made for decision making on the basis of BigData with the identification of certain trends and patterns. A specific situation is evaluated. And on the basis of a specific assessment a very specific decision is made.
To avoid much big criticism, I can say that BigData is very useful. And the data obtained from them should be used in the DSS. But the DSS should not be based on BigDta, as a fundamental basis. This is a topic for a separate discussion.
Prehistory
The solution is based on the method of Private Doctors' Algorithms. In this case, an abstraction has been added and the scope has been expanded.
Algorithmic description methods are many. Not everyone is comfortable. And even more, not everyone can claim to be able to describe the expert system equally well. Yes, and in various professional areas.
I personally liked the rather simple description model, which uses 3 main elements: a question, an answer and a recommendation. It is noteworthy that this technique allowed us to describe the most difficult from the point of view of formalization industry - medicine. That is, this technique was successful practical application. And it is also important that, with the availability of tools, the DSS logic can be created by specialists from their professional fields without involving developers.
To get started, a paper was taken on an algorithm for a specialized ambulance brigade “Coma, Poisoning, Collapsies”. I did not give it into my hands. Only temporary use. In fact, it was a set of cards with instructions.
Ideologically, I wanted to get solutions for various professional fields besides medicine. Therefore, it was decided to develop a certain platform, with the help of which it will be possible both to create algorithms (to create DSS logic) and to use the created DSS. The way was not chosen to oppose the system to already existing solutions, but, on the contrary, to create as an addition that allows extending the functionality. That is, the system must have an API that would allow it to be integrated into existing systems.
Implementation
This is how the concept of the DSS Platform Universal Algorithms appeared. Which stands on 3 pillars:
• Method of creating and describing an algorithmic model
• Algorithm Designer - an application for the visual creation and editing of DSS algorithms
• Algorithm-Navigator - a web application that implements the use of the logical model of DSS.
Everyone understands that this is a graph model. To be honest, I didn’t want to reinvent the wheel, but one foe pushed me to draw the model being created. Therefore, it was taken
Graphviz ready-made solution, which perfectly copes with this task. Another advantage is that this package allows you to create interactive graphs with URLs.
Drawing a graph of a whole algorithm makes no sense, otherwise it will not fit on a huge wall. Therefore, a path was created to create a graph for each situation. If an element leads to another situation, then this is so displayed on the graph.
Algorithm Designer
Algorithm-Designer allows you to create a logical model according to the methodology. The algorithm for the content is divided into situations. And in situations the model of reasoning is realized.
Algorithm Designer - Windows application. So far, no concept has been devised of how else can you implement all the functionality of such an application as an alternative solution (for example, web).

The screenshot indicates the main elements in the Algorithm Designer:
- • Menu and toolbar - no explanation required here
- • Algorithm tree (decision tree) - the most convenient display of the structure of the algorithm
- • Area for working with "parent" node elements.
- • Area to display the child elements of the node.
- • Area for filling in “Recommendations” and “explanatory comments” - the text of the recommendation is entered in this area. Also for the remaining elements allowed to enter explanatory or reference information. This information turns the algorithm into a user reference when it may not be clear to him the meaning of the item being offered for selection. The example of the Navigator Algorithm will show how to display such comments.
- • The “Repository” area is an auxiliary tool for storing the most common logical structures. In order not to re-enter, you can simply copy from the repository. And when the data in the repository changes, they are automatically replicated to all related elements in the algorithm tree.
As already mentioned, in fact, the structure of the algorithm is a graph model. But working at the application level is convenient with a tree structure. And it is more convenient to logically separate a common data model in a tree view.
The main logical element is Algorithm.

The algorithm may contain nested elements of the same type. That is, an element of the “Ambulance” algorithm can contain elements of algorithms for specialized ambulance crews.
Next, the algorithm is divided into situations. The situation exists in order to divide the algorithm into logical sections. This allows you to select a separate logical task from the general algorithm.
Note: In terms of programming, we can assume that the Algorithm is a program, and the Situation is a subroutine, procedure or function.
Naturally, all elements are interrelated. Therefore, the logical elements of the Algorithm allow you to establish links and transitions between Situations.
Next is the element - Question. The system works on the principle of assessing the "current situation". Therefore, it constantly works in the mode of asking a question and receiving a response from the user.
The answer is the logical element associated with the question. What the user will choose to assess the "current situation"
A recommendation is a logical element that, on the basis of an assessment, suggests, or demands to perform certain actions. Recommendations are divided into simple ones and those that set the time for execution. That is, for such recommendations, the time period is determined during which the action must be performed before moving along the algorithm - the minimum and maximum intervals.
Another auxiliary element is used - Close the line. This was dictated by the fact that we wanted to visually highlight the moment when the line of reasoning ends. This element can be used repeatedly in the algorithm. In this case, there is redundancy. But it is better to ignore it for the sake of clarity.
Why did you need to "Work with parents and children"?
The algorithm is a graph. But the mapping is tree view. Therefore, only one parent element of the node is displayed in the tree. What does not reflect the real state of things. Also in the tree are not visible all the child nodes, if they are in other branches of the tree. Also needed a mechanism to establish such links. Therefore, the Parent assignment function for the node was implemented. Child elements are just an informative mapping.
To simplify viewing and testing in the tree with a double click on an element, a transition to the 1st child node is performed. Including the one that is installed in another branch. Reverse movement on the tree to the parents is carried out by double clicking in the display field of the child nodes.
The logical model is editable and open. But the visual presentation makes it even more vivid and understandable to a wider audience without special knowledge. As a visualization tool was selected tool
Graphviz . Because it builds charts quickly, free and cross-platform. There are a number of advantages. One of them is the ability to build interactive charts. That is, each element can contain a URL.
It was decided to display by situations. Since the whole algorithm is a fairly large canvas, which is difficult to understand. Elements of diagrams contain the display of all texts. This applies to Recommendations and additional reference comments, explanations for Answers. This allows you to fully reflect the logical and meaningful content of the system.
Delphi, Firebird DBMS,
Graphviz were used for implementation. Binding to the DBMS is dictated by the use of the component. For use in the web application Algorithm-Navigator, the database was converted to MySql, SQLite, etc.
Algorithm Navigator
Algorithm-Navigator is designed as a web-application with an adaptive design. It looks fine on screens with different orientations and resolutions. The same interface is simple enough to use, so that no special user training is required.

I chose for some time the method of implementing Algorithm-Navigator. It was known that this should be a web application, that it should be able to run on Linux and there should be an API for embedding it into other information systems. Because it was originally planned not to oppose the system with an existing one, but rather to supplement it.
Python was chosen for development. The bottle framework (I plan to transfer everything to django). It does not need special explanation. I am not an expert in design and do the project myself. Therefore, a ready-made kit for the front-end
titon.io was taken, which has all the necessary functionality.
I looked up the pages as they should have looked. And then on the basis of them I made templates.
Since we wanted to have the functionality of generating diagrams in the Algorithm Navigator, the
pydot package was used.
The order and principle of work
Algorithm-Designer allows you to create a logical model. In principle, you can start using it immediately after creating a few steps.
As you go through the algorithm, all user steps are recorded. According to them, the protocol is restored. This is another feature of this methodology - when passing by an algorithm, a specialist's reasoning protocol is formed. Which can be used as a document. I planned to copy the text in the application system service desk.
API example

UID - user ID of the algorithm.
OID - object ID. In this case, there may be any object. In medicine - the patient.
Parameter list - a set of parameters of type name = value for macro substitutions in the texts of the algorithm. As an example, the name, company name, product name.
Algorithm entry point - the entry point to the algorithm. It is not always necessary to start from the beginning. When you call an algorithm from another system, you can select a point in the algorithm (situation) with which the work will be started.
Application examples
First of all, the algorithms were created and used in medicine. True it happened on the cards. It was funny to see this method, when the necessary one fell out of hundreds of cards with the help of a pair of knitting needles. Modern index searches and queries rest at the speed of providing data to the user.
Medicine: Ambulance dispatcher, Algorithms of specialized ambulance crews (I mentioned Coma, Poisoning, Collapse), Prof. examination, Pulmology, Cardiology, Pediatrics, Obstetrics and Genicology, Recovery algorithm for health care facilities.
This is not a complete list.

I have already described an attempt to create an expert system for a support service in a branch network of a private medical company.
An example of CRM criterion analysis, provided that the criteria are complex.

Conversation and sales scripts services.

Ability to create a questionnaire for the secret buyer.
A side effect is the ability to describe schedules using diagrams.
Used to describe the rules for discharge of patients:

In his work, he also described the implementation process:

Previous related publications:
Part 2. DSS Universal Algorithms - Support Service AlgorithmPart 3. Chat bot Telegram on the core of the DSS logic (in the sandbox)