I have DFTs with one or more FT1s. I'm trying to get them into SQL Server 2008. I'm using Mirth 2.1.0.5389. Since I don't know how many FT1s I have, I can't use a transformer to pull out the fields I want and send them to a stored procedure. I could concatenate the strings together and deal with it in SQL Server but that isn't my preferred method.
Sample input:
MSH|^~\&|MTAB|MM|MODULEMD|MODULEMD|20150223093543| |DFT^P03|201502230935431000|P|2.3
EVN|P03|20150223093543|||
PID|1|22818|32396|22818|PtLastname^PTFirstname^||1 9380303|M||WHITE|8359 Office Park Dr^^Grand Blanc^MI^48439||248-434-0444^^^|||||22818|123456789|||NON - HISPANIC/LATINO||||||||
PV1|1|O|^^^PMC|R|||^DrLastName^DrFirstName|H83114^ Dr2LastName^Dr2FirstName||||||||N||P|||||||||||||| ||||||||||||||||||||
FT1|1|212887|1|20150223||CM|93000^ECG ROUTINE ECG W/AT LEAST 12 LEADS; W/I&R|||1.00||||||PMC|||427.9~272.9~786.05~272.0|A73 292^DrLastName^DrFirstName|A73292^DrLastName^DrFir stName|H83114^Dr2LastName^Dr2FirstName|||93000^ECG ROUTINE ECG W/AT LEAST 12 LEADS; W/I&R
FT1|2|212887|2|20150223||CG|99214^OFC/OUTPT VISIT E&M EST MOD-HI SEVERITY 25 MIN|||1.00||||||PMC|||427.9~272.4~424.2~496|A73292 ^DrLastName^DrFirstName|A73292^DrLastName^DrFirstN ame|H83114^Dr2LastName^Dr2FirstName|||99214^OFC/OUTPT VISIT E&M EST MOD-HI SEVERITY 25 MIN
I found a post about writing each FT1(+ MSH, PID, etc.) into a new message.
http://ift.tt/1AXd2BN
"multiple messages from one".
I imported the channel. I only get one message and the result is "FT1|undefined". The MSH, PID, etc. are ok.
Here is my channel transformer code:
var suppress = "";
var tmp = msg;
for each (seg in msg..MSH)
{
tmp['MSH'] = msg['MSH'];
}
for each (seg in msg..EVN)
{
tmp['EVN'] = msg['EVN'];
}
for each (seg in msg..PID)
{
tmp['PID'] = msg['PID'];
}
for each (seg in msg..PV1)
{
tmp['PV1'] = msg['PV1'];
}
try{
if (msg['FT1'][0]['FT1.1']['FT1.1.1'] != ""){
//continue
}
}
catch(e){
suppress = "yes";
channelMap.put('check', e);
}
var test = "";
var count = 0;
for each (seg in msg..FT1)
{
tmp['FT1'] = msg['FT1'][count];
var test = test + tmp;
count++;
}
channelMap.put('test', test);
channelMap.put('suppress', suppress);
Sample input:
MSH|^~\&|MTAB|MM|MODULEMD|MODULEMD|20150223093543| |DFT^P03|201502230935431000|P|2.3
EVN|P03|20150223093543|||
PID|1|22818|32396|22818|PtLastname^PTFirstname^||1 9380303|M||WHITE|8359 Office Park Dr^^Grand Blanc^MI^48439||248-434-0444^^^|||||22818|123456789|||NON - HISPANIC/LATINO||||||||
PV1|1|O|^^^PMC|R|||^DrLastName^DrFirstName|H83114^ Dr2LastName^Dr2FirstName||||||||N||P|||||||||||||| ||||||||||||||||||||
FT1|1|212887|1|20150223||CM|93000^ECG ROUTINE ECG W/AT LEAST 12 LEADS; W/I&R|||1.00||||||PMC|||427.9~272.9~786.05~272.0|A73 292^DrLastName^DrFirstName|A73292^DrLastName^DrFir stName|H83114^Dr2LastName^Dr2FirstName|||93000^ECG ROUTINE ECG W/AT LEAST 12 LEADS; W/I&R
FT1|2|212887|2|20150223||CG|99214^OFC/OUTPT VISIT E&M EST MOD-HI SEVERITY 25 MIN|||1.00||||||PMC|||427.9~272.4~424.2~496|A73292 ^DrLastName^DrFirstName|A73292^DrLastName^DrFirstN ame|H83114^Dr2LastName^Dr2FirstName|||99214^OFC/OUTPT VISIT E&M EST MOD-HI SEVERITY 25 MIN
I found a post about writing each FT1(+ MSH, PID, etc.) into a new message.
http://ift.tt/1AXd2BN
"multiple messages from one".
I imported the channel. I only get one message and the result is "FT1|undefined". The MSH, PID, etc. are ok.
Here is my channel transformer code:
var suppress = "";
var tmp = msg;
for each (seg in msg..MSH)
{
tmp['MSH'] = msg['MSH'];
}
for each (seg in msg..EVN)
{
tmp['EVN'] = msg['EVN'];
}
for each (seg in msg..PID)
{
tmp['PID'] = msg['PID'];
}
for each (seg in msg..PV1)
{
tmp['PV1'] = msg['PV1'];
}
try{
if (msg['FT1'][0]['FT1.1']['FT1.1.1'] != ""){
//continue
}
}
catch(e){
suppress = "yes";
channelMap.put('check', e);
}
var test = "";
var count = 0;
for each (seg in msg..FT1)
{
tmp['FT1'] = msg['FT1'][count];
var test = test + tmp;
count++;
}
channelMap.put('test', test);
channelMap.put('suppress', suppress);
Processing DFTs with multiple FT1s
0 commentaires:
Enregistrer un commentaire