creating a random token in Health Connect
How can we create a random token within HealthConnect? any examples?
Product version: IRIS 2022.1
$ZV: IRIS for UNIX (Red Hat Enterprise Linux 7 for x86-64) 2022.1 (Build 209U) Tue May 31 2022 12:13:58 EDT [HealthConnect:3.5.0] [HealthConnect:3.5.0]
Discussion (2)0
Comments
HI,
Perhaps the following methods can be considered
w ##class(%SYSTEM.Util).CreateGUID()
w $system.Encryption.GenCryptToken()
w $system.Encryption.GenCryptRand(20,0)
w $system.Encryption.Base64Encode($system.Encryption.GenCryptRand(20,0),1)
I usually use this for FHIR resource id, it is a global unique uid and lower case:
w $zconvert($system.Util.CreateGUID(),"l")