Hey Developers,
Enjoy watching the new video on InterSystems Developers YouTube channel:
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.
Hey Developers,
Enjoy watching the new video on InterSystems Developers YouTube channel:
Does anyone have any pointers or maybe familiarity of making Email templates in Objectscript?
I'm currently trying to implement Televisits with our system and am needing to send an email to the patient. I'd like to make it a nicer looking email which will require a good amount of inline CSS. I currently have a method, but is very much a sore sight for the eyes.
I was wondering if there was a way I could use Embedded HTML and pass that into the DO msg.TextData.Write command with the ##class(%Net.MailMessage)?
How do I access items and their settings of production by using Objectscript? I have already tried making SQL queries to Ens_Config.Production table and using methods in Ens.Director and EnsPortal.Utils classes but I just can't get a hang of it.
The unfortunate reason, why I need to do this, is that our environments (DEV, QA and PROD) have gone in really bad shape over the years and now the software development is just pure agony since environments are not in sync. Comparing different environments is also extremely difficult since it is hard to even tell which classes are in use.
Is there any full featured tutorial available for doing the report development using object script in the Trakcare system for a starter developer(For Trakcare)?
Once we developed the report and then how we can test and add this report to our existing Trakcare.
I am reaching out to find out if anyone has come across a similar dilemma.
In my current role, I have been asked around the best way to design some patient labels for a client.
I primarily would stick to what I know and veered towards designing the label in ZPL and then creating a Abstract Class to call the ZPL code, however I have been asked why not to design via JReport. The patient labels will be processed via thermal ink printers primarily Zebras, I am wondering if anyone out there has come across this or would recommend to stick to what you know.
Mixing Object syntax with SQL is one of the nice features in Object Script. But in one case, it gave strange results, so I decided to isolate the case and describe it here.
Let's say you need to write a classmethod that updates a single property on disk. Usually, i would write that using SQL like this :
There are many ways to generate excel files using Intersystems, some of them are ZEN reports, IRIS reports ( Logi reports or formally known as JReports), or we can use third party Java libraries, the possibilities are almost endless.
But, what if you want to create a simple spreadsheet with only Caché ObjectScript?
Let's say I have two lists of connected data where elements of listTwo only make sense if given an item of listOne as context:
listOne = ["A", "B", "C"]
listTwo = ["x", "y", "z"]
Tuples like ("A", "y") and ("C, "x") make sense, but "A" or "x" by themselves don't. I would like to pass in a list of such tuples into a method and have it handle each tuple in the list. So what would be the best way to format them given that ObjectScript does not have specialized tuples? Would it be nested $LISTBUILD lists or something else?
Is it a good practice to set the MAXLEN value of %Library.String property type? Will it lead to wasted storage if its not really using it?
For example, I have to store a 5 characters long string into the below str field. Which of the statement is recommended?
Property str As %String;
vs
Property str As %String(MAXLEN="5");
Hi,
I am using IRIS for Windows (x86-64) 2019.1.1
I have.
1. Created a BS with SQL Inbound Adapter which successfully connects and gets rows from DB .
2. Created a request message is populated with results of SQL query.
3 Created a BP with HL7 Router + Routing Rule + Transformation + Send to Target (BO).
4 . Created BO sending HL7 to file.
i am getting the following error.
ERROR <Ens>ErrException: <PROPERTY DOES NOT EXIST>zOnRequest+1^EnsLib.MsgRouter.VDocRoutingEngine.1 *DocType,Test.SQLtoHL7Req -- logged as '-' number - @''
What am i missing
Thanks.
Hi developers. I often miss the ZPM program on a clean system. Nothing complicated? Take and install. And in one line? Especially in a docker container. There is a solution. I'm very happy with it;) Maybe the line can be shortened?
set $namespace="%SYS", name="DefaultSSL" do:'##class(Security.SSLConfigs).Exists(name) ##class(Security.SSLConfigs).Create(name) set url="https://pm.community.intersystems.com/packages/zpm/latest/installer" Do ##class(%Net.URLParser).Parse(url,.comp) set ht = ##class(%Net.HttpRequest).%New(), ht.Server = comp("host"), ht.Port = 443, ht.Https=1, ht.@Ming Zhou asked a great question in https://community.intersystems.com/post/how-get-all-properties-defined-… and the answer sums up exactly why ObjectScript is my favorite.
When I'm first describing ObjectScript or IRIS to someone I always explain that you can write a class, compile it, get a table, and work with your data from an object or relational perspective - whichever is most natural.
Hi, I tried the following exercise from the IRIS documentation. I updated the username, password and IP address, but receiving this error;
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. --->
I can use the same credentials and IP address to connect ok via VSCode to my local IRIS...
Any pointers much appreciated.
https://docs.intersystems.com/irisforhealth20211/csp/docbook/DocBook.UI….
Has anyone here been successfully populating a %Persistent object from calling %LoadFromMemory() with a temp. global?
I have tried using Sample.Person in the SAMPLES namespace. It worked EXCEPT that I have no way to set the id into that Sample.Person objec.
SAMPLES>Merge array(1) = ^Sample.PersonD(1)
SAMPLES>Set obj = ##class(Sample.Person).%LoadFromMemory(1,.array)
SAMPLES>zw obj
obj=1@Sample.Person ; <OREF>
+----------------- general information ---------------
| oref value: 1
| class name: Sample.Is there a way to access a SOUNDEX function from ObjectScript? There is such a function in the multivalue basic dialect and also one used by Patient Index.
I'd like to to assign a value to a variable, depending on the results of a condition. The equivalent of what can be done in c++ with the following:
(a>b) ? a=1:a=0;
Or in python:
a = 1 if a>b else 0This makes the code much more readable and compact.
In objectscript it would be:
if (a>b){
a=1
} else{
a=0
}Hello,
I want to access the HL7 Router settings from within the HL7 rule. Goal is to create a New class by extending
Then create a PARAMETER ProcessMessage which can be set to an integer value for the HL7 Router.
Create a Rule class and based on the value of this setting ProcessMessage
process/not process the messages.
{ Parameter RuleAssistClass = "EnsLib.HL7.MsgRouter.RuleAssist"; XData RuleDefinition [ XMLNamespace = "http://www.intersystems.
What is the difference between method and class method and why are mentioning one as Method and class method what is the purpose of this?
Only a few days to go until the Global Summit! George James Software will be on hand to talk about any projects you may have on the horizon, such as application development, data and platform migration, system integration, training, and support – we can work with you to find practical and maintainable solutions that support the growing needs of your organization.
We're also running a User Group Session on Wednesday, July 22nd at 12pm. It's a great opportunity to find out more about our tools and ask us (and current users!) any questions.
Hi,
Any suggestion on how to compare dates? Below is my code but it does not seem to work.
USER>w $zdate(zdateh(x,8),1) > $zdate($zdateh(y,8),1)
When I set x to "06/01/2022" and set y to "04/01/2022" gives me an output of 1
When I set x to "09/01/2019" and set y to "04/1/2022" still gives me an output of 1
Any help is appreciated.
Thanks!
Hi, is there a method that can retrieve both the filename and archive path?
I can get the path to the file ok i.e. set sPath = pInput.Filename and I can get the archive path i.e. set tArchivePath = ..Adapter.ArchivePath
For our WSDL the portType value is being suffixed with "Soap" at the end.
When i update the the SERVICENAME parameter. in the Service I can update the start of the portType value. Is there a way to prevent the suffix being added?
You may have seen my series of articles on GlobalToJSON closing with Embedded Python.
And to me, Embedded means inside a Class and not PEX or other external variants.
The first variants showed that ePy is not an ultimate requirement. ISOS/COS may do it as well.
Here I try to position ePy inside IRIS.
This month I announce the release of version 1.8.0 of the VS Code extension, which contains the following enhancements and bug fixes.
The big news is support for server-side project files as some of you old-timers will remember from Studio. If you work client-side, VS Code already has great project management features. You can simply use a folder as a project, or use multi-root workspaces. But if you work server-side, you might appreciate some better artifact management capabilities, and that's what this feature is about. Read more in this new Projects chapter of the documentation.
How I can get current date/time on format YYYYMMDDhhmmss?
I tried $ZDATETIME($HOROLOG,8), but I got 20220606 17:59:56 and I want 20220606175956
Thanks
Hi Community,
This post is a introduction of my open exchange iris-fhir-client application.
iris-fhir-client can connect to any open FHIR Server by using embedded python with the help of fhirpy Library.
Get Resource information by terminal and by using CSP web application.
Hi, what’s the best way to check if your query return 0 records?
If $$$ISOK(sc)
{
Set tResult = sqlStatement.%Execute()
WHILE tResult.%Next()
{
set tRecords = tResult.%ROWCOUNT
}
if (tRecords = "")
{
write "no records"
}
}
Hi Community,
Recently, I migrated a series of Objectscript repositories from XML to UDL format.
After the migration, I was a bit disappointed by the presentation on the GitLab web interface.
Since Objectscript syntax is supported by GitHub, I thought It would be also supported by GitLab. Unfortunately, the library used by GitLab to highlight the code does not have an extension to support Objectscript.
GitLab uses the library Rouge, which can highlight over 200 languages. This is a library written in Ruby (see the GitHub page), but Objectscript is not in the list.
HI Guys.
I want to know how to distinguish whether a variable is a pure numeric string or a number, such as "123" and "123".
I only know an inelegant way.
ClassMethod IsNumber(n)
{
s ret=0
try{
s ret= $lb(n)=$lb(+n)
}catch e{
s ret=0
}
q ret
}Is there any other way to implement it
Hi everyone,
I am currently performing a patient merge thorug ADT^40 HL7 messages. In order to do that, I am following this guide which I found on the ducumentation: http://10.41.11.210:57772/csp/docbook/DocBook.UI.Page.cls?KEY=HESUP_ch_IHE#HESUP_IHE_configuring_registry_PIX
My main issue regards the fact that I can't update the PatientID and the SourcePatientID of the HS_Registry.Document table of the prior patient, wheras, I find only the new anagraphic on the HS_Registry.Patient table.