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 5C48A9FA50E for ; Fri, 12 May 2006 19:01:11 -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 46951-09 for ; Fri, 12 May 2006 19:01:02 -0300 (ADT) X-Greylist: delayed 00:06:38.784793 by SQLgrey- Received: from sapo.pt (relay1.ptmail.sapo.pt [212.55.154.21]) by postgresql.org (Postfix) with SMTP id D9C169F9429 for ; Fri, 12 May 2006 19:01:01 -0300 (ADT) Received: (qmail 21597 invoked by uid 0); 12 May 2006 21:54:20 -0000 Received: from unknown (HELO sapo.pt) (10.134.35.152) by relay1 with SMTP; 12 May 2006 21:54:20 -0000 Received: (qmail 31559 invoked from network); 12 May 2006 21:54:20 -0000 X-AntiVirus: PTMail-AV 0.3-0.88.2 X-Virus-Status: Clean (0.00701 seconds) Received: from unknown (HELO hmv02) (hmv@[82.155.145.3]) (envelope-sender ) by mta2 (qmail-ldap-1.03) with SMTP for ; 12 May 2006 21:54:19 -0000 Message-ID: <005a01c6760e$9e55ca40$6200a8c0@hmv02> From: =?iso-8859-1?Q?H=E9lder_M._Vieira?= To: References: <1147453260.9755.116.camel@state.g2switchworks.com> <7D1BD819-CD34-4760-8C7A-89F944A4D589@scottshill.com> <4464CE12.8070900@commandprompt.com> Subject: Re: Copy HL7 record/file into PostgreSQL Table Date: Fri, 12 May 2006 22:54:18 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/162 X-Sequence-Number: 21694 HL7 is a complex standard, because the reality it tries to describe is complex. It was designed (and is still being designed) to allow the transfer of all kinds of information related with health institutions. So, depending on the specific institutions and purposes involved, either the HL7 messages flowing between them contain a small and simple set of useful information, and therefore might be parsed on the fly, or they contain a full load of technical, administrative and financial information and therefore demand a slightly more complex parser and a lot of related tables and business rules. I guess it would be important to Sean to get more specific information on the task, because the parser will probably be the least complicated part of it. Hélder M. Vieira ----- Original Message ----- From: "Joshua D. Drake" To: "Kenneth B. Hill" Cc: "Scott Marlowe" ; Sent: Friday, May 12, 2006 7:04 PM Subject: Re: [ADMIN] Copy HL7 record/file into PostgreSQL Table > 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.