public override void Populate(HL7Element element, IEnumerable <string> tableIds = null) { var tblsUsed = 0; TelephoneNumber = element.ElementValue(0); TelecommunicationUseCode = NewID(element.ElementValue(1), NextTableId(tableIds, ref tblsUsed)); TelecommunicationEquipment = NewID(element.ElementValue(2), NextTableId(tableIds, ref tblsUsed)); }
public override void Populate(HL7Element element, IEnumerable <string> tableIds = null) { var tblsUsed = 0; NamespaceId = NewIS(element.ElementValue(0), NextTableId(tableIds, ref tblsUsed)); UniversalId = element.ElementValue(1); UniversalIdType = NewID(element.ElementValue(2), NextTableId(tableIds, ref tblsUsed)); }
private void FromElement(HL7Element element) { var comparitor = element.ElementValue(0); var separator = element.ElementValue(2); Comparitor = (Constants.AllowedComparitors.Contains(comparitor)) ? comparitor : ""; Num1 = new NM_Number(element.IndexedElement(1)); SeparatorOrSuffix = (Constants.AllowedSeparators.Contains(separator)) ? separator : ""; Num2 = new NM_Number(element.IndexedElement(3)); }
public override void Populate(HL7Element element, IEnumerable <string> tableIds = null) { var tblsUsed = 0; OrganizationName = element.ElementValue(0); OrganizationNameTypeCode = NewIS(element.ElementValue(1), NextTableId(tableIds, ref tblsUsed)); ID = element.IndexedElement(2); CheckDigit = element.ElementValue(3); CheckDigitScheme = NewID(element.ElementValue(4), NextTableId(tableIds, ref tblsUsed)); AssigningAuthority = element.AsHD(5, tableIds?.Skip(tblsUsed), Tables); tblsUsed += HD_HierarchicDesignator.TotalCodedFieldCount; IdentifierTypeCode = NewIS(element.ElementValue(6), NextTableId(tableIds, ref tblsUsed)); AssigningFacility = element.AsHD(7, tableIds, Tables); }
public static ICodedDataValue AsCodedValue(this HL7Element element, int index = -1, string tableId = "", IDataTableProvider tables = null) { string value = element.ElementValue(index); return(new CodedDataValue(value, tableId, tables)); }
public static ICodedDataValue AsCodedValue(this HL7Element element, int index = -1, string tableId = "", Dictionary <string, string> table = null) { string value = element.ElementValue(index); return(new CodedDataValue(value, table, tableId)); }
public override void Populate(HL7Element element, IEnumerable <string> tableIds = null) { var tblsUsed = 0; FamilyName = element.ElementValue(0); GivenName = element.ElementValue(1); SecondGivenNamesOrInitials = element.ElementValue(2); Suffix = element.ElementValue(3); Prefix = element.ElementValue(4); Degree = NewIS(element.IndexedElement(5), NextTableId(tableIds, ref tblsUsed), Tables); NameTypeCode = NewID(element.IndexedElement(6), NextTableId(tableIds, ref tblsUsed)); NameRepresentationCode = NewID(element.IndexedElement(7), NextTableId(tableIds, ref tblsUsed), Tables); NameContext = element.IndexedElement(8).AsCE(tableIds, Tables); tblsUsed += CE_CodedElement.TotalCodedFieldCount; NameAssemblyOrder = NewID(element.IndexedElement(9), NextTableId(tableIds, ref tblsUsed), Tables); }
public override void Populate(HL7Element element, IEnumerable <string> tableIds = null) { var tblsUsed = 0; ID = element.ElementValue(0); CheckDigit = element.ElementValue(1); CheckDigitScheme = NewID(element.ElementValue(2), NextTableId(tableIds, ref tblsUsed), Tables); AssigningAuthority = element.AsHD(3, tableIds?.Skip(tblsUsed), Tables); tblsUsed += HD_HierarchicDesignator.TotalCodedFieldCount; IdentifierTypeCode = NewID(element.ElementValue(4), NextTableId(tableIds, ref tblsUsed), Tables); AssigningFacility = element.AsHD(5, tableIds?.Skip(tblsUsed), Tables); tblsUsed += HD_HierarchicDesignator.TotalCodedFieldCount; EffectiveDate = element.FromTS(6); ExpirationDate = element.FromTS(7); }
public override void Populate(HL7Element element, IEnumerable <string> tableIds = null) { if (element.Count == 0) { Data = element; } else { var tblsUsed = 0; SourceApplication = element.AsHD(0, tableIds, Tables); tblsUsed += HD_HierarchicDesignator.TotalCodedFieldCount; TypeOfData = NewID(element.ElementValue(1), NextTableId(tableIds, ref tblsUsed)); DataSubType = NewID(element.ElementValue(2), NextTableId(tableIds, ref tblsUsed)); Encoding = NewID(element.ElementValue(3), NextTableId(tableIds, ref tblsUsed)); Data = element.ElementValue(4); }; }
public override void Populate(HL7Element element, IEnumerable <string> tableIds = null) { var tblsUsed = 0; StreetAddress = new SAD_StreetAddress(element.IndexedElement(0)); OtherDesignation = element.ElementValue(1); City = element.ElementValue(2); StateOrProvince = element.ElementValue(3); ZipOrPostalCode = element.ElementValue(4); Country = NewID(element.ElementValue(5), NextTableId(tableIds, ref tblsUsed), Tables); AddressType = NewID(element.ElementValue(6), NextTableId(tableIds, ref tblsUsed), Tables); OtherGeographicDesignation = element.ElementValue(7); CountyOrParishCode = NewIS(element.ElementValue(8), NextTableId(tableIds, ref tblsUsed), Tables); CensusTract = NewIS(element.ElementValue(9), NextTableId(tableIds, ref tblsUsed), Tables); AddressRepresentationCode = NewID(element.ElementValue(10), NextTableId(tableIds, ref tblsUsed), Tables); AddressValidityRange = element.AsDateRange(11); }
public override void Populate(HL7Element element, IEnumerable <string> tableIds = null) { var tblsUsed = 0; VersionID = NewID(element.ElementValue(0), NextTableId(tableIds, ref tblsUsed)); Internationalization = element.IndexedElement(1).AsCE(tableIds?.Skip(tblsUsed), Tables); tblsUsed += CE_CodedElement.TotalCodedFieldCount; InternationalVersionID = element.IndexedElement(2).AsCE(tableIds?.Skip(tblsUsed), Tables); }
/// <summary> /// Extract a DateTime field from a supplied element assuming suitable content /// NOTE: Dates and Tims use the DateTime.Kind property to correctly convert the date /// from UTC and Local Times. Use the LocaLtime and UTCTime extensions to safely /// handle the returned DateTime. /// </summary> /// <param name="element"></param> /// <param name="index"></param> /// <returns></returns> public static DateTime?FromTS(this HL7Element element, int index = -1) { var el = element.ElementValue(index); if (String.IsNullOrWhiteSpace(el)) { return(null); } try { return(AsDateTime(el)); } catch { return(null); } }
public override void Populate(HL7Element element, IEnumerable <string> tableIds = null) { var tablesUsed = 0; Identifier = element.ElementValue(0); Text = element.ElementValue(1); NameOfCodingSystem = NewIS( element.ElementValue(2), NextTableId(tableIds, ref tablesUsed)); AlternateIdentifier = element.ElementValue(3); AlternateText = element.ElementValue(4); NameOfAlternateCodingSystem = NewIS( element.ElementValue(5), NextTableId(tableIds, ref tablesUsed)); }
/// <summary> /// Extract a Time field from a supplied element assuming suitable content /// NOTE: Dates and Tims use the DateTime.Kind property to correctly convert the date /// from UTC and Local Times. Use the LocaLtime and UTCTime extensions to safely /// handle the returned Time. /// </summary> /// <param name="element"></param> /// <param name="index"></param> /// <returns></returns> public static TimeSpan?FromTM(this HL7Element element, int index = -1) { var dtTm = AsDateTime($"20000101{element.ElementValue(index)}"); return(dtTm?.TimeOfDay); }
public override void Populate(HL7Element element, IEnumerable <string> tableIds = null) { if (element.IsRepeatingField) { throw new InvalidOperationException("AsXCN() called on repeating field.\r\n" + " The Field in question should be treated as an Enumerable type"); } ID = element.ElementValue(0); FamilyName = element.ElementValue(1); GivenName = element.ElementValue(2); SecondGivenNamesOrInitials = element.ElementValue(3); Suffix = element.ElementValue(4); Prefix = element.ElementValue(5); var tblsUsed = 0; Degree = NewIS(element.ElementValue(6), NextTableId(tableIds, ref tblsUsed)); SourceTable = element.ElementValue(7); AssigningAuthority = element.IndexedElement(8).AsHD(tableIds, Tables); tblsUsed += HD_HierarchicDesignator.TotalCodedFieldCount;; NameTypeCode = NewID(element.ElementValue(9), NextTableId(tableIds, ref tblsUsed)); IdentifierCheckDigit = element.ElementValue(10); CheckDigitScheme = element.ElementValue(11); IdentifierTypeCode = element.ElementValue(12); AssigningFacility = element.IndexedElement(13).AsHD(tableIds, Tables); tblsUsed += HD_HierarchicDesignator.TotalCodedFieldCount; NameRepresentationCode = NewID(element.ElementValue(14), NextTableId(tableIds, ref tblsUsed)); NameContext = element.IndexedElement(15).AsCE(); NameValidityRange = element.IndexedElement(16).AsDateRange(); NameAssemblyOrder = NewID(element.ElementValue(17), NextTableId(tableIds, ref tblsUsed)); }
public SAD_StreetAddress(HL7Element element) { StreetOrMailingAddress = element.ElementValue(0); StreetName = element.ElementValue(1); DwellingNumber = element.ElementValue(2); }