It is necessary to simplify the process of issuing medical certificates as much as possible so that the doctor spends less time on registration and can print out the finished document immediately after completing the appointment.
Why an alternative algorithm of actions may be required 
Standard document templates often require manual modification, which slows down the doctor's work. Using many separate templates for each case leads to an increase in the document directory and confusion when choosing the right form.
Decision 
To avoid creating multiple document templates, use variables inside a single universal template. If you add a variable to the template«Цель визита», the text that is entered in «Цель визита»the patient record field in the schedule will be pulled up into the finished document.
Step-by-step implementation 
- You need to create a help template using a variable. Read more about the configuration method in the article.
The variable responsible for the field is inserted into the appropriate place in the help text block, where variability is assumed«Цель визита».

- In the record editing section, the doctor enters «Цель визита»the specific part of the phrase or text that should appear in the help and clicks the button in the lower right corner«Назначить».

- Then, from the same appointment editing window, when you switch to the tab «Документы»and click the button «Печать»next to the document you need, the system generates a ready-made document, where the variable «Цель визита»is replaced by the text entered by the doctor, fitting seamlessly into the context of the help.


Important notes 
This method requires employees to be careful when filling in the field «Цель визита»in the protocol, as the text will be printed «сыром»in the form (case-sensitive and case-sensitive). It is recommended to instruct the doctors in advance on how exactly the phrase should be formulated in the reception so that it is grammatically consistent with the rest of the template text.