├── LICENSE ├── README.md └── j4jayant.HL7.Parser ├── j4jayant.HL7.Parser.sln ├── j4jayant.HL7.Parser.suo ├── j4jayant.HL7.Parser ├── Component.cs ├── Field.cs ├── HL7Exception.cs ├── Message.cs ├── MessageHelper.cs ├── Properties │ └── AssemblyInfo.cs ├── Segment.cs ├── SubComponent.cs ├── bin │ ├── Debug │ │ ├── j4jayant.HL7.Parser.dll │ │ └── j4jayant.HL7.Parser.pdb │ └── Release │ │ ├── Confused │ │ ├── j4jayant.HL7.Parser.dll │ │ ├── j4jayant.HL7.Parser.pdb │ │ └── report.crdb │ │ ├── j4jayant.HL7.Parser.dll │ │ └── j4jayant.HL7.Parser.pdb ├── j4jayant.HL7.Parser.csproj └── obj │ ├── Debug │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ ├── j4jayant.HL7.Parser.csproj.FileListAbsolute.txt │ ├── j4jayant.HL7.Parser.dll │ └── j4jayant.HL7.Parser.pdb │ └── Release │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ ├── j4jayant.HL7.Parser.csproj.FileListAbsolute.txt │ ├── j4jayant.HL7.Parser.csprojResolveAssemblyReference.cache │ ├── j4jayant.HL7.Parser.dll │ └── j4jayant.HL7.Parser.pdb └── testHL7Parser ├── Form1.Designer.cs ├── Form1.cs ├── Form1.resx ├── Program.cs ├── Properties ├── AssemblyInfo.cs ├── Resources.Designer.cs ├── Resources.resx ├── Settings.Designer.cs └── Settings.settings ├── bin └── Debug │ ├── j4jayant.HL7.Parser.dll │ ├── j4jayant.HL7.Parser.pdb │ ├── testHL7Parser.exe │ ├── testHL7Parser.pdb │ ├── testHL7Parser.vshost.exe │ └── testHL7Parser.vshost.exe.manifest ├── obj └── x86 │ └── Debug │ ├── DesignTimeResolveAssemblyReferences.cache │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ ├── GenerateResource.read.1.tlog │ ├── GenerateResource.write.1.tlog │ ├── ResolveAssemblyReference.cache │ ├── testHL7Parser.Form1.resources │ ├── testHL7Parser.Properties.Resources.resources │ ├── testHL7Parser.csproj.FileListAbsolute.txt │ ├── testHL7Parser.exe │ └── testHL7Parser.pdb └── testHL7Parser.csproj /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Jayant Singh - www.j4jayant.com 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | hl7-cSharp-parser 2 | ================= 3 | 4 | HL7 C# parser 5 | 6 | http://j4jayant.com/articles/hl7/31-hl7-parsing-lib 7 | 8 | 9 | -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/j4jayant.HL7.Parser.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "j4jayant.HL7.Parser", "j4jayant.HL7.Parser\j4jayant.HL7.Parser.csproj", "{687F3113-0395-4DBC-A332-C1A329516651}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "testHL7Parser", "testHL7Parser\testHL7Parser.csproj", "{2C1E25EA-95A2-4A9D-845F-9E174CD2E7D0}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Debug|Mixed Platforms = Debug|Mixed Platforms 12 | Debug|x86 = Debug|x86 13 | Release|Any CPU = Release|Any CPU 14 | Release|Mixed Platforms = Release|Mixed Platforms 15 | Release|x86 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {687F3113-0395-4DBC-A332-C1A329516651}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {687F3113-0395-4DBC-A332-C1A329516651}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {687F3113-0395-4DBC-A332-C1A329516651}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 21 | {687F3113-0395-4DBC-A332-C1A329516651}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 22 | {687F3113-0395-4DBC-A332-C1A329516651}.Debug|x86.ActiveCfg = Debug|Any CPU 23 | {687F3113-0395-4DBC-A332-C1A329516651}.Release|Any CPU.ActiveCfg = Release|Any CPU 24 | {687F3113-0395-4DBC-A332-C1A329516651}.Release|Any CPU.Build.0 = Release|Any CPU 25 | {687F3113-0395-4DBC-A332-C1A329516651}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 26 | {687F3113-0395-4DBC-A332-C1A329516651}.Release|Mixed Platforms.Build.0 = Release|Any CPU 27 | {687F3113-0395-4DBC-A332-C1A329516651}.Release|x86.ActiveCfg = Release|Any CPU 28 | {2C1E25EA-95A2-4A9D-845F-9E174CD2E7D0}.Debug|Any CPU.ActiveCfg = Debug|x86 29 | {2C1E25EA-95A2-4A9D-845F-9E174CD2E7D0}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 30 | {2C1E25EA-95A2-4A9D-845F-9E174CD2E7D0}.Debug|Mixed Platforms.Build.0 = Debug|x86 31 | {2C1E25EA-95A2-4A9D-845F-9E174CD2E7D0}.Debug|x86.ActiveCfg = Debug|x86 32 | {2C1E25EA-95A2-4A9D-845F-9E174CD2E7D0}.Debug|x86.Build.0 = Debug|x86 33 | {2C1E25EA-95A2-4A9D-845F-9E174CD2E7D0}.Release|Any CPU.ActiveCfg = Release|x86 34 | {2C1E25EA-95A2-4A9D-845F-9E174CD2E7D0}.Release|Mixed Platforms.ActiveCfg = Release|x86 35 | {2C1E25EA-95A2-4A9D-845F-9E174CD2E7D0}.Release|Mixed Platforms.Build.0 = Release|x86 36 | {2C1E25EA-95A2-4A9D-845F-9E174CD2E7D0}.Release|x86.ActiveCfg = Release|x86 37 | {2C1E25EA-95A2-4A9D-845F-9E174CD2E7D0}.Release|x86.Build.0 = Release|x86 38 | EndGlobalSection 39 | GlobalSection(SolutionProperties) = preSolution 40 | HideSolutionNode = FALSE 41 | EndGlobalSection 42 | EndGlobal 43 | -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/j4jayant.HL7.Parser.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/j4jayant.HL7.Parser.suo -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/j4jayant.HL7.Parser/Component.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace j4jayant.HL7.Parser 7 | { 8 | public class Component 9 | { 10 | private String _Value; 11 | internal List SubComponentList { get; set; } 12 | private Char[] subComponentSeparator = new Char[1] { '&' }; 13 | private bool isSubComponentized = false; 14 | 15 | internal Char[] SubComponentSeparator 16 | { 17 | get { return subComponentSeparator; } 18 | set { subComponentSeparator = value; } 19 | } 20 | 21 | public bool IsSubComponentized 22 | { 23 | get { return isSubComponentized; } 24 | set { isSubComponentized = value; } 25 | } 26 | 27 | public Component() 28 | { 29 | SubComponentList = new List(); 30 | } 31 | public Component(String pValue) 32 | { 33 | SubComponentList = new List(); 34 | _Value = pValue; 35 | } 36 | 37 | public String Value 38 | { 39 | get 40 | { 41 | if (_Value == null) 42 | return String.Empty; 43 | else 44 | return _Value; 45 | } 46 | set 47 | { 48 | _Value = value; 49 | if (_Value.Length > 0) 50 | { 51 | SubComponentList = new List(); 52 | List AllSubComponents = MessageHelper.SplitString(_Value, SubComponentSeparator); 53 | 54 | if (AllSubComponents.Count > 1) 55 | { 56 | isSubComponentized = true; 57 | 58 | foreach (String strSubComponent in AllSubComponents) 59 | { 60 | SubComponent subComponent = new SubComponent(); 61 | subComponent.Value = strSubComponent; 62 | SubComponentList.Add(subComponent); 63 | } 64 | } 65 | else 66 | { 67 | SubComponentList = new List(); 68 | SubComponent subComponent = new SubComponent(); 69 | subComponent.Value = _Value; 70 | SubComponentList.Add(subComponent); 71 | } 72 | } 73 | } 74 | } 75 | 76 | public SubComponent SubComponents(int position) 77 | { 78 | position = position - 1; 79 | SubComponent sub = null; 80 | 81 | try 82 | { 83 | sub = SubComponentList[position]; 84 | } 85 | catch (Exception ex) 86 | { 87 | throw new HL7Exception("SubComponent not availalbe Error-" + ex.Message); 88 | } 89 | 90 | return sub; 91 | } 92 | 93 | public List SubComponents() 94 | { 95 | return SubComponentList; 96 | } 97 | } 98 | 99 | internal class ComponentCollection : List 100 | { 101 | internal ComponentCollection() 102 | : base() 103 | { 104 | 105 | } 106 | 107 | internal new Component this[int index] 108 | { 109 | get 110 | { 111 | Component com = null; 112 | if (index < base.Count) 113 | com = base[index]; 114 | return com; 115 | } 116 | set 117 | { 118 | base[index] = value; 119 | } 120 | } 121 | 122 | /// 123 | /// Add Component at next position 124 | /// 125 | /// Component 126 | internal new void Add(Component com) 127 | { 128 | base.Add(com); 129 | } 130 | 131 | /// 132 | /// Add component at specific position 133 | /// 134 | /// Component 135 | /// Position 136 | internal void Add(Component com, int position) 137 | { 138 | position = position - 1; 139 | int listCount = base.Count; 140 | 141 | if (position <= listCount) 142 | base[position] = com; 143 | else 144 | { 145 | for (int comIndex = listCount + 1; comIndex <= position; comIndex++) 146 | { 147 | Component blankCom = new Component(); 148 | blankCom.Value = String.Empty; 149 | base.Add(blankCom); 150 | } 151 | base.Add(com); 152 | } 153 | } 154 | } 155 | } 156 | -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/j4jayant.HL7.Parser/Field.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace j4jayant.HL7.Parser 7 | { 8 | public class Field 9 | { 10 | private String _Value; 11 | internal ComponentCollection ComponentList { get; set; } 12 | 13 | private Char[] fieldDelimiters = new Char[] { '^', '~', '&' }; 14 | private bool isComponentized = false; 15 | private bool hasRepetitions = false; 16 | private List _RepetitionList; 17 | 18 | internal Char[] FieldDelimiters 19 | { 20 | get { return fieldDelimiters; } 21 | set { fieldDelimiters = value; } 22 | } 23 | 24 | public bool IsComponentized 25 | { 26 | get { return isComponentized; } 27 | set { isComponentized = value; } 28 | } 29 | 30 | public bool HasRepetitions 31 | { 32 | get { return hasRepetitions; } 33 | set { hasRepetitions = value; } 34 | } 35 | 36 | internal List RepeatitionList 37 | { 38 | get 39 | { 40 | if (_RepetitionList == null) 41 | _RepetitionList = new List(); 42 | return _RepetitionList; 43 | } 44 | set 45 | { 46 | _RepetitionList = value; 47 | } 48 | } 49 | 50 | public Field() 51 | { 52 | //ComponentList = new List(); 53 | ComponentList = new ComponentCollection(); 54 | } 55 | 56 | public Field(String pValue) 57 | { 58 | //ComponentList = new List(); 59 | ComponentList = new ComponentCollection(); 60 | _Value = pValue; 61 | } 62 | 63 | public String Value 64 | { 65 | get 66 | { 67 | if (_Value == null) 68 | return String.Empty; 69 | else 70 | return _Value; 71 | } 72 | set 73 | { 74 | _Value = value; 75 | 76 | if (_Value.Length > 0) 77 | { 78 | hasRepetitions = _Value.Contains(FieldDelimiters[1]); 79 | 80 | if (hasRepetitions) 81 | { 82 | _RepetitionList = new List(); 83 | List InduvidualFields = MessageHelper.SplitString(_Value, new char[] { FieldDelimiters[1] }); 84 | 85 | for (int index = 0; index < InduvidualFields.Count; index++) 86 | { 87 | Field field = new Field(); 88 | field.FieldDelimiters = new Char[3] { FieldDelimiters[0], FieldDelimiters[1], FieldDelimiters[2] }; 89 | field.Value = InduvidualFields[index]; 90 | _RepetitionList.Add(field); 91 | } 92 | } 93 | else 94 | { 95 | //ComponentList = new List(); 96 | char[] componentSeparatorString = new char[1] { FieldDelimiters[0] }; 97 | 98 | List AllComponents = MessageHelper.SplitString(_Value, componentSeparatorString); 99 | if (AllComponents.Count > 1) 100 | { 101 | isComponentized = true; 102 | ComponentList = new ComponentCollection(); 103 | foreach (String strComponent in AllComponents) 104 | { 105 | Component component = new Component(); 106 | component.SubComponentSeparator = new char[1] { FieldDelimiters[2] }; 107 | component.Value = strComponent; 108 | ComponentList.Add(component); 109 | } 110 | } 111 | else 112 | { 113 | ComponentList = new ComponentCollection(); 114 | Component component = new Component(); 115 | component.SubComponentSeparator = new char[1] { FieldDelimiters[2] }; 116 | component.Value = _Value; 117 | ComponentList.Add(component); 118 | } 119 | } 120 | } 121 | } 122 | 123 | } 124 | 125 | public bool AddNewComponent(Component com) 126 | { 127 | try 128 | { 129 | this.ComponentList.Add(com); 130 | return true; 131 | } 132 | catch (Exception ex) 133 | { 134 | throw new HL7Exception("Unable to add new component Error - " + ex.Message); 135 | } 136 | } 137 | 138 | public bool AddNewComponent(Component com, int position) 139 | { 140 | try 141 | { 142 | this.ComponentList.Add(com, position); 143 | return true; 144 | } 145 | catch (Exception ex) 146 | { 147 | throw new HL7Exception("Unable to add new component Error - " + ex.Message); 148 | } 149 | } 150 | 151 | public Component Components(int position) 152 | { 153 | position = position - 1; 154 | Component com = null; 155 | 156 | try 157 | { 158 | com = ComponentList[position]; 159 | } 160 | catch (Exception ex) 161 | { 162 | throw new HL7Exception("Component not availalbe Error-" + ex.Message); 163 | } 164 | 165 | return com; 166 | } 167 | 168 | public List Components() 169 | { 170 | return ComponentList; 171 | } 172 | 173 | public List Repetitions() 174 | { 175 | if (this.hasRepetitions) 176 | { 177 | return _RepetitionList; 178 | } 179 | return null; 180 | } 181 | 182 | public Field Repetitions(int repeatitionNumber) 183 | { 184 | if (this.hasRepetitions) 185 | { 186 | return _RepetitionList[repeatitionNumber - 1]; 187 | } 188 | return null; 189 | } 190 | 191 | } 192 | 193 | internal class FieldCollection : List 194 | { 195 | internal FieldCollection() 196 | :base() 197 | { 198 | 199 | } 200 | 201 | internal new Field this[int index] 202 | { 203 | get 204 | { 205 | Field field = null; 206 | if (index < base.Count) 207 | field = base[index]; 208 | return field; 209 | } 210 | set 211 | { 212 | base[index] = value; 213 | } 214 | } 215 | 216 | /// 217 | /// add field at next position 218 | /// 219 | /// Field 220 | internal new void Add(Field field) 221 | { 222 | base.Add(field); 223 | } 224 | 225 | /// 226 | /// Add field at specific position 227 | /// 228 | /// Field 229 | /// position 230 | internal void Add(Field field, int position) 231 | { 232 | int listCount = base.Count; 233 | 234 | if (position <= listCount) 235 | base[position] = field; 236 | else 237 | { 238 | for (int fieldIndex = listCount+1; fieldIndex <= position; fieldIndex++) 239 | { 240 | Field blankField = new Field(); 241 | blankField.Value = String.Empty; 242 | base.Add(blankField); 243 | } 244 | base.Add(field); 245 | } 246 | } 247 | } 248 | } 249 | -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/j4jayant.HL7.Parser/HL7Exception.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace j4jayant.HL7.Parser 4 | { 5 | [Serializable] 6 | public class HL7Exception : Exception 7 | { 8 | public String ErrorCode { get; set; } 9 | 10 | public HL7Exception(string message) 11 | : base(message) 12 | { 13 | } 14 | 15 | public HL7Exception(string message, String Code) 16 | : base(message) 17 | { 18 | ErrorCode = Code; 19 | } 20 | 21 | public override string ToString() 22 | { 23 | return ErrorCode + " : " + Message; 24 | } 25 | 26 | public const String REQUIRED_FIELD_MISSING = "Validation Error - Required field missing in message"; 27 | public const String UNSUPPORTED_MESSAGE_TYPE = "Validation Error - Message Type Not Supported by this Implementation"; 28 | public const String BAD_MESSAGE = "Validation Error - Bad Message"; 29 | public const String PARSING_ERROR = "Parseing Error"; 30 | public const String SERIALIZATION_ERROR = "Serialization Error"; 31 | 32 | } 33 | } -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/j4jayant.HL7.Parser/Message.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace j4jayant.HL7.Parser 7 | { 8 | public class Message 9 | { 10 | private Char[] DefaultSegmentSeparatorString = new Char[2] { '\r', '\n' }; 11 | 12 | private int msgSegmentSeparatorIndex = 0; 13 | private String _HL7Message = String.Empty; 14 | private String _Version = String.Empty; 15 | private String _MessageStructure = String.Empty; 16 | private String _MessageControlID = String.Empty; 17 | private String _ProcessingID = String.Empty; 18 | private short _SegmentCount = 0; 19 | private List AllSegments = null; 20 | 21 | //11 - VT(\v), 28 - FS, 13 - CR(\r) 22 | private Char[] messageTrimChars = new Char[] { Convert.ToChar(11), Convert.ToChar(28), Convert.ToChar(13), ' ', '\n' }; 23 | 24 | private Char[] fieldDelimiters = new Char[] { '|', '^', '~', '\\', '&' }; 25 | 26 | internal Char[] FieldDelimiters 27 | { 28 | get { return fieldDelimiters; } 29 | set { fieldDelimiters = value; } 30 | } 31 | 32 | private Dictionary segmentList; 33 | 34 | public String HL7Message { get { return _HL7Message; } set { _HL7Message = value; } } 35 | public String Version { get { return _Version; } set { _Version = value; } } 36 | public String MessageStructure { get { return _MessageStructure; } set { _MessageStructure = value; } } 37 | public String MessageControlID { get { return _MessageControlID; } set { _MessageControlID = value; } } 38 | public String ProcessingID { get { return _ProcessingID; } set { _ProcessingID = value; } } 39 | public short SegmentCount { get { return _SegmentCount; } set { _SegmentCount = value; } } 40 | 41 | internal Dictionary SegmentList 42 | { 43 | get 44 | { 45 | return segmentList; 46 | } 47 | set 48 | { 49 | segmentList = value; 50 | } 51 | } 52 | 53 | public Message() 54 | { 55 | SegmentList = new Dictionary(); 56 | } 57 | 58 | public Message(String strMessage) 59 | { 60 | HL7Message = strMessage; 61 | SegmentList = new Dictionary(); 62 | } 63 | 64 | /// 65 | /// Parse the HL7 message in text format, throws HL7Exception if error occurs 66 | /// 67 | /// boolean 68 | public bool ParseMessage() 69 | { 70 | bool isValid = false; 71 | bool isParsed = false; 72 | try 73 | { 74 | isValid = ValidateMessage(); 75 | } 76 | catch (HL7Exception ex) 77 | { 78 | throw ex; 79 | } 80 | catch (Exception ex) 81 | { 82 | throw new HL7Exception("Unhandeled Exceiption in validation - " + ex.Message, HL7Exception.BAD_MESSAGE); 83 | } 84 | 85 | if (isValid) 86 | { 87 | try 88 | { 89 | if (AllSegments == null || AllSegments.Count <= 0) 90 | { 91 | AllSegments = MessageHelper.SplitString(HL7Message, new Char[1] { DefaultSegmentSeparatorString[msgSegmentSeparatorIndex] }); 92 | } 93 | 94 | short SegSeqNo = 0; 95 | foreach (String strSegment in AllSegments) 96 | { 97 | Segment segNew = new Segment(); 98 | String segmentName = strSegment.Substring(0, 3); 99 | segNew.FieldDelimiters = new Char[] { FieldDelimiters[0], FieldDelimiters[1], FieldDelimiters[2], FieldDelimiters[4] }; 100 | segNew.Name = segmentName; 101 | segNew.Value = strSegment; 102 | segNew.SequenceNo = SegSeqNo++; 103 | 104 | if (SegmentList.ContainsKey(segmentName)) 105 | { 106 | SegmentList[segmentName].List.Add(segNew); 107 | } 108 | else 109 | { 110 | SegmentList.Add(segmentName, segNew); 111 | SegmentList[segmentName].List.Add(segNew); 112 | } 113 | } 114 | _SegmentCount = SegSeqNo; 115 | 116 | String strSerializedMessage = String.Empty; 117 | try 118 | { 119 | strSerializedMessage = SerializeMessageWithoutValidate(); //validation not required here as we haven't changed anything in message 120 | } 121 | catch (HL7Exception ex) 122 | { 123 | throw new HL7Exception("Failed to serialize parsed message with error -" + ex.Message, HL7Exception.PARSING_ERROR); 124 | } 125 | 126 | if (!String.IsNullOrEmpty(strSerializedMessage)) 127 | { 128 | if (HL7Message.Equals(strSerializedMessage)) 129 | isParsed = true; 130 | } 131 | else 132 | { 133 | throw new HL7Exception("Unable to serialize to origional message -", HL7Exception.PARSING_ERROR); 134 | } 135 | } 136 | catch (Exception ex) 137 | { 138 | throw new HL7Exception("Failed to parse the message with error -" + ex.Message, HL7Exception.PARSING_ERROR); 139 | } 140 | } 141 | return isParsed; 142 | } 143 | 144 | /// 145 | /// validates the HL7 message for basic syntax 146 | /// 147 | /// boolean 148 | private bool ValidateMessage() 149 | { 150 | try 151 | { 152 | if (!String.IsNullOrEmpty(HL7Message)) 153 | { 154 | HL7Message = HL7Message.Trim(messageTrimChars); 155 | 156 | //check message length - MSH+Delemeters+12Fields in MSH 157 | if (HL7Message.Length < 20) 158 | { 159 | throw new HL7Exception("Message Length too short" + HL7Message.Length + " fields.", HL7Exception.BAD_MESSAGE); 160 | } 161 | 162 | //check if message starts with header segment 163 | if (!HL7Message.StartsWith("MSH")) 164 | { 165 | throw new HL7Exception("MSH Segment not found at the beggining of the message", HL7Exception.BAD_MESSAGE); 166 | } 167 | 168 | //Find segment separator 169 | if (HL7Message.Contains(DefaultSegmentSeparatorString[0])) 170 | msgSegmentSeparatorIndex = 0; 171 | else if (HL7Message.Contains(DefaultSegmentSeparatorString[1])) 172 | msgSegmentSeparatorIndex = 1; 173 | else 174 | msgSegmentSeparatorIndex = 0; 175 | 176 | //check Segment Name & 4th character of each segment 177 | char fourthCharMSH = HL7Message[3]; 178 | AllSegments = MessageHelper.SplitString(HL7Message, new Char[1] { DefaultSegmentSeparatorString[msgSegmentSeparatorIndex] }); 179 | 180 | foreach (String strSegment in AllSegments) 181 | { 182 | bool isValidSegName = false; 183 | String segmentName = strSegment.Substring(0, 3); 184 | String segNameRegEx = "[A-Z][A-Z][A-Z1-9]"; 185 | isValidSegName = System.Text.RegularExpressions.Regex.IsMatch(segmentName, segNameRegEx); 186 | 187 | if (!isValidSegName) 188 | { 189 | throw new HL7Exception("Invalid Segment Name Found :" + strSegment, HL7Exception.BAD_MESSAGE); 190 | } 191 | 192 | char fourthCharSEG = strSegment[3]; 193 | 194 | if (fourthCharMSH != fourthCharSEG) 195 | { 196 | throw new HL7Exception("Invalid Segment Found :" + strSegment, HL7Exception.BAD_MESSAGE); 197 | } 198 | } 199 | 200 | Char[] _fieldDelimiters_Message = AllSegments[0].Substring(3, 8 - 3).ToArray(); 201 | FieldDelimiters = _fieldDelimiters_Message; 202 | 203 | //count field separators, MSH.12 is required so there should be at least 11 field separators in MSH 204 | int countFieldSepInMSH = AllSegments[0].Count(f => f == FieldDelimiters[0]); 205 | 206 | if (countFieldSepInMSH < 11) 207 | { 208 | throw new HL7Exception("MSH segment doesn't contain all required fields", HL7Exception.BAD_MESSAGE); 209 | } 210 | 211 | //Find Message Version 212 | char[] fieldSeparator = new char[1] { FieldDelimiters[0] }; 213 | char[] componentSeparator = new char[1] { FieldDelimiters[1] }; 214 | 215 | List MSHFields = AllSegments[0].Split(fieldSeparator, StringSplitOptions.None).ToList(); 216 | if (MSHFields.Count >= 12) 217 | { 218 | this._Version = MSHFields[11].Split(componentSeparator, StringSplitOptions.None)[0]; 219 | } 220 | else 221 | { 222 | throw new HL7Exception("HL7 version not found in MSH Segment", HL7Exception.REQUIRED_FIELD_MISSING); 223 | } 224 | 225 | //Find Message Type & Trigger Event 226 | 227 | try 228 | { 229 | String MSH_9 = MSHFields[8]; 230 | if (!String.IsNullOrEmpty(MSH_9)) 231 | { 232 | System.String[] MSH_9_comps = MSH_9.Split(componentSeparator, StringSplitOptions.None); 233 | if (MSH_9_comps.Length >= 3) 234 | { 235 | this._MessageStructure = MSH_9_comps[2]; 236 | } 237 | else if (MSH_9_comps.Length > 0 && MSH_9_comps[0] != null && MSH_9_comps[0].Equals("ACK")) 238 | { 239 | this._MessageStructure = "ACK"; 240 | } 241 | else if (MSH_9_comps.Length == 2) 242 | { 243 | this._MessageStructure = MSH_9_comps[0] + "_" + MSH_9_comps[1]; 244 | } 245 | else 246 | { 247 | throw new HL7Exception("Message Type & Trigger Event value not found in message", HL7Exception.UNSUPPORTED_MESSAGE_TYPE); 248 | } 249 | } 250 | else 251 | throw new HL7Exception("MSH.10 not available", HL7Exception.UNSUPPORTED_MESSAGE_TYPE); 252 | } 253 | catch (System.IndexOutOfRangeException e) 254 | { 255 | throw new HL7Exception("Can't find message structure (MSH.9.3) - " + e.Message, HL7Exception.UNSUPPORTED_MESSAGE_TYPE); 256 | } 257 | 258 | try 259 | { 260 | this._MessageControlID = MSHFields[9]; 261 | 262 | if (String.IsNullOrEmpty(this._MessageControlID)) 263 | throw new HL7Exception("MSH.10 - Message Control ID not found", HL7Exception.REQUIRED_FIELD_MISSING); 264 | } 265 | catch (Exception ex) 266 | { 267 | throw new HL7Exception("Error occured while accessing MSH.10 - " + ex.Message, HL7Exception.REQUIRED_FIELD_MISSING); 268 | } 269 | 270 | try 271 | { 272 | this._ProcessingID = MSHFields[10]; 273 | 274 | if (String.IsNullOrEmpty(this._ProcessingID)) 275 | throw new HL7Exception("MSH.11 - Processing ID not found", HL7Exception.REQUIRED_FIELD_MISSING); 276 | } 277 | catch (Exception ex) 278 | { 279 | throw new HL7Exception("Error occured while accessing MSH.11 - " + ex.Message, HL7Exception.REQUIRED_FIELD_MISSING); 280 | } 281 | } 282 | else 283 | throw new HL7Exception("No Message Found", HL7Exception.BAD_MESSAGE); 284 | } 285 | catch (Exception ex) 286 | { 287 | throw new HL7Exception("Failed to validate the message with error - " + ex.Message, HL7Exception.BAD_MESSAGE); 288 | } 289 | 290 | return true; 291 | } 292 | 293 | //validation not required here as we haven't changed anything in message 294 | private String SerializeMessageWithoutValidate() 295 | { 296 | String strMessage = String.Empty; 297 | 298 | String mshString = string.Empty; 299 | List _segListOrdered = getAllSegmentsInOrder(); 300 | _segListOrdered.RemoveAll(o => o.Name.Equals("MSH")); 301 | 302 | try 303 | { 304 | Segment mshSegment = this.segmentList["MSH"]; 305 | mshString = mshSegment.Name + FieldDelimiters[0] + mshSegment.FieldList[1].Value + FieldDelimiters[0]; 306 | 307 | int indexField = 0; 308 | try 309 | { 310 | foreach (Field field in mshSegment.FieldList) 311 | { 312 | indexField++; 313 | if (indexField <= 2) 314 | continue; 315 | 316 | if (field.ComponentList.Count > 0) 317 | { 318 | int indexCom = 0; 319 | foreach (Component com in field.ComponentList) 320 | { 321 | indexCom++; 322 | if (com.SubComponentList.Count > 0) 323 | { 324 | int indexSubCom = 0; 325 | foreach (SubComponent subCom in com.SubComponentList) 326 | { 327 | indexSubCom++; 328 | mshString += subCom.Value; 329 | if (indexSubCom < com.SubComponentList.Count) 330 | mshString += FieldDelimiters[4]; 331 | } 332 | } 333 | else 334 | mshString += com.Value; 335 | 336 | if (indexCom < field.ComponentList.Count) 337 | mshString += FieldDelimiters[1]; 338 | } 339 | } 340 | else 341 | mshString += field.Value; 342 | 343 | if (indexField < mshSegment.FieldList.Count) 344 | mshString += FieldDelimiters[0]; 345 | } 346 | } 347 | catch (Exception ex) 348 | { 349 | throw new HL7Exception("Failed to serialize MSH segment with error - " + ex.Message, HL7Exception.SERIALIZATION_ERROR); 350 | } 351 | //mshString += DefaultSegmentSeparatorString[msgSegmentSeparatorIndex]; 352 | 353 | foreach (Segment seg in _segListOrdered) 354 | { 355 | strMessage += seg.Name + FieldDelimiters[0]; 356 | indexField = 0; 357 | foreach (Field field in seg.FieldList) 358 | { 359 | indexField++; 360 | if (field.ComponentList.Count > 0) 361 | { 362 | int indexCom = 0; 363 | foreach (Component com in field.ComponentList) 364 | { 365 | indexCom++; 366 | if (com.SubComponentList.Count > 0) 367 | { 368 | int indexSubCom = 0; 369 | foreach (SubComponent subCom in com.SubComponentList) 370 | { 371 | indexSubCom++; 372 | strMessage += subCom.Value; 373 | if (indexSubCom < com.SubComponentList.Count) 374 | strMessage += FieldDelimiters[4]; 375 | } 376 | } 377 | else 378 | strMessage += com.Value; 379 | 380 | if (indexCom < field.ComponentList.Count) 381 | strMessage += FieldDelimiters[1]; 382 | } 383 | } 384 | else 385 | strMessage += field.Value; 386 | 387 | if (indexField < seg.FieldList.Count) 388 | strMessage += FieldDelimiters[0]; 389 | } 390 | strMessage += DefaultSegmentSeparatorString[msgSegmentSeparatorIndex]; 391 | } 392 | 393 | strMessage = mshString + DefaultSegmentSeparatorString[msgSegmentSeparatorIndex] + strMessage; 394 | return strMessage.Trim(messageTrimChars); 395 | } 396 | catch (Exception ex) 397 | { 398 | throw new HL7Exception("Failed to serialize the message with error - " + ex.Message, HL7Exception.SERIALIZATION_ERROR); 399 | } 400 | } 401 | 402 | //validation required here as user might have changed the message 403 | /// 404 | /// Serialize the message in text format 405 | /// 406 | /// String with HL7 message 407 | public String SerializeMessage() 408 | { 409 | String strMessage = String.Empty; 410 | 411 | if (ValidateMessage()) 412 | { 413 | String mshString = string.Empty; 414 | List _segListOrdered = getAllSegmentsInOrder(); 415 | _segListOrdered.RemoveAll(o => o.Name.Equals("MSH")); 416 | 417 | try 418 | { 419 | Segment mshSegment = this.segmentList["MSH"]; 420 | mshString = mshSegment.Name + FieldDelimiters[0] + mshSegment.FieldList[1].Value + FieldDelimiters[0]; 421 | 422 | int indexField = 0; 423 | try 424 | { 425 | foreach (Field field in mshSegment.FieldList) 426 | { 427 | indexField++; 428 | if (indexField <= 2) 429 | continue; 430 | 431 | if (field.ComponentList.Count > 0) 432 | { 433 | int indexCom = 0; 434 | foreach (Component com in field.ComponentList) 435 | { 436 | indexCom++; 437 | if (com.SubComponentList.Count > 0) 438 | { 439 | int indexSubCom = 0; 440 | foreach (SubComponent subCom in com.SubComponentList) 441 | { 442 | indexSubCom++; 443 | mshString += subCom.Value; 444 | if (indexSubCom < com.SubComponentList.Count) 445 | mshString += FieldDelimiters[4]; 446 | } 447 | } 448 | else 449 | mshString += com.Value; 450 | 451 | if (indexCom < field.ComponentList.Count) 452 | mshString += FieldDelimiters[1]; 453 | } 454 | } 455 | else 456 | mshString += field.Value; 457 | 458 | if (indexField < mshSegment.FieldList.Count) 459 | mshString += FieldDelimiters[0]; 460 | } 461 | } 462 | catch (Exception ex) 463 | { 464 | throw new HL7Exception("Failed to serialize MSH segment with error - " + ex.Message, HL7Exception.SERIALIZATION_ERROR); 465 | } 466 | //mshString += DefaultSegmentSeparatorString[msgSegmentSeparatorIndex]; 467 | 468 | foreach (Segment seg in _segListOrdered) 469 | { 470 | strMessage += seg.Name + FieldDelimiters[0]; 471 | indexField = 0; 472 | foreach (Field field in seg.FieldList) 473 | { 474 | indexField++; 475 | if (field.ComponentList.Count > 0) 476 | { 477 | int indexCom = 0; 478 | foreach (Component com in field.ComponentList) 479 | { 480 | indexCom++; 481 | if (com.SubComponentList.Count > 0) 482 | { 483 | int indexSubCom = 0; 484 | foreach (SubComponent subCom in com.SubComponentList) 485 | { 486 | indexSubCom++; 487 | strMessage += subCom.Value; 488 | if (indexSubCom < com.SubComponentList.Count) 489 | strMessage += FieldDelimiters[4]; 490 | } 491 | } 492 | else 493 | strMessage += com.Value; 494 | 495 | if (indexCom < field.ComponentList.Count) 496 | strMessage += FieldDelimiters[1]; 497 | } 498 | } 499 | else 500 | strMessage += field.Value; 501 | 502 | if (indexField < seg.FieldList.Count) 503 | strMessage += FieldDelimiters[0]; 504 | } 505 | strMessage += DefaultSegmentSeparatorString[msgSegmentSeparatorIndex]; 506 | } 507 | 508 | strMessage = mshString + DefaultSegmentSeparatorString[msgSegmentSeparatorIndex] + strMessage; 509 | return strMessage.Trim(messageTrimChars); 510 | } 511 | catch (Exception ex) 512 | { 513 | throw new HL7Exception("Failed to serialize the message with error - " + ex.Message, HL7Exception.SERIALIZATION_ERROR); 514 | } 515 | } 516 | else 517 | throw new HL7Exception("Failed to validate updated message", HL7Exception.BAD_MESSAGE); 518 | } 519 | 520 | //get all segments in order as they appear in origional message 521 | //like this is the usual order IN1|1 IN2|1 IN1|2 IN2|2 522 | //segmentlist stroes segments based on key, so all the IN1s will be stored together without mainting the order 523 | private List getAllSegmentsInOrder() 524 | { 525 | List _list = new List(); 526 | 527 | foreach (String segName in SegmentList.Keys) 528 | { 529 | foreach (Segment seg in SegmentList[segName].List) 530 | { 531 | _list.Add(seg); 532 | } 533 | } 534 | 535 | List _listOrdered = _list.OrderBy(o => o.SequenceNo).ToList(); 536 | 537 | return _listOrdered; 538 | } 539 | 540 | /// 541 | /// Get the Value of specific Field/Component/SubCpomponent, throws error if field/component index is not valid 542 | /// 543 | /// Field/Component position in format SEGMENTNAME.FieldIndex.ComponentIndex.SubComponentIndex example PID.5.2 544 | /// Value of specified field/component/subcomponent 545 | public String getValue(String strValueFormat) 546 | { 547 | bool isValid = false; 548 | 549 | String segmentName = String.Empty; 550 | int fieldIndex = 0; 551 | int componentIndex = 0; 552 | int subComponentIndex = 0; 553 | int comCount = 0; 554 | String strValue = String.Empty; 555 | 556 | List AllComponents = MessageHelper.SplitString(strValueFormat, new char[] { '.' }); 557 | comCount = AllComponents.Count; 558 | 559 | isValid = validateValueFormat(AllComponents); 560 | 561 | if (isValid) 562 | { 563 | segmentName = AllComponents[0]; 564 | if (SegmentList.ContainsKey(segmentName)) 565 | { 566 | if (comCount == 4) 567 | { 568 | Int32.TryParse(AllComponents[1], out fieldIndex); 569 | Int32.TryParse(AllComponents[2], out componentIndex); 570 | Int32.TryParse(AllComponents[3], out subComponentIndex); 571 | 572 | try 573 | { 574 | strValue = SegmentList[segmentName].FieldList[fieldIndex - 1].ComponentList[componentIndex - 1].SubComponentList[subComponentIndex - 1].Value; 575 | } 576 | catch (Exception ex) 577 | { 578 | throw new HL7Exception("SubComponent not available - " + strValueFormat + " Error: " + ex.Message); 579 | } 580 | } 581 | else if (comCount == 3) 582 | { 583 | Int32.TryParse(AllComponents[1], out fieldIndex); 584 | Int32.TryParse(AllComponents[2], out componentIndex); 585 | 586 | try 587 | { 588 | strValue = SegmentList[segmentName].FieldList[fieldIndex - 1].ComponentList[componentIndex - 1].Value; 589 | } 590 | catch (Exception ex) 591 | { 592 | throw new HL7Exception("Component not available - " + strValueFormat + " Error: " + ex.Message); 593 | } 594 | } 595 | else if (comCount == 2) 596 | { 597 | Int32.TryParse(AllComponents[1], out fieldIndex); 598 | try 599 | { 600 | strValue = SegmentList[segmentName].FieldList[fieldIndex - 1].Value; 601 | } 602 | catch (Exception ex) 603 | { 604 | throw new HL7Exception("Field not available - " + strValueFormat + " Error: " + ex.Message); 605 | } 606 | } 607 | else 608 | { 609 | try 610 | { 611 | strValue = SegmentList[segmentName].Value; 612 | } 613 | catch (Exception ex) 614 | { 615 | throw new HL7Exception("Segment Value not available - " + strValueFormat + " Error: " + ex.Message); 616 | } 617 | } 618 | } 619 | else 620 | throw new HL7Exception("Segment Name not available"); 621 | } 622 | else 623 | throw new HL7Exception("Request Format is not valid"); 624 | 625 | return strValue; 626 | } 627 | 628 | /// 629 | /// Sets the Value of specific Field/Component/SubCpomponent, throws error if field/component index is not valid 630 | /// 631 | /// Field/Component position in format SEGMENTNAME.FieldIndex.ComponentIndex.SubComponentIndex example PID.5.2 632 | /// Value for the specified field/component 633 | /// boolean 634 | public bool setValue(String strValueFormat, String strValue) 635 | { 636 | bool isValid = false; 637 | bool isSet = false; 638 | 639 | String segmentName = String.Empty; 640 | int fieldIndex = 0; 641 | int componentIndex = 0; 642 | int subComponentIndex = 0; 643 | int comCount = 0; 644 | 645 | List AllComponents = MessageHelper.SplitString(strValueFormat, new char[] { '.' }); 646 | comCount = AllComponents.Count; 647 | 648 | isValid = validateValueFormat(AllComponents); 649 | 650 | if (isValid) 651 | { 652 | segmentName = AllComponents[0]; 653 | if (SegmentList.ContainsKey(segmentName)) 654 | { 655 | if (comCount == 4) 656 | { 657 | Int32.TryParse(AllComponents[1], out fieldIndex); 658 | Int32.TryParse(AllComponents[2], out componentIndex); 659 | Int32.TryParse(AllComponents[3], out subComponentIndex); 660 | 661 | try 662 | { 663 | SegmentList[segmentName].FieldList[fieldIndex - 1].ComponentList[componentIndex - 1].SubComponentList[subComponentIndex - 1].Value = strValue; 664 | isSet = true; 665 | } 666 | catch (Exception ex) 667 | { 668 | throw new HL7Exception("SubComponent not available - " + strValueFormat + " Error: " + ex.Message); 669 | } 670 | } 671 | else if (comCount == 3) 672 | { 673 | Int32.TryParse(AllComponents[1], out fieldIndex); 674 | Int32.TryParse(AllComponents[2], out componentIndex); 675 | 676 | try 677 | { 678 | SegmentList[segmentName].FieldList[fieldIndex - 1].ComponentList[componentIndex - 1].Value = strValue; 679 | isSet = true; 680 | } 681 | catch (Exception ex) 682 | { 683 | throw new HL7Exception("Component not available - " + strValueFormat + " Error: " + ex.Message); 684 | } 685 | } 686 | else if (comCount == 2) 687 | { 688 | Int32.TryParse(AllComponents[1], out fieldIndex); 689 | try 690 | { 691 | SegmentList[segmentName].FieldList[fieldIndex - 1].Value = strValue; 692 | isSet = true; 693 | } 694 | catch (Exception ex) 695 | { 696 | throw new HL7Exception("Field not available - " + strValueFormat + " Error: " + ex.Message); 697 | } 698 | } 699 | else 700 | { 701 | throw new HL7Exception("Cannot overwrite a Segment Value"); 702 | } 703 | } 704 | else 705 | throw new HL7Exception("Segment Name not available"); 706 | } 707 | else 708 | throw new HL7Exception("Request Format is not valid"); 709 | 710 | return isSet; 711 | } 712 | 713 | private bool validateValueFormat(List AllComponents) 714 | { 715 | String segNameRegEx = "[A-Z][A-Z][A-Z1-9]"; 716 | String otherRegEx = @"^[1-9]([0-9]{1,2})?$"; 717 | bool isValid = false; 718 | 719 | if (AllComponents.Count > 0) 720 | { 721 | if (System.Text.RegularExpressions.Regex.IsMatch(AllComponents[0], segNameRegEx)) 722 | { 723 | for (int i = 1; i < AllComponents.Count; i++) 724 | { 725 | if (System.Text.RegularExpressions.Regex.IsMatch(AllComponents[i], otherRegEx)) 726 | isValid = true; 727 | else 728 | return false; 729 | 730 | } 731 | } 732 | else 733 | isValid = false; 734 | } 735 | 736 | return isValid; 737 | } 738 | 739 | /// 740 | /// check if specified field has components 741 | /// 742 | /// Field/Component position in format SEGMENTNAME.FieldIndex.ComponentIndex.SubComponentIndex example PID.5.2 743 | /// boolean 744 | public bool IsComponentized(String strValueFormat) 745 | { 746 | bool isComponentized = false; 747 | bool isValid = false; 748 | 749 | String segmentName = String.Empty; 750 | int fieldIndex = 0; 751 | int comCount = 0; 752 | 753 | List AllComponents = MessageHelper.SplitString(strValueFormat, new char[] { '.' }); 754 | comCount = AllComponents.Count; 755 | 756 | isValid = validateValueFormat(AllComponents); 757 | 758 | if (isValid) 759 | { 760 | segmentName = AllComponents[0]; 761 | if (comCount >= 2) 762 | { 763 | try 764 | { 765 | Int32.TryParse(AllComponents[1], out fieldIndex); 766 | 767 | isComponentized = SegmentList[segmentName].FieldList[fieldIndex - 1].IsComponentized; 768 | } 769 | catch (Exception ex) 770 | { 771 | throw new HL7Exception("Field not available - " + strValueFormat + " Error: " + ex.Message); 772 | } 773 | } 774 | else 775 | throw new HL7Exception("Field not identified in request"); 776 | } 777 | else 778 | throw new HL7Exception("Request Format is not valid"); 779 | 780 | return isComponentized; 781 | } 782 | 783 | /// 784 | /// check if specified fields has repeatitions 785 | /// 786 | /// Field/Component position in format SEGMENTNAME.FieldIndex.ComponentIndex.SubComponentIndex example PID.5.2 787 | /// boolean 788 | public bool HasRepeatitions(String strValueFormat) 789 | { 790 | bool hasRepeatitions = false; 791 | bool isValid = false; 792 | 793 | String segmentName = String.Empty; 794 | int fieldIndex = 0; 795 | int comCount = 0; 796 | 797 | List AllComponents = MessageHelper.SplitString(strValueFormat, new char[] { '.' }); 798 | comCount = AllComponents.Count; 799 | 800 | isValid = validateValueFormat(AllComponents); 801 | 802 | if (isValid) 803 | { 804 | segmentName = AllComponents[0]; 805 | if (comCount >= 2) 806 | { 807 | try 808 | { 809 | Int32.TryParse(AllComponents[1], out fieldIndex); 810 | 811 | hasRepeatitions = SegmentList[segmentName].FieldList[fieldIndex - 1].HasRepetitions; 812 | } 813 | catch (Exception ex) 814 | { 815 | throw new HL7Exception("Field not available - " + strValueFormat + " Error: " + ex.Message); 816 | } 817 | } 818 | else 819 | throw new HL7Exception("Field not identified in request"); 820 | } 821 | else 822 | throw new HL7Exception("Request Format is not valid"); 823 | 824 | return hasRepeatitions; 825 | } 826 | 827 | /// 828 | /// check if specified component has sub components 829 | /// 830 | /// Field/Component position in format SEGMENTNAME.FieldIndex.ComponentIndex.SubComponentIndex example PID.5.2 831 | /// boolean 832 | public bool IsSubComponentized(String strValueFormat) 833 | { 834 | bool isSubComponentized = false; 835 | bool isValid = false; 836 | 837 | String segmentName = String.Empty; 838 | int fieldIndex = 0; 839 | int componentIndex = 0; 840 | int comCount = 0; 841 | 842 | List AllComponents = MessageHelper.SplitString(strValueFormat, new char[] { '.' }); 843 | comCount = AllComponents.Count; 844 | 845 | isValid = validateValueFormat(AllComponents); 846 | 847 | if (isValid) 848 | { 849 | segmentName = AllComponents[0]; 850 | if (comCount >= 3) 851 | { 852 | try 853 | { 854 | Int32.TryParse(AllComponents[1], out fieldIndex); 855 | Int32.TryParse(AllComponents[2], out componentIndex); 856 | 857 | isSubComponentized = SegmentList[segmentName].FieldList[fieldIndex - 1].ComponentList[componentIndex - 1].IsSubComponentized; 858 | } 859 | catch (Exception ex) 860 | { 861 | throw new HL7Exception("Component not available - " + strValueFormat + " Error: " + ex.Message); 862 | } 863 | } 864 | else 865 | throw new HL7Exception("Component not identified in request"); 866 | } 867 | else 868 | throw new HL7Exception("Request Format is not valid"); 869 | 870 | return isSubComponentized; 871 | } 872 | 873 | /// 874 | /// get acknowledgement message for this message 875 | /// 876 | /// String with ack message 877 | public String getACK() 878 | { 879 | String ackMsg = String.Empty; 880 | if (this.MessageStructure != "ACK") 881 | { 882 | ackMsg += "MSH" + new String(fieldDelimiters) + FieldDelimiters[0] + this.SegmentList["MSH"].FieldList[4].Value + FieldDelimiters[0] + this.SegmentList["MSH"].FieldList[5].Value + FieldDelimiters[0] + this.SegmentList["MSH"].FieldList[2].Value + FieldDelimiters[0] + this.SegmentList["MSH"].FieldList[3].Value + FieldDelimiters[0] + "ddmmyyyy" + FieldDelimiters[0] + this.SegmentList["MSH"].FieldList[7].Value + FieldDelimiters[0] + "ACK" + FieldDelimiters[0] + this.MessageControlID + FieldDelimiters[0] + this.ProcessingID + FieldDelimiters[0] + this.Version + this.DefaultSegmentSeparatorString[msgSegmentSeparatorIndex]; 883 | ackMsg += "MSA" + FieldDelimiters[0] + "AA" + FieldDelimiters[0] + this.MessageControlID + this.DefaultSegmentSeparatorString[msgSegmentSeparatorIndex]; 884 | } 885 | return ackMsg; 886 | } 887 | 888 | /// 889 | /// get negative ack for this message 890 | /// 891 | /// ack code like AR, AE 892 | /// error message to be sent with ACK 893 | /// String with ack message 894 | public String getNACK(String code, String errMsg) 895 | { 896 | String ackMsg = String.Empty; 897 | if (this.MessageStructure != "ACK") 898 | { 899 | ackMsg = String.Empty; 900 | ackMsg += "MSH" + new String(fieldDelimiters) + FieldDelimiters[0] + this.SegmentList["MSH"].FieldList[4].Value + FieldDelimiters[0] + this.SegmentList["MSH"].FieldList[5].Value + FieldDelimiters[0] + this.SegmentList["MSH"].FieldList[2].Value + FieldDelimiters[0] + this.SegmentList["MSH"].FieldList[3].Value + FieldDelimiters[0] + "ddmmyyyy" + FieldDelimiters[0] + this.SegmentList["MSH"].FieldList[7].Value + FieldDelimiters[0] + "ACK" + FieldDelimiters[0] + this.MessageControlID + FieldDelimiters[0] + this.ProcessingID + FieldDelimiters[0] + this.Version + this.DefaultSegmentSeparatorString[msgSegmentSeparatorIndex]; 901 | ackMsg += "MSA" + FieldDelimiters[0] + code + FieldDelimiters[0] + this.MessageControlID + FieldDelimiters[0] + errMsg + this.DefaultSegmentSeparatorString[msgSegmentSeparatorIndex]; 902 | } 903 | return ackMsg; 904 | } 905 | 906 | public bool AddNewSegment(Segment newSeg) 907 | { 908 | try 909 | { 910 | newSeg.SequenceNo = SegmentCount++; 911 | if (SegmentList.ContainsKey(newSeg.Name)) 912 | { 913 | SegmentList[newSeg.Name].List.Add(newSeg); 914 | } 915 | else 916 | { 917 | SegmentList.Add(newSeg.Name, newSeg); 918 | SegmentList[newSeg.Name].List.Add(newSeg); 919 | } 920 | return true; 921 | } 922 | catch (Exception ex) 923 | { 924 | SegmentCount--; 925 | throw new HL7Exception("Unable to add new segment Error - " + ex.Message); 926 | } 927 | } 928 | 929 | public List Segments() 930 | { 931 | return getAllSegmentsInOrder(); 932 | } 933 | 934 | public List Segments(String segmentName) 935 | { 936 | return getAllSegmentsInOrder().FindAll(o=> o.Name.Equals(segmentName)); 937 | } 938 | 939 | public Segment DefaultSegment(String segmentName) 940 | { 941 | return getAllSegmentsInOrder().First(o => o.Name.Equals(segmentName)); 942 | } 943 | } 944 | 945 | } 946 | -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/j4jayant.HL7.Parser/MessageHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Globalization; 5 | using System.Text; 6 | using System.Text.RegularExpressions; 7 | 8 | namespace j4jayant.HL7.Parser 9 | { 10 | public static class MessageHelper 11 | { 12 | 13 | static MessageHelper() 14 | { 15 | } 16 | 17 | public static List SplitString(String strStringToSplit, String[] strSplitBy, StringSplitOptions splitOptions = StringSplitOptions.None) 18 | { 19 | return strStringToSplit.Split(strSplitBy, splitOptions).ToList(); 20 | } 21 | 22 | public static List SplitString(String strStringToSplit, char[] chSplitBy, StringSplitOptions splitOptions = StringSplitOptions.None) 23 | { 24 | return strStringToSplit.Split(chSplitBy, splitOptions).ToList(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/j4jayant.HL7.Parser/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("j4jayant.HL7.Parser")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("j4jayant.HL7.Parser")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b1a06d84-5854-4923-aade-df2c4877b9ec")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/j4jayant.HL7.Parser/Segment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace j4jayant.HL7.Parser 7 | { 8 | public class Segment 9 | { 10 | private String _Value; 11 | private String _Name; 12 | //internal Segment.SegmentList _list; 13 | private List _List; 14 | private Char[] fieldDelimiters = new Char[] { '|', '^', '~', '&' }; 15 | private short seqNo = 0; 16 | 17 | internal Char[] FieldDelimiters 18 | { 19 | get { return fieldDelimiters; } 20 | set { fieldDelimiters = value; } 21 | } 22 | 23 | //public List FieldList { get; set; } 24 | internal FieldCollection FieldList { get; set; } 25 | 26 | public Segment() 27 | { 28 | //FieldList = new List(); 29 | FieldList = new FieldCollection(); 30 | } 31 | 32 | public Segment(String pName) 33 | { 34 | //FieldList = new List(); 35 | FieldList = new FieldCollection(); 36 | _Name = pName; 37 | } 38 | 39 | public String Name 40 | { 41 | get 42 | { 43 | return _Name; 44 | } 45 | set 46 | { 47 | _Name = value; 48 | } 49 | } 50 | 51 | internal short SequenceNo 52 | { 53 | get 54 | { 55 | return seqNo; 56 | } 57 | set 58 | { 59 | seqNo = value; 60 | } 61 | } 62 | 63 | internal String Value 64 | { 65 | get 66 | { 67 | return _Value; 68 | } 69 | set 70 | { 71 | _Value = value; 72 | if (_Value.Length > 0) 73 | { 74 | //FieldList = new List(); 75 | 76 | char[] fieldSeparatorString = new char[1] { FieldDelimiters[0] }; 77 | List AllFields = MessageHelper.SplitString(_Value, fieldSeparatorString); 78 | 79 | if (AllFields.Count > 1) 80 | { 81 | if (Name == "MSH") 82 | { 83 | AllFields[0] = new String(fieldSeparatorString); 84 | } 85 | else 86 | AllFields.RemoveAt(0); 87 | 88 | foreach (String strField in AllFields) 89 | { 90 | Field field = new Field(); 91 | field.FieldDelimiters = new Char[3] { FieldDelimiters[1], FieldDelimiters[2], FieldDelimiters[3] }; 92 | field.Value = strField; 93 | FieldList.Add(field); 94 | } 95 | } 96 | else 97 | { 98 | Field field = new Field(); 99 | field.FieldDelimiters = new Char[3] { FieldDelimiters[1], FieldDelimiters[2], FieldDelimiters[3] }; 100 | field.Value = _Value; 101 | FieldList.Add(field); 102 | } 103 | } 104 | } 105 | 106 | } 107 | 108 | internal List List 109 | { 110 | get 111 | { 112 | if (_List == null) 113 | _List = new List(); 114 | return _List; 115 | } 116 | set 117 | { 118 | _List = value; 119 | } 120 | } 121 | 122 | public bool AddNewField(Field field) 123 | { 124 | try 125 | { 126 | this.FieldList.Add(field); 127 | return true; 128 | } 129 | catch (Exception ex) 130 | { 131 | throw new HL7Exception("Unable to add new field in segment " + this.Name + " Error - " + ex.Message); 132 | } 133 | } 134 | 135 | public bool AddNewField(Field field, int position) 136 | { 137 | position = position - 1; 138 | try 139 | { 140 | this.FieldList.Add(field, position); 141 | return true; 142 | } 143 | catch (Exception ex) 144 | { 145 | throw new HL7Exception("Unable to add new field in segment " + this.Name + " Error - " + ex.Message); 146 | } 147 | } 148 | 149 | public Field Fields(int position) 150 | { 151 | position = position - 1; 152 | Field field = null; 153 | 154 | try 155 | { 156 | field = FieldList[position]; 157 | } 158 | catch (Exception ex) 159 | { 160 | throw new HL7Exception("Field not availalbe Error-" + ex.Message); 161 | } 162 | 163 | return field; 164 | } 165 | 166 | public List GetAllFields() 167 | { 168 | return FieldList; 169 | } 170 | } 171 | 172 | } 173 | -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/j4jayant.HL7.Parser/SubComponent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace j4jayant.HL7.Parser 7 | { 8 | public class SubComponent 9 | { 10 | private String _Value; 11 | 12 | public SubComponent() 13 | { 14 | } 15 | 16 | public SubComponent(String pValue) 17 | { 18 | _Value = pValue; 19 | } 20 | 21 | public String Value 22 | { 23 | get 24 | { 25 | if (_Value == null) 26 | return String.Empty; 27 | else 28 | return _Value; 29 | } 30 | set 31 | { 32 | _Value = value; 33 | 34 | } 35 | } 36 | 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/j4jayant.HL7.Parser/bin/Debug/j4jayant.HL7.Parser.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/j4jayant.HL7.Parser/bin/Debug/j4jayant.HL7.Parser.dll -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/j4jayant.HL7.Parser/bin/Debug/j4jayant.HL7.Parser.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/j4jayant.HL7.Parser/bin/Debug/j4jayant.HL7.Parser.pdb -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/j4jayant.HL7.Parser/bin/Release/Confused/j4jayant.HL7.Parser.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/j4jayant.HL7.Parser/bin/Release/Confused/j4jayant.HL7.Parser.dll -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/j4jayant.HL7.Parser/bin/Release/Confused/j4jayant.HL7.Parser.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/j4jayant.HL7.Parser/bin/Release/Confused/j4jayant.HL7.Parser.pdb -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/j4jayant.HL7.Parser/bin/Release/Confused/report.crdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/j4jayant.HL7.Parser/bin/Release/Confused/report.crdb -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/j4jayant.HL7.Parser/bin/Release/j4jayant.HL7.Parser.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/j4jayant.HL7.Parser/bin/Release/j4jayant.HL7.Parser.dll -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/j4jayant.HL7.Parser/bin/Release/j4jayant.HL7.Parser.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/j4jayant.HL7.Parser/bin/Release/j4jayant.HL7.Parser.pdb -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/j4jayant.HL7.Parser/j4jayant.HL7.Parser.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {687F3113-0395-4DBC-A332-C1A329516651} 9 | Library 10 | Properties 11 | j4jayant.HL7.Parser 12 | j4jayant.HL7.Parser 13 | v4.0 14 | 512 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | pdbonly 27 | true 28 | bin\Release\ 29 | TRACE 30 | prompt 31 | 4 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 60 | -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/j4jayant.HL7.Parser/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/j4jayant.HL7.Parser/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/j4jayant.HL7.Parser/obj/Debug/j4jayant.HL7.Parser.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\Jayant\Jayant\My Projects\HL7\j4jayant.HL7.Parser\j4jayant.HL7.Parser\bin\Debug\j4jayant.HL7.Parser.dll 2 | D:\Jayant\Jayant\My Projects\HL7\j4jayant.HL7.Parser\j4jayant.HL7.Parser\bin\Debug\j4jayant.HL7.Parser.pdb 3 | D:\Jayant\Jayant\My Projects\HL7\j4jayant.HL7.Parser\j4jayant.HL7.Parser\obj\Debug\j4jayant.HL7.Parser.dll 4 | D:\Jayant\Jayant\My Projects\HL7\j4jayant.HL7.Parser\j4jayant.HL7.Parser\obj\Debug\j4jayant.HL7.Parser.pdb 5 | C:\Users\jayant\Desktop\My Projects\j4jayant.HL7.Parser\j4jayant.HL7.Parser\bin\Debug\j4jayant.HL7.Parser.dll 6 | C:\Users\jayant\Desktop\My Projects\j4jayant.HL7.Parser\j4jayant.HL7.Parser\bin\Debug\j4jayant.HL7.Parser.pdb 7 | C:\Users\jayant\Desktop\My Projects\j4jayant.HL7.Parser\j4jayant.HL7.Parser\obj\Debug\ResolveAssemblyReference.cache 8 | C:\Users\jayant\Desktop\My Projects\j4jayant.HL7.Parser\j4jayant.HL7.Parser\obj\Debug\j4jayant.HL7.Parser.dll 9 | C:\Users\jayant\Desktop\My Projects\j4jayant.HL7.Parser\j4jayant.HL7.Parser\obj\Debug\j4jayant.HL7.Parser.pdb 10 | -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/j4jayant.HL7.Parser/obj/Debug/j4jayant.HL7.Parser.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/j4jayant.HL7.Parser/obj/Debug/j4jayant.HL7.Parser.dll -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/j4jayant.HL7.Parser/obj/Debug/j4jayant.HL7.Parser.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/j4jayant.HL7.Parser/obj/Debug/j4jayant.HL7.Parser.pdb -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/j4jayant.HL7.Parser/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/j4jayant.HL7.Parser/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/j4jayant.HL7.Parser/obj/Release/j4jayant.HL7.Parser.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\Jayant\Jayant\My Projects\HL7\j4jayant.HL7.Parser\j4jayant.HL7.Parser\bin\Release\j4jayant.HL7.Parser.dll 2 | D:\Jayant\Jayant\My Projects\HL7\j4jayant.HL7.Parser\j4jayant.HL7.Parser\bin\Release\j4jayant.HL7.Parser.pdb 3 | D:\Jayant\Jayant\My Projects\HL7\j4jayant.HL7.Parser\j4jayant.HL7.Parser\obj\Release\j4jayant.HL7.Parser.dll 4 | D:\Jayant\Jayant\My Projects\HL7\j4jayant.HL7.Parser\j4jayant.HL7.Parser\obj\Release\j4jayant.HL7.Parser.pdb 5 | D:\Jayant\Jayant\My Projects\HL7\j4jayant.HL7.Parser\j4jayant.HL7.Parser\obj\Release\j4jayant.HL7.Parser.csprojResolveAssemblyReference.cache 6 | -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/j4jayant.HL7.Parser/obj/Release/j4jayant.HL7.Parser.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/j4jayant.HL7.Parser/obj/Release/j4jayant.HL7.Parser.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/j4jayant.HL7.Parser/obj/Release/j4jayant.HL7.Parser.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/j4jayant.HL7.Parser/obj/Release/j4jayant.HL7.Parser.dll -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/j4jayant.HL7.Parser/obj/Release/j4jayant.HL7.Parser.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/j4jayant.HL7.Parser/obj/Release/j4jayant.HL7.Parser.pdb -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/testHL7Parser/Form1.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace testHL7Parser 2 | { 3 | partial class Form1 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.txtResult = new System.Windows.Forms.RichTextBox(); 32 | this.btnGetPID3 = new System.Windows.Forms.Button(); 33 | this.btnAddPV110 = new System.Windows.Forms.Button(); 34 | this.SuspendLayout(); 35 | // 36 | // txtResult 37 | // 38 | this.txtResult.Location = new System.Drawing.Point(13, 13); 39 | this.txtResult.Name = "txtResult"; 40 | this.txtResult.Size = new System.Drawing.Size(720, 271); 41 | this.txtResult.TabIndex = 0; 42 | this.txtResult.Text = ""; 43 | // 44 | // btnGetPID3 45 | // 46 | this.btnGetPID3.Location = new System.Drawing.Point(13, 291); 47 | this.btnGetPID3.Name = "btnGetPID3"; 48 | this.btnGetPID3.Size = new System.Drawing.Size(75, 23); 49 | this.btnGetPID3.TabIndex = 1; 50 | this.btnGetPID3.Text = "Get PID-3"; 51 | this.btnGetPID3.UseVisualStyleBackColor = true; 52 | // 53 | // btnAddPV110 54 | // 55 | this.btnAddPV110.Location = new System.Drawing.Point(95, 291); 56 | this.btnAddPV110.Name = "btnAddPV110"; 57 | this.btnAddPV110.Size = new System.Drawing.Size(75, 23); 58 | this.btnAddPV110.TabIndex = 2; 59 | this.btnAddPV110.Text = "Add PV1-10"; 60 | this.btnAddPV110.UseVisualStyleBackColor = true; 61 | // 62 | // Form1 63 | // 64 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 65 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 66 | this.ClientSize = new System.Drawing.Size(851, 373); 67 | this.Controls.Add(this.btnAddPV110); 68 | this.Controls.Add(this.btnGetPID3); 69 | this.Controls.Add(this.txtResult); 70 | this.Name = "Form1"; 71 | this.Text = "Form1"; 72 | this.Load += new System.EventHandler(this.Form1_Load); 73 | this.ResumeLayout(false); 74 | 75 | } 76 | 77 | #endregion 78 | 79 | private System.Windows.Forms.RichTextBox txtResult; 80 | private System.Windows.Forms.Button btnGetPID3; 81 | private System.Windows.Forms.Button btnAddPV110; 82 | } 83 | } 84 | 85 | -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/testHL7Parser/Form1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | using j4jayant.HL7.Parser; 10 | 11 | namespace testHL7Parser 12 | { 13 | public partial class Form1 : Form 14 | { 15 | string strHL7Message = string.Empty; 16 | 17 | public Form1() 18 | { 19 | InitializeComponent(); 20 | } 21 | 22 | private void Form1_Load(object sender, EventArgs e) 23 | { 24 | strHL7Message = @"MSH|^~\&|ADT|ADI|ADT-1|ADI-1|20050215||ADT^A01|MSGADT003|T|2.4" + "\r" + 25 | "EVN|A01|20031016000000" + "\r" + 26 | "PID|1|111222333|H123123^^^^MR^ADT~111-222-333^^^^SS^ADT||John^Smith|GARSEN^^Melissa|19380818|M||2028-9|241 AVE^^Lake City^WA^98125^^^^100|100|(425)111-2222|(425)111-2222||S|CHR|1234567|111-222-333" + "\r" + 27 | "NK1|2|GARSEN^Melissa" + "\r" + 28 | "PV1|1|E|||||D123^Jeff^Carron|||MED||||7|||D123^Jeff^Taylor|E|3454|R^20050215|||||||||||||||||||EM|||||20050215" + "\r" + 29 | "IN1|1|I123|ICOMP1|INS COMP 1|PO BOX 1^^Lake City^WA^98125||||||||||1|John^Smith|01|19380818" + "\r" + 30 | "IN2|1||RETIRED" + "\r" + 31 | "IN1|2|I456|ICOMP2|INS COMP 1|PO BOX 2^^Lake City^WA^98125||||||||||8|John^Smith|01|19380818" + "\r" + 32 | "IN2|2||RETIRED" + "\r"; 33 | 34 | txtResult.AppendText(strHL7Message); 35 | txtResult.AppendText("\n\n\n"); 36 | 37 | j4jayant.HL7.Parser.Message hl7Message = new j4jayant.HL7.Parser.Message(strHL7Message); 38 | bool isParsed = false; 39 | try 40 | { 41 | isParsed = hl7Message.ParseMessage(); 42 | } 43 | catch (Exception ex) 44 | { 45 | 46 | } 47 | 48 | if (isParsed) 49 | { 50 | txtResult.AppendText("Get List of All Segments\n"); 51 | 52 | List segList = hl7Message.Segments(); 53 | 54 | foreach(Segment s in segList) 55 | { 56 | txtResult.AppendText(s.Name + "\n"); 57 | 58 | //foreach (Field f in s.GetAllFields()) 59 | //{ 60 | // txtResult.AppendText(f.Value); 61 | //} 62 | } 63 | 64 | txtResult.AppendText("Get all repetitions of IN1 Segment\n"); 65 | 66 | List segIN1List = hl7Message.Segments("IN1"); 67 | 68 | foreach (Segment s in segIN1List) 69 | { 70 | txtResult.AppendText(s.Name + "\n"); 71 | 72 | //foreach (Field f in s.GetAllFields()) 73 | //{ 74 | // txtResult.AppendText(f.Value); 75 | //} 76 | } 77 | 78 | 79 | txtResult.AppendText("Get particular IN1 segment, second repetition\n"); 80 | 81 | Segment segIN1_2 = hl7Message.Segments("IN1")[1]; 82 | 83 | int fieldIndex = 1; 84 | foreach (Field f in segIN1_2.GetAllFields()) 85 | { 86 | txtResult.AppendText("IN1." + fieldIndex++ + ": " + f.Value + "\n"); 87 | } 88 | 89 | txtResult.AppendText("Get count of all the IN1s in the message\n"); 90 | 91 | int in1Count = hl7Message.Segments("IN1").Count; 92 | 93 | txtResult.AppendText("Count of IN1s in message: " + in1Count+ "\n"); 94 | 95 | 96 | txtResult.AppendText("Access Field Value\n"); 97 | 98 | txtResult.AppendText("MSH-4: " + hl7Message.getValue("MSH.4") + "\n"); 99 | txtResult.AppendText("MSH-4: " + hl7Message.DefaultSegment("MSH").Fields(4).Value + "\n"); 100 | txtResult.AppendText("MSH-4: " + hl7Message.Segments("MSH")[0].Fields(4).Value + "\n"); 101 | 102 | txtResult.AppendText("Check if field is componentized\n"); 103 | 104 | txtResult.AppendText("is PV1-7 componentized: " + hl7Message.IsComponentized("PV1.7") + "\n"); 105 | txtResult.AppendText("is PV1-7 componentized: " + hl7Message.DefaultSegment("PV1").Fields(7).IsComponentized + "\n"); 106 | txtResult.AppendText("is PV1-7 componentized: " + hl7Message.Segments("PV1")[0].Fields(7).IsComponentized + "\n"); 107 | 108 | 109 | txtResult.AppendText("Check if field has repetitions\n"); 110 | 111 | txtResult.AppendText("is PID-3 rereated?: " + hl7Message.HasRepeatitions("PID.3") + "\n"); 112 | txtResult.AppendText("is PID-3 repeated?: " + hl7Message.DefaultSegment("PID").Fields(3).HasRepetitions + "\n"); 113 | txtResult.AppendText("is PID-3 repeated?: " + hl7Message.Segments("PID")[0].Fields(3).HasRepetitions + "\n"); 114 | 115 | } 116 | } 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/testHL7Parser/Form1.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/testHL7Parser/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Windows.Forms; 5 | 6 | namespace testHL7Parser 7 | { 8 | static class Program 9 | { 10 | /// 11 | /// The main entry point for the application. 12 | /// 13 | [STAThread] 14 | static void Main() 15 | { 16 | Application.EnableVisualStyles(); 17 | Application.SetCompatibleTextRenderingDefault(false); 18 | Application.Run(new Form1()); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/testHL7Parser/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("testHL7Parser")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("testHL7Parser")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("4afebbe1-6b59-401a-8daa-149b6f72aa56")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/testHL7Parser/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.1 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace testHL7Parser.Properties 12 | { 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// Returns the cached ResourceManager instance used by this class. 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("testHL7Parser.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// Overrides the current thread's CurrentUICulture property for all 56 | /// resource lookups using this strongly typed resource class. 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/testHL7Parser/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/testHL7Parser/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.1 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace testHL7Parser.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/testHL7Parser/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/testHL7Parser/bin/Debug/j4jayant.HL7.Parser.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/testHL7Parser/bin/Debug/j4jayant.HL7.Parser.dll -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/testHL7Parser/bin/Debug/j4jayant.HL7.Parser.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/testHL7Parser/bin/Debug/j4jayant.HL7.Parser.pdb -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/testHL7Parser/bin/Debug/testHL7Parser.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/testHL7Parser/bin/Debug/testHL7Parser.exe -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/testHL7Parser/bin/Debug/testHL7Parser.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/testHL7Parser/bin/Debug/testHL7Parser.pdb -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/testHL7Parser/bin/Debug/testHL7Parser.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/testHL7Parser/bin/Debug/testHL7Parser.vshost.exe -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/testHL7Parser/bin/Debug/testHL7Parser.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/testHL7Parser/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/testHL7Parser/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/testHL7Parser/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/testHL7Parser/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/testHL7Parser/obj/x86/Debug/GenerateResource.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/testHL7Parser/obj/x86/Debug/GenerateResource.read.1.tlog -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/testHL7Parser/obj/x86/Debug/GenerateResource.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/testHL7Parser/obj/x86/Debug/GenerateResource.write.1.tlog -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/testHL7Parser/obj/x86/Debug/ResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/testHL7Parser/obj/x86/Debug/ResolveAssemblyReference.cache -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/testHL7Parser/obj/x86/Debug/testHL7Parser.Form1.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/testHL7Parser/obj/x86/Debug/testHL7Parser.Form1.resources -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/testHL7Parser/obj/x86/Debug/testHL7Parser.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/testHL7Parser/obj/x86/Debug/testHL7Parser.Properties.Resources.resources -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/testHL7Parser/obj/x86/Debug/testHL7Parser.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\jayant\Desktop\My Projects\j4jayant.HL7.Parser\testHL7Parser\bin\Debug\testHL7Parser.exe 2 | C:\Users\jayant\Desktop\My Projects\j4jayant.HL7.Parser\testHL7Parser\bin\Debug\testHL7Parser.pdb 3 | C:\Users\jayant\Desktop\My Projects\j4jayant.HL7.Parser\testHL7Parser\bin\Debug\j4jayant.HL7.Parser.dll 4 | C:\Users\jayant\Desktop\My Projects\j4jayant.HL7.Parser\testHL7Parser\bin\Debug\j4jayant.HL7.Parser.pdb 5 | C:\Users\jayant\Desktop\My Projects\j4jayant.HL7.Parser\testHL7Parser\obj\x86\Debug\ResolveAssemblyReference.cache 6 | C:\Users\jayant\Desktop\My Projects\j4jayant.HL7.Parser\testHL7Parser\obj\x86\Debug\testHL7Parser.Form1.resources 7 | C:\Users\jayant\Desktop\My Projects\j4jayant.HL7.Parser\testHL7Parser\obj\x86\Debug\testHL7Parser.Properties.Resources.resources 8 | C:\Users\jayant\Desktop\My Projects\j4jayant.HL7.Parser\testHL7Parser\obj\x86\Debug\GenerateResource.read.1.tlog 9 | C:\Users\jayant\Desktop\My Projects\j4jayant.HL7.Parser\testHL7Parser\obj\x86\Debug\GenerateResource.write.1.tlog 10 | C:\Users\jayant\Desktop\My Projects\j4jayant.HL7.Parser\testHL7Parser\obj\x86\Debug\testHL7Parser.exe 11 | C:\Users\jayant\Desktop\My Projects\j4jayant.HL7.Parser\testHL7Parser\obj\x86\Debug\testHL7Parser.pdb 12 | -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/testHL7Parser/obj/x86/Debug/testHL7Parser.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/testHL7Parser/obj/x86/Debug/testHL7Parser.exe -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/testHL7Parser/obj/x86/Debug/testHL7Parser.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j4jayant/hl7-cSharp-parser/ea487d27ff02d96546bc0b406269dcebfd865610/j4jayant.HL7.Parser/testHL7Parser/obj/x86/Debug/testHL7Parser.pdb -------------------------------------------------------------------------------- /j4jayant.HL7.Parser/testHL7Parser/testHL7Parser.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | x86 6 | 8.0.30703 7 | 2.0 8 | {2C1E25EA-95A2-4A9D-845F-9E174CD2E7D0} 9 | WinExe 10 | Properties 11 | testHL7Parser 12 | testHL7Parser 13 | v4.0 14 | Client 15 | 512 16 | 17 | 18 | x86 19 | true 20 | full 21 | false 22 | bin\Debug\ 23 | DEBUG;TRACE 24 | prompt 25 | 4 26 | 27 | 28 | x86 29 | pdbonly 30 | true 31 | bin\Release\ 32 | TRACE 33 | prompt 34 | 4 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | Form 51 | 52 | 53 | Form1.cs 54 | 55 | 56 | 57 | 58 | Form1.cs 59 | 60 | 61 | ResXFileCodeGenerator 62 | Resources.Designer.cs 63 | Designer 64 | 65 | 66 | True 67 | Resources.resx 68 | 69 | 70 | SettingsSingleFileGenerator 71 | Settings.Designer.cs 72 | 73 | 74 | True 75 | Settings.settings 76 | True 77 | 78 | 79 | 80 | 81 | {687F3113-0395-4DBC-A332-C1A329516651} 82 | j4jayant.HL7.Parser 83 | 84 | 85 | 86 | 93 | --------------------------------------------------------------------------------