HL7Spy v20.4.541 Released

  • Improvement – HL7 Transform – HL7 Transform Device – Add function to move a segment within a message
  • Improvement – HL7 Send – Better Retry and detection of broken connections
  • Improvement – HL7 Send – Add option to Close Connection after sending each message – Requested by Robert S @uk.ibm.com
  • Improvement – HL7 Send – Improve sizing of HL7 Send tool so that it takes up less space
  • Improvement – HL7 Editor – Add DragDrop support from Editor to Compare tool
  • Improvement – HL7 Editor – Add support for inserting a Base64 file into a message – Requested by Robert S @uk.ibm.com
  • Bug Fix – HL7 Send – Fix NRE when there is no HL7 Target selected

HL7Spy v2020.4.512

  • Improvement – HL7 Send – Allow sort by Hostname in the target selector dialog – request by David H. from hcahealthcare.com
  • Improvement – HL7 Send – Add timestamps to HL7Send events shown in UI
  • Improvement – HL7 Send – Improve Logging of HL7 protocol events
  • Improvement – Speed startup time by initializing Sqlite in background thread
  • Improvement – HL7 Transform – Add InsertSegmentBefore, InsertSegmentAfter, ToUpper, ToLower, RegexReplace functions to HL7Transform
  • Bug Fix – HL7 Send – Fix issue where HL7 connection is closed between each message is sent using the “Single” button
  • Bug Fix – HL7 Core – Better handling of escape sequences in HL7 messages
  • Bug Fix – Custom Code – Fix issue where the Plugin folder now includes name and version of HL7Spy where it did not in the past – reported by Richard F. from healthcatalyst.com
  • Bug Fix – Custom Code – Fix issue where newly added, or removed assembly references are not properly handled by the intellisense editor
  • Bug Fix – HL7 Transform – RemoveSegment function not working – reported by Jeff D. from hicgrp.com
  • Bug Fix – [InvalidOperationException] Invoke or BeginInvoke cannot be called on a control until the window handle has been created.
  • Bug Fix – Unexpected exception in setting error indicators (129,{Line=-1,Character=-1}). System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.

How do I set the second identifier in the PID-3 field?

I need to set a 2nd field of a repeated field. For example, how do I set the second identifier for a patient in the PID-3 field? 

There are many ways to handle values in a repeated field. The following sets of code all set the 2 patient identifier to “12345^^^ALT”.

    // set using named fields
    CX cx = pid.PatientIdentifierList_03[2];
    cx.IDNumber_01.Value = "12345";
    cx.AssigningAuthority_04.NamespaceID_01.Value = "ALT";
    
    // set using the segment
    pid[3,2,1] = "12345";
    pid[3,2,4] = "ALT";
    
    // set using the message and a fully qualified Path
    message["PID-3[2].1"] = "12345";
    message["PID-3[2].4"] = "ALT";
    
    // set using the message with explicit SEG, FIELD, REPEAT, COMPONENT, SUBCOMPONENT
    message["PID", 1, 3, 2, 1] = "12345";
    message["PID", 1, 3, 2, 4] = "ALT";

HL7Spy v20.4.466 Released

  • Improvement – Better support for high res monitors – request by Alexander F. from xsolis.com
  • Improvement – Bulk Compare – Add feature to flag hl7 messages with differing segment orders – request by Jeff D. from hicgrp.com
  • Improvement – Custom Code – Better support for assembly references which have binding redirects
  • Improvement – Update all 3rd Party libraries to incorporate bug fixes and performance improvements made by our partners
  • Bug Fix – HL7 Standard – Fix exception thrown when setting the SplitterDistance to an invalid value
  • Bug Fix – Custom Code – Fix issue where the wrong CustomCode function is selected when a search is performed
  • Bug Fix – Ftp Explorer sometimes becomes unresponsive
  • Bug Fix – Ftp Browser – Fix tab stops in Password Dialog – requested by jeff.drumm@hicgrp.com
  • Bug Fix – Application Settings – Fix issue introduced in v20.4.450 where settings do not get stored correctly
  • Bug Fix – HL7 SQL/Sql Loader – Fix databinding error resulting in ResultsToNewTab not being stored correctly
  • Bug Fix – Cloverleaf Reader – Fix Sqlite password form size in designer
  • Bug Fix – Cloverleaf Reader – Ftp Explorer – Fix [AggregateException] A Task’s exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread.
  • Bug Fix – HL7 Editor – Fix NRE in MessageCollection.Dispose

HL7Spy 2020.4.413 Released

  • Improvement – Update UI libraries to include new capabilities to Grid and Tree controls
  • Improvement – Update Rebex libraries for improved FTP/FTPS support
  • Improvement – Custom Code – Add function to replace illegal characters in an HL7 message
  • Bug Fix – Application – Fix: [ArgumentException] Form showDialog tried to set an ineligible form as its owner. Forms cannot own themselves or their owners. when closing the SplashScreen
  • Bug Fix – Fix [ArgumentException] Invalid HL7Path ‘[1]-0’ in BuildReportTask
  • Bug Fix – HL7 Send – Fix NRE when there are no destinations selected and the “Connect” button is clicked
  • Bug Fix – HL7 Editor – fix NRE in HL7Editor.SetDocument
  • Bug Fix – HL7 Editor – fix [ArgumentOutOfRangeException] Specified argument was out of the range of valid values.

HL7Spy v2020.3.565 Released

  • Improvement – Segment – Add commonly used operations, such as Field Statistics, when you right-click on node within the segment editor – request by Paul @diridium.com
  • Improvement – Ftp Explorer – Automatically check for new messages when double-click the file, if it is already opened
  • Improvement – Better Layout of all windows and dialogs with scaling set to 300% – requested by Ben @zotecpartners.com
  • Bug Fix – Application – Saving/Restoring current Application Window Layout not working properly in some cases
  • Bug Fix – Application – [InvalidOperationException] Cross-thread operation not valid: Control ‘ShellView’ accessed from a thread other than the thread it was created on.
  • Bug Fix – HL7 Editor – Cntrl-V does not paste into the Find window when it is active and has focus – reported by Jeff D. @hicgrp.com
  • Bug Fix – HL7 Editor – Messages starting with MSH|^~\| rather than MSH|^~\&| do not get loaded properly in HL7Spy without changing the message framing
  • Bug Fix – Field Statistics – If there is an invalid value in a DTM, INT, or DOUBLE type, the sorting stops working
  • Bug Fix – Error initializing SettingsManagerBase. [UnauthorizedAccessException] Access to the registry key ‘HKEY_LOCAL_MACHINE\SOFTWARE\Inner Harbour\SqlLoader’ is denied
  • Bug Fix – FTP Explorer – Tail is not working – Reported By Alfred @musc.edu
  • Big Fix – FTP Explorer – Issue where opening a single compressed file in FTP Explorer does not correctly open – Reported by Alfred @musc.edu
  • Bug Fix – Error in BulkCompareView.RunInternal. [InvalidOperationException] Collection was modified; enumeration operation may not execute.
  • Bug Fix – Statistics View – [NullReferenceException] Object reference not set to an instance of an object.
  • Bug Fix – Custom Code View – Mouse selection issue in the Custom Code Editor with collapsed regions
  • Bug Fix – Custom Code View – Issue where Custom Code tool was not being restored to its saved state

How can I debug Custom Code in Visual Studio?

I would like to debug the code that I have written in HL7Spy. How do I do this?

If you have Visual Studio installed, you can add Break(); to the OnStart() method of your custom code to trigger the Visual Studio debugger to launch when you push the “Run” button in the user interface.

  public override void OnStart()
  {
    this.Break();
  }

Once you are in Visual Studio you can set break-points, watch variables, etc.

How do I remove the OBR segments that do not contain any corresponding OBX records?

Question: How do I remove the OBR segments that do not contain any corresponding OBX records

To do this you can loop through the OrderGroups in the message and remove all OBRs except the first one.

  public override void Run()
  {
    // Get an HL7 Message in parsed format
    HL7Message message = GetParsedMessage();
    foreach(OrderGroup order in message.GetOrderGroups())
    {
       int end = order.OBXs.Count == 0 ? order.OBRs.Count : order.OBRs.Count -1;
       for(int i = 0; i < end; ++i)
       {
          OBR obr = order.OBRs[i];
          message.Remove(obr);
       }
    }

    SaveMessage(message, "Modified");
  }
  

How do I find all ADTs where the discharge date (PV1-45) and message date (MSH-7) differ by 30 days?

Question: How do I find all ADT messages in a tab where the date/time of the message and the discharge date of the patient is 30 days or more?

To do this you need to need to parse the PV1-45 field into an HL7DateTime and compare it to the MSH-7 date time. There is a shortcut to the MSH-7 field on the message object called MessageDateTime which can be used instead of parsing the MSH-7 field.

 public override void Run()
 {
    // Get an HL7 Message in parsed format
    HL7Message message = GetParsedMessage();

    // if the message is not an ADT, or doesn't have a PV1 segment, skip it
    if(message.MessageCode != "ADT" || message.PV1 == null)
      return;
    
    if(message.MessageDateTime == null)
      return; // if we don't have a message date/time
    
    HL7DateTime dt;
    // try to parse the HL7 DTM
    if(!HL7DateTime.TryParse(message.PV1.DischargeDateTime_45.Value, out dt))
      return; // if we can't parse it successfully, skip it

    TimeSpan delta = dt.DateTimeOffset - message.MessageDateTime.Value;
    if(delta.TotalDays >= 30)
      SaveMessage(message, "old adt"); // save the message if it is older than our OldestDate
  }

HL7Spy v2020.3.494 Released

  • Improvement – Updates/Improvements to Core UI Libraries
  • Improvement – Custom Code – Updates/Improvements to .NET C# language libraries and editor
  • Improvement – Add the DynamicClass Identifier to the output window when compiling so that the user knows how to retrieve a backup from the backup folder
  • Improvement – Better handling of invalid characters in HL7 Message
  • Improvement – Better handling of Parser Errors/Warnings in HL7Editor
  • Improvement – Set UseLargeBuffers to true in Rebex Ftp and Sftp for better performance
  • Improvement – Speed up loading of messages
  • Improvement – BulkCompare – Speed up showing of Master/Detail results
  • Improvement – Remove even row appearance in BulkCompare tool because it looks too cluttered
  • Improvement – Sql Loader – Add option to enable/disable Even Row Appearance
  • Improvement – Statistics View – Change row and selection highlighting
  • Improvement – Custom Code – Add method HL7Segment.GetOrCreate to get or create HL7Subcomponents
  • Improvement – Custom Code – Do not create empty repeats/components/subcomponents when setting string.Empty
  • Improvement – Improve implementation of IsNull, Coalesce, == null, etc
  • Improvement – Custom Coe – Add BaseSegment.IsFieldNullOrEmpty
  • Improvement – Everywhere – Take advantage of new Devexpress search in grid column feature
  • Improvement – Bulk Compare – Highlight rows in the summary that have messages with errors
  • Improvement – Ftp Explorer – Update Rebex Libraries to take advantage of new features
  • Improvement – Everywhere – Update Devexpress Libraries to take advantage of new features
  • Bug Fix – HL7 SQL – Closing any tab always cancels the existing query
  • Bug Fix – Fix [ArgumentException] This causes two bindings in the collection to bind to the same property.
  • Bug Fix – Fix Unexpected exception in HighlightActiveField. [IndexOutOfRangeException] Index was outside the bounds of the array.
  • Bug Fix – Custom Code – Fix [NullReferenceException] Object reference not set to an instance of an object.
  • Bug Fix – Fix NRE when Custom Code Tool is hidden at startup then activated
  • Bug Fix – Fix NRE in HL7Spy.Views.MessageCollectionView.MessageEditorView.ShowMessagePropertiesView()>
  • Big Fix – Fix resizing of the FTP/SFTP Server Tree
  • Bug Fix – Fix up ToolStripSpringTextBox just for use in FileBrowser
  • Bug Fix – Fix issue where “Open Message in external editor” attempts to open the file with an empty editor path
  • Bug Fix – Fix NRE in SqlLoader DbConnection form
  • Bug Fix – Export – Fix Export of long file named message collections
  • Bug Fix – Custom Code – Fix issue with Connexion.Core appending new segments to HL7 Message
  • Bug Fix – Fix File in user exception when the Settings backup happens at start-up
  • Bug Fix – Fix ZSH-1 issue where Field is not being encoded properly into a Component
  • Bug Fix – Fix issue with detecting HL7Paths in an HL7Expression
  • Bug Fix – HL7 Message detection fixes – reported by Len F. from health.qld.gov.au
  • Bug Fix – Fix [XmlException] The ‘ ‘ character, hexadecimal value 0x20, cannot be included in a name.
  • Bug Fix – Fix unhandled exception when searching using the Multi-Value search tool
  • Bug Fix – Custom Code – Fix DateTimeOffset is not defaulting to the local DateTimeOffset when parsing HL7DateTime
  • Bug Fix – Fix issue where MSH-3, MSH-4, MSH-5 are not set correctly in the FHS and BHS segments – reported C.H @ tanaq.com
  • Bug Fix – Fix issue where message frame characters are set in each message within a batch. According the standard these should not be set. reported by C.H @ tanaq.com
  • Bug Fix – Fix threading issue with StringBuilder in HL7QueryView: [ArgumentOutOfRangeException] Index was out of range. Must be non-negative and less than the size of the collection.
  • Bug Fix – Fix HexEitorView.Selection [NullReferenceException] Object reference not set to an instance of an object.
  • Bug Fix – Fix: SplitCollectionView – [ParserException] Multiple MSHs found in message buffer at offset 1025
  • Bug Fix – Fix issue where opening files from the Ftp Explorer loads 0 messages when the configure type is a LocalFileSystem – Reported by A. Islam from health.qld.gov.au
  • Bug Fix – Message Editor – Selecting right-click option “Save Unescaped Field to File” does nothing
  • Bug Fix – Bulk Compare – Fix [NullReferenceException] Object reference not set to an instance of an object. in BulkCompare when message has errors in it
  • Bug Fix – Fix [NullReferenceException] Object reference not set to an instance of an object.
    at Be.Windows.Forms.HexEditorControl.Selection(Int64 offset, Int32 size)

HL7Spy 2020.2.296

  • Improvement – Bulk Difference Tool – Add support for Ignoring Extra Fields – Requested by Randall C. from vumc.org
  • Improvement – Add option to change the message framing in the Split Messages Tool – Requested by Mike T. from amwell.com
  • Improvement – Diff Tool – Update DiffView when settings change in BulkCompareView’s ignore fields
  • Improvement – Statistics – Add AverageSize to Message Statistics
  • Improvement – Remember message framing last used in SaveAs – Requested by Jeff D. from hicgrp.com
  • Improvement – HL7 Editor – Add support for changing the size that triggers field collapsing – Requested by Ruslan A. from rochesterregional.org
  • Improvement – HL7 Send – Add Clone functionality to clone an existing HL7 Target configuration – Requested by Jeff D. from hicgrp.com
  • Improvement – Diff Tool – Reduce flashing when comparing 2 messages
  • Improvement – Custom Code – Write out the custom code uid to the output window when compiling so a user can identify the correct backup file if an older version of the code needs to be restored
  • Bug Fix – Custom Code – Fix issue where when adding an assembly reference the code is blanked out – Reported by Charla from nehii.org
  • Bug Fix – HL7 Receive – Update the file name when the port changes – reported by Nick J. from Conevity
  • Bug Fix – Fix issue with formatting of DateTimes and exporting to Excel
  • Bug Fix – OBX-5 CWE not returning correct value for obx.ObservationValue_05.First.CWE_01.Text_02 – reported by Paul M. from BCCancer
  • Bug Fix – Diff Tool Fix jittering in synchronized scrolling
  • Bug Fix – Bulk Compare – Message Counts, File Path, and First Message Date time missing from dropdown
  • Bug Fix – HL7Send – Fix weird positioning of configuration window
  • Bug Fix – HL7Send – Fix up flickering when opening HL7 Send settings popup dialog
  • Bug Fix – HL7 Send – Clear the last error on each Send()
  • Bug Fix – HL7 Send – Fix issue where “Repeat” does not decrement to 0. Reported by Nick J. from Conevity
  • Bug Fix – HL7 Send – Fix issue where TargetSettings not being properly upgraded from v2.x – Reported by Matthew B. from corhio.org
  • Bug Fix – Custom Code Tool – Clone button does not work
  • Bug Fix – Hex Editor – Fix offset/size not shown in Hex Editor
  • Bug Fix – Fix sizing of count column in SqlLoader and HL7Query tool
  • Bug Fix – HL7Parser – Fix [IndexOutOfRangeException] Index was outside the bounds of the array.
  • Bug Fix – HL7Parser – Fix: [ArgumentOutOfRangeException] Index and length must refer to a location within the string.
  • Bug Fix – Ftp Explorer – Fix InvalidOperationException “Cannot send command to the server because the response for previous one was not received.” is sometimes thrown by FTP library
  • Bug Fix – Ftp Explorer – Fix issue were MessageFraming cannot be changed when files retrieved using the FTP Explorer – Reported by Brian G. from utmb.edu
  • Bug Fix – HL7 SQL – Execute Button is not restored if the tab being queried is closed