go to post David Loveluck · Feb 26, 2016 Danthere are lots of ways of doing this. I find thta building the segment data into strings is often the easiest way to do it because you can see what you have and mistakes are easier to avoid.The example below builds strings with random data but you could be pulling it form a database. If you want to be more sophistcated you could use the SetValueAt() method of an HL7 Segment.As Stefan says, looking at the generated code for a data transform can often give you good ideas.Dave //random values. These could be pulled from an applicationset PID1=(1+$r(9))_$r(9999999)set PID2=(1+$r(9))_$r(9999999)set PID3=(1+$r(9))_$r(9999999)set PID4=(1+$r(9))_$r(9999999)set CID=(1+$r(9))_$r(9999999)set PAC=(1+$r(9))_$r(9999999)set firstname=##class(%PopulateUtils).FirstName()set lastname=##class(%PopulateUtils).LastName()set hl7=##class(EnsLib.HL7.Message).%New()set hl7.DocType="2.5:ADT_A01"set tSeg1=##class(EnsLib.HL7.Segment).ImportFromString("MSH|^~\&|HQ|A|||20070222140835||ADT^A01|1"_$r(99999999)_"R"_$R(99999999)_"|D|2.2||||||||||2.2b")set tSeg2=##class(EnsLib.HL7.Segment).ImportFromString("EVN|A01|200702221400||ADM|MPACPB")set tSeg3=##class(EnsLib.HL7.Segment).ImportFromString("PID|1|"_PID1_"|"_PID2_"^^^A^MR~"_PID3_"^^^B^PI~"_PID4_"^^^C^PI||"_lastname_"^"_firstname_"||20010101|U||W|122 BIRDSEED ROAD^^SKOKIE^IL^60077^US^^COOK|COOK|(847)676-2211||ENG|S|NON|3000018947054|111-11-1111|||||||||||N||||||||||||||||||||N")set tSeg4=##class(EnsLib.HL7.Segment).ImportFromString("PD1|||||||O")set tSeg5=##class(EnsLib.HL7.Segment).ImportFromString("PV1|1|I|E3E^3404^01^E|U|||000764^LERNER^DAVID JOSEPH^^MD^DR|||MED||||R|||000764^LERNER^DAVID JOSEPH^^MD^DR|I|7054|5^20070223|||||||||||||||||||E|||||200702221400|||||||A||000764^LERNER^^^MD^DR")set tSeg6=##class(EnsLib.HL7.Segment).ImportFromString("PV2||P")set tSeg7=##class(EnsLib.HL7.Segment).ImportFromString("DG1|1|FF|^OOO^FF||20050101|A|||||||||0||O")set tSeg8=##class(EnsLib.HL7.Segment).ImportFromString("GT1|1|300001894^^^A^PI|BOOBOO^POOPOO||122 BIRDSEED ROAD^^SKOKIE^IL^60077^US^^COOK|(847)676-2211||20010101|U||P|111-11-1111||||001000^NONE|^^^^^US|||N")set tSeg9=##class(EnsLib.HL7.Segment).ImportFromString("ZPI|1|N|||||||||20070220|N||^C|001000^NONE|^^^^^US")set tSeg10=##class(EnsLib.HL7.Segment).ImportFromString("ZPV|1||||||||||N||||O||")set tSeg11=##class(EnsLib.HL7.Segment).ImportFromString("ZP2|1|x|dgcode|")set tsc=hl7.SetSegmentAt(tSeg1,1)set tsc=hl7.InsertSegmentAt(tSeg2,2)set tsc=hl7.InsertSegmentAt(tSeg3,3)set tsc=hl7.InsertSegmentAt(tSeg4,4)set tsc=hl7.InsertSegmentAt(tSeg5,5)set tsc=hl7.InsertSegmentAt(tSeg6,6)set tsc=hl7.InsertSegmentAt(tSeg7,7)set tsc=hl7.InsertSegmentAt(tSeg8,8)set tsc=hl7.InsertSegmentAt(tSeg9,9)set tsc=hl7.InsertSegmentAt(tSeg10,10)set tsc=hl7.InsertSegmentAt(tSeg11,11)
go to post David Loveluck · Feb 11, 2016 looking at the 2016.2 field test, the red exclamation mark has gone. It normally means the argument is required, so it shouldn't be there, but is doing no harm other than misleading people.
go to post David Loveluck · Feb 11, 2016 the UI here is not very clear - it suggests that you need an argument, but leaving the box empty should work just fine. No argument will be passed and everything will work fine.
go to post David Loveluck · Feb 1, 2016 Most Ensemble productions should restart without problems when the OS restarts. what problems are you seeing? There are some application specific details you may want to consider and these are discussed in the white paper: https://community.intersystems.com/documentation/behavior-ensemble-following-system-failure-and-restart
go to post David Loveluck · Jan 25, 2016 Andreas I don't think there is an easy way to do what you are asking for in a single SQL statement. Mapping Ens.MessageHeader data from different databases into one namespace isn't really possible. I think you will have to run a query per namespace and merge the results. The new activity statistics capability will centralize statistics for many namespaces so you can run a single query, but that isn't available until 2016.1. Dave
go to post David Loveluck · Jan 21, 2016 personally i would use set mode=$System.Version.SystemMode() which is documented and therefore a supported API. This package provides a wealth of classes and methods. Look at documatic for the %SYSTEM package.
go to post David Loveluck · Jan 20, 2016 Robert when database encryption was first introduced it was determined that for a particular application that was very I/O intensive (5,000 block read or writes per second) , encryption would add about 4% to the CPU usage and it can add a tiny amount to disk block latency. That is an extreme case, so it is probably an upper bound for any considerations. In my experience, very few Ensemble solutions are at all IO intensive, with more time spent on network traffic or CPU usage. So I would be surprised if it is possible to measure the difference in your case. I don't know about disk encryption. dave
go to post David Loveluck · Jan 19, 2016 Scott what type of messages are they? I guess since you are using a routing rule they are HL7 v2 or X12 messages, but perhaps not. If you want to block or route a message based on a field in the message and you are dealing with more than a very small number of customers then I would use a lookup table as you suggest that maps customer identifiers to 0 or 1 so it is easy to reference them in a routing rule. For a small number of customers that don't change, you could use an In(...) function but I am guessing that is not the case.
go to post David Loveluck · Jan 19, 2016 InterSystems is very committed to this. We are working through a number of user interface issues in the first design and we are very happy to get suggestions.