private AimTemplateTreeAllowedTerm AllowedTermFromXsdAllowedTerm(ComponentCharacteristicAllowedTerm allowedTerm) { var standardValidTerms = new List <StandardValidTerm>(); if (allowedTerm.ValidTerm1 != null) { foreach (var childValidTerm in allowedTerm.ValidTerm1) { var childTerm = ValidTermFromXsdValidTerm(childValidTerm); if (childTerm != null) { standardValidTerms.Add(childTerm); } } } var term = new AimTemplateTreeAllowedTerm(new StandardCodeSequence( allowedTerm.codeValue, allowedTerm.codeMeaning, allowedTerm.codingSchemeDesignator, allowedTerm.codingSchemeVersion), allowedTerm.defaultAnswer, allowedTerm.nextId, allowedTerm.noMoreQuestions, standardValidTerms); if (allowedTerm.ValidTerm1 != null) { foreach (var childValidTerm in allowedTerm.ValidTerm1) { var childTerm = ValidTermFromXsdValidTerm(childValidTerm); if (childTerm != null) { term.StandardValidTerms.Add(childTerm); } } } return(term); }
private CharacteristicQuantificationAllowedTerm CharacteristicQuantificationAllowedTermFromXsdAllowedTerm(ComponentCharacteristicAllowedTerm allowedTerm) { var nonQuantifiables = new List <StandardCodedTerm>(); //if (allowedTerm.CharacteristicQuantification != null && allowedTerm.CharacteristicQuantification.NonQuantifiable != null) //{ // nonQuantifiables.AddRange(allowedTerm.CharacteristicQuantification.NonQuantifiable.Select( // nonQuantifiable => StandardCodedTermFomXsdNonQuantifiable(nonQuantifiable)).ToList()); //} var standardValidTerms = new List <StandardValidTerm>(); if (allowedTerm.ValidTerm1 != null) { foreach (var childValidTerm in allowedTerm.ValidTerm1) { var childTerm = ValidTermFromXsdValidTerm(childValidTerm); if (childTerm != null) { standardValidTerms.Add(childTerm); } } } string name = String.Empty; bool hasConfidence = false; var quantifications = new List <AimTemplateTreeCharacteristicQuantification>(); if (allowedTerm.CharacteristicQuantification != null) { foreach (var quantification in allowedTerm.CharacteristicQuantification) { quantifications.Add(CharacteristicQuantificationFromXsdCharacteristicQuantification(quantification)); } } return(new CharacteristicQuantificationAllowedTerm( quantifications, new StandardCodeSequence( allowedTerm.codeValue, allowedTerm.codeMeaning, allowedTerm.codingSchemeDesignator, allowedTerm.codingSchemeVersion), allowedTerm.defaultAnswer, allowedTerm.nextId, allowedTerm.noMoreQuestions, standardValidTerms)); }