On 16/03/2007, at 10:03 PM, john dooley wrote:

Anyone able to show us how hard an ack is to generate? Im guessing its about 5 lines long..has a little demographics, a unique message ID and really wouldnt be that hard to produce for each imported .ORU

Hi John

Pretty good guess. It's exactly 5 lines in Genie, although there are a couple of sub-methods.

======================================================================== ==
` called from method importing HL7 formatted pathology results

$ackText:=HL_CreateACK ($sendingApp;$sendingFacility;$msgType;String ([Downloaded Results]ID);$theirMsgControlID;$receivingFacility;"";"") $outGoingFolder:=◊PathResultsFolder+"HL7 ACKS"+◊EEPathDelimiter+ $sendingFacility+◊EEPathDelimiter
$docRef:=Create document($outGoingFolder+$theirMsgControlID+"ACK.hl7")
SEND PACKET($DocRef;$ackText)
CLOSE DOCUMENT($DocRef)

========================================================================
  `Project Method: HL_CreateACK
  `
  `   Parameter        Type             Description
  ` $0                    Text              app we're replying to
  ` $1                    Text              facility we're replying to
` $2 Text the message type, pathology or a letter ` $3 Text Unique ID of the result or letter created in Genie ` $4 Text sending facilities unique ID for the message ` $5 Text the practice receiving the result or letter ` $6 Text the RF1 segment of the received message, simply returned ` $7 Text the PID segment of the received message, simply returned
  `Description:
  `
  `
  `Date        Init  Description
  `15/08//2005   PC   Initial version.

C_TEXT($0;$1;$2;$3;$4;$5;$6;$7;$8)
C_TEXT($text;$toApplication;$toFacility;$incomingType;$myMsgControlID; $theirMsgControlID;$RF1Segment;$PIDSegment;$outgoingType;$fromFacility)
C_TEXT($carrier)

$toApplication:=$1
$toFacility:=$2
$incomingType:=$3
$myMsgControlID:=$4
$theirMsgControlID:=$5
$fromFacility:=$6  `this would be the practice's EDI
$RF1Segment:=$7
$PIDSegment:=$8

Case of
        : ($incomingType="REF^I12")  ` a letter
                $outgoingType:="RRI^I12"
        Else
                $outgoingType:="ACK"  ` path result
End case

GetPracticePrefs ("Read only")

If ($fromFacility=[Practice Preferences]HealthLink Identifier)
        $carrier:="Healthlink"
Else
        $carrier:=""
End if

$text:=HL_MSHSegment ($toApplication;$toFacility;$outgoingType; $myMsgControlID;$carrier)
$text:=$text+HL_MSASegment ($theirMsgControlID)
If ($RF1Segment#"")
        $text:=$text+$RF1Segment+◊CR
End if

If ($PIDSegment#"")
        $text:=$text+$PIDSegment+◊CR
End if

UNLOAD RECORD([Practice Preferences])

$0:=$text `returned value
======================================================================== =========

  `Project Method: HL_MSHSegment
  `
  `   Parameter        Type             Description
` $1 text recipient's EHR, usually unknown ` $2 text identifier of recipent eg EDI for Healthlink, but could be email/provider number/name ` $3 text type of message eg Referral or ack ` $4 text unique id number of the record in Genie ` $5 text carrier of message eg Healthlink ` $0 text returned line of text for MSH Segment
  `Description:
  `
  `
  `Date        Init  Description
  `15/08/2005   PC   Initial version.

C_TEXT($0;$1;$2;$3;$4;$5)
C_TEXT($text;$from;$sendersEDI;$recipientsEHR;$recipientsEDI;$time; $type;$MsgControlID;$carrier)

$from:="Genie v"+String(◊Version)
$recipientsEHR:=$1
$recipientsEDI:=$2
$time:=SetDateFormat (GetCurrentDate ;8;"";">")+Replace string(String (CurrentTime );":";"")+"+1000"
$type:=$3
$MsgControlID:=$4
$carrier:=$5

Case of
        : ($carrier="Healthlink")
                $sendersEDI:=[Practice Preferences]HealthLink Identifier
                
        : ($carrier="Alltalk")
                $sendersEDI:=[Practice Preferences]Alltalk Identifier
                
        : ($carrier="2Hippo")
                If (Records in selection([Preferences])#0)
                        $sendersEDI:=[Preferences]Hippo Identifier
                Else   `when creating an ACK
                        $sendersEDI:=[Practice Preferences]Clinic Name
                End if
        Else
                
                If (Records in selection([Preferences])#0)
                        $sendersEDI:=[Preferences]Provider No
                Else
                        $sendersEDI:=[Practice Preferences]Clinic Name
                End if
End case

$text:="MSH|^~\\&"+◊Pipe+$from+◊Pipe+$sendersEDI+◊Pipe+$recipientsEHR +◊Pipe+$recipientsEDI+◊Pipe+$time+◊Pipe+◊Pipe+$type+◊Pipe+ $MsgControlID+◊Pipe+"P"+◊Pipe+"2.3.1^AUS"+◊CR

$0:=$text
======================================================================== ==============
Regards

Paul Carr
Genie Solutions Pty Ltd
80 Stamford Road, Indooroopilly 4068 Ph: 07 3720 2801 Fx: 07 3720 2802
www.geniesolutions.com.au



_______________________________________________
Gpcg_talk mailing list
[email protected]
http://ozdocit.org/cgi-bin/mailman/listinfo/gpcg_talk

Reply via email to