예제 #1
0
        /// <summary>
        /// Encodes the output to the single concept matcher.
        /// </summary>
        /// <param name="encodedConcept">The encoded concept.</param>
        private void EncodeOutput(EncodedConcept encodedConcept)
        {
            SingleConceptMatchingOutput output = new SingleConceptMatchingOutput()
            {
                OriginalInputFieldText = this.SingleConceptMatching.InputBoxText,
                OriginalAdditionalText = this.SingleConceptMatching.AdditionalTextBoxText,
                EncodedConcept         = encodedConcept
            };

            this.outputs.Add(output);
            this.OutputListBox.SelectedIndex = this.OutputListBox.Items.Count - 1;

            this.SingleConceptMatching.Clear();
            this.SingleConceptMatching.IsEnabled = true;
            this.SingleConceptMatching.FocusInputBox();

            this.HideProgressBar();
        }
예제 #2
0
        /// <summary>
        /// Builds the name from the encoded concept for a specified depth.
        /// </summary>
        /// <param name="encodedConcept">The encoded concept.</param>
        /// <param name="depth">The depth.</param>
        /// <returns>A build string representing the name of the concept.</returns>
        private string BuildName(EncodedConcept encodedConcept, int depth)
        {
            string nameString = string.Empty;

            if (encodedConcept != null && encodedConcept.EncodedSingleConcept != null)
            {
                nameString += encodedConcept.EncodedSingleConcept.FullySpecifiedName + " (" + encodedConcept.EncodedSingleConcept.SnomedConceptId + ")";

                if (encodedConcept.AttributeCollection != null && encodedConcept.AttributeCollection.Count > 0)
                {
                    foreach (AttributeValuePair attributeValuePair in encodedConcept.AttributeCollection)
                    {
                        nameString += "\r\n" + EncodedConcept.InsertTabs(depth + 1) + attributeValuePair.Attribute.PreferredTerm + " (" + attributeValuePair.Attribute.SnomedConceptId + ") -> " + this.BuildName(attributeValuePair.Value, depth + 1);
                    }
                }
            }
            else
            {
                return(EncodedConcept.UnencodedConcept);
            }

            return(nameString);
        }
        /// <summary>
        /// Encodes the output to the single concept matcher.
        /// </summary>
        /// <param name="encodedConcept">The encoded concept.</param>
        private void EncodeOutput(EncodedConcept encodedConcept)
        {
            SingleConceptMatchingOutput output = new SingleConceptMatchingOutput()
            {
                OriginalInputFieldText = this.SingleConceptMatching.InputBoxText,
                OriginalAdditionalText = this.SingleConceptMatching.AdditionalTextBoxText,
                EncodedConcept = encodedConcept
            };

            this.outputs.Add(output);
            this.OutputListBox.SelectedIndex = this.OutputListBox.Items.Count - 1;

            this.SingleConceptMatching.Clear();
            this.SingleConceptMatching.IsEnabled = true;
            this.SingleConceptMatching.FocusInputBox();

            this.HideProgressBar();
        }
예제 #4
0
 /// <summary>
 /// Builds the name from the encoded concept.
 /// </summary>
 /// <param name="encodedConcept">The encoded concept.</param>
 /// <returns>A build string representing the name of the concept.</returns>
 private string BuildName(EncodedConcept encodedConcept)
 {
     return(this.BuildName(encodedConcept, 0));
 }
예제 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AttributeValuePair"/> class.
 /// </summary>
 /// <param name="attribute">The attribute.</param>
 /// <param name="value">The value.</param>
 public AttributeValuePair(ConceptDetail attribute, EncodedConcept value)
 {
     this.Attribute = attribute;
     this.Value     = value;
 }
예제 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AttributeValuePair"/> class.
 /// </summary>
 /// <param name="attribute">The attribute.</param>
 /// <param name="value">The value.</param>
 public AttributeValuePair(ConceptDetail attribute, EncodedConcept value)
 {
     this.Attribute = attribute;
     this.Value = value;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="EncodeConceptCompletedEventArgs"/> class.
 /// </summary>
 /// <param name="encodedConcept">The encoded concept.</param>
 public EncodeConceptCompletedEventArgs(EncodedConcept encodedConcept)
 {
     this.encodedConcept = encodedConcept;
 }