David Hockenbroch · Oct 9, 2024 go to post

Do you mean you want to know how to get just that column?

SELECT IdentityId
FROM PhysTable
WHERE ProviderName = 'DOE, JOE'ANDtype = 'NPI'AND ProvID = '8252'

Or if this is in SQL embedded in ObjectScript:

&sql(SELECT IdentityId INTO :IdentityId FROM PhysTable WHERE ProviderName = 'DOE, JOE'ANDtype = 'NPI'AND ProvId = '8252')

That will get the Identity ID and put it into the variable IdentityId for you to use in further code.

David Hockenbroch · Oct 9, 2024 go to post

So you get the IdentityId and the ProviderName, and you know the Type, and you want to write a query to get the ProvId?

David Hockenbroch · Oct 9, 2024 go to post

I think I'm confused. In your previous comment you said "We do not get the ProvId "8252" in the message, we do get the IdentityId "345678"." So I thought you got the IdentityId in the message.

David Hockenbroch · Oct 9, 2024 go to post

If you don't have any other criteria you can use in your where clause, that will happen. Based on the data you've shown us, you'd need either ProvId or ProviderType to get it down to 1 row.

If you just want the first row returned and don't really care which one it is, you could do

SELECT TOP 1 IdentityId 
FROM PhysTable 
WHERE ProviderName = 'DOE, JOE' AND Type = 'NPI' 
ORDER BY IdentityId

But that's only if you always want the lower number, and I doubt that's the case, right?

David Hockenbroch · Oct 11, 2024 go to post

Yes, you can do that, but I have another recommendation.

You generally want to be careful with what you do in %SYS, and you might not want a user to have permission to access that stuff all the time. You could create a new security role that gives the right permissions to access whatever you're accessing, then assign it in that method, run the code that needs it, and remove it. So let's say your new security role is called MyRole:

set$ROLES = MyRole
set oldns = $NAMESPACEnew$NAMESPACEset$NAMESPACE = "%SYS"// Do your stuff here.new$NAMESPACEset$NAMESPACE = oldns
new$ROLES

The $ROLES special variable is used to manage roles that are added and removed programatically during the execution of code, but does not affect roles assigned to the user in the management portal.

David Hockenbroch · Oct 11, 2024 go to post

Performance is number one for us. With properly defined and tuned tables, I've never seen a database run its queries faster than IRIS.

Also just a lot of native capabilities. It's pretty rare that we have to reach outside of what comes in the box. And now with embedded Python, when we do need to add something, we have a lot of options.

Aside from Python's technical benefits, there's also a personnel consideration. More and more younger developers are learning Python, and according to the PYPL index Python passed Java in popularity among learners in 2018 and is far beyond Java today. That means having Python as an option opens up your hiring pool more than any other language to the next generation of developers.

David Hockenbroch · Oct 14, 2024 go to post

Thank you, Guillaume! Lesson learned: make sure you're running pip from the IRIS Python, not the default Python on the PC!

David Hockenbroch · Oct 14, 2024 go to post

Inside your combobox, you can define a displayList and valueList. If you do that, you don't have to also define the options individually.

David Hockenbroch · Oct 17, 2024 go to post

Does $ZV not meet your needs? I see you used it for your post, and it includes the build version, too.

David Hockenbroch · Oct 22, 2024 go to post

If you use a dataCombo, the first column of the SQL query is the actual value of the dataCombo and the second column is the display value. So if you defined a dataCombo with sql="select Analyst, Analyst->Name from Analysts" (or whatever your table is) you'll get what you want.

In that case, you'll also want to define the sqlLookup property of the dataCombo. That tells the Zen page how to find the correct display value when the value of the control is changed programatically, so something like "select Analyst->Name from Analysts where Analyst=?"

David Hockenbroch · Oct 22, 2024 go to post

That shouldn't matter since the tasks themselves are not always stored in the namespace in which they are run. They are stored in IRISSYS. Does the user you are logged in as have permission to edit the %SYS.Tasks table in the IRISSYS namespace? And is this a system task? (System tasks cannot be deleted.)

David Hockenbroch · Nov 7, 2024 go to post

Is SMTP authentication enabled in the Microsoft 365 account? That setting is turned off by default for new clients. You can check the setting in the Microsoft 365 admin portal under your active users.

David Hockenbroch · Nov 18, 2024 go to post

The documentation for the Read method says "Some stream classes use this to optimize the amount of data returned to align this with the underlying storage of the stream." I take this to mean that for a file stream, it might be trying to read in a way that aligns with how the drive is formatted. Can you run the command below and see if the Bytes Per Cluster is 1024?

C:\Windows\System32>fsutil fsinfo ntfsInfo C:
NTFS Volume Serial Number :        0x0060ba3960ba356e
NTFS Version      :                3.1
LFS Version       :                2.0
Total Sectors     :                997,918,719  (475.8 GB)
Total Clusters    :                124,739,839  (475.8 GB)
Free Clusters     :                 96,063,960  (366.5 GB)
Total Reserved Clusters :              893,290  (  3.4 GB)
Reserved For Storage Reserve :         884,043  (  3.4 GB)
Bytes Per Sector  :                512
Bytes Per Physical Sector :        512
Bytes Per Cluster :                4096  (4 KB)
Bytes Per FileRecord Segment    :  1024
Clusters Per FileRecord Segment :  0
Mft Valid Data Length :            512.50 MB
Mft Start Lcn  :                   0x00000000000c0000
Mft2 Start Lcn :                   0x0000000000000002
Mft Zone Start :                   0x0000000001d59580
Mft Zone End   :                   0x0000000001d65da0
MFT Zone Size  :                   200.13 MB
Max Device Trim Extent Count :     256
Max Device Trim Byte Count :       0xffffffff
Max Volume Trim Extent Count :     62
Max Volume Trim Byte Count :       0x40000000
Resource Manager Identifier :      BBA1AD65-C5EC-11EE-8ED5-D0AD0854D65E
David Hockenbroch · Nov 20, 2024 go to post

For what it's worth, I get the error about the MutationObserver too, but my results still display correctly. (Is Magneto messing with Cerebro again over there?)

David Hockenbroch · Nov 20, 2024 go to post

@Sammy Lee 
@Marc Mundt 
I'm able to replicate some of this behavior if I use the developer tools in Edge, go to the network tab, and use Network Request Blocking to block *algolia*. The issue might be with the XHR requests there.

@Scott Roth 
In Edge, if you bring up the developer tools, go to the network tab, and in the filter buttons, click on XHR, then start typing in the search box, do you see errors there? (GIF shows what some good requests look like, followed by what errors might look like.)

 

David Hockenbroch · Nov 20, 2024 go to post

Is there a write command happening somewhere in your method before you try to set the header? If so, the headers will be sent before the write command, and will mean that it's too late to modify them after that. You can check %response.InProgress to see if that has already happened.

David Hockenbroch · Nov 20, 2024 go to post

You'll use both %Library.DynamicObject and %Library.DynamicArray classes for this. When you do JSON.%Get("Practice") the resulting object is a dynamic array, not a dynamic object, so it works a little differently. Then when you get the first element of the array, you have another dynamic object. Try:

//Get the array Practiceset array = JSON.%Get("Practice")
//Get item 0 from the array we just gotset nodejson = array.%Get(0)
//Get the value of Nodeset node = nodejson.%Get("Node")
//Write the value out (or do whatever else you need)write node
David Hockenbroch · Nov 22, 2024 go to post

Thanks for pointing that out. I changed just the number when writing the article so I wasn't using real data, and I missed changing it in the first instance!

That was the issue. The IRISLIB database was mounted as read-only, so once I gave myself the right permissions and fixed that, I was able to edit it.

I'm probably going to take this approach going forward, but for the moment the amount of rewriting I would have to do to switch everything over to that subclass is a bit more than I want to take on.

In your system management portal, you'd have to have your /gmmhhcdev/csp/healthshare/gmmhtie/ web application set to be usable unauthenticated, but are you sure you want to do that?