Results 1 to 4 of 4
  1. #1
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: ASCII Codes (2003)

    I don't think HL7 messages are meant to be viewed in Word; they need to be parsed by a HL7 parser.

    You can search for paragraph marks by typing ^p in the 'Find What' box; you can copy and paste other "codes" from the document into the Find and Replace dialog.

  2. #2
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Park City, Utah
    Posts
    189
    Thanks
    1
    Thanked 0 Times in 0 Posts

    ASCII Codes (2003)

    <P ID="edit" class=small>(Edited by jscher2000 on 02-Nov-04 09:36. Attachment removed.)</P>I'm trying to use Word to format an HL7 message. There are, however, certain codes I cannot search and replace and I do not know what they are. What I am trying to do is get the attached sample.doc with no line breaks or spaces, but I do not know what to search or replace or how to import this so the line breaks contained in it do not come in.

    Any help you can give is, as always, GREATLY appreciated.

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: ASCII Codes (2003)

    First, out of an excess of paranoia, I removed that attachment because it appeared to contain confidential information. For those interested, here is a general idea of the data structure (first 25%):
    <hr><pre>MSH|^~&|NAMEOFPERSON|INSTITUTION|TEXT||DA TETIME||ORM^O01|DATETIME|P|2.3||||
    EVN|O01|DATETIME|
    PID|1||50086^^^^^1||LASTNAME^FIRSTNAME^^^|^^^^|DOB |M|^^^^| (line break for posting)
    W|STREETADDRESS^^P^^091|091||||M|C|9000616^^^^^1|| |||||||</pre>

    <hr>
    Second, if you have the documentation for this format, you have many options for parsing it. As it is unformatted text, you can use the built-in VBA string-handling functions. For example, the Split() function can create an array of individual data fields if told the "delimiter" that separates them (in this case, it appears to be the | character). The array elements numbered 0 to whatever then match the data fields in the definition of the format.

    Does that help or, as suggested above, would it be easier to use dedicated software?

  4. #4
    3 Star Lounger
    Join Date
    Apr 2004
    Location
    Boston, Massachusetts, USA
    Posts
    389
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ASCII Codes (2003)

    If this is a large document, or there are many of them, I'd strongly suggest exploring the VBScript RegExp object. While VBA's string functions aren't bad, they're no match for real regular expressions, which would probably be the best tool for the job at hand.

    In fact, if I were facing this task, and new I wanted Word files as the end result, I'd consider a Perl script to parse it and try to format it with HTML tags, which Word can then easily import. Can you be more specific about the kind of formatting you're trying apply to this text?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •