Enrico Parisi · Mar 22, 2025 go to post

If the SetValueAt() method is not working I guess it's also returning an error, my suggestion is to check the returned error, so:

Set sc=tOBXSegment.SetValueAt(tOBXText, 5)
Do $system.OBJ.DisplayError(sc)

Enrico Parisi · Mar 19, 2025 go to post

Status already includes stack-trace

I  know, that is the very reason why I'm curious to see how it's implemented there!

My guess is that is using $ZU(41,-2).

Enrico Parisi · Mar 18, 2025 go to post

I wish I could see the code in $$macroERROR^%occMsgXML() (used by $$$ERROR() macro and other) to store the stack in a Status.

Enrico Parisi · Mar 13, 2025 go to post

Hi Scott,

I don't consider 255 as larger than the typical string length and I'm surprised of your issue and I don't fully understand your code, probably because it's not complete (set tSC = rs.Insert(pInput) make no sense to me).

Anyway, my suggestion is to find some more info that may give you some hint.

For example I'd add the following lines in your OnProcessInput() method:

Set colId=pInput.GetColumnID("ExternalName")
$$$LOGINFO("ColumnType is "_pInput.GetColumnType(colId))
$$$LOGINFO("ColumnSQLType is "_pInput.GetColumnSQLType(colId))
$$$LOGINFO("ColumnSize is "_pInput.GetColumnSize(colId))

Please test this using a query that extract a few records to avoid flooding your event log.

I'm curious to see what you get.

Enrico Parisi · Mar 13, 2025 go to post

Can you please provide some more details on "columns that are larger than the typical string length"?

How long (max) can be?
What's the data type for these columns in the external database?
What database are you connecting to? Using ODBC or JDBC?

Enrico Parisi · Mar 11, 2025 go to post

InterSystems offers specific training course for Building and Managing HL7 integration periodically available in InterSystems offices, remote/online and on customer site. 

To get detailed info and take advantage of what it's available in InterSystem Learning, click the Learning link on left top of this page.

There you can find plenty of material regarding HL7v2 and MUCH more.

An excellent starting point would be to start with what's freely available for self learning, with a quick search I found couple of Learning Path on HL7v2:

Building Basic HL7 V2 Integrations with InterSystems

Building Advanced HL7 V2 Integrations with InterSystems

In addition to these Learning Paths there are additional more specific resources for specific topics.

In the Developer Community there are many HL7v2 articles you can learn from and maybe browsing HL7v2 related questions and provided answers can help learning.

Last but not least, in Open Exchange (fourth link on top of this page)  also contains many HL7v2 projects you can learn from.

Regarding certification, please check InterSystems Certification Program, link on top of this page.

Enjoy learning! 😊

Enrico Parisi · Mar 10, 2025 go to post

Be careful, in some cases that method does not work correctly.

I was testing this using a class where the package redefine the SQL schema name for the classes, in that case the ClassNameToTableName() returns a wrong result.

Enrico Parisi · Mar 10, 2025 go to post

I know this is an old question, but in case someone will search for the same question, another option (better, IMHO) is to use:

$$$ClassSQLTable("my.ClassName")

In case you need it for current class:

$$$ClassSQLTable($classname())

To use the $$$ClassSQLTable macro your class needs:

Include Ensemble

Enrico Parisi · Mar 6, 2025 go to post

I'm afraid that the query you suggest does not returns the same result.

It returns one row per session, each with the number of messages for the session.

Enrico Parisi · Mar 5, 2025 go to post

Well...if fact, a better query would be:

select count(DISTINCT SessionId)
from Ens.MessageHeader
where TimeCreated between '2025-02-01 00:00:00' and '2025-02-28 23:59:59'

Note: while the query is different, it ends running pretty much the same code as the previous query, but I like this better 😊

Enrico Parisi · Mar 4, 2025 go to post

select count(*) from (
select SessionId
from Ens.MessageHeader
where TimeCreated between '2025-02-01 00:00:00' and '2025-02-28 23:59:59'
group by SessionId
)

Enrico Parisi · Mar 4, 2025 go to post

Ciao Riccardo,

<PROTECT> error, evidently the caller or the web application does not have enough permission.

Is the caller being authenticated? How? What user? What roles has the user?

Check the associated Web Application authentication and the user used by the caller to connect to your (FHIR) Web Application.

Enrico Parisi · Feb 28, 2025 go to post

Hi @Muhammad Waseem , nice and useful article.

Please note that for embedded SQL, since some version 2020.1, when the Universal Query Cache was introduced, it's no longer true that "SQL statements are pre-compiled into the program during development", please check relevant documentation.
 

You can find more details and a discussion of this topic, including comments from @Dan Pascothe initial dynamic SQL developer, in the post A look at Dynamic SQL and Embedded SQL
 

Enrico Parisi · Feb 28, 2025 go to post

You can enable the log in the .NET Gateway and see if the log give you some useful info.

As in my previous post, my guess is that you are passing the wrong/incomplete class name as 1st parameter of new().

Enrico Parisi · Feb 28, 2025 go to post

Are you sure you are using the correct/full name reference to your parametisedClass?

It should be NamespaceName.PublicClassName

Enrico Parisi · Feb 28, 2025 go to post

I'm not familiar with Spring Boot, so I don't understand what you want to implement in IRIS.

Do you want to define a custom datatype?

What kind of behavior you need to implement in IRIS?

Enrico Parisi · Feb 28, 2025 go to post

I'm not sure what you want to implement, note that ByRef and Output are keywords (not parameters) and are for documentation purpose only, the (dot) syntax used by the caller define if an argument is passed by reference, regardless of ByRef/Output keyword specified in the called method.

What kind of customization you need to implement?

Enrico Parisi · Feb 28, 2025 go to post

To get the XML rule definition from SQL you can write/define a stored procedure that returns the XML rule definition, then....parse the XML. Something like:

Class Community.Rule.XDATA
{
ClassMethod GetXML(RuleName As %String) As %String(MAXLEN="") [ SqlProc ]
{
    Set xdataOBJ = ##class(%Dictionary.XDataDefinition).IDKEYOpen(RuleName,"RuleDefinition")
    Quit xdataOBJ.Data.Read($$$MaxLocalLength)
}
}

Then from SQL:

select Community_Rule.XDATA_GetXML('Your.Rule.Name')

Enrico Parisi · Feb 28, 2025 go to post

I really doubt it's possible to search for Data Set values, that information is stored in a binary file in the filesystem, not in the database.

Enrico Parisi · Feb 25, 2025 go to post

You can use this query in your method:

select * from Ens.Job_Enumerate()
where  ConfigName ='T_SPM_SIU'

Enrico Parisi · Feb 25, 2025 go to post

From documentation:

General Rules

Every identifier must be unique within its context (for example, no two classes in a given namespace can have the same full name).

Identifiers preserve case: you must exactly match the case of a name; at the same time, two classes cannot have names that differ only in case. For example, the identifiers id1 and ID1 are considered identical for purposes of uniqueness.

Enrico Parisi · Feb 24, 2025 go to post

Would you mind specify what kind of rule?

Edit to add: note that rules are defined as XML, there is no table available to directly query a rule

Enrico Parisi · Feb 21, 2025 go to post

To my knowledge what can be done it's making a call via Web Gateway using %Net.HttpRequest.

I'm afraid that without going trough the Web Gateway it's not possible, but I'd love to be proven wrong.

Enrico Parisi · Feb 18, 2025 go to post

@David.Satorres6134 , you asked:

We have reviewed the documentation but were unable to find a method or API that provides the correct compilation order for the cubes.

I gave the documentation links on how to provide the correct compilation order for classes.

In most cases the compiler does take care of dependencies and build/compile in correct order.
In my experience I have very, very rarely (maybe a couple of times) used DependsOn or CompileAfter Class keywords (I don't do cubes/DeepSee).

I'm not familiar with multiple cubes compilation, but evidently your implementation has some particular dependency that the compiler is unable to identify and take care of it.

Maybe  (just guessing here) you have some cross dependency that is "resolved" with multiple compilations?

Enrico Parisi · Feb 18, 2025 go to post

I've seen that message too and.....I ignored it since everything works fine.

It would be nice to know without opening a WRC for something that, apart of that message, just works! 😁

If that directory is required for Web Gateway cache, then it looks like a bug in the GW installation script.

Enrico Parisi · Feb 18, 2025 go to post

I don't have experience with SQL SP from IRIS but I believe the SQL syntax should be something like:

call ExternalDB.DB.StoredProcName(?)

I'm not sure named parameters are supported. I don't think they are.

Enrico Parisi · Feb 18, 2025 go to post

@David.Satorres6134 , in the class EnsPortal.SuspendedMsg,  DeleteMessage() is an instance method and cannot be invoked directly.

Anyway, what it does is simply invoking:

Set tStatus = ##class(Ens.MessageHeader).%DeleteId(pHeaderId)

But, as explained in my previous post, this leave orphaned messages and should be avoided.