Hello,
I'm trying to customize error handling in the overriden HS.FHIRServer.Storage.JsonAdvSQL.Interactions::Search method. It is clear how to add to the resultset a valid FHIR resource (pseudocode):
Method Search(pResourceType As %String, pCompartment As %String, pCompartmentId As %String, pParameters As HS.FHIRServer.API.Data.QueryParameters = "", ByRef pSortKeys = "") As HS.FHIRServer.Util.SearchResult
{
#Dim resultSet as HS.FHIRServer.Util.SearchResult
Set resultSet = ##class(HS.FHIRServer.Util.SearchResult).Create()
If (pResourceType = "Patient")
{
Set patientDynamicObject = ..MethodWhichLoadsPatient()
Do resultSet.AddRow(somePatientId, "Patient", somePatientId, "1", "match",,patientDynamicObject)
Return resultSet
}
}