go to post Rich Taylor · Feb 1, 2022 Here is a quick example program I wrote a couple of months ago. This uses JDBC and the JayDeBeapi library others have mentioned. Note the Credentials import provides a set of login credentials in the following format. LocalCreds = {"user":"SuperUser", "password":"SYS"} Here is the code: import jaydebeapiimport credentials def get_database_connection(inpDBInstance): IRIS_JARFILE = "/home/ritaylor/InterSystemsJDBC/intersystems-jdbc-3.2.0.jar" IRIS_DRIVER = "com.intersystems.jdbc.IRISDriver" AA_JARFILE = "/home/ritaylor/Downloads/AtScale/hive-jdbc-uber-2.6.5.0-292.jar" AA_DRIVER = "org.apache.hive.jdbc.HiveDriver" # note connecting to two data sources in the same program requires that you # reference the paths to BOTH jar files in a list in every call. Otherwise the # second connection attempt will fail. It appears that the paths only get # added once within a process. JDBC_JARFILES = [IRIS_JARFILE,AA_JARFILE] # Database settings - this should be in a config file somewhere if (inpDBInstance == "local"): dbConn = jaydebeapi.connect(IRIS_DRIVER, "jdbc:IRIS://18.119.2.28:1972/USER", credentials.LocalCreds, JDBC_JARFILES) else: dbConn = None return dbConn def run_database_query(inpQuery, inpDBInstance): resultSet = None dbConn = get_database_connection(inpDBInstance) cursor = dbConn.cursor() cursor.execute(inpQuery) resultSet = cursor.fetchall() return resultSet def print_db_result_set(resultSet): if (resultSet != None): for row in resultSet: print(row) else: print("Input result set is empty")
go to post Rich Taylor · Jan 17, 2022 Daniel, One thing I always recommend is to get familiar with the API using a standalone tool before attempting to code the programmatic interface. I like Postman as it has pretty good UI to work with. If you are at the command line you can use curl. https://www.postman.com/ Postman can also give you the code for different programming environments. Unfortunately not Objectscript, but it is fairly easy to translate from the examples you can see.
go to post Rich Taylor · Dec 7, 2021 Great that you found that and can adjust those properties to your liking. Best of luck in your development work.
go to post Rich Taylor · Nov 29, 2021 Marcos, I was going through some unanswered questions and came across yours. If you could share your spec to DM it to me I can take a look. However, understand that the %Stream.Object probably contains the JSON payload that you need. As such you can get your dynamic object with the following command: set dyObject = {}.%FromJSON(body) hope that helps.
go to post Rich Taylor · Jul 28, 2021 One way to be sure that the request is or is not reaching IRIS is to go into the IRIS Web Gateway on the web server and use the trace utility to see if the request is coming in and what it looks like. Turn on the trace, make a request and then come back and turn off the trace. Also the default on the Web Gateway server definition is the use gzip compression which will make the body unreadable. You can temporarily turn this off while you do this test. Hopefully you are doing this in a development environment so this will have no impact on production. UPDATE: One other thing is to check the audit logs for an security issues that you may hit. This does not sound like the issue for you, but its worth checking.
go to post Rich Taylor · Jul 28, 2021 You should understand that while InterSystems employees are on the community this is really a public forum and not an "official" support path. Questions are answered by the community at large when they can. For people in the forum to help more information is needed. You indicated you are working with HealthShare however this is really a family of solutions. Which specific product are you referring to? What part of that product are you trying understand better? The more specific you can be the easier it is for the community to help. If you have an immediate need I would suggest that you contact the Worldwide Response Center (referred to as the WRC) for immediate support. Here is the contact information: Phone:+1-617-621-0700+44 (0) 844 854 29170800615658 (NZ Toll Free)1800 628 181 (Aus Toll Free) Email:support@intersystems.com Finally, learning services (learning.instersystems.com) and documentation (docs.intersystems.coms) can be of great help. For HealthShare specific areas you do need to be a registered HealthShare user. If you are not work with your organization and the WRC to get that updated.
go to post Rich Taylor · Jul 22, 2021 Is it expected that this will be a single socket connection that is continually available for bi-directional communications? I ask because my initial thought was that we have to completely separate interfaces here. On the remote side (ip) there is a listener on the indicated port number. You will be connecting to this ip+port to send your ADT. A completely separate communication is initiated by the remote system to YOUR ip address where you would have a listener on the same port. This would be limited to accept communications only from the remote ip. The remote system would send the A19 over this connection which would. If this is the case then you can simply use our built-in HL7 TCP operation and service to accomplish this. If this is truly a bi-directional communications over the same open TCP connection then @Jeffrey Drumm is correct. They would need to provide the custom protocol they use to manage the communications.
go to post Rich Taylor · Jul 13, 2021 The #Dim is a precompiler directive and not a statement. Objectscript is a type-less language. The #dim directive only assigns a type to a variable which enables capabilities like Intellisense. The Creation, with the %New(), that you do in the second method is necessary since the list object does not actually exist before that.
go to post Rich Taylor · Jul 7, 2021 First the content type is not correct. This should be application/json. Next I would add the following statement do httprequest.SetHeader("Accept","application/json") This tells the request what type of response your application will accept. The default is text/html I believe which can't be supplied by the api.
go to post Rich Taylor · May 26, 2021 I think John is basically correct, but I don't see this as an issue. When you are doing client-side editing, which is what I normally do, you need to export code to your project to edit it. This is an action you need to perform as every definition you look at should not necessarily become part of your project. When you choose to 'Go To Definition' the InterSystems extension looks to see if it's local and opens that if it is, local meaning client-side. If not it opens it from the server which is always read-only when working in client-side editing. To edit export it then open the local copy.
go to post Rich Taylor · May 26, 2021 You could try %SYS.MONLBL. This is intended as a performance trace, but it MAY work for this purpose too. You would have your application running in one session and get the the process is for that session. Open a new session and run %SYS.MONLBL. Choose the options to monitor ALL routines and the specific process id (PID) where you are running your application. Go back to the application session and perform the function you want to trace. Immediately go back to %SYS.MONLBL and generate the report before doing anything else in the application. NOTE: This might not work with deployed code and even if it does will likely not provide any details of the deployed programs. Hopefully it will at least show an entry for the deployed routine so you can see what is being called. Good luck https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...
go to post Rich Taylor · May 20, 2021 In Linux, create a docker group and add your user to that. This should enable you to do docker without sudo.
go to post Rich Taylor · May 13, 2021 I have had great luck with Udemy. You do have to pay for the course, but watch the sales which are constantly going on. You can get courses for $12 to $50 US dollars. Here is the one I bought (currently $2.99). https://www.udemy.com/course/the-python-mega-course/ I bought this one as it talked about having lots of projects to work on. Some are interesting, but not all. It did cover the language fairly well. However, I found the instructors style not quite to my taste. Here is another couple of course I have found. I plan on getting one of these to improve my Python knowledge https://www.udemy.com/course/the-complete-python-course/ https://www.udemy.com/course/python-the-complete-python-developer-course/ I am taking a course on Java with the instructor from the last link (Tim Buchalka) and so far I do like his style. Good Luck!
go to post Rich Taylor · May 12, 2021 I have not tried this but if you enable LDAP security and select it for that Web Application then passing a username and password it may work. You would setup LDAP per the documentation for Cache. As I said I am not sure that this would work in this context. An alternative is to use Delegated Authentication. Here is a link to a Global Summit presentation on dealing with LDAP in the Delegated Authentication zAuthenticate routine. https://community.intersystems.com/post/global-summit-2016-ldap-beyond-s... This is a bit old and it is focused on dealing with custom LDAP schemas, but it will help you understand how to work with LDAP in code.
go to post Rich Taylor · Apr 28, 2021 Please expand a bit on what you are attempting to do. Are you trying to execute queries FROM IRIS to the HP NonStop SQL environment? Or are you trying to execute NonStop SQL syntax against IRIS? If this is the latter understand that IRIS implements ANSI Standard SQL with some IRIS specific extensions. NonStop SQL syntax may not work entirely against IRIS as that environment will have its own extensions and syntaxes which may not be standard. It would help if you could post the SQL you are attempting to run along with any error messages you are receiving.
go to post Rich Taylor · Apr 21, 2021 Let me elaborate a bit more on Dmitry's suggestion. IRIS for Health has a full FHIR server capability built-in. Rather than implement the API yourself, and have to keep up with the changing FHIR versions, you could use that. Now where the data comes from is a separate issue. For this you can use the interoperability of IRIS to reach out to your external systems to supply the data needed to complete the FHIR request. This stays with your use case of IRIS as an ESB to the rest of your environment. You can still use the InterSystems API manager to provide access to the service and mange that inteface.
go to post Rich Taylor · Mar 12, 2021 Alexey, I feel that this would be counter productive. Let me explain why. There is a fundamental difference in the purpose of journaling versus Auditing. Journals protect against data loss. The developers are in a position to determine whether or not a particular update to the database is important to the integrity of the system. Auditing it to help protect the Security of the data. Giving a developer the opportunity to turn off an auditing event deemed important to capture kind of defeats that purpose. It might be worth looking into what this external program is. Perhaps there is a native api that would accomplish this. You could also take a look at our gateways to see if you could ingest this external functionality to use directly in Cache. I'd also look at our IRIS product to see if a migration to that platform would provide the needed functionality or a better pathway to utilizing the external program. Finally, look at why this external program is called so often. Perhaps the calls can be optimized to reduce the audit events if this is a major issue.
go to post Rich Taylor · Feb 19, 2021 Weird, I don't see a log. That message pretty definitively says we have a license issue. I had based my earlier response on the fact that He seemed to be able to get some jobs working which would imply that the instances was running. That wouldn't happen if there was a license limitation exceeded on startup. As the message indicates the instance just shuts down. Mohana, have you been trying this in different environments? To echo Erik, please let us know how you are making out!
go to post Rich Taylor · Feb 18, 2021 The Community edition uses a core based license. It appears that your instance is running successfully and that some routines do execute. Therefore I do not believe that this is a license issue. If you had exceeded the number of allowed cores then the instance would not start. I would look at the routines that are not executing in the background successfully. It is possible that they are using Cache syntax that are no longer supported or has changed names. Try executing these routines in the foreground instead of as a background job. Verify that you get the results you expect. If that works try jobbing this off from the terminal session to see if it will run in the background at all. I would also examine the log files to see if you are getting any errors that are captured from the background execution.
go to post Rich Taylor · Jan 6, 2021 The best way to approach this would to engage with your sales engineer. We are always available to help evaluate use cases for our technology and to assist you in understanding the implementation of such interfaces. You can additionally begin your investigation with our documentation and learning resoures. Here are a couple of links to get you started. Enabling Productions to Use Managed File Transfer Services First Look: Managed File Transfer (MFT) with Interoperability Productions Managed File Transfer video