User bio
404 bio not found
Member since Apr 14, 2022
Replies:
import iris

# first, we connect to the %SYS namespace
conn = iris.connect('localhost:1972/%SYS','_SYSTEM',pwd,10,True)
irispy = iris.createIRIS(conn)

# here we switch to the USER namespace
newNameSpace = irispy.classMethodString('%SYSTEM.Process','SetNamespace','USER')

# now we can call the method from the new namespace
#print(irispy.classMethodInteger('DC.Unix','RoundPosixToSeconds',1154669852181849976))

conn.close()
#Include %sqlx
set newposix $$$sqlxPosixTimeEncode(+$p($$$sqlxPosixTimeDecode(posix),".",1))

Сheck:

for posix = 1154669852181849976, -6979664624441081856, 1406323805406846975 {

  set newposix $$$sqlxPosixTimeEncode(+$p($$$sqlxPosixTimeDecode(posix),".",1))

  write ##class(%PosixTime).LogicalToTimeStamp(posix),!,
        ##class(%PosixTime).LogicalToTimeStamp(newposix),!!
}

2025-05-27 12:06:15.003
2025-05-27 12:06:15
 
0001-01-01 00:00:00
0001-01-01 00:00:00
 
9999-12-31 23:59:59.999999
9999-12-31 23:59:59
 
source code of dc.observation_lab

The following query does not use iCode/iCodeText indexes (2025.2.CE):

select code_1_textcount(code_1_text)
  from dc.observation_lab
  group by code_1_text
  order by desc

PS: if possible, I would try to convert the text into a number in some way and index this number already, perhaps even with the bitmap type.

Certifications & Credly badges:
Vitaliy has no Certifications & Credly badges yet.
Global Masters badges:
Vitaliy has no Global Masters badges yet.
Followers:
Following:
Vitaliy has not followed anybody yet.