I have opened a ticket with WRC regarding this issue.
- Log in to post comments
I have opened a ticket with WRC regarding this issue.
I am not aware that a CSV could be read in via EnsLib.File.PassthroughService. From what I was taught a CSV would have to be mapped to a RecordMap then you can parse out the CSV using EnsLib.RecordMap.Service.FileService.
https://docs.intersystems.com/healthconnect20191/csp/docbook/DocBook.UI.Page.cls?KEY=EGDV_recmap
Scott
When we were going through our conversion from egate to Ensemble, it was suggested not to have anymore that 25 rules within a Business Router. Anymore than that caused us severe performance issues when it came to making sure our downstream systems was receiving the messages in time.
Scott Roth
I figured it out on my own.
It did not like
<assign value='source.GetFieldStreamRaw(.tStream,"ORCgrp(1).OBRgrp(1).OBXgrp(k1).OBX:ObservationValue(1).AlternateText}",tRemainder)' property='tSC' action='set' />
I had to change it to
<assign value='source.GetFieldStreamRaw(.tStream,"ORCgrp(1).OBRgrp(1).OBXgrp("_k1_").OBX:5.5",.tRemainder)' property='tSC' action='set' />
Have you used JDBC drivers before? I have a couple of connections that I have created through JDBC to connect to Oracle to pull data from an Oracle table to create an HL7 message. Currently we are using the Oracle JDBC driver to connect to the Oracle system.
Make sure you are also using EnsLib.RecordMap.Operation.BatchFileOperation as your operation and you define the header in it as well.
.png)
This maybe a silly question but what if you are not using a docker image? What is docker-compose?
I found with create a Inbound BS, you can't really use the Delete query as an update statement. Either you place the update statement within your BPL, or truly make the Delete query a Delete query on your inbound service.
Try this link...
and look for Using Ens.Director to Start and Stop a Production
First start off by looking at the following documentation...
What you use for your connection string all depends on the driver you are using. In the past I have used Microsoft, Oracle, and jTDS JDBC drivers. Currently I am using jTDS because it allows me to use integrated Authentication. so my strings are a little long...
jdbc:jtds:sqlserver://(server name):(port)/(database);instance=xx;domain=xxxx;useNTLMv2=true;cacheMetaData=true;prepareSQL=2;
is just an example.
Scott
I would believe the only way to put a schema filter in would be within your query and not in the connection string.
I have created a Cache Operation that uses JDBC to connect to Oracle using the EnsLib.SQL.OutboundAdapter, if that is what you are looking for. I try keep the read, and write operations different as it can make it less confusing on which operation is doing what.
Here is just one example..
Include (EnsSQLTypes, %occODBC)Class osuwmc.IWEnc.IWDBPollBusinessOperation Extends Ens.BusinessOperation [ ClassType = "", ProcedureBlock ]
{Parameter ADAPTER = "EnsLib.SQL.OutboundAdapter";Parameter INVOCATION = "Queue";Property InitDSN As %String;Method OnInit() As %Status
{
Set ..InitDSN = ..Adapter.DSN
//Set ..Adapter.ConnectAttrs = "QueryTimeout:45" ; try this too just in case...
Quit $$$OK
}Method SelectIWLinkedResults(pRequest As osuwmc.IWEnc.DataStructures.IWtoERSLTSLnk, Output pResponse As EnsLib.SQL.Snapshot) As %Status
{
set Select = "SELECT MRN,ACCOUNTNUM,SUMMARYID,ANCILLARY,DEPARTMENT,REPORTCODE,REPORTDESCRIPTION,DATEOFSERVICE,STATUS,INSERTDATE,"
set Select = Select_"TRANSMITAPP,TRANSMITDATE,RENDDRNUM "
set Select = Select_"FROM IW_TO_ERSLTS_LNK "
set Select = Select_"WHERE TRANSMITDATE IS NULL AND TEXTID = ?"
set tSC = ..Adapter.ExecuteQuery(.rs,Select,pRequest.TextID)
set tSC = rs.GetSnapshot(.pResponse)
Quit tSC
}Method UpdateIWLinkedResults(pRequest As osuwmc.IWEnc.DataStructures.UpdateIWtoERSLTSLnk, Output pResponse As Ens.Response) As %Status
{
set update = "UPDATE IWDINTF.IW_TO_ERSLTS_LNK SET TRANSMITDATE = SYSDATE WHERE SUMMARYID = '"_pRequest.SummaryID_"'"
set tSC = ..Adapter.ExecuteUpdate(.rows,update)
Quit tSC
}XData MessageMap
{
<MapItems>
<MapItem MessageType="osuwmc.IWEnc.DataStructures.IWtoERSLTSLnk">
<Method>SelectIWLinkedResults</Method>
</MapItem>
<MapItem MessageType="osuwmc.IWEnc.DataStructures.UpdateIWtoERSLTSLnk">
<Method>UpdateIWLinkedResults</Method>
</MapItem>
</MapItems>
}
I have HealthShare 2018.1.3, IRIS HealthShare 2020.1.0.197, and I just downloaded CACHE development 2018.1.3 for Windows installed on my machine. I am not able to find the cachejdbc.jar under C:\intersystems anywhere, am I miss something? Is there a separate install for the jdbc driver? I am looking to try to connect Squirrel SQL Client, so I can easily add data to a Cache table without using the Management Studio SQL.
I was able to replicate the issue this morning in our Test Interface engine. The syntax error was related to when typing in a when condition not putting the { after the HL7.

Clicked SAVE
Got…
Clicked OK
Got…
Clicked OK, screen went back to Business Rule Editor Screen
Click SAVE again and it repeats the process above
If I try to exit out of the Business Rule Editor I get… 
If I click CANCEL it goes back to the Business Rule Editor
If I click LEAVE it takes me back out to the Production Configuration Screen
I open that Business Rule again by clicking on the 
When the Business Rule Editor Opens…
The Syntax error is still appearing in the rule… 
So %Dictionary.CacheClassname would be my table name then? I don't have to use any :sql.... type code for it to do the lookup? What about the existing EXISTS function that already exists that is used for Data Lookup Tables (lut)?
So it would be like this...
ClassMethod CacheExists(table as %String , index As %String, value As %String) As %Boolean
{
set:table'["." table=$$$DefaultSchema_"."_table // support unqualified names
set class = $$$GetClassNameFromIQN(table)
DO $classmethod(class, index _ "Exists", value)
}
It appears my first attempt didn't work as expected..
ClassMethod CacheExists(table As %String, index As %String, value As %String) As %Boolean
{
set:table'["." table=$$$DefaultSchema_"."_table // support unqualified names
set class = $$$GetClassNameFromIQN(table)
quit $classmethod(class, index _ "Exists", value)
}
.png)
ERROR <Ens>ErrBPTerminated: Terminating BP SIU949502CaseRoutingRule # due to error: ERROR <Ens>ErrException: <PROPERTY DOES NOT EXIST>zevaluateRuleDefinition+193 ^osuwmc.CaseSchedulingRoutingRule.1 *osuwmc,EnsLib.HL7.MsgRouter.RoutingEngine -- logged as '-'
number - @'
if (##class(osuwmc.Functions).CacheExists(((pContext.osuwmc)_(pContext.Tecsys)_(pContext.Unit.DataTable)),(pContext.UnitID),(pContext.HL7.GetValueAt("RGSgrp("_(1)_").AIL:LocationResourceID("_(1)_").Facility.NamespaceID")))) {'
> ERROR <Ens>ErrException: <PROPERTY DOES NOT EXIST>zevaluateRuleDefinition+193 ^osuwmc.CaseSchedulingRoutingRule.1 *osuwmc,EnsLib.HL7.MsgRouter.RoutingEngine -- logged as '-'
number - @'
if (##class(osuwmc.Functions).CacheExists(((pContext.osuwmc)_(pContext.Tecsys)_(pContext.Unit.DataTable)),(pContext.UnitID),(pContext.HL7.GetValueAt("RGSgrp("_(1)_").AIL:LocationResourceID("_(1)_").Facility.NamespaceID")))) {'
I am not quite sure I am following... osuwmc.Functions is the main class file, we store our custom functions. We have used it in many other Business rules before for other functions we have created. So doesn't that mean osuwmc property should exists? We store all of our files under the osuwmc schema.
Yes we have played around with that setting, to no avail. Its like the Vendor just pauses sending us data, never realizes it, or restarts their connection. Currently StayConnected is set to 120, but when they trigger this issue its like the connection is hung.
In a Business Rule, I have used...
.png)
I maybe wrong... But since the native format of dates in Ensemble are not strings, unless you create a function to convert $HOROLOG into a string and set it equal to the variable of Today, I do not think this is possible.
http://intengtest:57772/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_vhorolog
/// Provide the current date HL7 Format YYYYMMDD
ClassMethod getCurrentDateHL7() As %Numeric
{
quit $ZDATE($H,8)
}
/// Compare a Message Date/Time with the CurrentDate
ClassMethod DateCompare(DateString As %String) As %Boolean [ Final ]
{
Set CurDate=$PIECE($HOROLOG,",",1)
Set MyDate=$EXTRACT(DateString,1,8)
Set TestDate=$ZDATEH(MyDate,8)//Calculation example: 20150304 - 20150306 = -2, function returns '0'
If (TestDate - CurDate < 0)
{
quit 0
}
Else
{
quit 1
}
}
I haven't spent any time doing anything with NACK's as of yet. I would suggest creating another post for that question to see if other Developers can help you out.
Also how do a make a Table that was generated from RecordMap, DDL enabled?
I think I figured it out, but could someone verify?
I am able to edit the class file in Studio to enable "DDLAllowed".
1. Then I scripted the following...
Alter table "osuwmc_Workday_DataStructures_FSINT3376ItemMaster"."Record" ADD DateInserted DateTime
2. After I was able to add the time through SQL I was able to alter the column to set the DEFAULT = getdate()
Alter table osuwmc_Workday_DataStructures_FSINT3376ItemMaster.Record Alter DateInserted DEFAULT(getdate())
In the class file it is now showing...
Property DateInserted As %Library.TimeStamp [ InitialExpression = {$zdt($zu(188),3,1)}, SqlColumnNumber = 24 ];
I realize I can probably combine my SQL statements, but I did not use the Generator.GenerateObject(). Is this ok?
Thanks
Scott
setting the following did not work InitialExpression = {$zdt($zu(188),3,1)} as the records are being read by EnsLib.RecordMap.Service.FileService into the record map generated table, I can not get the DateInserted column to auto-populate.
Does anyone have any suggestions on getting this DateInserted column to populate as the RecordMap.Service is reading in the file?
Thanks
Scott
Is PEX replacing the JavaGateway service?
Nicole, I believe your problem is with the repeating fields. You can not leave () blank. You will need to use a counter or loop through OBX to look for the individual fields you are looking for.
Scott
Your welcome.
We have used Length many times in Routing rules to check to see if Admit/Discharge date exists. We haven't quite used HL7.{PV1:45} to get the field, we let the system spell it out for us... so instead of HL7.{PV1:45} we allow the system to put it in the nomenclature that it knows the field as.. in this case HL7.{PV1:AdmitDateTime.Time}
.png)
I figured querying a local table through an SQL call in the DTL would cut down on the amount of development that is needed. I created a view with only 2 columns of the data set and wrote a custom function so my other team members could use it. So far so good.