The Single Concept Matching control contains a multi-line text box control, called AdditionalTextBox, as one of its constituent controls. The purpose of this control is to let the clinician type free text.
The control fires the events AdditionalTextBoxEnterPressed and AdditionalTextBoxTextChanged when the clinician presses the Enter key and when any text update occurs within the additional qualifier text field respectively. These events must be handled and the additional text parsed to determining clinically encodable terms within the text.
If clinical terms are present in the text, the property AdditionalTextBoxMatchingTermItemsSource should be initialized with a collection of custom objects. Each of these objects represents a clinical concept and contains information regarding the position of these terms within the AdditionalTextBox's text.
The following snippets assume that a custom class representing a matched term has the properties StartIndex, Length and IsSelected.
The properties StartIndex and Length denote the zero based position of the first character of the matched term and the number of the characters in the matched term respectively.
The application logic for parsing the additional text is responsible for setting
these properties so that the Single Concept Matching control can render the matched words.
The property MatchingTermAlternateItemsMemberPath has been initialized to the member name of the custom class which represents the SNOMED CT® preferred name of the concept.
The property MatchingTermAlternateItemsMemberPath has been initialized to the member name of the custom class which returns a collection of all concepts that are possible choices for replacing the matched term.
<mscui:SingleConceptMatching
...
AdditionalTextBoxMatchingTermStartIndexMemberPath="StartIndex"
AdditionalTextBoxMatchingTermIsSelectedMemberPath="IsSelected"
AdditionalTextBoxMatchingTermLengthMemberPath="Length"
...
MatchingTermSelectedItemMemberPath="SelectedItem"
MatchingTermSelectedItemTextMemberPath="PreferredTerm"
MatchingTermAlternateItemsMemberPath="AlternateItems"
...
MatchingTermItemsControlItemTemplate="{StaticResource MatchingTermItemTemplate}"
MatchingTermItemsControlEncodedItemTemplate="{StaticResource MatchingTermEncodedItemTemplate}"
...>
</mscui:SingleConceptMatching>
An example of a DataTemplate for configuring the display of the alternate concepts within the check box:
<DataTemplate x:Key="MatchingTermItemTemplate">
<Border>
<mscui:IndentedLabel
MaxLines="2" IndentCharacterCount="2"
Text="{Binding PreferredTerm}" />
</Border>
</DataTemplate>
An example of a DataTemplate for configuring the display of the matched word within the check box:
<DataTemplate x:Key="MatchingTermEncodedItemTemplate">
<Border>
<mscui:IndentedLabel
MaxLines="2" IndentCharacterCount="2"
Margin="2" Text="{Binding PreferredTerm}" />
</Border>
</DataTemplate>