Evgeny Shvarov · Jun 5, 2025 go to post

Thank you, @DC AI Bot  - but your answer is not super relevant to the situation. I really want to store the global name in a class parameter and don't see what is wrong here.

Evgeny Shvarov · Jun 4, 2025 go to post

It'd be great if we could alter the length of subscript per system. Sometimes the ability to momentarily get the value for a index of 1K+ values would be very benefitial

Evgeny Shvarov · May 18, 2025 go to post

Thank you, @Tani Frankel !

This is useful through years!

Just adding here the snippet to add role to a user:

ClassMethod AddRoleToUser(user = "CSPSystem", role = "DB_USER_Read") As %Status

{

// Change to the %SYS namespace.

new $NAMESPACE

set $NAMESPACE="%SYS"



set status=##class(Security.Users).Get(user, .MyUserProps)

set $p(MyUserProps("Roles"),",",*)=role

set status=##class(Security.Users).Modify(user,.MyUserProps)



// Announce success.

if $$$ISOK(status) {

write !, "Roles for the user "_user_" were successfully modified."

}

Quit status

}
Evgeny Shvarov · May 4, 2025 go to post

Is it very complex to develop a new DICOM adapter that will use global streams instead?

Evgeny Shvarov · Apr 28, 2025 go to post

Thank you very much, @Enrico Parisi ! This looks like what I was looking for!

It is also looks as a perfect new generation for the deprecated %ZEN with:
 

set sc=##class(%ZEN.Auxiliary.jsonSQLProvider).%WriteJSONFromSQL(,sql)

Which only provides string, but not %DynamicArray so will not work for Spec First REST API.
 

Evgeny Shvarov · Apr 28, 2025 go to post

I can call after-install scripts, of course! Now this makes sense!

The only question - is it OK? :) It looks a little ... dangerous? 

Evgeny Shvarov · Apr 28, 2025 go to post

Thanks, Enrico! Namespace, of course! I prefer usualy the simplicity of having one Database in one Namespace if possible.

Your great answer doesn't answer though my question. The situation is: I deploy a package, which contains:

persistent class(es), data(generated ok, but could be different), WebApp (aka CSP app). I deploy a Role also, which will be used by the WebApp. Role need the access to database... Here is my question, which database resource do I provide to the role as I don't know the namespace the package will be installed by a potential user? 

Evgeny Shvarov · Apr 24, 2025 go to post

"Let's remember this tweet" ;) 

I suggest we test the water in 6 month/one year. I believe all the frameworks(current or new AI-focused) will be a tool for AI to construct the frontend at least. 

Same for the backend. 

Or maybe we'll use "GPT Memory" concepts instead of relational/multi-model databases we used to work with.

Evgeny Shvarov · Apr 17, 2025 go to post

Great article, @Timothy Leavitt ! I think it is questionable the recommendation not to use AI for the spheres you are not familiar with.

E.g. I'm not a frontend developer at all but the AI capabilities in AI generation are awesome and give me an opportunity to immediately have an MVP in frontend and also to build prototypes fast which was impossible in a preAI times.

Evgeny Shvarov · Apr 17, 2025 go to post

Great article! Thank you @Pablo Frigolett !

Also, if you develop in Docker there is an issue with server name, and my version of the same GetSpec method is:

ClassMethod GetSpec() As %DynamicObject

{

Set spec = {}.%FromJSON(##class(%Dictionary.CompiledXData).%OpenId("dc.Sample.v2rest.spec||OpenAPI").Data)

Set url = $Select(%request.Secure:"https",1:"http") _ "://"_$Get(%request.CgiEnvs("SERVER_NAME")) _ ":" _ $Get(%request.CgiEnvs("SERVER_PORT")) _ %request.Application

Set spec.servers = [{"url" : (url)}]

Quit spec

}

Thanks to @Lorenzo Scalese !