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.

Great that you found that and can adjust those properties to your liking.

Best of luck in your development work.

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.

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.

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 2917
0800615658 (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.

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.

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. 

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.

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.

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...