Hi Community!
We are pleased to invite you to the upcoming webinar "Machine Learning Toolkit (Python, ObjectScript, Interoperability, Analytics) for InterSystems IRIS" on 26th of March at 10:00 (Moscow time)!
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 Community!
We are pleased to invite you to the upcoming webinar "Machine Learning Toolkit (Python, ObjectScript, Interoperability, Analytics) for InterSystems IRIS" on 26th of March at 10:00 (Moscow time)!
Is it possible to mimic what selenium does like navigating to a site and logging in and filling out a form then logout in COS.I am trying to do that in COS using %Net.HttpRequest class or should I be using a different class the idea is to be able to call a web app login into it and fill out form and log out
In recent discussion on CachéQuality I was (friendly) blamed for old syntax promotion and deliberate obfuscation of the code. Therefore I decided to clarify my point and shed some light on one of possible source of side effects that may unexpectedly occur with RETURN command with an argument.
what is the bullet point char value in COS the equivalent of •
Hi all,
Lets imagine that there's a process that locks an entry of a gived domain, in my example the ID 2 of the table User.tApplications and using an exclusive lock. Additionally the error handling is managed by a $ETrap routine wich will look for error data in order to log it
Set $ETrap = "Do Err1^ErrRoutine" Set obj = ##class(User.tApplications).%OpenId(2,"4",.errors) If ($System.Status.
Hello Gentlemen,
My Business process connector receive a Oru_01 hl7 message with an ED segment inside (Base64 pdf). How is it possible to extract it and create a pdf file within?
Here is the sample of function I have. I know it doesn't work but if you could help me, it would be perfect. Here is my function, the goal would be it create the file where I want and return me the link of the file.
Method getPdfFromED(req As EnsLib.HL7.Message,segment As %String) As %Status
{
do req.GetFieldStreamBase64(.base64, segment)
set stream1=##class(%Stream.FileCharacter).Hello,
I'm using ZEN report to generate a PDF file out a table.
Although, I need to display data from two tables splitted into two different namespaces.
So, I created a process that fetches all the data I need and then calls the PDF class and generates the stream out of it.
My question is, once I've got my list of objects. How can I transform it into a ResultSet, in order to display in the report ?
Thanks for your answer.
I successfully got everything in this guide to work: https://community.intersystems.com/post/ensemble-rabbitmq-java-client-q…
I am now using the information I gained from this guide along side with this guide:
https://www.rabbitmq.com/tutorials/tutorial-one-spring-amqp.html
I am running into an issue though. In the RabbitMQ guide I just posted, they have a "Receive message" functionality. I use that alongside with the SendMsg from Ensemble method in the InterSystems guide.
I know it's late, but I really love the advent of code theme each year to find some project ideas to go out and code something and push myself.
I had the intentions of completing the AOC 2018 before the new year, but I've got 2 young kids (1yo and 4yo), so most nights I just want to sleep.
I've been looking at this on my half hourly commute each day before and after work.
So whilst doing this, I found not many people had posted what they had done and in previous years.
ˮ This is one of my articles which was never published in English. Let's fix it!
Hello! This article is about quite a practical way of developing InterSystems solutions without using the integrated tools like Studio or Atelier. All the code of the project can be stored in the form of "traditional" source code files, edited in your favorite development environment (for example, Visual Studio Code), indexed by any version control system and arbitrarily combined with many external tools for code analysis, preprocessing, packaging and so on.
I have a problem,ExtentSize,Selectivity etc is stored in class definition.
I have multiple namespaces with globals maped and only one class definition for All, for example Orders.
Order definition is only one,mapped to main namespace,but in different namespaces have different ExtentSize etc.
I am taking over a production system that had some HSLIB and other database routine and class files modified. However, I do not know what was modified .
I developed a routine that allows me to load each database in our production instance and compare it against a default instance using the SIZE attribute. This allowed me to generate a list of files where the .INT file size in production does not match the file size in the default instance. However, doing a spot check of the .cls or .mac files indicates that in some cases these files are identical, just the intermediate files are different.
Hello Gentlemen,
As you can read on the title, my question is to know how to retranslate the hl7 message into a string and so to remove the '\E' that are inside. A example/picture worth more than a thousand word.
OBX|1|RP|ECG||CARDIO ECG^APPLICATION^PDF^^\E\\E\sitehopital.org\E\files\E\cardio\E\022018\E\GE274583.PDF|
As you can see, the escape character \E is used by hl7 message in the purpose to authorize a character '\' just but I don't want it in my program... Is there any function that retranslates this format into a "normal" format?
Faithfully,
Thomas
I'm getting this compilation error:
Kompilieren der Klasse digi.packet
FEHLER #5002: Caché-Fehler: <FUNCTION>zLockUse+5^%ExtentMgr.GlobalRegistry.1
> FEHLER #5030: Während der Kompilierung von Klasse 'digi.packet' ist ein Fehler aufgetreten
when importing one of my classes on the production server into one particular namespace:
In my routine when I call set filestream.FileName = filename, I get an error
"cn_iptcp://localhost:56773/USER/%Stream.FileBinary.1.INT" does not exist on the ServerI successfully instantiate the %Stream.FileCharacter object. 'filestream' value is '1@%Stream.FileCharacter'. But when I debug the code, the step where I try to set the file name fails.
The port number for local host looks good for my current instance. I have tried a few variations, such as using the method FileNameSet(). But this did not work either.
My routine exists in the USER namespace, as indicated in the error.
Hello gentlemen,
I'm wondering how to get the specific HL7 message structur by coding in ObjectScript. I'm explaining myself, when you receive a hl7 message, you have to set its DocType to be able to read it conveniently. For example, an ADT_A15 (2.3.1) must have the docType of an ADT_A09 (2.3.1) to be well read. So you have 2 possibilities to know that, either you go in the documentation to see which structur to set in but I don't think it's generic.
I am new to Intersystems Cache, so please bear with me. We are using HealthShare 2013.1.
I have a routine to compare databases from separate instances where I want to ignore values that begin with %sqlcq. I thought this would be easy with pattern matching operator '?' but it is proving difficult and it seems to be because of the percent character.
For example:
set x = "%sqlcq.something.value.foo"
#;does not evaluate as true.
if x?1P1"sqlcq" {write "valid"}
set y="sqlcq.something.value.bar"
if y?1"sqlcq".E {write "valid"}
valid
if x?1"sqlcq".Our PAS system supplies date in a particular date format (ISO 8601 compliant) that includes seconds and milliseconds. Because many downstream systems cannot handle milliseconds (and some don't even want seconds) many transformations are required to truncate the data.
What immediately sprang to my mind was to look for a setting on the operation to modify outbound datetime fields - obviously there isn't one, thus the need for this question.
The Caché / Ensemble standard distribution contains in namespace SAMPLES
a nice example of a CSP page consuming WebService as a Client.
I have modified it not only to display the replies but to feed them back into a Global.
I used the classic Hyperevent to achieve this. The replies end up as a log in global^WSREPLY.
When there is no input anymore the page closes and goes away.
There are 2 versions with visible and hidden display during operation.
dc.WSCSP.reverseVerbose.cls and dc.WSCSP.reverseHidden.cls
The message to send is simply passed as a hash after the CSP_URL. (Mind URL encoding!
Our development server is set up to automatically keep the .INT code of compiled classes and routines, but the live servers are set to not keep the .INT code.
I know how to set the system to keep this code ($SYSTEM.OBJ.SetQualifiers() ?) but what are the ramifications of keeping this code on the live servers? Is it just a space issue? I always thought it was to keep the code more private.
I'm writing to an ODBC connection to a SQLserver database, and I seem to be sending the wrong data type to a date colum?
set tSC = ..Adapter.ExecuteUpdate(.intRows,sqlInsert,$ZDATETIME($NOW(),3,2), pRequest.ComposerName, [...])
I think `$ZDATETIME($NOW(),3,2)` is ODBC datetime format:
Do I have it wrong?
Stephen
Today in docs I found this example using NULL:
WRITE $LISTVALID($LB(NULL)),!simplified
zzdump $LB(NULL)and NULL can be case-insensitive:
zzdump $LB(null)seems the same as just:
zzdump $LB()But if null variable is defined then list would contain value from variable. Case sensitive in that situation.
Does anyone have any Idea what is this? Is NULL used anywhere besides as a list element?
Recently I needed a classmethod that returns annotation value based on a name of a activity.
As doing it at runtime seemed inefficient, I wrote compile-time utility that iterates over all business process activities and generates relevant code.
This code could be used in a variety of situations when you need to iterate over business process activities, just add it as a secondary superclass to your BPL processes.
Let Say I have
Class Carrier Extends %Persistent
Property Employee As Array of Class Employees
Class Employees Extends %SerialObject
Property Name As %String
Property Address As Array of Class AddressDetail
Class AddressDetail Extends %SerialObject
Property Street1 As %String
Property Street2 As %String
I can get value for Employee Name as Employee_Name.
But I want to Get Value of Address Street1 and Street2 of Class AddressDetail using SQL Query
How can I get that?
The class method "test" in the following code snippet sends an HTML email with an embedded image. Edit the literal strings to change the embedded image, to address, from address, subject, and body of the email.
Class objectscript.sendEmailWithImage Extends %RegisteredObject
{
classmethod test() {
S SmtpServer = ""
S SmtpUserName = ""
S SmtpPassword = ""
S imgPath="C:\test.jpg"
set s=##class(%Net.SMTP).%New()
set s.smtpserver=SmtpServer
set auth=##class(%Net.Authenticator).%New() ; use default authentication list
set auth.UserName=SmtpUserName
set auth.Password=SmtpPassword
set s.
I need to automate the handling of usernames passwords, serverNames etc for use in the sending and receiving of emails, logging into SFTP servers etc etc for use within COS code
To manage external passwords we could use LastPass or any other proprietary password loggers, but I need to be able to call them as part of the automation (COS code) and occasionally visually look them up to "remind" the staff of their passwords.
any suggestions as to the best class data constructs to handle this scenario. Should the whole table be encrypted, only the passwords etc.
I was wondering if anyone has ever created a unit test which would run testing a mac routine (old fashion), via
This code snippet sends an XML request to a server and saves the response to a file. The class method "test" runs the code:
Class objectscript.postXML
{
classmethod test() {
Set HTTPRequest = ##class(%Net.HttpRequest).%New()
Set HTTPRequest.ContentType = "text/xml"
Set HTTPRequest.NoDefaultContentCharset = 1
Set HTTPRequest.Location = "ITOMCZ"
Set HTTPRequest.Server = "wph.foactive.com"
Do HTTPRequest.RemoveHeader("User-Agent")
Do HTTPRequest.RemoveHeader("Accept-Encoding")
Do HTTPRequest.RemoveHeader("Connection")
Do HTTPRequest.SetHeader("Expect","100-continue")
Set RequestXML = ##class(%Library.File).%New("c:\test.xml")
Do RequestXML.Open("RS")
Do HTTPRequest.EntityBody.CopyFrom(RequestXML)
Do RequestXML.%Close()
Do HTTPRequest.Post(HTTPRequest.Location)
Do $System.OBJ.Dump(HTTPRequest)
Do $System.OBJ.Dump(HTTPRequest.HttpResponse)
Write HTTPRequest.HttpResponse.Data.Size
Write HTTPRequest.ContentLength
Set ResponseStream = ##class(%Stream.FileBinary).%New()
// Second part is typically the file extension, i.e.: application/pdf -> pdf
Set FileType = $Piece(HTTPRequest.HttpResponse.GetHeader("CONTENT-TYPE"),"/",2)
Set ResponseStream.Filename = "C:\test."_FileType
Write ResponseStream.CopyFrom(HTTPRequest.HttpResponse.Data)
Write ResponseStream.%Save()
Do ResponseStream.%Close()
}
}
Here's a link to the code on GitHub
This post is intended to guide you through the new JSON capabilities that we introduced in Caché 2016.1. JSON has emerged to a serialization format used in many places. The web started it, but nowadays it is utilized everywhere. We've got plenty to cover, so let's get started.
Hi,
Is there any COS command could kill all the globals given the namespace?
Thanks.