Hi,
Is there any functionality available to generate FHIR bundle id (GUID)?
Thanks
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,
Is there any functionality available to generate FHIR bundle id (GUID)?
Thanks
I am working on tweaking our current patient load process. The roster input is in text pipe delimited format, parsed out and transforms it to a standard HS.Message.PatientSearchRequest, and send to business process for patient matching. Result is transformed into a standard ADT HL7 message using EnsLib.HL.Message class. I would like to know if there is another class I can use that will transform my output to a text flat file pipe delimited instead of HL7 format? any advice on how to do this is greatly appreciated.
Thanks!
Greetings, InterSystems community!
I am pleased to announce that the web terminal project, Caché WebTerminal version 4 gets its release! After long period of enhancing this web application from 2013, it came to the version 4, which features major stability and security improvements, intelligent autocomplete and syntax highlighting, convenient SQL mode and a lot of other useful features.
The goal of this article is to spread the knowledge about this project over the InterSystems community.
Hi Developers!
A question to those who use VSCode to code InterSystems ObjectScript.
Suppose you have the ObjectScript code on IRIS server and you want to export it into the desired folder.
And you have VSCode connected to the server.
What is the way to tell VSCode that I want to export classes into some particular folder in /package/class.cls way?
E.g. into:
/project_folder/src/cls/Package/class.cls
and project_folder is opened in VSCode as the folder of the project.
Here are a few examples of conversions and operations you might need, along with links to documentation where you can learn more.
At the time I wrote this, Eastern Daylight Time was in effect for my Caché system.
Caché has a simple time format, with a longer range of recognized dates compared to some other technologies.
The current time is maintained in a special variable $HOROLOG ($H):
USER>WRITE $H 64146,54027 USER>
The first integer is the count of days since December 31, 1840. The second integer is the count of seconds since midnight of the current day.
Hi,
I have the requirement to dump large result sets into files. I am currently using %SQL.Statement and the result set created by it.
The DisplayFormatted is used to write a CSV. The query I used to test does not contain any filters, it is just a select * from a table with 16 million rows.
The file created is 2GB in size. The issue I have is that it takes 8 hours to create this file.
I have seen in the past that file streams write fast at the start. As the file continues to grow, the process' memory usage increases until it reaches the max allowed.
Hi all, I am new to IS Objectscript and I would appreciate some assistance regarding this.
I am trying to find out how to count the number of elements within a dynamic abstract object and I am having some trouble using the size method.
Here is the code below:
The key value pairs are originally in JSON and I would have converted it in to an object for use.
Class JSON.I'm looking for a way to get the message header ID for the current message in a Request to a Business Process.
I've located some code that gives me what I need, but it runs the risk of violating the "abstraction layer" ISC has in place around such things. And while I very much appreciate their efforts at keeping things simple for me ... well, sometimes you just have to dig through the guts to get what you want.
Is there a documented, deprecation-resistant method for getting at %Ensemble("%Process").%PrimaryRequestHeader.%Id() from within a BP?
I've been tasked with an interface that needs to supply some additional metadata for the indexing of HL7v2 messages. After toying with a couple of ideas, I thought that it would be useful to subclass EnsLib.HL7.Message, add a %DynamicObject property, and store the metadata in it (it ends up getting sent to the target in JSON form anyway).
And, well, it seems to work just fine ... so far.
I seem to remember that %DynamicObjects are not persistent, and for that reason not something you would normally stuff into a database.
for debugging purposes of complex applications.
Hey I am very new to Intersystems Objectscript and I am trying to find a way of extract 4 digit numbers from a stream.
I have a stream full of results
2334
3434
5543
4334
And I am trying to remove each 4 digit grouping from the stream.
I have tried the following for loop
for i=1:1:$length(result) {
set curr = $extract(result, i)
write !, curr
set count(curr) = $get(count(curr)) + 1
}
Unfortunately the loop extracts one digit.
Does anyone have any suggestions on how to solve this ?
Hi all
I'm trying to recreate this method below in Cache/IRIS.
https://en.wikipedia.org/wiki/Luhn_mod_N_algorithm ISO-7812-1 (LUHN-10)
I've been following the javascript example. It seems simple in theory but i'm struggling with which cache methods to pick.
$LENGTH, $System.SQL.FLOOR() - seem ok
$EXTRACT - I think for .charAt (though may need to correct base)
$FIND - for .indexOf
Any suggestion which would be the best ones for the job?
Thanks
Dan
Hi Community,
We're pleased to invite you to the upcoming webinar in Spanish called "Learning ObjectScript from scratch"!
Date & Time: May 25, 4:00 PM (CEST)
Speaker: @David Reche, Manager of the Dev Community in Spanish
The webinar is aimed at:
Awhile back the Developer community helped me with a situation I was having... How to loop through a Repeating Segment and Single Filed, example OBX().5, within a Business Process Rule and compare it against a Data Lookup table.
Well now I need to take it a step further. I need a way to loop through OBR() segment, and loop through OBR().4() and the subfield 4.1 and compare it to a Data Lookup table.
So I thought I could copy my existing function code and add another level to it, but its not returning what I would expect.
Hi developers!
I have an existing CSP app and I want to add a role to it. How can I make it programmatically?
Hi! I have a promblem with ##class(%File).Exists -method and scandinavian characters.
Ensemble: Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2018.1.2 (Build 309_5U)
I have a business service (EnsLib.EDI.XML.Service.FileService (charset=binary)) which reads XML-files from the server and transmits those to the business process. BP request class is EnsLib.EDI.XML.Document. In BP I have code block
SET SourceConfigName = process.%PrimaryRequestHeader.SourceConfigName SET SrcPath = ##class(Ens.Director).GetAdapterSettingValue(SourceConfigName,"FilePath",.tSC) SET AttachFileName = request.
I am updating the PV1 segment with values from the database but when I get two values back I dont know how to separate them with a tilde and insert. Any advice for me on that?
so if I get two values returned
my PV1.7 segment should be :
My current code is as below: It works fine for one value, but when there are more than 2 values returned I need to find a way to include it
Set sc=res.Prepare(sqlstring,,conn)
{
s RET = res.GetData(2)
}
s sc=res.Close()
Set sc=conn.
Hi Community,
Please welcome the new video on InterSystems Developers YouTube:
Following instructions on this page https://docs.intersystems.com/latest/csp/docbook/Doc.View.cls?KEY=D2IMP… I am trying to create a Data Connector to be used as a base class for a cube with update support.
That page suggests that putting an SQL query inside XData block is not suitable for a Data Connector that supports updates.
Later it also suggests that to enable updates your SQL query must include
WHERE $$$RESTRICT
Providing an example of it in XData block example like this
<sql>SELECT A,B,C FROM MyApp.
Announcing gj :: locate. A simple extension for VS Code that will help you get to the source of your errors.
In VS Code, using either the Serenji extension or the basic InterSystems objectscript extension, this small add-on will open the appropriate class or routine and position you at the exact line where an error occurred.
No more tedious counting of lines to find <UNDEFINED>zCredit+206^Ledger.Invoice.1. Instead, with gj :: locate you can get there with just a couple of clicks.
This 20 second video tells it all:
Download now and enjoy getting to the source of your errors.
Hi Community,
I am trying to access another process's content of objects like %request and %session. I am using the class/method "%SYS.ProcessQuery:VariableByPid". Does anyone knows how to get the value of the properties like %request.Data("ID",1) from one process that is running on the DB server?
Example of what I am trying to do:
set rs=##class(%ResultSet).%New("%SYS.ProcessQuery:VariableByPid")
set tsc=rs.Execute(ProcessID,"%request")
while rs.%Next() {
w "Name:"_$g(rs.Data("Name")),!
w "Value:"_$g(rs.Data("Value")),!
}
do rs.
You may think it isn’t too difficult to get from label+offset^routine to the actual source line responsible for the error. For an expert it isn't that hard... most of the time. But there are enough oddities and special rules that even an expert can get it wrong, whilst spending a lot of time trying to get there.
gj :: locate is the latest tool from George James Software – it debugs any error, class or routine by converting the location of an error in compiled .int code to the corresponding location in your source, and then taking you right there.
Image this scenario…
I checked out a Git-Branch and want to Import all Objectscript-Objects to my localhost.
While using Import without Compilation I receive a lot of errors.
request to http://127.0.0.1:57772/api/atelier/v3/TSTCBW/doc/MusLT01LCOD.int?ignore… failed, reason: connect ECONNREFUSED 127.0.0.1:57772
While using Import and Compile I receive much more of this errors.
Is there a setting, that I have to key in?
Or how can I synchronize my namespace to test my changes?
I have a CSP page that is supposed to show some user info (Full name and some other properties retrieved from AD)
I am unable to get them outside of %SYS namespace using Security.Users class. Is there another mechanism to do that, or I am using Security.Users class incorrectly?
Hi folks!
Often while debugging you want to know the values of all the parameters.
Using VSCode Debugger is not an option.
What do you use to know what parameters came to the method?
My hope if you have a "magic" macro that will store all the variables with their names into a global?
And share your approaches, please?
We released a new version of ZPM (Package Manager)
New in ZPM 0.2.14 release:
See the details below.
anyone know of a simple way to search a blob of text from a list of keywords in one fell swoop, without having to iterate through each keyword and perform an individual search? Ex.
s keywords="This,blob,text"
s text = "This is a sample blob of text"
i text[keywords w "hit"
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!
Background: We have our own SQL map that predates InterSystems'. A program writes an XML file for each table map class as $system.OBJ.Export would. $system.OBJ.LoadDir loads the XML files into .cls files.
The reason is a long story, but we need to update parameter EXTENTSIZE (only) in existing classes. This does not seem to happen. As a test I used $system.OBJ.