If the Response you get from a REST call is a %DynamicAbstractObject, how do you know how many levels to go through? 

I tried using JSON2Persistant however the naming convention of the tree that it is building it too long for me to upload it into github, so since I have two values that I need to only retrieve I am attempting to iterate through the JSON and just extract those two values

for example, if I only want to pull the pureId and the portalURL from the response object, how can I iterate through the JSON response to get those values only? 

{
  "count": 0,
  "pageInformation": {
    "offset": 0,
    "size": 0
  },
  "items": [
    {
      "pureId": 0,
      "uuid": "196ab1c9-6e60-4000-88cb-4b1795761180",
      "createdBy": "string",
      "createdDate": "1970-01-01T00:00:00.000Z",
      "modifiedBy": "string",
      "modifiedDate": "1970-01-01T00:00:00.000Z",
      "portalUrl": "string",
      "prettyUrlIdentifiers": [
        "string"
      ],
      "previousUuids": [
        "string"
      ],
      "version": "string",
      "startDateAsResearcher": "1970-01-01",
      "affiliationNote": "string",
      "dateOfBirth": "1970-01-01",
      "employeeStartDate": "1970-01-01",
      "employeeEndDate": "1970-01-01",
      "externalPositions": [
        {
          "pureId": 0,
          "appointment": {
            "uri": "string",
            "term": {
              "en_GB": "Some text"
            }
          },
          "appointmentString": {
            "en_GB": "Some text"
          },
          "period": {
            "startDate": {
              "year": 0,
              "month": 1,
              "day": 1
            },
            "endDate": {
              "year": 0,
              "month": 1,
              "day": 1
            }
          },
          "externalOrganization": {
            "uuid": "196ab1c9-6e60-4000-8b89-29269178a480",
            "systemName": "string"
          }
        }
      ],

when I attempted 

    set itr = responseData.%GetIterator()
    while itr.%GetNext(.key, .value) {
      if key = "pureID"{
        set pResponse.pureID = value
      } elseif key = "portalURL" {
        set pResponse.portalURL = value
      }
    }

both the pureID and portalURL came back blank.

I just had a similar issue, where there were 25 sessions open with my name. We hit our limit of licenses, so I ended up killing what I was not using so it did not interrupt my team. I did not capture the Timeout (UTC) before I did it, but should of.

After I freed up sessions, I did notice that if I opened VSCode that /api/atelier sessions still opened after I had closed out VS Code. We have the CSP Inactivity Timeout on the Web Gateway to 24 hrs, so I don't know if those sessions were over that timeframe or not.

I have an Identifier that I receive in an HL7 MFN message, I need to take this Identifier and find the Locations that the Identifier is associated with, so I can set the Sending Facility value within the HL7 message to help filter out specific locations from being sent to the Health Share Provider Directory.

for example... ID1 might be associated with Site 1, Site 3. IF site 1 is valued and equals xxx, then send on else do not send on.

I was able to get it to work. I found that in Cache I need to call %Get("<column>") name vs what I am doing in a BPL.

 s Loc = ""
 s tStatement = ##class(%SQL.Statement).%New()
 s execall= "CALL osuwmc_Utils_EnterpriseDirDb.InterfaceCheckConnectMedCtrID(?)"
 s qStatus = tStatement.%Prepare(execall)
 if $$$ISERR(qStatus) {write "%Prepare failed:" do $SYSTEM.Status.DisplayError(qStatus) quit}
 set rset = tStatement.%Execute(pInput)
 while rset.%Next() {
 set Loc = rset.%Get("OSUguestRoleDTL")
 }
 if $Length(Loc) = 0 {
    set Loc = "OSUWMC"
 }

The Class name is osuwmc.Epic.Clarity.DepartmentMaster and it is storing data in 

  • Data - ^E2C8.D9IS.1
  • BitmapExtent Index - ^E2C8.D9IS.2
  • IDIndex Index - ^E2C8.D9IS.3
  • IDKey Index - ^E2C8.D9IS.1
  • Indexes - ^E2C8.D9IS.I
  • Stream - ^E2C8.D9IS.S

I am not sure what to put in as the Global Name, would that be E2C8? and then the subscript to be mapped would be D9IS.*?

interesting theory to try, someone on my team changed it to cover it to stream, and put it back into the message before this answer. the Physician memory usage went down, the virtual memory usage went up. However, the error seemed more at the Routing than the DTL. It may have something to do with Locking and trying to send to multiple locations in a single send.

With the way that we built our namespaces, I had to create a smaller namespace that included all of our nuances that we do like... BPL making JDBC MS SQL Stored Procedure calls, making internal cache calls, making linked table/store procedure calls.

Larger namespaces will cause the comparison run to take longer to run.

So, my mini namespace is used to test new versions of HealthShare Health Connect.

Nice comparison, also you have to take in account the processing speed as well. I found using Embedded SQL through a SQL Outbound Adapter can slow processing significantly down as it has to build the SQL in the connection to get results. I have a high-volume Business Process that required us to build a Stored Procedure on MS SQL instead of the Embedded SQL so that the SQL Server has the query already built.