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)
}

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 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…

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 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>
}

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 am struggling with understanding how to display the table within the CSP page. In reading the document it mentions ZEN, but as we have been told not to use ZEN because ZEN is going away.

So how can I display the SQL table in a table format that could be updated instead of the form document mentioned above? Most of the examples are only 1 or 2 rows. I am looking at a 25 rows x 6 columns table to display and update. 

I got the above to work, just trying to make it more friendly.

Thanks

Scott

Here is an interesting outcome from playing around. Before I could not open the osuwmc.TestClin in either studio or the Management portal after an upgrade/compile to 2019.1.1.

So I was wondering if I should just look at the file. So I exported it from studio, looked at it on my local desktop, then imported it locally from my desktop. I was able to compile it through studio without issues, and Management Portal was able to see the production as well.

Weird.....

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' />