Congrats, @Dmitry Maslennikov ! Well deserved!
- Log in to post comments
Congrats, @Dmitry Maslennikov ! Well deserved!
Just've published the shvarov-persistent package once installed by
USER>zpm "install shvarov-persistent"
will add shvarov.persistent.base class which can be used as an ancestor after %Persistent, like:
Class yourclass Extends (%Persistent, shvarov.persistent.base), which will add two properties:
Property CreatedAt As %TimeStamp [ InitialExpression = {$ZDT($H, 3)} ];
Property LastUpdate As %TimeStamp [ SqlComputeCode = {set {*}=$ZDATETIME($HOROLOG,3)}, SqlComputed, SqlComputeOnChange = (%%INSERT, %%UPDATE) ];Hi @Luis Petkovicz!
Consider to try csvgen also?
it will be:
USER>zpm "install csvgen"
to install the package, and here is the usage:
USER>do ##class(community.csvgen).Generate("/folder/filename.csv")
to generate class and import the data into it from an arbitrary csv.
Also this could be a typical copy-paste for a REST API app created in a module.xml in a <module> section:
<CSPApplication
Url="/travel/api"
PasswordAuthEnabled="0"
UnauthenticatedEnabled="1"
DispatchClass="shvarov.travel.disp"
MatchRoles=":{$dbrole}"
Recurse="1"
UseCookies="2"
CookiePath="/travel/api"
/>where /travel/api is the app name, and shvarov.travel.disp - a generated class vs the swagger spec file and shvarov.travel.spec class.
Another useful comment: while generating swagger spec ask GPT to provide meaningful OperationId for every endpoint, otherwise the generated impl class will come with generated names for implementation methods like that:

I think it is a good use-case for embedded python. I asked gpt and it suggested the following python code:
from datetime import datetime
from zoneinfo import ZoneInfo
# Original string
input_str = "Thu Jul 03 08:20:00 CEST 2025"
# Strip the abbreviation since it's not useful for parsing
# Replace it with an IANA timezone
# Let's assume "CEST" corresponds to Europe/Paris
input_str_cleaned = input_str.replace("CEST", "").strip()
# Parse the datetime
dt_naive = datetime.strptime(input_str_cleaned, "%a %b %d %H:%M:%S %Y")
# Localize to the correct zone
dt_aware = dt_naive.replace(tzinfo=ZoneInfo("Europe/Paris"))
# Format in ISO format with UTC offset
print(dt_aware.isoformat()) # e.g., '2025-07-03T08:20:00+02:00'
Also it suggested to make a mapping for CEST/CET:
tz_abbreviation_map = {
"CEST": "Europe/Paris",
"CET": "Europe/Paris",
"EDT": "America/New_York",
"EST": "America/New_York",
"PST": "America/Los_Angeles",
# Add more mappings as needed
}
Thank you, @Andrew Sklyarov ! No %OnSave callback is needed for the CreatedAt property in this case
How does an array project to SQL?
Do we have any new options for collections in DDL? Something like:
CREATE TABLE Aricle (tags varchar50[])
?
Hi @Phillip Wu !
Namespaces give flexibility and were introduced to make a lot of powerful things possible.
If you are confused with all this uncertainty and don't need flexibility for now you can create Namespace DEV that has only one database DEV for everything and you can think that you are working with database DEV only with no any confusion.
But you will sign in into Namespace DEV in your IRIS system as users log in into Namespaces in InterSystems IRIS.
Or, e.g., if you take any vanilla IRIS docker image and run it, it will have a USER namespace that provides access to the USER database, which is convenient to use for any dev experiments.
Wow, I didn't know that! Is it working? Anyways, you first need to be logged into some IRIS Namespace.
Glad you solved it! Thanks for the update!
Ah, maybe VSCode-ObjectScript "thinks" that comments do not deserve to be recompiled? if you change anything in a "real code" space?
How does the INT code in VSCode look?
As for community images - the latest releases do not have community registry enabled by default.
Use this command to make them work:
USER>zpm repo -r -n registry -url https://pm.community.intersystems.com/ -user "" -pass ""
@Ashok Kumar T - could you please raise it here too?
Hi @Mark Charlton ! Yes, you can make other packages visible from your private registry so that packages from public registries can be available from a private one with white/black lists. Apologies for the late answer :)
Thank you, @Julius Kavay
Thank you, very clear now!
Oh, Wow!
So many great answers! thank you @Stuart Strickland, @Chris Stewart , @Robert Cemper , @Ashok Kumar T
!
It was not obvious with $name and Class Parameter - now it is clear! Thanks a lot!
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.
Wow. Was the answer from AI right, @Scott Roth ?
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
Thanks @Laura Blázquez García ! Do you want to share more details on how your app works?
This is great news, @Andreas Schneider !
That's impressive and persuasive! Thank you @Enrico Parisi !
Dear @Dean White , @Enrico Parisi: what to use better:
Do Body.%ToJSON(Request.EntityBody)or
do Request.EntityBody.Write(Body.%ToJSON())?
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
}Changed to an annoucement and added Job Wanted tag. Also take a look at Job Opportunity tag offerings.
Hi @Kevin Mayfield ! If you have docker on your laptop you can clone this Github project and start it in a docker - it starts InterSystems FHIR server (within IRIS for Health) automatically.