Beispiel #1
0
        private void setInitValueByTag(ChainInfo initSet, ChainInfo.tagValuePair tagVal)
        {
            // Get the tag:
            ChainInfo.varTags tag = ChainInfo.getTagFromValue(tagVal.tagName);
            // Set appropriately -- try ChainInfo first:
            bool matched = initSet.setByTag(tag, tagVal.tagValue);

            if (!matched)               // It was not an ChainInfo, try DataInfo:
            {
                matched = initSet.dataInfo.setByTag(tag, tagVal.tagValue);
            }
            if (!matched)               // Not a DataInfo, try a PatientInfo
            {
                matched = initSet.patientInfo.setByTag(tag, tagVal.tagValue);
            }
            if (!matched)
            {
                matched = initSet.fileInfo.setByTag(tag, tagVal.tagValue);
            }
            if (!matched)
            {
                // None of the above -- ????
            }
        }
Beispiel #2
0
 /// <summary>
 /// Returns the tag that the given value corresponds to, or throws an
 /// exception if there is no match.
 /// Note that the match must be exact and case-sensitive!
 /// </summary>
 /// <param name="tagValue">Tag Value to match to varTags tags</param>
 /// <returns>The appropriate tag;  throws an exception if no match.
 ///		Note that the match must be exact and case-sensitive!</returns>
 public static ChainInfo.varTags getTagFromLabel(string tagValue)
 {
     return(ChainInfo.getTagFromValue(tagValue));
 }