using Strata.RxNorm.Biz.RxNorm; using System.ComponentModel.DataAnnotations; namespace Strata.RxNorm.Biz.Test.Unit.RxNorm { public class RxnComponent { [Key] public int Key { get; set; } public int AltKey { get; set; } public string Rxcui { get; set; } public string Rxcui2 { get; set; } public string Description { get; set; } public string Attribute { get; set; } public RxnComponent() { } public RxnComponent(RxnConcept concept, RxnAttribute attribute) { Key = int.TryParse(concept.Rxcui, out var cui) ? cui : 0; AltKey = int.TryParse(attribute.Rxcui, out var cui2) ? cui2 : 0; Rxcui = concept.Rxcui; Rxcui2 = attribute.Rxcui; Description = concept.Str; Attribute = attribute.Atv; } public RxnComponent(RxnConcept concept, RxnConcept concept2) { Key = int.TryParse(concept.Rxcui, out var cui) ? cui : 0; AltKey = int.TryParse(concept2.Rxcui, out var cui2) ? cui2 : 0; Rxcui = concept.Rxcui; Rxcui2 = concept2.Rxcui; Description = concept.Str; Attribute = concept2.Str; } } }