public XdsPerson(string organization) { _person = DataType.Parse(new XCN(), organization); }
public XdsPerson(XCN organization) { _person = organization; }
public void Should_Serialize_FirstComponent() { var field = new XCN { IdNumber = new ST { Value = "XCN.IdNumber" }, }; Assert.AreEqual(First, field.ToString()); }
public void Should_Serialize_LastComponent() { var field = new XCN { AssigningAgencyOrDepartment = new CWE { OriginalText = new ST { Value = "XCN.AssigningAgencyOrDepartment.OriginalText" } } }; Assert.AreEqual(Last, field.ToString()); }
public void Should_Serialize_AllComponents() { var field = new XCN { IdNumber = new ST { Value = "XCN.IdNumber" }, FamilyName = new FN { Surname = new ST { Value = "XCN.FamilyName.Surname" }, OwnSurnamePrefix = new ST { Value = "XCN.FamilyName.OwnSurnamePrefix" }, OwnSurname = new ST { Value = "XCN.FamilyName.OwnSurname" }, SurnamePrefixFromPartnerSpouse = new ST { Value = "XCN.FamilyName.SurnamePrefixFromPartnerSpouse" }, SurnameFromPartnerSpouse = new ST { Value = "XCN.FamilyName.SurnameFromPartnerSpouse" } }, GivenName = new ST { Value = "XCN.GivenName" }, SecondandFurtherGivenNames = new ST { Value = "XCN.SecondandFurtherGivenNames" }, Suffix = new ST { Value = "XCN.Suffix" }, Prefix = new ST { Value = "XCN.Prefix" }, Degree = new IS { Value = "XCN.Degree" }, SourceTable = new IS { Value = "XCN.SourceTable" }, AssigningAuthority = new HD { NamespaceId = new IS { Value = "XCN.AssigningAuthority.NamespaceId" }, UniversalId = new ST { Value = "XCN.AssigningAuthority.UniversalId" }, UniversalIdType = new ID { Value = "XCN.AssigningAuthority.UniversalIdType" } }, NameTypeCode = new ID { Value = "XCN.NameTypeCode" }, IdentifierCheckDigit = new ST { Value = "XCN.IdentifierCheckDigit" }, CheckDigitScheme = new ID { Value = "XCN.CheckDigitScheme" }, IdentifierTypeCode = new ID { Value = "XCN.IdentifierTypeCode" }, AssigningFacility = new HD { NamespaceId = new IS { Value = "XCN.AssigningFacility.NamespaceId" }, UniversalId = new ST { Value = "XCN.AssigningFacility.UniversalId" }, UniversalIdType = new ID { Value = "XCN.AssigningFacility.UniversalIdType" } }, NameRepresentationCode = new ID { Value = "XCN.NameRepresentationCode" }, NameContext = new CE { Identifier = new ST { Value = "XCN.NameContext.Identifier" }, Text = new ST { Value = "XCN.NameContext.Text" }, NameofCodingSystem = new ID { Value = "XCN.NameContext.NameofCodingSystem" }, AlternateIdentifier1 = new ST { Value = "XCN.NameContext.AlternateIdentifier1" }, AlternateText1 = new ST { Value = "XCN.NameContext.AlternateText1" }, NameofAlternateCodingSystem1 = new ID { Value = "XCN.NameContext.NameofAlternateCodingSystem1" }, AlternateIdentifier2 = new ST { Value = "XCN.NameContext.AlternateIdentifier2" }, AlternateText2 = new ST { Value = "XCN.NameContext.AlternateText2" }, NameofAlternateCodingSystem2 = new ID { Value = "XCN.NameContext.NameofAlternateCodingSystem2" } }, NameValidityRange = new DR { RangeStartDateTime = new TS { Time = new DTM(2015, 9, 6, 9, 42, 12), DegreeOfPrecision = new ID { Value = "XCN.NameValidityRange.RangeStartDateTime.DegreeOfPrecision" } }, RangeEndDateTime = new TS { Time = new DTM(2015, 9, 7, 23, 59, 59, 999, 9, -4), DegreeOfPrecision = new ID { Value = "XCN.NameValidityRange.RangeEndDateTime.DegreeOfPrecision" } } }, NameAssemblyOrder = new ID { Value = "XCN.NameAssemblyOrder" }, EffectiveDate = new TS { Time = new DTM(2015, 9, 6, 9, 42, 12), DegreeOfPrecision = new ID { Value = "XCN.EffectiveDate.DegreeOfPrecision" } }, ExpirationDate = new TS { Time = new DTM(2015, 9, 6, 9, 42, 12), DegreeOfPrecision = new ID { Value = "XCN.ExpirationDate.DegreeOfPrecision" } }, ProfessionalSuffix = new ST { Value = "XCN.ProfessionalSuffix" }, AssigningJurisdiction = new CWE { Identifier = new ST { Value = "XCN.AssigningJurisdiction.Identifier" }, Text = new ST { Value = "XCN.AssigningJurisdiction.Text" }, NameofCodingSystem = new ID { Value = "XCN.AssigningJurisdiction.NameofCodingSystem" }, AlternateIdentifier = new ST { Value = "XCN.AssigningJurisdiction.AlternateIdentifier" }, AlternateText = new ST { Value = "XCN.AssigningJurisdiction.AlternateText" }, NameofAlternateCodingSystem = new ID { Value = "XCN.AssigningJurisdiction.NameofAlternateCodingSystem" }, CodingSystemVersionId = new ST { Value = "XCN.AssigningJurisdiction.CodingSystemVersionId" }, AlternateCodingSystemVersionId = new ST { Value = "XCN.AssigningJurisdiction.AlternateCodingSystemVersionId" }, OriginalText = new ST { Value = "XCN.AssigningJurisdiction.OriginalText" } }, AssigningAgencyOrDepartment = new CWE { Identifier = new ST { Value = "XCN.AssigningAgencyOrDepartment.Identifier" }, Text = new ST { Value = "XCN.AssigningAgencyOrDepartment.Text" }, NameofCodingSystem = new ID { Value = "XCN.AssigningAgencyOrDepartment.NameofCodingSystem" }, AlternateIdentifier = new ST { Value = "XCN.AssigningAgencyOrDepartment.AlternateIdentifier" }, AlternateText = new ST { Value = "XCN.AssigningAgencyOrDepartment.AlternateText" }, NameofAlternateCodingSystem = new ID { Value = "XCN.AssigningAgencyOrDepartment.NameofAlternateCodingSystem" }, CodingSystemVersionId = new ST { Value = "XCN.AssigningAgencyOrDepartment.CodingSystemVersionId" }, AlternateCodingSystemVersionId = new ST { Value = "XCN.AssigningAgencyOrDepartment.AlternateCodingSystemVersionId" }, OriginalText = new ST { Value = "XCN.AssigningAgencyOrDepartment.OriginalText" } } }; Assert.AreEqual(All, field.ToString()); }