Often there is a need to have a custom complex form in Profile for collecting a large amount of information from checkboxes, drop downs, edit boxes, etc. and sometimes including a final edit box to summarize. Some of this information would be important to putting into the encounter notes so the next clinician can review a summary and not have to click through to parsing a complex form. Of course double entry is an option but frowned upon and rightfully so as we humans have horrible consistency to errorless duplication.
Intrahealth has made this task very simple to implement. When saving your form the forms event OnMGetTextForContact gets triggered. And in most cases that event macro can be a single line of code to get the expected behaviour.
Profile.Variable("TextForContact").Value = Controls_("memNotes").Text
This takes the text contents of a memo/text field and will instantly insert it into the Encounter the form was launched from.
No complex macro coding to hook the encounter editor or other complexities are needed.
It wouldn't be much more complex if you wanted multiple values from a form to be inserted into the notes. You simply set the Value to a composed string from multiple controls values, like composing a paragraph of sentences into a single string.
That's it. Sweet simple, and powerful.