Mirth: Mapper: Cannot get data to map to variables - mirth

I'm learning Mirth and ran into a weird issue.
I created an HL7 to HL7 channel. I can get the v2.3 hl7 messages into the source and out of/to the destination. no problem. But when i set up a mapper step in the transformer to map data to a variable the data from the message will not copy over to the variable. Variable is just blank
variable name: patDOB2
mapping: msg['PID']['PID.7']['PID.7.1'].toString()
i used the same message for inbound and outbound templates and used that message for testing
MSH|^~&|AccMgr|1|||20050110045504||ADT^A01|599102|P|2.3|||
EVN|A01|20050110045502|||||
PID|1||10006579^^^1^MRN^1||DUCK^DONALD^D||19241010|M||1|111 DUCK ST^^FOWL^CA^999990000^^M|1|8885551212|8885551212|1|2||40007716^^^AccMgr^VN^1|123121234|||||||||||NO NK1|1|DUCK^HUEY|SO|3583 DUCK RD^^FOWL^CA^999990000|8885552222||Y||||||||||||||
PV1|1|I|PREOP^101^1^1^^^S|3|||37^DISNEY^WALT^^^^^^AccMgr^^^^CI|||01||||1|||37^DISNEY^WALT^^^^^^AccMgr^^^^CI|2|40007716^^^AccMgr^VN|4|||||||||||||||||||1||G|||20050110045253||||||
GT1|1|8291|DUCK^DONALD^D||111^DUCKST^^FOWL^CA^999990000|8885551212||19241010|M||1|123121234||||#Cartoon Ducks Inc|111^DUCK ST^^FOWL^CA^999990000|8885551212||PT|
DG1|1|I9|71596^OSTEOARTHROS NOS-L/LEG ^I9|OSTEOARTHROS NOS-L/LEG ||A| IN1|1|MEDICARE|3|MEDICARE|||||||Cartoon Ducks Inc|19891001|||4|DUCK^DONALD^D|1|19241010|111^DUCK ST^^FOWL^CA^999990000|||||||||||||||||123121234A||||||PT|M|111 DUCK ST^^FOWL^CA^999990000|||||8291
IN2|1||123121234|Cartoon Ducks Inc|||123121234A|||||||||||||||||||||||||||||||||||||||||||||||||||||||||8885551212
IN1|2|NON-PRIMARY|9|MEDICAL MUTUAL CALIF.|PO BOX 94776^^HOLLYWOOD^CA^441414776||8003621279|PUBSUMB|||Cartoon Ducks Inc||||7|DUCK^DONALD^D|1|19241010|111 DUCK ST^^FOWL^CA^999990000|||||||||||||||||056269770||||||PT|M|111^DUCK ST^^FOWL^CA^999990000|||||8291
IN2|2||123121234|Cartoon Ducks Inc||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||8885551212
IN1|3|SELF PAY|1|SELF PAY|||||||||||5||1
I have tried it as every kind of map: global channel, channel, etc
I have tried it in an iterator
I have tried it with different mappings within "msg"
I have tired it with all the above using tmp
I must be doing something very very wrong or missing some very simple step because i have literally followed along with 4 different tutorials and still it is not working.
I can get static data like "dog" or mirth generated data like a timestamp or uuid into the variable but not data from the msg or tmp.
I actually broke down and made the HL7 to HL7 channel to test this problem because on a HL7 to JSON channel the data from the msg segments was not copying over to the JSON file BUT timestamp, UUID, and static data would.
if needed i can attach a copy of the transformer or channel. thanks

To aid assistance, kindly share the Channel, a raw source file and a desired template of the output file to aid assistance or a screenshot of the message builder or Javascript transformer code you are using to assign variables.

Related

how to pass a variable value from one flutter page to another

suppose, I have a file body1.dart where I created a variable "hello" which was initially empty!
String hello = "";
Now, in the same file, I have created a loop which will set and update the value of hello after every iteration!
Now the thing is whenever the value of "hello" get changed, I want to display that inside a Text Field which is in a different file body2.dart. I want to retrieve the real-time value at that exact moment! (Not the final outcome at the end of the loop)
Can you provide code snippet for this? So that we can best assist you.
Otherwise the best option would be to use a stream. You can have multiple dart classes subscribed to the same stream.
Streams provide an asynchronous sequence of data. Data sequences include user-generated events and data read from files. You can process a stream using either await for or listen() from the Stream API
Checkout official documentation from dart.dev

Automatically download emails from Outlook with SAS or Outlook rule

I am trying to create a program to automatically download the attached files that are sent to us from a certain email and then transform the delimiter with SAS, of those csv that are attached to us and pass those csv through a flow that I have already created.
I have managed to create a program that treats the csv as I want and the delimiter that I want, the problem is that when it comes to automating the download of files from Outlook it does not work.
What I have done is create a rule with the following VB code that I found on the internet:
Public Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem)
Dim oAttachment As Outlook.Attachment
Dim sSaveFolder As String
sSaveFolder = "C:\Users\ES010246\Desktop"
For Each oAttachment In MItem.Attachments
oAttachment.SaveAsFile sSaveFolder & oAttachment.DisplayName
Next
End Sub
I have changed the path to my personal path where i want the files are downloaded.
website: https://es.extendoffice.com/documents/outlook/3747-outlook
The problem is that this code does not work for me, it does absolutely nothing for me and no matter how much I search the internet, only this code appears.
Is there any other way to do with SAS what I want? What is it to automatically download 8 csv files sent to me by Outlook, or has someone experienced the same thing as me with VBA?
I have followed all the steps about 7 times so I think the error is not in copying the code or selecting certain options wrong, in fact I had copied and pasted the code and later I modified the path where I wanted those to be saved. files but it doesn't work, does anyone know why?
I will be tremendously grateful, thank you very much for everything!
First of all, you need to make sure the file name and path doesn't include forbidden symbols.
The VBA macro used for a rule in Outlook is absolutely valid except that a mail item may contain the attached files with the same name, so a file saved to the disk may be overwritten (saved with the same name). That's why I'd suggest generating a file name with your own unique IDs making sure that DisplayName property is not empty and has a valid name what can be used for file names (exclude forbidden symbols).
Also you may consider handling the NewMailEx event of the Application class which is fired when a new message arrives in the Inbox and before client rule processing occurs. Use the Entry ID returned in the EntryIDCollection string to call the NameSpace.GetItemFromID method and process the item. This event fires once for every received item that is processed by Microsoft Outlook. The item can be one of several different item types, for example, MailItem, MeetingItem, or SharingItem.
The Items.ItemAdd event can be helpful when items are moved to a folder (from Inbox). This event does not run when a large number of items are added to the folder at once.

Defining a new variable in order to make a huge iteration giving me an error

I have an endpoint, you can have informaciĆ³n about products
{{URL_API}}/products/
If i perform a GET method over that endpoint i will obtain the information of every product
BUT i can also specify the product that i want to know about, i.e:
{{URL_API}}/products/9345TERFER (the last code is the id of the product, called SKU)
The problem is that if i want to make a CSV in order to update the information of different products i have to define a variable called sku in the endpoint so i will be able to pass the corresponding SKU
I want to create the variable {{sku}} but i do not understand how to do that.. i tried so many times and i failed, i've searched a lot but i do not really understand
Also, should i use ":" before the declaration of the variable? i mean:
{{URL_API}}/products/:{{sku}}
or simply:
{{URL_API}}/ns/products/{{sku}}
Can you help me?
I'm super lost :(
EDIT:
I want to perform a PUT method, i want to pass different values to the body and then.. send the request (it throws an error: 404 not found)
This is what i did:
PUT|{{URL_API}}/products/{{sku}}
body:
{
"tax_percentage":"{{tax_percentage}}",
"store_code":"{{store_code}}",
"markup_top":"{{markup_top}}",
"status":"{{status}}",
"group_prices": [
{
"group":"{{class_a}}",
"price":"{{price_a}}",
"website":"{{website_a}}"
}
]
}
CSV:
POSTMAN:
Your issue seems to be just a basic understanding of how data files work with variables in Postman, here's a simple example that will work the same way for you too.
This is a basic request I'm using to resolve the variable from the data file - It's a GET request but that doesn't matter as all we're look at here is using a data file to resolve variables. All you need to do is ensure the URL is correct and that you SAVE the request before using the runner.
Here's a simple CSV file created in a text editor. The heading sku in the name on the variable it will reference inside the Postman request. Each value under that is the value that will be used for each iteration.
In the Runner, select your Collection from the list (If you have more than one) then select the CSV file. Once imported, you will be able to see a preview of the data.
If that's correct, press the Run button. The Runner will then iterate through the file and pick up the sku value in the CSV file and use it in the request. I've expanded one of the requests so you can see that the value was used in the request.

WebSphere MQ binary fiiles

This might be a question that may not be answered due to the nature of the external tool I am using (lack of documentation).
Basically, I am using a tool that pushes and pulls messages from the queue, more precisely - it pushes and pulls files. It worked perfectly for text files but when I tried pushing and then pulling a binary file - the pulled one was corrupted, it's size increased in comparsion with the original file (1.33 ratio).
For example moving a zip file wouldn't work...
I suppose it has something to do with the tools configuration, the only settings that can be changed regarding the problem are CCSID and encoding (UTF-8, Base16, etc.), I tried playing with both, unfortunately without success.
Tried using the following CCSIDs: 65535, 1208, 819
and encodings : UTF-8, Base16, Base64
In every case the binary file was corrupted after pulling it from the queue, I'm not entirely sure how the tool acomplishes that, it's written in Java, also I'm new to MQ so I tried searching for the correct options in IBM's docs but I haven't found anything that makes more sense than 65535 and Base16, yet it still doesn't work, could anyone with more experience with MQ tell if playing with these options makes sense at all in this case and if so - suggest what CCSID and encoding can I try to accomplish what Ive described above?
More information is really needed, but my suspicion is you are putting the message on the queue as a text message and playing around with encodings and ccsid's to try to get it right. You really need to know how the 'Java' app achieves this - is it using JMS (eg JMSBytesMessage) or base Java (something like setMessageData).
At a high level, there is a header on a message (The MD) which 'describes' the data - the MD format field. If you say the data is a string then MQ can convert between codepages should the getter request it etc. Put a tiny binary file into a message onto a queue, and browse the queue with amqsbcg or the GUI - what are the MD fields for format? What headers are on the payload - anything like RFH2's?
Put the same code in to give us a clue, or at least the amqsbcg output

How to save message file in RAW format

One of our client does not know how to save/generate/produce/provide swift messages in its raw format via their swift alliance system, neither do i. By raw format i mean following format
{1:F21XXXXXXXXXXXX7108170239}{4:{177:1112071543}{451:0}}{1:F01XXXXXXXXXXXX7108170239}{2:O9502137111207XXXXXXXXXXXX54153885641112071537N}{4:
:20:XXXXXXXXXXXXXX
:25:XXXXXXXXXX
:28C:00237/00001
:60F:C090513AUD1162994,30
:61:1112061207D110,00NCHKFDD388407 //071211WDM9103
291111 GUJ
:61:1112061207D200,00NCHK3927611471 //071211WDM9104
090911 KAR
:62F:C090513AUD1610881,52
:64:C090513AUD1610881,52
-}{5:{CHK:XXXXXXXXXXXX}}{S:{COP:S}}
Is there any way/interface to integrate with SWIFT and extract these files Or is there any possibility to schedule SWIFT to generate these files Or even manual steps to do it?
Edit 1
Messages are saved by creating a profile from the application and setting connection type to "File Transfer". It will then keep generating files in ISO format to a shared location.
to get output file from swift you need to configure message partner CBSOUT
to do so do the following
enter to swift application SAE or SAA with super user.
click on
Application interface.
from the list right click on
CBSOUT and then enable
to configure CBSOUT double click on it.
Data format :select RJE
output path name : put the folder you want to store the files
output the extension : put the file extension example :out or txt.
session initiation select Auto.
number of message =1
finish.
good lucky.
byeeeeeee
Messages are saved by creating a profile from the application and setting connection type to "File Transfer". It will then keep generating files in ISO format to a shared location.