Question Jonathan Anglin · Jan 6, 2022

Problem to Solve: When an HL7 message hits a particular Process, I need to use the placer order number therein to query the messages that came in over the last 24 hours on a particular Service and grab discrete pieces of data that came in the latest message that has that placer order number.

The code I'm (currently) using looks like this:

<assign property='FullMessage'     action='set' value='"PID||TEST"' />
<sql>
    <![CDATA[SELECT Full_Message INTO :FullMessage, head.ID As ID, {fn RIGHT(%EXTERNAL(head.TimeCreated),999 )} As TimeCreated,
head.SessionId As Session,
head.Status As Status,
CASE head.IsError WHEN 1 THEN 'Error' ELSE 'OK' END As Error,
head.SourceConfigName As Source,
head.TargetConfigName As Target,
head.TargetConfigName,
head.MessageBodyClassName As BodyClassname,
(SELECT LIST(PropValue) FROM EnsLib_HL7.SearchTable WHERE head.MessageBodyId = DocId And PropId=7) As SchTbl_ORC2,
EnsLib_HL7.SearchTable.PropId As SchTbl_PropId,
head.MessageBodyId As BodyId,
EnsLib_HL7.Message.%ID As Body_ID,
EnsLib_HL7.Message.RawContent AS Full_Message
FROM Ens.MessageHeader head, EnsLib_HL7.SearchTable, EnsLib_HL7.Message
WHERE Head.TimeCreated >= DATEADD(day, -1, GETDATE())
AND Head.TimeCreated <= GETDATE()
AND ((head.SourceConfigName = 'SITE ORM-ORU Inbound')
AND (head.TargetConfigName = 'SITE ORM 1 PreProcessor')
AND head.MessageBodyClassName=(('EnsLib.HL7.Message'))
AND head.MessageBodyId = EnsLib_HL7.SearchTable.DocId
AND EnsLib_HL7.SearchTable.PropId = 6
AND EnsLib_HL7.SearchTable.PropValue = '1234567890'
AND head.MessageBodyClassName='EnsLib.HL7.Message'
AND head.MessageBodyId=EnsLib_HL7.Message.%ID)
ORDER BY head.ID Desc
    ]]></sql>

<assign property='target.{PID:2}'   action='set' value='..Piece(..Piece(FullMessage,"PID",2),"|",3)' />
4
0 822
Question Jonathan Anglin · Jun 29, 2021

Hello All

I'm running into an issue performing UPDATES that I'm not getting on INSERTS. It's probably obvious, but I'm just not seeing it and could use a little help.

I'm going over an HL7 message and depending upon varying criteria, the relevent variables will get items added to them like the following:

Set patientId = pRequest.GetValueAt("PID:3")
Set sqlColumns = sqlColumns_",patient_id"
Set sqlValues = sqlValues_",?"
Set par($i(p)) = patientId

After compiling the variables, I check to see if accession number is found in the table.

set performInsert = 1
set performUpdate = 0
...
set sqlQueryText = "SELECT id FROM table_name WHERE accession_number= ?"
set sc = ..Adapter.ExecuteQuery(.resultSet,sqlQueryText,accessionNumber)

  if $$$ISERR(sc) {return sc}

  while (resultSet.%Next() '= 0){
    Set performUpdate = 1
    Set performInsert = 0
  }

  Set par = p
14
0 823
Question Jonathan Anglin · Jul 16, 2020

I send ORUs to a process where a transform is applied before sending the message to a process where the routing is handled. A recent request was made that when OBR:25="D" the message is also be faxed with transforms that have some similarities to the original, but not exactly the same. I copied the DTC, made the alterations, and created a separate rule to handle it. However, when I run a message through with a "D" in OBR:25, it is only sent to the routing process once.

3
0 346
Question Jonathan Anglin · Jul 7, 2020

As I've become a little more familiar with HealthShare, I'd like to start exploring different ways of doing things. To date, the bulk of my data transformations have been using DTL; only using ObjectScript for a few operations that write to external SQL tables that were largely based on examples provided by my sales engineer.

I'd like to trying doing all of the data transformation in a process using ObjectScript.

4
0 493
Question Jonathan Anglin · Jun 18, 2020

I have a code tag that performs some logic in a DTL, and want to add to it the ability to find the number of substrings delimited by a dollar sign ($) within a particular string. I have tried the following which compiles just fine, but generates an error when testing in the Data Transformation Builder.

set lineCount = $DCOUNT(reportBody,"$")

ERROR <Ens>ErrException: <SUBSCRIPT>zTransform+985^LH.IAMON.IAMONORU1XsformDTC2.1 *DCOUNT() Encoded subscript 1 > 511 bytes -- logged as '-' number - @' set lineCount = DCOUNT(reportBody,"$")'

3
0 980
Question Jonathan Anglin · Jun 2, 2020

Hello All

I'm not sure what the best practice is for this. I have a DTL for returning ORUs back to a hospital in a different time zone. They have requested that various timestamps have the time zone offset added to the HL7 format (%q%k, I think). First, I just wanted to be sure the system was aware it was DST. I was able to determine if DST is in effect like this:

5
0 1022
Question Jonathan Anglin · Jan 28, 2020

I'm trying to tie IRIS (2019.1) into our Concord Fax cloud-based email-to-fax workflow. We have some sites that require a fax be sent to multiple locations based upon certain data (ie Radiology and Emergency departments). Unfortunately, CC-ing does not work with Concord Fax so I need a way to send the email, change the recipient, and then send it again if certain criteria are met. Is this possible? Do I need to duplicate and rename the method, calling the second one in the MessageMap?

2
0 329
Question Jonathan Anglin · May 7, 2019

Hello All!

I'm brand new to HealthShare and trying to enable LDAP Authentication. When I run the authentication test, the base DN looks good and the search user is successfully authenticated. However, the user is still not found. We have a linux installation in Azure, and I'm connecting to a Windows AD server (provided both Azure and local hostnames). I'm using the full DN in the username field. For the "LDAP Unique search attribute" I've tried, CN, DN, and sAMAccountName.

3
0 4627