It looks like a problem of $THIS, if you check the documentation (here) you'll see that the relative dot (..) notation is preferred, in the same page you can see that <NO CURRENT OBJECT> error is produced by a bad reference of the object.

Have you tried killing the process from the Task Administrator of Windows?

You can get the ID process from System Operation > Process , open the Task Administrator an kill it.

With the ID you can look for it from the Task Administrator:

%ROWCOUNT doesn't return the total of rows returned by the SELECT, you'll need to execute a previous SELECT COUNT(*) if you want to know the number of rows.

You can read here how %ROWCOUNT is used.

Well, I guess that you can change the URL modifying the value of those parameters, if you want to change "login" for "thisistheloginurl" you only have to update TokenLoginEndpoint to the new value.

You can see in the code my extended %CSP.Rest class:

Class QUINIELA.WS.Service Extends %CSP.REST
{

Parameter HandleCorsRequest = 0;

Parameter CHARSET = "utf-8";

XData UrlMap [ XMLNamespace = "https://www.intersystems.com/urlmap" ]
{
<Routes>
	<Route Url="/getPrediction" Method="GET" Call="GetPrediction" />
    <Route Url="/import" Method="GET" Call="ImportRawMatches" />
    <Route Url="/getStatus/:operation" Method="GET" Call="GetStatus" />
    <Route Url="/prepare" Method="GET" Call="PrepareData" />
    <Route Url="/train" Method="GET" Call="TrainData" />
    <Route Url="/getReferees" Method="GET" Call="GetReferees" />
    <Route Url="/getTeams" Method="GET" Call="GetTeams" />
	<Route Url="/saveMatch" Method="POST" Call="SaveMatch" />
    <Route Url="/deleteMatch/:matchId" Method="DELETE" Call="DeleteMatch" />
    <Route Url="/saveResult" Method="POST" Call="SaveResult" />
    <Route Url="/getMatches/:division" Method="GET" Call="GetMatches" />
</Routes>
}

ClassMethod OnHandleCorsRequest(url As %String) As %Status
{
	set url = %request.GetCgiEnv("HTTP_REFERER")
    set origin = $p(url,"/",1,3) // origin = "http(s)://origin.com:port"

    // here you can check specific origins
    // otherway, it will allow all origins (useful while developing only)

	do %response.SetHeader("Access-Control-Allow-Credentials","true")
	do %response.SetHeader("Access-Control-Allow-Methods","GET,POST,PUT,DELETE,OPTIONS")
	do %response.SetHeader("Access-Control-Allow-Origin",origin)
	do %response.SetHeader("Access-Control-Allow-Headers","Access-Control-Allow-Origin, Origin, X-Requested-With, Content-Type, Accept, Authorization, Cache-Control")
	quit $$$OK
}

Have you tried creating a class of type "view" joining both tables? Maybe with that class you can create your cube definition.

Here you can see and example of this type con classes.

I've no idea about how IRIS FHIR Server works with the profiling but according to FHIR documentation...Did you define in the meta element the profile property for the Patient resource? In theory you have to include that info to apply the profiling for the resource.

You can find here the description of profile property in FHIR documentation

It should be something like this:

<meta>
    <profile value= "http://localhost:52773/fhirr4/StructureDefinition"></profile>
</meta>

How are you importing the Python library in your class? Have you declared your method language as Python? Did you see the package installed in the path defined by the documentation?

If you are getting:

callresponse.%ClassName(): Ack

And your code is:

if (callresponse.%ClassName() = "consultarEstudiosDatosPacienteVNAResponse"){
	set callresponse = ..respuestaConsultaEstudios
	Quit $$$OK
}

It will never send back respuestaConsultaStudios because the previous condition, try assigning respuestaConsultaEstudios to callresponse without it.

Maybe you can do a workaround for this problem creating a new Business Process to send respuestaConsultaEstudios and manage it from there, ignoring from EnrutadorConsultarEstudiosVNAv01r00 the null response that you receive from ConsultarEstudiosMedianteFind

Another option could be define OnResponse method on ConsultarEstudiosMedianteFind and define the response properly.
 

Oh! forget what I said, I was thinking that you were calling a Business Operation all the time...remove the pOutput from the OnMessage method .

I see what is the problem. Your BP is using the method OnMessage to do the C-FIND operation, but the OnResponse method is not receiving the response.

Remove the pOutput references from your code and try with the following code:

do ..%responseSet(..respuestaConsultaEstudios)
Quit $$$OK

Not sure if that would work.

Did you update the call from EnrutadorConsultarEstudiosVNAv01r00 to ConsultarEstudiosMedianteFind  adding the variable by reference?

For the Quit you have to return the status, is not necessary to return the output variable. You have to update the call to Procesos.DICOM.ConsultarEstudiosMedianteFind adding the output variable as reference.

And the Quit is what is generating the null response. You have to avoid the async call and return the result using an output variable.

I suspect that the problem is that you are sending a SendRequestAsync to  EnrutadorConsultarEstudiosVNAv01r00 that is the business process that called to Procesos.DICOM.ConsultarEstudiosMedianteFind, and after that you are doing the Quit, returning to  EnrutadorConsultarEstudiosVNAv01r00 again.

Try adding a $$$TRACE in this method:

Method OnAssociationReleased(pSourceConfigName As %String, pInput As EnsLib.DICOM.Notify.Released) As %Status
{
    #dim tSC As %Status = $$$OK
        
        #; The association between this process and the operation has been released, so we are now
        #; not connected to the operation
        Set ..CurrentState="OperationNotConnected"
    
    ; Añadimos 11 10 2023
    
    
    Set tSC=..SendRequestAsync("EnrutadorConsultarEstudiosVNAv01r00",..respuestaConsultaEstudios,0)
    
    Quit tSC
}

Maybe you are calling the BP from here with a null response.

You can configure a transform creating a new message and defining another context variable with the same type than the original message as output, then you keep your original message in the request and the transformed message in the new variable.

Here you can see an example:

ClassMethod ImportRawMatches() As %DynamicObject
{
    Try {
        Do ##class(%REST.Impl).%SetContentType("application/json")
        If '##class(%REST.Impl).%CheckAccepts("application/json") Do ##class(%REST.Impl).%ReportRESTError(..#HTTP406NOTACCEPTABLE,$$$ERROR($$$RESTBadAccepts)) Quit
        
        set newRequest = ##class(QUINIELA.Message.OperationRequest).%New()
        set newRequest.Operation = "Import"
        
        set status = ##class(Ens.Director).CreateBusinessService("QUINIELA.BS.FromWSBS", .instance)
       	set response = ##class(QUINIELA.Message.ImportResponse).%New()
        set response.Status = "In Process"
        set response.Operation = "Import"
        set status = instance.SendRequestAsync("QUINIELA.BP.ImportBPL", newRequest, .response)
        
        if $ISOBJECT(response) {	        
            Do ##class(%REST.Impl).%SetStatusCode("200")
            return response.%JSONExport()
		}		
        
    } Catch (ex) {
        Do ##class(%REST.Impl).%SetStatusCode("400")
        return ex.DisplayString()
    }

The key is this row:

return response.%JSONExport()

Hi Yone! Your patientId is a param of the URL, you don't need to include it into the router map, to get the value you only need 

set patid = %request.Get("patientid")