go to post Jeffrey Drumm · Jul 21, 2017 Evgeny, I received a registration confirmation on Wednesday; do I need to re-register?
go to post Jeffrey Drumm · Jul 17, 2017 There aren't any "userland" settings in the HL7 service configuration that will allow a carriage return to be treated as both a segment delimiter and, well, not a segment delimiter. They're mutually exclusive.This situation is one of the reasons why InterSystems supports custom services ...
go to post Jeffrey Drumm · Jul 17, 2017 It's not a character set problem, it's a malformed HL7 problem. If the vendor sending the message needs to include a carriage return character in the middle of a segment, they should be escaping it. If the vendor won't fix it, you're probably looking at overriding the inbound service's OnProcessInput() method to strip out \0x0D\0x0A sequences and replace them with something else. If they're in there for textual formatting purposes, you'll need to know what the target system expects for a line-break character sequence.
go to post Jeffrey Drumm · Jul 17, 2017 Are you sure you're looking at the right task? I/O logs would normally be purged using Ens.Util.Tasks.Purge, which is also used to purge messages, alerts, and other production logging. Here's a task I created specifically for demonstration purposes. You won't find this in your scheduled task list by default. You may have another, similar task that someone may have set up in your environment, though:
go to post Jeffrey Drumm · Jul 15, 2017 If you're working with messages coming in from an HL7 service, the doctype will likely already be set. I only set it in my example because I used the ImportFromFile() method, which does not automatically select a schema and DocType category.The DocType essentially defines the message object's rules use for parsing the message, so without one, you won't really be able to do much with them.You could do some basic parsing/counting with $PIECE and some loop constructs against the raw message, but that doesn't sound like a lot of fun ...
go to post Jeffrey Drumm · Jul 14, 2017 A bit counter-intuitive, but GetValueAt() works for this, using the same segment path identifiers that you use in DTL:HICG > set msg=##class(EnsLib.HL7.Message).ImportFromFile("C:\interface\ensemble\LabResult.hl7")HICG > set msg.DocType = "2.3.1:ORU_R01"HICG > w msg.GetValueAt("PIDgrpgrp(1).ORCgrp(1).OBXgrp(*)")191
go to post Jeffrey Drumm · Jul 14, 2017 It appears as though an expression won't work in the target field. Interestingly, though, this actually compiles for me on 2017.1:It errors when the rule executes:I've done dynamic routing in a BPL code bock using ObjectScript, though, and you could certainly write your own BP in Studio for it ... see the methods SendRequestSync()/SendRequestAsync() in Ens.Host, of which Ens.BusinessService/BusinessOperation/BusinessProcess are subclasses.
go to post Jeffrey Drumm · Jul 3, 2017 Re-reading the question, this probably makes more sense than my answer
go to post Jeffrey Drumm · Jul 3, 2017 Yes, and InterSystems provides quite a few examples for developing Business Services. A Service generally extends an existing class, since there's a lot of operational stuff that is common between services. A Service also has a Parameter that defines the Adapter class it uses, which provides the methods to communicate with other processes/applications/servers. You can browse the EnsLib package for something that comes close to fitting your needs, then create a new class that either extends it or replaces its functionality with something different.Look at the COS (Caché ObjectScript) source for, say, EnsLib.HL7.Service.TCPService to get an idea of how it hangs together. And if you need a custom Adapter to support something that isn't built-in, you can look at the code for those as well (for example, EnsLib.HL7.Adapter.TCPInboundAdapter). This is obviously all done through Studio, and guides for developing using the pre-built adapters are included in the Caché/Ensemble documentation.Now, if you're talking about an API for some development platform other than COS, that's a different beast.
go to post Jeffrey Drumm · Jun 30, 2017 Are you looking for the Destination file path? That's a Property of the Adapter class. If you need to reference it from within one of the methods you've overridden or have created as a callback, you can reference it as ..Adapter.FilePath.If it's the Source file path you're looking for, the only place you'll find that is in pRequest.Source, and that will include not only the path but the filename as well.
go to post Jeffrey Drumm · Jun 29, 2017 The XML document checks out syntax-wise, and the CDATA blocks containing the individual deployment objects check out as well. I think you've encountered a bug ... might be time to get the WRC involved.
go to post Jeffrey Drumm · Jun 29, 2017 Hmm. Interesting. I created the exact same rule as your original in my local testing environment and it worked as expected. I was not using the testing service, however. I'm running HS 2017.1 if it matters.
go to post Jeffrey Drumm · Jun 29, 2017 Stuart, have you verified that the merge message parses correctly? Check the contents of the message in the message viewer and verify that the MRG segment isn't displayed in black text. If the segment doesn't parse against the schema and doctype specified in the inbound service, the HL7.{} field selectors referencing it won't work.
go to post Jeffrey Drumm · Jun 28, 2017 If LDAP/AD isn't an option, you should look at the class documentation for Security.Users and Security.Roles in the %SYS namespace. They both have import and export methods that should get you well on your way.You can limit the user export to specific roles, allowing you to synchronize non-administrative users without impacting the administrative ones. Assuming you've created a role named %Users that contains only those accounts that need to be updated across all servers:%SYS > Set sc = ##class(Security.Users).Export("C:\InterSystems\UserExport.xml",.outcnt,"*","%Users")This would create the file C:\InterSystems\UserExport.xml, containing the users in role %Users, with a count of the number exported in the variable outcnt. The variable sc is of type %Status and should be 1 if everything went ok.Those users can then be imported on other hosts using the corresponding import method:%SYS > Set sc = ##class(Security.Users).Import("C:\PathToImport\UserExport.xml",.incnt)The number of users imported will be found in variable incnt. Again, sc should be 1 if the method completed successfully.
go to post Jeffrey Drumm · Jun 28, 2017 Have you looked into centralized administration via LDAP/Active Directory? This might not be practical if the servers are not accessible through the same network infrastructure, but it could be a significant time saver in the long run.
go to post Jeffrey Drumm · Jun 26, 2017 Yes, that's the link I posted in response to Evgeny's request. Looks like we just missed each other