Hi Everyone!
Please watch the new video on InterSystems Developers YouTube, recorded by @Sourabh Sethi in the "Coding Talks" format:
Informative and Fast WEB API VIA ObjectScript and Ensemble/HealthShare
InterSystems ObjectScript is a scripting language to operate with data using any data model of InterSystems Data Platform (Objects, Relational, Key-Value, Document, Globals) and to develop business logic for serverside applications on InterSystems Data Platform.
Hi Everyone!
Please watch the new video on InterSystems Developers YouTube, recorded by @Sourabh Sethi in the "Coding Talks" format:
Informative and Fast WEB API VIA ObjectScript and Ensemble/HealthShare
Hello ,
Need some help to write a Request message to the File using EnsLib.File.PassthroughOperation class.
Request object is sent to the Ensemble operation has below simple structure.
{
Property SiteCode As %String;
Property HospitalCode As %String;
Property PatientFirstName As %String;
Property PatientLastName As %String;
Property EncounterId As %String;
}
But in the operation i am getting error
ERROR <Ens>ErrException: <PROPERTY DOES NOT EXIST>zOnMessage+1 ^EnsLib.File.PassthroughOperation.1 *Stream,ABC.Req -- logged as '-'
number - @'
Quit:'$IsObject(pRequest.
Pre-requisite - Basic knowledge of ENSEMBLE and ObjectScript
My both previous sessions were related to OBJECTSCRIPT.
This time, we are going to add a flavour Ensemble/Healthshare,
to be informative and fast.
In this session we are going to discuss about -
"Informative and Fast WEB API VIA ObjectScript and Ensemble/HealthShare"
Web API can be REST or SOAP. We will taking example of SOAP in this session.
However, whatever I demonstrate today, will also be applicable for REST.
In many projects I was faced with storing hierarchical data (tree) in classes.
By tree, I mean such data, where each node has a parent node — an object of the same class.
Many examples of such data can be given. For example, a catalog in the online store. Suppose that this online store sells books, in this case, the category tree might look like this:
The number in front of the name is the category ID.
For storage, you can create classes:
The MyApp.Category class is used to store the category tree and contains the property “Parent” - reference to the same class.
In this article we are going to compare $Increment and $Sequence functions.
First of all, a note for readers who have never heard of $Increment. $Increment is a Caché ObjectScript function which performs an atomic operation to increment its argument by 1 and return the resulting value. You can only pass a global or local variable node as a parameter to $Increment, not an arbitrary expression. $Increment is heavily used when assigning sequential IDs. In such cases parameter of $Increment is usually a global node. $Increment guarantees that each process using it gets a unique ID.
Hello,
Is it possible to write global output values to STDOUT, in a similar way to how csession can take routine intput, like below:
(In Cache Terminal)
%SYS>d ##class(%SYSTEM.License).
License Server summary view of active key.
Distributed license use:
Current License Units Used = 1
Maximum License Units Used = 1
License Units Authorized = 200
Local license use:
Current Connections = 1 Maximum Connections = 1
Current Users = 1 Maximum Users = 2
(From Linux OS Terminal)
[jhipp@test-sbox ~]# csession TEST "##class(%SYSTEM.
Hello Community,
How do i disable an operation explicitly based on a value in a variable?
I set the ReplyCodeAction to E=D.
In the Operation Code i am throwing an explicit ERROR
But my operation still remains up.
Any suggestions please will be appreciated.
Thanks,
Jimmy Christian.
I'm not saying that this is in anyway "best practices," but I'm in a peculiar situation where I need to restrict users from starting a "retired" Ensemble Production in a namespace that's been renamed. It's still an "Ensemble-activated" namespace; we need to keep it available for Ensemble Message Viewer access ... fortunately, only for a little while.
It's a bit of a hack ...
Open the Production class in Studio and add the following classmethod:
ClassMethod OnStart() As %Status
{
Return $system.Status.Hello community! I have to work with queries using all kinds of methods like embedded sql and class queries. But my favorite is dynamic sql, simply because of how easy it is to manipulate them at runtime. The downside to writing a lot of these is the maintenance of the code and interacting with the output in a meaningful way. In an effort to have as much dynamism as possible so that we're not rewriting code constantly, and so that we have as little code possible (while still making sense and getting the job done), I made a function that takes in any dynamic query and outputs a dynamic object.
Hi Everyone!
Please watch the new video on InterSystems Developers YouTube, recorded by @Sourabh Sethi in a new format called "Coding Talks":
A SOLID Design in InterSystems ObjectScript
Hi Everyone!
You're very welcome to watch the new video on InterSystems Developers YouTube, recorded by @Evgeny Shvarov in the new format called "Coding Talks":
GitHub Flow with InterSystems IRIS: Edit with VSCode, Test with Docker, Commit, Push, Pull Request
Hi guys!
What is the IRIS analog for Ensemble.INC?
Hi all,
I have a class that I want to serialize to JSon. So I'm using the object %ZEN.Auxiliary.jsonProvider)
set myClass = ##class(myapp.myclass).%New() set myClass.property1 ="value 1" set myClass.property2 = "value 2" set myClass.property3 = "value 3" do ##class(%ZEN.Auxiliary.jsonProvider).%WriteJSONStreamFromObject(.tStream,myClass ,,,1,"ed") write tStream.Read()
By definition of myclass, all properties are serialized, that's fine. But I want not serialize the property3. I think is using a XML attribute in the property, or something about. But I didn't find anything about.
Hi Everyone!
You're very welcome to watch the new video on InterSystems Developers YouTube, recorded by @Sourabh Sethi in a new format called "Coding Talks":
Locking in InterSystems ObjectScript
Hi, I am trying to transform a message to meet a third party specification, and would like to know if you can advice me on how to separate a single OBX segment into several segments based on a '.'
I would like to separate the segment where the . [marked in red] is into another OBX segment. So the next segment would be:
OBX|2|TX|R^REPORT^L|1|Patient had lumbar spine MRI ~ Patient also had barium swallow ~ Patient has good alignment 99%perfect ~ Patient has aspiration visible
Is there a way to do that?
Would appreciate your advice on this
Regards,
Eric
All,
I'm using Cache 2014.1 in an openVMS environment.
If I have multiple RMS files to clean up, for example.
!DIR MEMBER_EXTRACT.*;*
MEMBER_EXTRACT.CSV;2 MEMBER_EXTRACT.CSV;1
MEMBER_EXTRACT.PROC;1 MEMBER_EXTRACT.TXT;3
MEMBER_EXTRACT.TXT;2 MEMBER_EXTRACT.TXT;1
S FILE="MEMBER_EXTRACT.*;*"
Do ##class(%Library.File).ComplexDelete(FILE)
!DIR MEMBER_EXTRACT.*;*
MEMBER_EXTRACT.CSV;1 MEMBER_EXTRACT.TXT;2
MEMBER_EXTRACT.TXT;1
Total of 3 files.
I am looking to get the exec statement when we call the SP with
Get the exec string: exec pSPName '1', '2', '3'
Hey Intersystems-Developer,
I have already used that and know its possible, but can't find it anymore :(
I need dynamic access on proxy objects. For example:
set key = "lastName"
set name = obj.name
set lastName = obj.key <- Not possible
set lastName = obj.GetAt(key) <- Not possible
How can I get access to that object with my dynamic variable "key" ?
Best regards.
Hi guys!
As you know there are two (at least) ways to get the stored value of the property of InterSystems IRIS class if you know the ID of an instance (or a record).
1. Get it by as a property of an instance with "Object access":
ClassMethod GetPropertyForID(stId As %Integer) As %String
{
set obj=..%OpenId(stId)
return obj.StringData
}
2. Get it as a value of a column of the record with "SQL access":
It’s often useful to make changes inside the current transaction, that would not be rolled-back if transaction is rolled-back. For example to do some logging.
This can be achieved by using global that is mapped to temporary database -- IRISTEMP. All globals that start with ^IRIS.Temp* are mapped to IRISTEMP by default. Problem with such approach is that IRISTEMP is cleaned on InterSystems IRIS restart, so this log is lost.
What else you can do is -- suspend transaction temporarily, do the logging, and then resume the same transaction.
Hi Dev Community,
My team is currently working on a project where we need to post pdf documents to a 3rd party REST API.
The API specifies a field in the JSON request message to contain the 'physical content' of the file as an array of bytes, example of the JSON request as follows - data truncated for readability purposes:
{
"CaptureSource":2,
"RecipientID":"ID34",
"Document": {
"Guid":"5D847A4E9CC1485382DC4A5F5DC80D6C",
"EventDate":"2019-01-14T13:23:46",
"FileExtension":"pdf",
"FileContent":"JVBERi0xLjQNCiXi48/TDQoxIDAgb2JqDQogIDw8DQogICA.
How can I remove elements from $lb property? Specifically last element?
$list does not work with $lb properties.
$listupdate can't remove elements
The only solution I found is a temp variable and $list, but isn't there something better?
Hello,
Working on to learn very basic CUSTOM Business Service which sends to a
But operation is not writing to File and erroring out (No Stream contained in StreamContainer Request")'.
How do convert the object to STREAM and wrap in the StreamContainer so the operation does not error and write to a file.
Thanks.
Persistent Class
{
Property PatientId As %Stream.FileCharacter;
Property PatientName As %Stream.FileCharacter;
Hi,
We have a function that takes two parameters, the second one is for output value:
MyFunc(Param1,Param2)
S Param2="it's all good"
Q 1
How can we detect if the caller called the function with one, or two arguments?
Meaning, how to distinguish this call:
S Result=$$MyFunc(1)
from this call:
S Result=$$MyFunc(1,.OutVal)
Thanks!
Nael
Hello,
Can anyone please provide me with a guide I can follow to create an entry in Cache's SSL/TLS configuration that would allow me to "speak" to an website via the Post method using SSL.
I need to simulate functionality that is provided by my browser but from with Cache.
The topics I have are:
1. From where do I source the certificate that will be used for this process?
2. What processing must I do on it to make it acceptable for Cache's SSL/TLS
3. What settings are required when filling the the form
I have been reading on the %Net.HTTPRequest (thanks to @SeanConnelly)
Thanks
Charles
Just like Caché pattern matching, Regular Expressions can be used in Caché to identify patterns in text data – only with a much higher expressive power. This article provides a brief introduction into Regular Expressions and what you can do with it in Caché. The information provided herein is based on various sources, most notably the book “Mastering Regular Expressions” by Jeffrey Friedl and of course the Caché online documentation. The article is not intended to discuss all the possibilities and details of regular expressions. Please refer to the information sources listed in chapter 5 if you would like to learn more. If you prefer to read off-line you can also download the PDF version of this article.
Noticed some unexpected behavior when using $ZTH
Resultant values less than 1 are treated as strings and values >=1 are numbers. Causing heartburn in $Query / $Next / $Order loops. Is there a setting somewhere that can change this?
Example:
// Parse the time out of a text string whose format is YYYYMMDDHHMMSSsssssssss (lower case s = fractional parts)
Set MsgDT = "20180405000000001005933"
Set MsgDTH = $ZTH(($E(MsgDT,9,10)_":"_$E(MsgDT,11,12)_":"_$E(MsgDT,13,14)_".
I am trying to pull the word count from Microsoft Word document into Cache. Is there anyway to get the values of the extended file properties without opening the word document? If I right click on a word document (Word does not need to be installed) I can see the additional properties that I want to reference however don't know how to access these without calling out to VBA or poweshell.

Hi,
I have a project that requires me to post a form. I am following the documention at https://developers.clicksend.com/docs/http/v2/#send-an-sms .
In code I need to be able to do the following:
https://api-mapper.clicksend.com/http/v2/send.php ? method=http&username=xxxx&key=xxxx&to=+61411111111,+61422222222,+61433333333,+61444444444,+14055555555,+14055555666,+447777777777,+447778888888,+8615555555555&message=This is a test
From within a browser I am getting the expected response.
PS: the numbers I am using a testing numbers: https://developers.clicksend.