Good spot - I got so distracted by the %ConstructClone not being called with deep=1 that I didn't even notice that they were then still working from their pRequest variable.
- Log in to post comments
Good spot - I got so distracted by the %ConstructClone not being called with deep=1 that I didn't even notice that they were then still working from their pRequest variable.
Hey Gary.
I know that this has been mentioned before, but actual line breaks in the HL7 like this will likely causes issues with the parsing of the HL7 message in your receiving system.
I believe your goal should either be (see line 35):
.png)
(but maybe swapping out "/.br/" with "\X0D\\X0A\" depending on the receiving system per Jeffrey Drumm's comment here)
Or (see line 21)
.png)
Hey Colin.
I had a few minutes before a meeting so wanted to try recreate on IRIS instead of Cache and happened to have not yet restarted VSCode so didn't have the new extension versions installed.
I was able to run the example you tried in the old extension versions and observed no errors in the output for the language server, ran my updates, and then lost the ability to select the Language Server from the Output selection dropdown:
.png)
I would have liked to been able to completely recreate this in the new version, or at least give some indication of where the fault may be. But not being able to see the Output window for the language server like in your screenshot stops me in my tracks 😅
Perfect, thank you Ashok.
Setup 2 is my preferrable option for a few reasons:
So in effect, I would suggest something like:
.png)
Any common transforms you need to apply can then go in at the System A router (for example, I had a system with a bug in the outputs we would get, so worked around it once earlier in the flow rather than trying to fix it in every transform for the downstream systems).
Beyond that, I'd recommend the routing rules in the System A router is minimal but still apply a base level of filtering based on the message types the downstream routers will be receiving. There no point sending System D A04 messages if that router then will never process them. However, if System D will receive A08's when PV1:2 is "E", I'd allow all A08's from System A's Router to go to System D's router, and then do the explicit check for A08's when PV1:2 is "E" from within the rules of System D's Router.
Assuming you are iterating though the OBX's, you can simply add a variable where you increment it for each OBX you are processing.
Assuming your code is still similar to your code from your other account, you should have an incrementing variable of i.
Try sticking in
Do pOutput.SetValueAt(i,"ORCgrp(1).OBRuniongrp.OBXgrp("_i_").OBX:4")Hey Lukasz.
Do you not get this option after selecting the namespace?.png)
To give an example of where I have done something similar:
I have a Service that will check if the active mirror has changed since the last poll, and will trigger a message to the "Ens.Alert" component in the production if it has changed.
To do this, I have a service with the following code:
Class Demo.Monitoring.SystemMonitor Extends Ens.BusinessService
{
Method OnProcessInput(pInput As%RegisteredObject, Output pOutput As%RegisteredObject, ByRef pHint As%String) As%Status
{
Set tsc = ..CheckMirroring()
Quit tsc
}
Method CheckMirroring() As%Status
{
Set triggered = 0//Get the current serverSet CurrServer = $PIECE($SYSTEM,":")
/**Check Global exists, and create it if it does not.(Should really only ever happen once on deployment, but this is a failsafe)**/Set GBLCHK = $DATA(^$GLOBAL("^zMirrorName"))
If GBLCHK = 0{
Set^zMirrorName = CurrServer
Quit$$$OK//No need to evaluate on first run
}
If^zMirrorName = CurrServer {
/*Do not Alert*/Quit$$$OK
}
Else {
/*Alert*/Set AlertMessage = "The currently active server has changed since the last check, suggesting a mirror fail over."Set AlertMessage = AlertMessage_" The previous server was "_^zMirrorName_" and the current server is "_CurrServer_"."Set^zMirrorName = CurrServer
Set req=##class(Ens.AlertRequest).%New()
Set req.SourceConfigName = "System Monitor"Set req.AlertText = AlertMessage
Set req.AlertTime = $ZDATETIME($HOROLOG,3)_".000"Set tSC = ..SendRequestSync("Ens.Alert", req)
Quit tSC
}
}
}Then, from within my production, I then have the service that is using this class configured with "CallInterval" set to the desired frequency of running:
.png)
It's slightly dependant on the HL7 Version and Message Type, but assuming you're working with ORM_O01 messages using HL7 V2.3, you have a few options:
Example 1, Multiple Ifs, one for each variation (I only did 2 in the screenshot to save time) :.png)
Example 2, If/Else where we assume that we only want "I" in OBR:18 when PV1:2 is "I", and otherwise set to "O":
.png)
Example 3, use the $CASE function:
.png)
All of these can be combined with the response you just got here HL7 DTL formatting | InterSystems Developer Community | Business Process for the same question, assuming you want to put them into a subtransform, but I'd start with what I have shared here first, and venture into subtransforms and auxiliary-based configs after you get this nailed down.
Out of interest:
It is technically possible, but you are somewhat limited by your receiving endpoints capability to receive these in batch.
It relies on the use of FHS (File Header) and BHS (Batch Header) segments at the start of your batch message, and then all of the content you wish to send in that batch, finalised with BTS (Batch Trailer) and FTS (File Trailer)
You may want to look first at how IRIS will display a batch message within the system here and look here as to how you can work with them. But I do want to stress again that you will want to ensure first and foremost that the system you want to send this to can actually support it so that you don't lose time to building a solution using this method only to find it will never work.
Hey everyone!
Have you tried adding backticks to your double-quotes to escape them?
PS C:\Users\Colin\Desktop> irissession healthconnect -U user 'Say^ImplUtil(`"Your String Here`")'Hi Nezla.
As the URL starts out as "ac1.mqtt.sx3ac.com", suggesting that the API is using MQTT, is the %net.httprequest adapter the right way to go?
I think it'd be good to take a look at Using the MQTT Adapters to see how the adapter can be used if you haven't already.
If you're looking to simply convert timezone codes to the UTC offset, I'd setup a simple utility that returns the desired string based on a case statement.
Something like:
ClassMethod DisplayTimezoneToUTCOffset(pInput as%String) As%String{
Quit$CASE($ZCONVERT(pInput,"U"),
"CEST":"+02:00",
"CET":"+01:00",
"BST":"+01:00",
:"")
}If you then want to build the entire string, you could do similar to above for the months, and then have the following:
Class Demo.Utils.ExampleUtils.TimeConvert
{
ClassMethod DisplayDateTimeToLiteral(pInput as%String) As%String{
// Deconstruct the input string into it's logical parts.// Variables starting d are "display" values that will be converted later.Set DayOfWeek = $P(pInput," ",1) //Not usedSet dMonth = $P(pInput," ",2)
Set Day = $P(pInput," ",3)
Set Time = $P(pInput," ",4)
Set dTimeZone = $P(pInput," ",5)
Set Year = $P(pInput," ",6)
//Return final timestampQuit Year_"-"_..DisplayMonthToLiteral(dMonth)_"-"_Day_" "_Time_..DisplayTimezoneToUTCOffset(dTimeZone)
}
ClassMethod DisplayTimezoneToUTCOffset(pInput as%String) As%String{
Quit$CASE($ZCONVERT(pInput,"U"),
"CEST":"+02:00",
"CET":"+01:00",
"BST":"+01:00",
:"")
}
ClassMethod DisplayMonthToLiteral(pInput as%String) As%String{
Quit$CASE($ZCONVERT(pInput,"U"),
"JAN":"01",
"FEB":"02",
"MAR":"03",
//etc. etc."JUL":"07",
:"")
}
}
Which then gives the following:
.png)