How do we trigger a BPL Business Process on a time schedule?

We are building a production that takes a steady stream of (HL7) lab results messages, processes them and stores them in a temporary database table. At scheduled points during the day (eg 0800, 1300, 1600) the database is queried and messages sent on to the downstream system. Aiming that the Processes to be implemented in BPL if possible - but we are having trouble triggering code in a BPL as a scheduled job.

0 12
0 404

Hi Folks,

I created a persistent class as below

Class myclass.DataBase Extends %Persistent
{

Property ID As %String;

Property Skill As list Of myclass.SerialTablelist;
}

and Created another Serial class as

Class myclass.SerialTablelist Extends %SerialObject
{

Property PSkill As %String;

Property OSkill As %String;
}

Now I will save the id as below

do rs.Prepare("Insert into myclass.DataBase(ID)VALUES(?)")
do rs.Execute(ID)
0 12
1 416
Question
· Sep 28, 2018
Impact of OREF support

There are some classes in our code base that contain Methods only (no properties). I told my colleagues that converting them into the ClassMethods should improve performance as it would eliminate unnecessary OREF support at run-time. Some of them replied that it would be microseconds, so what is the reason to bother.

Is it possible to estimate the impact of OREF support of method calls at run-time? E.g., as a % of all CPU load.

0 12
0 443

Hello,

I am still a beginner with COS and am struggling with these concepts. While digging through the official documentation will eventually tell you everything you need to know, getting started is nevertheless not an easy feat...

Is it possible to create a "lists/array/multidimensional 101" page for beginners? And, for instance, its interaction with $data, what it means to use "as list of something" or "as array of something", how to walk lists, how to add/remove elements, how to extract sublists etc?

1 12
0 515
Question
· Mar 31, 2021
End Session programmatically

We have a background job that keeps an eye on our ongoing CSP sessions, counts licenses used and some other tasks. Question: If I know the session ID (something like "wuuZ2Gwgxw"), how do I (find and) end that particular session programmatically in ObjectScript - i.e., the equivalent of %session.EndSession=1 in the csp page code?

Thanks!

Michael Reach

1 12
1 694

I am still new to cache objectscript and am trying to figure out how I would go about removing the escape characters from my JSON below. When I call the $toJSON method it's adding the "\" character in the file path.

{"FileStatus":"P","Path":"\/somepath\/test\/test123\/filename.txt","InterchangeOID":"100458"}

My Code:

0 11
0 9.7K

in order to do analysis on huge data volumes, it is better to take you data to a separate machine for analysis away from the operational machine, so trying to write huge globals or tables into files as is would take a huge space, what could be a solution or best practice ?..in python for instance, there is the pickling option (serializes data to byte string and saves it to a file) to save space, what could be best in object script ?

0 11
0 1.1K

Hi Guys,

Can you please advise on the below queries.

Query 1:

Example 1:

 S a="345",b="arun",c="kumar",d="hi",e="yello",f="orange"

Example 2:

S a="345"

S b="arun"

S c="kumar"

S d="hi"

S e="yello"

S f="orange"

Can you please advise me, which one is performance wise is better.

Query 2:

Example 1:

S:a=1 R="Arun"

Example 2:

I a=2 R="Arun"

Please advise me, which one is giving better performance in this.

0 11
0 950

I need to set and use some context variables in a transformation (written in DTL), but the code is manually written.

When writing the same as BPL I define context variables and they are visible in transformations called by that process.

In something like this my.DTLtransform sets HL7 message fields to values in context variables:

0 11
1 604
Question
· Apr 2, 2022
Subscript with double quoted

Hi Team,

I would like to save the array subscript with in double quotes

eg sub1=111,sub2=444 (these values are dynamic)

set array(sub1,sub2)=""

It will be saved as array(111,444)=""

but I want to save it as array("111","444")=""

I am trying to save it from the class like """"_sub1_"""" but its not displaying as expected.

Kindly do the need full.

Thanks in Advance

0 11
0 301
Question
· Sep 30, 2021
Portal's category.

Hello,


I’m looking for a way to find out which category of portal a connector belongs to.
I looked at the class ‘Ens.Config.Production’ and ‘Ens.Config.Item’ but without success.


An idea about the ‘ObjectScript’ code to design?

Best Regards.

0 11
0 255

Now I want to return a large amount of data to the front end. The string length has reached 40000 +, and the returned data needs to be encrypted by AES + Base64. I can convert the string into a stream. AES can use the AESCBCEncryptStream method to encrypt, but Base64 has no stream method。Anyone who get the solution would you kindly share the solution please。

Any help would be appreciated. Thanks!

1 10
0 13K

Hi Community,

Can anyone point me to the docs that show how to add automatic class documentation for the arguments used in a method call? I can auto document the class, methods, properties etc. with the "///" but can't figure out how to get the nice argument documentation for the arguments used when calling a method.

Thanks in advance

0 10
0 131

We have a Unicode installation of Cache'. A client wants to send us documents that will be machine-read and loaded, automatically. They want to create the documents in ISO-8859-1 ("Latin-1"). We'd need to convert the text to UTF8 for our system. I saw the documentation on the $ZCONVERT function, but I didn't see this option. How should it be done?

Thanks!

0 10
0 1K

After linking in Oracle Table with Field Column's Data Types of NUMBER, my updates into these table fields are resulting in data that is being rounded to 2 decimal places. I insert a record with 1234.1234 and 1234.12 is stored.

It appears Cache xDBC might be manipulating my values prior to sending to Oracle. Is there a setting or system parameter that is controlling this? If so, is there a way to relax this from occurring so the values I send are being stored in Oracle with the same values?

0 10
0 392
Question
· Sep 12, 2023
Scoping OID / OREF map

It's a feature of ObjectScript (perhaps widely known, perhaps not) that if you open the same object ID multiple times, you end up with the same OREF. For example:

USER>set obj1 = ##class(Sample.Person).%OpenId(1)
 
USER>set obj2 = ##class(Sample.Person).%OpenId(1)

USER>w obj1,!,obj2
1@Sample.Person
1@Sample.Person

Generally speaking, this is an important feature - you won't end up accidentally modifying the same record via multiple paths and losing some of the changes.

2 10
2 298

At the moment I am trying to write a documentation file for a project and intend to use LaTeX for it.
Has anyone already had experience with this? I haven't found syntax highlighting with the LaTeX packages I know yet.
I found a request on Pygment but it was from 2016 and there was no reply on it since then.

Does anyone know a simple way for syntax highlighting COS in LaTeX?
Thanks for your input!

Martin

0 10
0 446

Hi,

I need to read a UTF8 encoded text file and translate the content to 8-bit.

Using %File class and $ZCVT(TXT,"I","UTF8") works , but I see that if the content is larger than max string (32000) and we cut the content

To max string chunks, we can get a <translate> error if we cut it in the "wrong" point..

Is there a better way to do this task?

My code looks like this:

0 10
0 1.8K