Closed AlexanderJohnSalter closed 4 years ago
It could be that you've hit our live server rate limit. That server is made available for reference or development, but not for volume access. We recommend running an instance of the terminology server, snowstorm, if you want to do more intensive queries.
Closing due to inactivity
This is quite probably not how the API is intended for use! I am using the API in excel to grab the likely associated snomed terms for a list of locally used terms a few thousand long. it runs fine until I hit 400 terms and then it hangs and errors as "Resource not found" or "Security issue", seems to resolve next day! Is this a same domain policy issue? some other security issue? does the HTTP request require specific headers?
Sub getTerms()
'Dimension variables Dim URL As String Dim edition As String Dim Version As String Dim filtertag As String Dim MyRequest As Object Dim Result As Variant Dim R As Integer Dim c As Variant Dim searchterm As String Dim baseURL As String Dim count As Integer
'set base variables baseURL = "https://browser.ihtsdotools.org/snowstorm/snomed-ct/v2/" edition = "MAIN" Version = "2019-07-31" count = 0
'loop through values to lookup from worksheet lastrow = Cells(Rows.count, "A").End(xlUp).Row
For Each c In Worksheets("API").Range(Cells(2, 1), Cells(lastrow, 1))
If c.Offset(0, 2).Value = "" Then searchterm = c.Value
'compile URL for HTTP request URL = baseURL + edition + "/" + Version + "/concepts?term=" + searchterm + "&conceptActive=true&groupByConcept=true&searchMode=STANDARD&offset=0&limit=50"
'Create request Set MyRequest = CreateObject("MSXML2.XMLHTTP.6.0") MyRequest.Open "GET", URL, False
'submit request MyRequest.send ""
'push result into variable Result Result = MyRequest.ResponseText
'parse results Result = Split(Result, "conceptId")
End If count = count + 1 Worksheets("API").Cells(1, 2) = count Next End Sub