検索

お知らせ
· 2025年1月2日

InterSystems Open Exchange Applications Digest, December 2024

Hello and welcome to the December 2024 Open Exchange Recap.
General Stats:
23 new apps in December
443 downloads in December
1,028 applications all time
38,227 downloads all time
2,981 developers joined
New Applications
IRIS Global VSCode Editor
By Yuri Marx
iris-HL7v2Gen
By Muhammad Waseem
iris-http-calls
By Oliver Wilms
tz - ObjectScript Time Zone Conversion Library
By Eric Fortenberry
vault-link
By Henrique Dias
Database-Size-Monitoring
By sara aplin
docs-intersystems
By Dmitry Maslennikov
AoC2024_test
By Robert Cemper
SharePoint Online SPO REST API
By Mark OReilly
ks-fhir-gen
By Robert Barbiaux
iris-unit-test-dashboard
By Chi Nguyen-Rettig
ObjectScript-To-XML
By Akio Hashimoto
IRIS_ISTIO
By Ariel Glikman
Vector Search for MPI
By Luis Angel Pérez Ramos
FHIR Primitive Extension
By Keren Skubach
ISCLauncher
By Benjamin Spead
GPG
By Eduard Lebedyuk
DICOM Image Demo
By Keren Skubach
iris-global-yaml
By Yuri Marx
LLM QuickStart
By Chris Stewart
pyiris-iceberg
By Patrick Sulin
Doxygenerate
By John Murray
mongoCDC
By Netanel Frankel
New Releases
iris-python-lookup-table-utils by Johannes Heinzl
v1.0.1
  • Extends instructions in README
  • Fixes Dockerfile by omitting fixed version which became obsolete
IRIS WHIZ - HL7v2 Browser Extension by Rob Ellis
v1.10.0
Version 1.10.0
Feature Added
: ChartJS Analysis
An Analyse button now appears on message viewer page. This opens the results of your current message search in a new tab and shows you the data in some default ChartJS pie charts, a bar chart and a line chart. See item 33 in the ReadMe file for full details.
Thanks to the creators of the following libraries I used: * Chart.js v4.4.5 * chartjs-adapter-date-fns v3.0.0 * chartjs-plugin-datalabels v2.2.0 * chartjs-plugin-zoom v2.0.1 * Hammer.JS - v2.0.8 - 2016-04-23
Each released under the MIT License. See ReadMe and chartjs directory for further details.
Feature Added
: Queue refresh
Iris now has an auto refresh dropdown for the Queues page. Will refresh the queue at the interval selected. Does not load on Ensemble as it already has this feature.
Feature Added
: Export Search as CSV
On the Message Viewer page you can click the Iris Whiz Export button to download a CSV copy of the data currently in your search table.
Useful if you want to do quick analysis on your data but don't want to use the fancy new Chart.JS page I spent ages creating.
Feature Added
: Production Page Message Refresh
Added refresh button on the Message tab on the production page. Set an interval in the dropdown for automatic refreshing.
Feature Added
: Production Page Queue Sort
Added sort options for the queue tab on the production page. Defaults to sorting by error count. Click a table header to switch between asc and desc sort order. Use the search bar to find items quickly.
Feature Added
: Category Dropdown Case-Insensitive Order
Alphabetises the category dropdown list on the production page, regardless of case. Without this the order is case dependent.
Bug Fix
: Hide Related
Hide related button going for walkies.
Feature Updated
: TraceViewer
Clickable area to highlight the message in the FullTrace tab was tiny. Now it's all of the background area.
Feature Updated
: Saved Searches
Saved Searches now automatically use Body Property Criterion Type if RawContent is found in the text values.
Feature Updated
: Expand Schema
Expand Schema buttons now highlight on hover. Also now square to prevent them messing the visual of the message.
isc-json by Timothy Leavitt
v2.0.1

Fixed

7: Make the library compatible with %IPM v0.9+

iris-energy-isodata by Muhammad Waseem
v1.0.3
Fixed Python library version
isc-rest by Timothy Leavitt
v1.2.2

[1.2.2] - 2024-12-05

Fixed

  • Added compatibility with IPM 0.9+
Git for Shared Development Environments by Timothy Leavitt
v2.8.0

Added

  • Production Decomposition mode allows controlling interoperability productions as individual files for each host (#469)
  • Mapping configuration supports parameter expansion of \<env> to the environment name (#640)
  • Added saving settings as system default for new namespaces (#535)
  • Added filtering through branch names in UI (#615)
  • FullLoad pull event handler allows deploying changes with a full import of the repository (#619)
  • Pull and Sync options no longer log a fatal error if remote branch does not exist (#562)

Fixed

  • Fixed minor issues in Studio UI (#641)
  • Document save is forced before menu operations that can modify repository state
ks-iris-lib by Robert Barbiaux
v1.0.2
Separate unit test runtime root directory
ServiceInspection by Wolis Oliavr
v1.0.1
Add some detail pages and data statistics
v1.1.0
Update log
  1. Add two inspection items
  2. Add a configuration page to set the threshold for inspection items and whether to push alarm information to the email image configuration;
  3. Add a detail page that displays detailed information about component queues and inactive duration
  4. Add email alerts (requiring self configured email addresses), and send an alert email to the designated email address when the value exceeds the threshold
v1.1.1
Zpm installation bug fix
Intersystems-Monitoring by Teunis Stolker
v1.0.20
Various improvements that allow (temporary) suppression of errors
InterSystems Package Manager by Robert Kuszewski
v0.9.1
0.9 marks significant progress towards our 1.0 goals. IPM now supports using container registries for package distribution.
We've made a few incompatible changes so please read the latest release notes.
IRIS apiPub by Claudio Devecchi
v1.1.78
bug fixes & improvements
v1.1.79
improvements
d[IA]gnosis by Luis Angel Pérez Ramos
v2.0.0
New major update! LLM has been include to identify diagnosis from free text.
Ollama's docker image has been included to the project to leverage the llama3.2 model capabilities.
Most downloaded
MDX2JSON
By Eduard Lebedyuk
DeepSeeWeb
By Anton Gnibeda
ssl-client
By Evgeny Shvarov
WebTerminal
By Nikita Savchenko
ObjectScript-Math
By Peter Steiwer
iris-bi-utils
By Evgeniy Potapov
RESTForms2
By Henry Pereira
passwordless
By Sergey Mikhailenko
December, 2024Month at a GlanceInterSystems Open Exchange
ディスカッション (0)1
続けるにはログインするか新規登録を行ってください
質問
· 2025年1月2日

Nested queries

Hi Guys,

This Nested query is not working for some reason, but they work fine when executing  separately ?  

select id from FDRD_Com.List where vehicle in (select Car from FDRD_Com.Prod where ProductLineName='Toyota' and Car is not null)

 

Thanks

3 Comments
ディスカッション (3)2
続けるにはログインするか新規登録を行ってください
お知らせ
· 2025年1月2日

Resumen del mes de diciembre, 2024

¿No habéis podido entrar en la Comunidad todo lo que os gustaría? ¡No os preocupéis! Os traemos un resumen de todo lo que hemos publicado en el mes de diciembre. Seguid leyendo y no os lo perdáis ⬇️⬇️
Estadísticas generales
✓ publicaciones nuevas:
 18 artículos
 6 anuncios
 7 nuevas preguntas
Top 10 publicaciones
Top 5 Autores
Todos los artículos
#InterSystems IRIS
Actualización de Auditoría en 2024.3 - Eventos de Sentencias SQL Más Detallados
Por Alberto Fuentes
HL7 -> SDA -> FHIR -> Crecimiento Personal
Por Andre Ribera
Construyendo una imagen de IRIS con CPF Merge
Por Luis Angel Pérez Ramos
EduVerse: Asistente de Aprendizaje Accesible
Por Rolano Rebelo
QuinielaML - Predicción de la 27ª jornada de la Quiniela
Por Luis Angel Pérez Ramos
¿Cómo generar un error personalizado?
Por Ricardo Paiva
QuinielaML - Predicción de la 29ª jornada de la Quiniela
Por Luis Angel Pérez Ramos
Usando IRIS y Presto para consultas SQL de alto rendimiento y escalabilidad
Por Yuri Marx
Mejoras en la interoperabilidad de InterSystems con IRIS Whiz
Por Rob Ellis
Editad vuestros Globals con VSCode y YAML
Por Yuri Marx
QuinielaML - Predicción de la 31ª jornada de la Quiniela
Por Luis Angel Pérez Ramos
Cómo Monitorear el crecimiento del tamaño de la base de datos y emitir alertas
Por Ricardo Paiva
Análisis más rápido de mensajes con IRIS Whiz
Por Rob Ellis
 
#Comunidad de Desarrolladores Oficial
 
#Portal de ideas de InterSystems
 
#Global Masters
 
#Portal de Formación
 
Todos los anuncios
Todas las preguntas
diciembre, 2024Month at a GlanceInterSystems Developer Community
ディスカッション (0)1
続けるにはログインするか新規登録を行ってください
ダイジェスト
· 2025年1月2日

Resumen de la Comunidad de Desarrolladores, diciembre 2024

Hola y bienvenidos al boletín de la comunidad de desarrolladores diciembre 2024.
Estadísticas generales
✓ publicaciones nuevas:
 18 artículos
 6 anuncios
 7 nuevas preguntas
10 nuevos miembros se unieron en diciembre
1,958 contenidos publicados de forma constante
721 miembros se unieron de forma constante
Publicaciones populares
Autores populares
Artículos
#InterSystems IRIS
Actualización de Auditoría en 2024.3 - Eventos de Sentencias SQL Más Detallados
Por Alberto Fuentes
HL7 -> SDA -> FHIR -> Crecimiento Personal
Por Andre Ribera
Construyendo una imagen de IRIS con CPF Merge
Por Luis Angel Pérez Ramos
EduVerse: Asistente de Aprendizaje Accesible
Por Rolano Rebelo
QuinielaML - Predicción de la 27ª jornada de la Quiniela
Por Luis Angel Pérez Ramos
¿Cómo generar un error personalizado?
Por Ricardo Paiva
QuinielaML - Predicción de la 29ª jornada de la Quiniela
Por Luis Angel Pérez Ramos
Usando IRIS y Presto para consultas SQL de alto rendimiento y escalabilidad
Por Yuri Marx
Mejoras en la interoperabilidad de InterSystems con IRIS Whiz
Por Rob Ellis
Editad vuestros Globals con VSCode y YAML
Por Yuri Marx
QuinielaML - Predicción de la 31ª jornada de la Quiniela
Por Luis Angel Pérez Ramos
Cómo Monitorear el crecimiento del tamaño de la base de datos y emitir alertas
Por Ricardo Paiva
Análisis más rápido de mensajes con IRIS Whiz
Por Rob Ellis
#Comunidad de Desarrolladores Oficial
#Portal de ideas de InterSystems
#Global Masters
#Portal de Formación
Anuncios
Preguntas
diciembre, 2024Month at a GlanceInterSystems Developer Community
記事
· 2025年1月2日 5m read

Creating a REST client to get Tracks from Spotify REST API - Part5 creating my own REST service

Last Chapter: Creating a REST client to get Tracks from Spotify REST API - Part4 Save the Search Result

Git link: https://github.com/ecelg/InterSystems-IRIS-as-a-Spotify-REST-client

 

OK.... based on what I have done.... I am able to 

1. Query Track information by making use of the Spotify API

2. Store the necessary data into my own album, artists, and track table

 

so.... what next?🤔 How about I set up my own REST API service on my IRIS for the other people to query my table?🤔🤨

 

ok... 1st... start from document Introduction to Creating REST Services

so we have 2 ways to implement a REST service on IRIS

Way 1. Using the OpenAPI 2.0 specification 

Way 2. Creating a REST Service Manually

mummmm...both are ok for me.... how about trying the way 2?

 

OK Let's start with a simple HelloWorld!!!


1.  Create a business service class rest.bs.RestService.cls extend the class  %CSP.REST   

Create a folder bs under the folder rest

Create a class RestService.cls under the folder bs

replace the code by the following

Class rest.bs.RestService Extends %CSP.REST
{

Parameter CONTENTTYPE = "application/json";
XData UrlMap [ XMLNamespace = "http://www.intersystems.com/urlmap" ]
{
<Routes>
		<Route Url="/hello" Method="GET" Call="HelloWorld" />
	</Routes>
}

ClassMethod HelloWorld() As %Status
{
	//define a DynamicObject
	#dim tJSON As %DynamicObject={}
	
	//set the keys and values
	set tJSON."test_message"="Hello World!!"
	// write to response
	do ##class(%JSON.Formatter).%New().Format(tJSON)
	
	return $$$OK
}

}

Save it

 


2. Create a Web Application for this REST service

Open the management portal

Go to the page Web Applications

Name : /csp/myapi

Namespace : demo

Dispatch Class: rest.bs.RestService

Save

Assign %All in the application roles

 


3. Test the api

GET localhost/csp/myapi/hello

localhost can be replace as the url of your server, /csp/myapi is the path that I defined in the web application, /hello
is the path of the class method I would like to call, which is defined in the class rest.bs.RestService

Yeah!!! My REST API is working!!!😆😆

 


Now... let's try to let our API users search our tracks by the id of the track table

and write it to JSON as response to our API users

 

4. add the routing path to the class rest.bs.RestService.cls

We add the /:id as the arguments(in this case, it will pass into the 1st argument) for query, this argument will pass into the class method Track(will be implement in the next session) for process

<Route Url="/spotify/track/:id" Method="GET" Call="Track" />

 

 


5. Add the Class Method Track

This method will look up the related data based on the argument /:id  and return as JSON response

Add the following class method in to the class rest.bs.RestService.cls

ClassMethod Track(pId As %Integer) As %Status
{
	kill a
	//open an object with id
	set a=##class(rest.spotify.track).%OpenId(pId)
	
	//convert to JSON String
	set b=""
	do a.%JSONExportToString(.b)
	kill a
	
	// write to response
	w b
	return $$$OK
}

save the class

 


6. Test it!!!!

GET localhost/csp/myapi/track/5

localhost can be replace as the url of your server, /csp/myapi is the path that I defined in the web application, /track
is the path of the class method I would like to call, which is defined in the class rest.bs.RestService/5 is the argument for looking up the track by id

Yeah!!!  working!!!!😀

 


Ok seems working well!!!😁 My final question is... how to let our user search for a track???

mummmm... at least.. we can search by name of the track, market, or maybe by artist

OK... let's add another route and class method to handle it!!

 

7. add the routing path to the class rest.bs.RestService.cls

<Route Url="/spotify/searchtrack" Method="GET" Call="SearchTrack" />

 



8. Add the Class Method SearchTrack

This method will look up the related data based on the parameters name, market, artist  and return as JSON response

 

to get the parameters, you may use the code  $GET(%request.Data({paramete_key},1),""), for example to get the parameter name  $GET(%request.Data("name",1),"")

Add the following class method in to the class rest.bs.RestService.cls
 

ClassMethod SearchTrack() As %Status
{
	// get the parameter "name"
	#dim tname As %String=$GET(%request.Data("name",1),"")
	// get the parameter "name"
	#dim tmarket As %String=$GET(%request.Data("market",1),"")
	// get the parameter "name"
	#dim tartists As %String=$GET(%request.Data("artists",1),"")
	
	set sname="%"_tname_"%"
	set trowid=0
	&sql(SELECT top 1 ID into :trowid FROM rest_spotify.track where name like :sname order by popularity desc)
	set tarowid=""
	if (tartists'="")
	{
		set sartists=tartists
		&sql(SELECT top 1 ID into :trowid FROM rest_spotify.track where name like :sname  and album->artists->name like :sartists order by popularity )
	}
	if tarowid'="" set trowid=tarowid
	/*//debug
	//define a DynamicObject
	#dim tJSON As %DynamicObject={}
	//set the keys and values
	set tJSON."debug_message_name"=$replace(tname," ","%20")
	set tJSON."debug_message_market"=tmarket
	set tJSON."debug_message_rowid"=trowid
	// write to response
	do ##class(%JSON.Formatter).%New().Format(tJSON)
	*/
	if (trowid="")
	{
		/*//debug
		//define a DynamicObject
		#dim tJSON As %DynamicObject={}
		//set the keys and values
		set tJSON."debug_message_rowid"="not found"
		// write to response
		do ##class(%JSON.Formatter).%New().Format(tJSON)
		*/
		set tquery="offset=5&limit=10&query="_tname_"&type=track&market="_tmarket
		set str=##class(rest.utli.requestUtli).getdata("Spotify","/search",tquery)
		set std=##class(rest.utli.spotifyUtli).getSearchResult(str)
		&sql(SELECT top 1 ID into :trowid FROM rest_spotify.track where name like :sname order by popularity desc)
	}
	if (trowid>0)
	{
		//open an object with id
		set a=##class(rest.spotify.track).%OpenId(trowid)
		
		//convert to JSON String
		set b=""
		do a.%JSONExportToString(.b)
	
		// write to response
		w b
		return $$$OK
	}
	
	return $$$OK
}

save the class

 


9. Test it again!!!

 

GET localhost/csp/myapi/searchtrack?name=APT&market=SG&artists=

localhost can be replace as the url of your server, /csp/myapi is the path that I defined in the web application, /track
is the path of the class method I would like to call, which is defined in the class rest.bs.RestServicename, market, artist are the parameter input for searching

Yeah!! working!!!😁

Let's try one more

GET localhost/csp/myapi/searchtrack?name=call me maybe&market=SG&artists=Carly Rae Jepsen

ディスカッション (0)1
続けるにはログインするか新規登録を行ってください