If you are creating a FHIR Bundle manually (programmatically; as opposed for example of just getting a Bundle back as a search result response from our built-in FHIR Resource Repository) I think you should be using HS.FHIRServer.Util.Bundle:CreateBundle().
Indeed behind the scenes you can see it calls the CreateGUID() method @Marc Mundt pointed to populate the id -
Set bundle.id = $ZConvert($SYSTEM.Util.CreateGUID(),"L")
ObjectScript includes utilities for generating GUIDs:
https://docs.intersystems.com/irisforhealthlatest/csp/docbook/DocBook.UI...
In particular, have a look at $System.Util.CreateGUID():
https://docs.intersystems.com/irisforhealthlatest/csp/documatic/%25CSP.D...
If you are creating a FHIR Bundle manually (programmatically; as opposed for example of just getting a Bundle back as a search result response from our built-in FHIR Resource Repository) I think you should be using HS.FHIRServer.Util.Bundle:CreateBundle().
Indeed behind the scenes you can see it calls the CreateGUID() method @Marc Mundt pointed to populate the id -
[The $ZConvert changes it to lower-case, e.g.:
]
Thanks @Tani Frankel