public void TestFindCodedValueByCodeSystem_ShouldNotFindValueWhenThereIsNoData() { ValueSetEntry value_ren = this.dao.FindValueByCodeSystem(VOCABULARY_DOMAIN, CODE, OID); NUnit.Framework.Assert.IsNull(value_ren); }
public ValueSetEntry CreateValueSet(CodedValue codedValue, String version, params VocabularyDomain[] vocabularyDomain) { ValueSet valueSet = new ValueSet(); valueSet.Name = "testValueSetName" + uniqueNameSuffix; valueSet.Version = version; uniqueNameSuffix++; ValueSetEntry result = new ValueSetEntry(); result.CodedValue = codedValue; result.Sequence = 1; result.Active = ILOG.J2CsMapping.Util.BooleanUtil.TRUE; result.Common = ILOG.J2CsMapping.Util.BooleanUtil.TRUE; result.ValueSet = valueSet; /* foreach */ foreach (VocabularyDomain domain in vocabularyDomain) { ILOG.J2CsMapping.Collections.Generics.Collections.Add(result.ValueSet.VocabularyDomains, domain); } Save(result); return(result); }
void Start() { foreach (Value value in GameManager.instance.modeSettings.values) { ValueSetEntry valueSetEntry = Instantiate(this.valueSetEntry) as ValueSetEntry; valueSetEntry.SetValue(value); valueSetEntry.transform.SetParent(valueSetHolder.transform); } }
public void TestFindCodedValueByCodeSystem_ShouldNotFindValuesInOtherCodeSystems() { VocabularyDomain vocabularyDomain = this.factory .CreateVocabularyDomain(VOCABULARY_DOMAIN); CreateCodedValue(vocabularyDomain, OTHER_OID, CODE); ValueSetEntry value_ren = this.dao.FindValueByCodeSystem(VOCABULARY_DOMAIN, CODE, OID); NUnit.Framework.Assert.IsNull(value_ren); }
internal ValueSetEntry CreateValueSetWithDisplayText(String code) { ValueSet valueSet = new ValueSet(); ILOG.J2CsMapping.Collections.Generics.Collections.Add(valueSet.VocabularyDomains, new VocabularyDomain( "x_NormalRestrictedTabooConfidentialityKind")); ValueSetEntry valueSetEntry = new ValueSetEntry(); valueSetEntry.ValueSet = valueSet; valueSetEntry.CodedValue = CreateCodedValueWithDisplayText(code); return(valueSetEntry); }
private IList <CodedValue> ConvertValueSetsToCodedValues( IList <ValueSetEntry> valueSets) { IList <CodedValue> result = new List <CodedValue>(); for (IIterator <ValueSetEntry> iter = new ILOG.J2CsMapping.Collections.Generics.IteratorAdapter <Ca.Infoway.Messagebuilder.Terminology.Codeset.Domain.ValueSetEntry>(valueSets.GetEnumerator()); iter .HasNext();) { ValueSetEntry valueSet = iter.Next(); ILOG.J2CsMapping.Collections.Generics.Collections.Add(result, valueSet.CodedValue); } return(result); }
public void TestFindCodedValueByCodeSystem_ShouldFindMatchingCodedValue() { VocabularyDomain vocabularyDomain = this.factory .CreateVocabularyDomain(typeof(Confidentiality)); CreateCodedValue(vocabularyDomain, OID, "N"); ValueSetEntry value_ren = this.dao.FindValueByCodeSystem( typeof(Confidentiality), "N", OID); NUnit.Framework.Assert.IsNotNull(value_ren, "coded value"); NUnit.Framework.Assert.AreEqual("N", value_ren.CodedValue.Code); NUnit.Framework.Assert.AreEqual(OID, value_ren.CodedValue.CodeSystem.Oid); }
internal Object CreateValueSet(String code, IList <Type> list) { ValueSetEntry valueSetEntry = new ValueSetEntry(); ValueSet valueSet = new ValueSet(); valueSetEntry.ValueSet = valueSet; /* foreach */ foreach (Type type in list) { ILOG.J2CsMapping.Collections.Generics.Collections.Add(valueSet.VocabularyDomains, new VocabularyDomain(type.Name)); } valueSetEntry.CodedValue = CreateCodedValue(code); return(valueSetEntry); }
/// <summary> /// {@inheritDoc} /// </summary> /// public virtual T Lookup <T>(Type type, String code, String codeSystemOid, bool ignoreCase) where T : Code { // RM 15390 (and others) - TM: The lookup won't work if no code system is provided. // An argument could be made that if this method is called then we should expect the code system to be valid, // but let's err on the side of caution and do our best to find a matching code. if (StringUtils.IsBlank(codeSystemOid)) { return(this.Lookup <T>(type, code, ignoreCase)); } else { ValueSetEntry valueSet = this.dao.FindValueByCodeSystem(type, code, codeSystemOid, this.version, ignoreCase); return((valueSet == null) ? default(T) /* was: null */ : this.CreateCode <T>(type, valueSet)); } }
public ValueSetEntry CreateValueSet(CodedValue codedValue, params VocabularyDomain[] vocabularyDomain) { ValueSetEntry result = new ValueSetEntry(); result.CodedValue = codedValue; result.Sequence = 1; result.Active = ILOG.J2CsMapping.Util.BooleanUtil.TRUE; result.Common = ILOG.J2CsMapping.Util.BooleanUtil.TRUE; result.ValueSet = new ValueSet(); /* foreach */ foreach (VocabularyDomain domain in vocabularyDomain) { ILOG.J2CsMapping.Collections.Generics.Collections.Add(result.ValueSet.VocabularyDomains, domain); } Save(result); return(result); }
/// <summary> /// {@inheritDoc} /// </summary> /// public virtual void Save(ValueSetEntry valueSet) { HibernateTemplate.SaveOrUpdate(valueSet); }
private ILOG.J2CsMapping.Collections.Generics.ISet <Type> GetImplementedTypes(ValueSetEntry value_ren) { ILOG.J2CsMapping.Collections.Generics.ISet <Type> typeList = new HashedSet <Type>(); ICollection <VocabularyDomain> vocabularyDomains = value_ren.ValueSet.VocabularyDomains; /* foreach */ foreach (VocabularyDomain vocabularyDomain in vocabularyDomains) { Type typeAsClass = vocabularyDomain.GetTypeAsClass(this.version); if (typeAsClass != null) { typeList.Add(typeAsClass); } } return(typeList); }
internal T CreateCode <T>(Type type, ValueSetEntry value_ren) where T : Code { return(this.CreateCode <T>(type, value_ren.CodedValue, GetImplementedTypes(value_ren))); }