X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 3AC679F946D for ; Fri, 12 May 2006 15:04:12 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 20809-01 for ; Fri, 12 May 2006 15:04:07 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from projects.commandprompt.com (host-130.commandprompt.net [207.173.203.130]) by postgresql.org (Postfix) with ESMTP id 3237F9FA293 for ; Fri, 12 May 2006 15:04:05 -0300 (ADT) Received: from [192.168.1.50] (or-67-76-146-141.sta.sprint-hsd.net [67.76.146.141]) (authenticated bits=0) by projects.commandprompt.com (8.13.6/8.13.4) with ESMTP id k4CI44j1021361; Fri, 12 May 2006 11:04:05 -0700 Message-ID: <4464CE12.8070900@commandprompt.com> Date: Fri, 12 May 2006 11:04:02 -0700 From: "Joshua D. Drake" Organization: Command Prompt, Inc. User-Agent: Mail/News 1.5 (X11/20060309) MIME-Version: 1.0 To: "Kenneth B. Hill" CC: Scott Marlowe , pgsql-admin@postgresql.org Subject: Re: Copy HL7 record/file into PostgreSQL Table References: <1147453260.9755.116.camel@state.g2switchworks.com> <7D1BD819-CD34-4760-8C7A-89F944A4D589@scottshill.com> In-Reply-To: <7D1BD819-CD34-4760-8C7A-89F944A4D589@scottshill.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.88.2, clamav-milter version 0.88.2 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (projects.commandprompt.com [192.168.2.159]); Fri, 12 May 2006 11:04:05 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/161 X-Sequence-Number: 21693 Kenneth B. Hill wrote: > An HL7 file is a tagged file used to transfer electronic health records. > The file looks like: > > MSH|^~\&|EPIC|EPICADT|SMS|SMSADT|199912271408|CHARRIS|ADT^A04|1817457| > EVN|A04|199912271408|||CHARRIS > PID||0493575^^^2^ID 1|454721||DOE^JOHN^^^^|DOE^JOHN^^^^|19480203|M| > NK1||CONROY^MARI^^^^|SPO||(216)731-4359||EC||||||||||||||||||||||||||| > PV1||O|168 ~219~C~PMA^^^^^^^^^||||277^ALLEN FADZL^BONNIE^^^^|||||||||| > You *might* actually not have to parse this... just use | as your delimiter with copy. SIncerely, Joshua D. Drake > You can download a PDF for details here: > > http://www.hl7.org/Special/IG/final.pdf > > -Ken > > On May 12, 2006, at 10:01 AM, Scott Marlowe wrote: > >> On Fri, 2006-05-12 at 11:41, Kenneth B. Hill wrote: >>> I'm looking for a way to get an HL7 file into a table. My current >>> thinking is I need to parse the HL7 file to a flat-file and use the >>> copy command. I would appreciate some guidance on doing this. Thank you. >> >> I'd love to help out. >> >> Just one thing... What's an HL7 file? > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: don't forget to increase your free space map settings > -- === The PostgreSQL Company: Command Prompt, Inc. === Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240 Providing the most comprehensive PostgreSQL solutions since 1997 http://www.commandprompt.com/