I have a DTL that calls a custom function that returns an object. How do I code the IF statement to check if the object is empty. e.g. IF tObject={}
Hi Community,
Watch this video to learn how to programmatically manage task schedules using InterSystems IRIS, including creation, editing, and deleting a user-defined task:
⏯ Working with InterSystems IRIS task schedules programmatically
Does anyone know what this task does exactly? And what problems would I have if I didn't use an SSL certificate?
I got the error: "SSL/TLS error in SSL_connect(), SSL_ERROR_SSL: protocol error, error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed"
Has anyone encountered this problem before?
If one of your packages on OEX receives a review you get notified by OEX only of YOUR own package.
The rating reflects the experience of the reviewer with the status found at the time of review.
It is kind of a snapshot and might have changed meanwhile.
Reviews by other members of the community are marked by * in the last column.
I also placed a bunch of Pull Requests on GitHub when I found a problem I could fix.
Some were accepted and merged, and some were just ignored.
So if you made a major change and expect a changed review just let me know.
Hi there,
My purpose is to encrypt a communication using JWT tokens. I am developing on IRIS and my purpose is to generate a JWT token that will run on an older version of Cache (so I have to use functions that are compatible with the older version, Cache).
I wrote this code in IRIS:
I need an example of how to consume a pipe-delimited flat file place parts of it's content into parts of the SDA. I have the RecordMap built, but am unsure of where to go from here.
Any help would be greatly appropriated.
Thanks,
Lawrence
Works?
I was watching this video about IRIS and GitHub and all is clear to me how it works and how code from each branch is getting deployed to each IRIS environment but the process to deploy is manual. My question is how can I, if possible, to utilize gti-source-control from GitLab CICD pipeline to deploy code automaticaly after PR approval instead going to the Git UI?
Thanks
InterSystems FAQ rubric
To compile class routines including the mapped modifier, specify the compiler modifier "/mapped=1" or "/mapped". For example, do the following:
[Example 1] Get the class list and compile
do$System.OBJ.GetClassList(.list,"/mapped")
// build your classes starting from .listdo$System.OBJ.Compile(.list) [Example 2] Compile all classes
do$system.OBJ.CompileAll("/mapped") Hi Community,
We invite you to join our next Meetup in Cambridge, MA on August 28, 5:30-7:30 pm.
>> RSVP here <<
Hi all,
I have some .vm (Velocity Templating Language) files that I'd like to be able to load into IRIS with the $System.OBJ.Load(filename) command, but it seems that only accepts XML files.
I've tried adding import/export logic in my custom studio document that will wrap the velocity content inside an XML document and vice versa, I've changed the existing Velocity files to have the extension .xml and be wrapped in XML, and I've included a .dtd file for them to reference. However, this doesn't seem to work.
Hello,
Is there a built-in Set class in IRIS? A set is an array-like collection where each value in the set is guaranteed to only appear once.
Among the numerous authors present on the InterSystems Developer Community, there are unsung heroes who leave a lasting impact through their dedication and contributions. One such member is @Ben Spead, whose experiences and milestones have greatly shaped our Developer Community. He has consistently championed the communities, starting with Zen Community in 2008 to being an early participant in the Developer Community's beta phase in 2015.
🤩 Let's take a closer look at Ben's journey with InterSystems technology and our Developer Community...
.jpg)
Hello,
Recently I have been tinkering with VSCode and ObjectScript extension to connect to my dockerized IRIS instance. I have configured the instance to use Apache as a Web Gateway as per instructions and it has been working well. Currently I'm using a self-signed certificate for the SSL part of the connection. The browser nags about insecure certs when connecting to Management Portal but that's expected.
However when I try to connect to the instance with VSCode it simply fails with the following error message
Hi Team,
My SOAP functions were working perfectly before enabling basic authentication. To set up basic authentication, I created web applications for the SOAP service, checked the password option, and assigned a user to this web application. However, after enabling basic authentication, the SOAP service stopped working.
Started some work using WorkMgr, but then I noticed, that it stuck and does not get any responses from workers anymore
And I found that messages log contains logs about dead processes, why WorkMgr daemon did not restart died processes?
How to restart them without restarting IRIS
Hi Community,
We are pleased to invite you to the next InterSystems online programming contest, which is focused on Python!
🏆 InterSystems Python Contest 🏆
Duration: July 15 - August 4, 2024
Prize pool: $14,000
.jpg)
Since my initial question on ordering json properties a few things have happened.
Let me recap the issue at hand:
- In the FHIR specification, properties are listed in a certain order, for example, see https://www.hl7.org/fhir/patient.html#resource
- When you serialize resources to XML, the resulting document elements are ordered as defined in the specification.
- On the other hand, json objects returned from the IRIS for Health FHIR Repository will for example normally have the "id" as the last property, given that new properties are appended.
For me as a developer, this is annoying, even though I know json has no concept of order. When I read through received resources in e.g. Postman, I now need to look for "id" and "extension" properties at the end of the resource, instead of in the location that you would expect them based on the specification...
The most thorough but more expensive solution for ordering resource properties is to convert the FHIR resource to XML and back to json, like this:
/// Order FHIR resource properties according to the spec
/// With modifyOriginalObject = 1, also the original resource is re-ordered
/// This is implemented by converting to XML and back so orders also deeper levels
/// This is 40-50 times slower than the shallow method, it takes 1.5 - 2 milliseconds
/// With modifyOriginalObject = 1 it is "only" 20 times slower than the shallow method
ClassMethod FHIROrderResourcePropertiesDeep(schema As HS.FHIRServer.Schema, resource As %DynamicObject, modifyOriginalObject As %Boolean = 0) As %DynamicObject
{
do ##class(HS.FHIRServer.Util.JSONToXML).JSONToXML(resource, .pOutStream, schema)
set newresource = ##class(HS.FHIRServer.Util.XMLToJSON).XMLToJSON(.pOutStream, schema)
if (modifyOriginalObject)
{
do ..CopyFromResource(resource, newresource)
}
return newresource
}
This will properly order all properties in the object hierarchy based on the FHIR Schema.
I also have a more "shallow" method, where we just re-order each resource to start with "resourceType", "id", "meta", "text" and "extension", and we do not touch lower levels of the object hierarchy:
/// Order FHIR resource properties according to the spec
/// With modifyOriginalObject = 1, also the original resource is re-ordered
/// This is a "shallow" method as it only looks at a few common attributes, and only orders the outer level of the object
/// This is however 40-50 times faster than the deep method, it only takes around 0.04 milliseconds
/// With modifyOriginalObject = 1 it takes around twice as much and so is "only" 20 times faster than the deep method
ClassMethod FHIROrderResourceProperties(resource As %DynamicObject, modifyOriginalObject As %Boolean = 0) As %DynamicObject
{
set newresource = ..JsonOrderProperties(resource, [ "resourceType", "id", "meta", "text", "extension" ])
if (modifyOriginalObject)
{
do ..CopyFromResource(resource, newresource)
}
return newresource
}
/// Create a new json object with its properties in the specified order
ClassMethod JsonOrderProperties(object As %DynamicObject, order As %DynamicArray) As %DynamicObject
{
#dim newObject as %DynamicObject = {}
// First set the ordered properties in the new object
for index = 0:1:order.%Size() - 1
{
set name = order.%Get(index)
set done(name) = 1
set type = object.%GetTypeOf(name)
if $EXTRACT(type, 1, 2) '= "un" // unassigned
{
do newObject.%Set(name, object.%Get(name))
}
}
// Now copy remaining attributes not specified
#dim iterator As %Iterator.Object = object.%GetIterator()
while iterator.%GetNext(.name, .value, .type)
{
if '$DATA(done(name))
{
set type = object.%GetTypeOf(name)
if (type = "boolean") || (type = "number") || (type = "null")
{
do newObject.%Set(name, value, type)
}
else
{
do newObject.%Set(name, value)
}
}
}
return newObject
}
I also wanted to be able to return a properly ordered FHIR resource from the Add() and Update() interaction methods in my IRIS for Health FHIR repository strategy. This is implemented through the modifyOriginalObject parameter you will find in both code samples above:
if (modifyOriginalObject)
{
do ..CopyFromResource(resource, newresource)
}
Goal for the CopyFromResource(resource, newresource) method is to remove all properties from the original resource, and too re-insert the properties from the new resource in the proper order. Surprise, surprise, I ended up with the resource properties being perfectly reversed order. :)
What I learned from this is that the %Set() adds new properties in the last know empty spot. After reversing the order before adding I ended up with the perfectly ordered resource:
/// Copy one json object and replace properties in the other
ClassMethod CopyFromResource(object As %DynamicObject, newobject As %DynamicObject)
{
// First remove all original properties
#dim iterator As %Iterator.Object = object.%GetIterator()
while iterator.%GetNext(.name1, .value, .type)
{
do object.%Remove(name1)
}
// Properties are added back in at the last known empty slot in the object, so we end up with everything in reverse order
// That is why we explicitly reverse that
#dim reversedorder as %ListOfDataTypes = ##Class(%ListOfDataTypes).%New()
#dim newiterator As %Iterator.Object = newobject.%GetIterator()
while newiterator.%GetNext(.name, .value, .type)
{
do reversedorder.Insert(name)
}
// Now add back all properties from the new object in reverse order!!
for index = reversedorder.Count():-1:1
{
set name = reversedorder.GetAt(index)
set value = newobject.%Get(name)
set type = newobject.%GetTypeOf(name)
if (type = "boolean") || (type = "number") || (type = "null")
{
do object.%Set(name, value, type)
}
else
{
do object.%Set(name, value)
}
}
}
Yesterday I tried using the %Clear() method available in 2023.3 on %DynamicAbstractObject, to simplify the code. Unfortunately this throws an UNIMPLEMENTED error.
To be continued!
Not so while ago GitHub introduced, ability to very quickly run VSCode in the browser for any repository hosted there. Press the . key on any repository or pull request, or swap .com with .dev in the URL, to go directly to a VS Code environment in your browser.

This VSCode is a light version of the Desktop version but works entirely in Browser. And due to this, it has a limitation for extensions which was allowed to work this way. And let me introduce the new version 1.2.1 of VSCode-ObjectScript extension which now supports running in Browser mode.
Hi Community,
What are the advantages of using multiple namespaces for your code? Learn some of the benefits in this discussion with @Derek Robinson, Senior Online Course Developer, and @Scott Clark, Implementation Specialist:
I receive response from Business Operation(HTTP GET) as below :
<response>
<message_code>202</message_code>
<message_string>Success/message_string>
</response>
I am not able to read the "message_code" as response.message_code ?
is it because of underscore ?
Is there a way to read it ?
Hi,
I'm new with writing Caché Objectscript so I need some assistance. I have XML which contains information like this:
<?xml version="1.0" encoding="UTF-8"?> <session> <sessionId>124364</sessionId> <cabinet>demo</cabinet> <eventType>IN</eventType> <eventTime>20161006160154</eventTime> <login>test</login> <loginFirstName>test</loginFirstName> <loginLastName>test</loginLastName> </session>
I have a class representing this object as follows:
Hi, Community!
Need to learn how to write better prompts for GenAI? This video from Learning Services introduces six key strategies:
Hello Intersystems Community,
I'm currently facing an issue with message purging in my Healthcare environment, and I'm seeking your valuable insights and guidance to resolve it.
I've configured a purge task to delete messages older than 30 days, and when I run this task immediately, it doesn't delete anything,
I changed the 'Run task as this user:...', I thought it could be an access issue.. But nothing happened, I even changed the priority, same thing..
Hi Guys,
I'm getting ERROR #6237: Unexpected tag in XML input: imageclickbutton when running Build All for all existing classes, imageclickbutton is one of custom components we use in our application and I can actually compile imageclickbutton.cls class with no issues and also I can compile the class containing the imageclickbutton tag with not issues but I get the errors when running the Build All not sure why?
BTW in was a part of conversion where I'm converting our legacy Ensemble 2014 to 2018 and all classes are compiling fine only classes that have those custom components in them
.png)
An effective source control solution allows organizations to manage complex codebases, facilitate seamless collaboration within development teams, and streamline deployment processes.
Sonic Healthcare, a leading provider of pathology, radiology, general practice, and corporate medical services, has significantly enhanced visibility and control over its complex environment by implementing Deltanji source control. The tight integration Deltanji provides with InterSystems IRIS and IRIS for Health has been central in achieving these improvements.
Sonic Healthcare's Set Up
I am trying to log certain program data in my ObjectScript REST class, to track down a bug I have. I am comparing two values at runtime, and one result does one thing, and another a different thing. Since this is a REST API class, I have no way of seeing in real time what the value is to debug. I cannot simply run the method in debug in Studio as it will not run properly being a REST class method, nor have the correct incoming header data to correctly replicate what is happening in the API at runtime when being hit by client apps. In other languages like C# or Java, when I would debug an API
I encountered this quirk when investigating an unrelated issue affecting how Studio projects are handled in VS Code.
When you add the top level of the webapp to a %Studio.Project this inserts a %Studio.ProjectItem with a .DIR suffix. For example, if Studio or VS Code is connected to the USER namespace and you add the /csp/user webapp to a project the new ProjectItem name is "csp/user.DIR".
As I was trying to create a routine search query via RoutineList, I discovered that documentation both for Cache and Iris offers only ABC* and ABC? syntax for including routine names and, unlike %RO, does not offer name ranges. Is that indeed so?
After some system files reading, I discovered that you can EXCLUDE certain routines with ', by using the 'ABC or 'ABC* syntax. That is not documented but it should be. Any other non-documented RoutineList syntax capabilities?
Example:
Hi,
I'm making a request to an API that works perfectly with Postman, you can see it here:.png)
The URL is https://testcds.esriguide.org/v2/session/3189981 where the last part is the ID's session I want to get back.
When I try to make the same request in IRIS I always get a "Bad request" error.
I'm creating the request which all the information needed (or at least that I know):
Method TornaRequestGET() As %Net.HttpRequest