The following code snippet is a REGEX that validates characters that are not in English, as well as English characters. The class method "test" takes an email address and validates it based on this additional criteria:
(Originally posted by @Eduard Lebedyuk on Intersystems CODE, 6/26/14) This code snippet determines the difference between two ObjectScript lists. The class method "test" runs the code, and its parameters are detailed in the comments:
Two fairly common requests we receive from HL7 customers are (1) how to remove all trailing delimiters for fields and segments in HL7 messages and (2) how to "find and replace" for an entire HL7 message (as opposed to one segment/field at a time). The code sample below shows a custom function that solves for item 1 and by extension item 2 above. In other words the same approach can be used for finding/replacing any sequence of chars in an entire HL7 message, with some tweaks to the custom function.
I have been tasked with creating a class that will handle error logging in a consistent manor for an application I am working on. The need is to have all variables in the calling method logged along with some other information.
The example given was zwrite which is exactly what I need, however, I somehow need to capture the output of ZW and put it into a database table. Any easy way to capture this data? I was able to dump ZW to a file, but that is not ideal.
I want to share four functions with you. I hope that you can use it at some time.
DNI: the initials of the type of national identity document, is composed of different series of numbers and letters. That proves the identity and personal data of the holder, as well as the Spanish nationality. Example: 94494452X
NIE: The NIE or foreigner identity number is a code for foreigners in Spain.
NOTE: This content was originally presented at the InterSystems Global Summit in 2014, however related topics often come up on the Developer Community so I have decided to turn this into an article for easier reference and discussion. However, much of the content was pulled directly from the presentation slides so the article format resembles that of a PPT deck more than paragraphs.
It is often necessary to run some external command such as a python program or a shell script from inside Caché/Ensemble. There are three ways of doing this:
With the release of Cache 2016.1, JSON support was re-architected and made part of the core object model with the creation of %Object and %Array classes, which allow you to create dynamic JSON enabled objects and arrays.
On a recent demonstration I was working on, I had the need to create a REST web service that returned a JSON representation of a persistent object. After searching for methods that would allow me to accomplish this, ultimately I found none, until now.
The challenge of day 16 is about generating random data using a modified version of a dragon curve (you can find more info on fractal curves like Dragon here : https://en.wikipedia.org/wiki/Dragon_curve).