User bio
404 bio not found
Member since Dec 4, 2015
Posts:
Replies:
Programmatically you can use the SubclassOf() query in the %Dictionary.ClassDefinitionQuery class. Pass in %Persistent and the flag for non-system classes.
So if I am calling this service from an Ensemble operation that looks something like this:
Method getPatient(pRequest As RESTDemo.REST.ClaimRequest, Output pResponse As EnsLib.REST.GenericMessage) As %Status
{
try {
// Prepare and log the call
// Append the claim to the URL
Set tURL=..Adapter.URL_"/claims/"_pRequest.claimBlob
// Execute the call
set tSC=..Adapter.GetURL(tURL,.tHttpResponse)
#; Suppress HTTP status errors and just pass back the status, headers and body
If $$$ISERR(tSC)&&'$$$StatusEquals(tSC,$$$EnsErrHTTPStatus) { Quit }
// Return the response
Set tSC=$$$OK
If $IsObject(tHttpResponse.Data) {
Set tStream=tHttpResponse.Data
} Else {
Set tStream=##class(%GlobalBinaryStream).%New()
Set tSC=tStream.Write(tHttpResponse.Data) Quit:$$$ISERR(tSC)
}
Set pResponse=##class(EnsLib.REST.GenericMessage).%New(tStream,,tHttpResponse)
Do pResponse.HTTPHeaders.SetAt(tHttpResponse.StatusLine,"StatusLine")
} catch {
Set tSC=$$$SystemError
}
Quit tSC
}
Would I just call $system.
Encryption.Base64Encode()
on the claimBlob property?
Certifications & Credly badges:
Jeffrey has no Certifications & Credly badges yet.
Global Masters badges:
Followers:
Jeffrey has no followers yet.
Following:
Jeffrey has not followed anybody yet.
You could then iterate through the returned classes and check to see which ones are marked "system" by opening up each definition. I seem to vaguely remember a way to do this with a query but I can't find it now.