Cloverleaf 6.1.2 on AIX
I am attempting to create a generic Xlate for chaining, which will convert a single A17 message into two A02s and my only real problem is using the SEND action to generate and send the two A02 messages.
Would somone be willing to assist me? There is nothing special being done, except for trying to SEND tne A02 within an iteration.
Here is the Xlate:
prologue
xlt_infile: hl7 2.5.1 Epic_AIP_711700_IB ADT_A17
who: jblanchar01
date: March 14, 2017 3:11:11 PM CDT
xlt_outfile: hl7 2.5.1 Epic_AIP_711700_IB ADT_A02
type: xlt
version: 7.0
end_prologue
{ { OP IF }
{ ERR 0 }
{ COND { 0(0).MSH(0).#9(0).[1] eq =A17} }
{ THENBODY {
{ { OP SUPPRESS }
{ REM 1 }
}
{ { OP COPY }
{ ERR 2 }
{ IN =1 }
{ OUT @msgCounter }
}
{ { OP ITERATE }
{ BASIS 1(%g1) }
{ VAR %g1 }
{ TYPE group }
{ BODY {
{ { OP PATHCOPY }
{ ERR 2 }
{ IN 0(0).MSH(0) }
{ OUT 0(0).MSH(0) }
}
{ { OP COPY }
{ ERR 2 }
{ IN =A02 }
{ OUT {{0(0).MSH(0).#9(0).[1]}} }
}
{ { OP COPY }
{ ERR 2 }
{ IN @null }
{ OUT {{0(0).MSH(0).#9(0).[2]}} }
}
{ { OP COPY }
{ ERR 2 }
{ IN {{0(0).MSH(0).#10(0).[0]} =. @msgCounter} }
{ OUT {{0(0).MSH(0).#10(0).[0]}} }
{ COPYSEP {} }
}
{ { OP PATHCOPY }
{ ERR 0 }
{ IN 0(0).EVN(0) }
{ OUT 0(0).EVN(0) }
}
{ { OP COPY }
{ ERR 0 }
{ IN =A02 }
{ OUT 0(0).EVN(0).#1(0) }
}
{ { OP PATHCOPY }
{ ERR 2 }
{ IN 1(%g1).0(0).PID(0) }
{ OUT 1(%g1).0(0).PID(0) }
}
{ { OP PATHCOPY }
{ ERR 2 }
{ IN 1(%g1).0(0).ZPD(0) }
{ OUT 1(%g1).0(0).ZPD(0) }
}
{ { OP PATHCOPY }
{ ERR 2 }
{ IN 1(%g1).0(0).PD1(0) }
{ OUT 1(%g1).0(0).PD1(0) }
}
{ { OP PATHCOPY }
{ ERR 2 }
{ IN 1(%g1).0(0).PV1(0) }
{ OUT 1(%g1).0(0).PV1(0) }
}
{ { OP PATHCOPY }
{ ERR 2 }
{ IN 1(%g1).0(0).PV2(0) }
{ OUT 1(%g1).0(0).PV2(0) }
}
{ { OP PATHCOPY }
{ ERR 2 }
{ IN 1(%g1).0(0).ZPV(0) }
{ OUT 1(%g1).0(0).ZPV(0) }
}
{ { OP SEND } }
{ { OP ADD }
{ ERR 2 }
{ IN {@msgCounter =1} }
{ OUT @msgCounter }
{ FUNCTION ADD }
}
{ { OP PATHCOPY }
{ ERR 2 }
{ IN @null }
{ OUT 1(0).0(0).PID(0) }
}
{ { OP PATHCOPY }
{ ERR 2 }
{ IN @null }
{ OUT 1(0).0(0).ZPD(0) }
}
{ { OP PATHCOPY }
{ ERR 2 }
{ IN @null }
{ OUT 1(0).0(0).PD1(0) }
}
{ { OP PATHCOPY }
{ ERR 2 }
{ IN @null }
{ OUT 1(0).0(0).PV1(0) }
}
{ { OP PATHCOPY }
{ ERR 2 }
{ IN @null }
{ OUT 1(0).0(0).PV2(0) }
}
{ { OP PATHCOPY }
{ ERR 2 }
{ IN @null }
{ OUT 1(0).0(0).ZPV(0) }
}
}}
}
{ { OP SUPPRESS } }
}}
{ ELSEBODY {
}}
}
MESSAGE 1
0(0).MSH(0) : >|^~&|EPIC||||20170302082554|OLIVERMA|ADT^A02|77964.1|T|2.5.1<
0(0).EVN(0) : >|A02|20170302082554||ADT_EVENT|OLIVERMA^OLIVER^MARK^^^^^^ABQ^^^^^1LRH|20170302072551|1LRH^1LRH^FAC<
1(0).0(0).PID(0) : >|1|205819^^^AHS^MR|0000000821^^^1ABQH^MR||NAVICARE^ONE^^^^^D||19820223|F||White|777 MULBERRY, #77^^LAS VEGAS^NM^87701^US^L^^SAN MIGUEL|SAN |(888)555-3465^P^H^^^888^5553465~^NET^Internet^test@test.org||ENG|MARRIED||1000100061445|555-55-3579|||NOT HISPANIC||||||||N<
1(0).0(0).ZPD(0) : >||||||ABQ SERVICE AREA^^10|N||N<
1(0).0(0).PD1(0) : >|||ROSWELL REGIONAL HOSPITAL^^101004|1054^CHAMPION^PHYSICIAN^^^^^^PROVID^^^^PROVID~1105499994^CHAMPION^PHYSICIAN^^^^^^NPI^^^^NPI<
1(0).0(0).PV1(0) : >|1|I|1LRH22RS^201^201-1^1LRH^EVS ASSIGNED^^^^^^DEPID|EL||1LRH22RS^206^206-1^1LRH^D^^^^^^DEPID|1111^LEAN^PHYSICIAN^^^^^^PROVID^^^^PROVID~1111199992^LEAN^PHYSICIAN^^^^^^NPI^^^^NPI|||MED||||Phys/Clinic|||1111^LEAN^PHYSICIAN^^^^^^PROVID^^^^PROVID~1111199992^LEAN^PHYSICIAN^^^^^^NPI^^^^NPI|INP|1000100061445||||||||||||||||||||||Ad|||20170302072400<
1(0).0(0).PV2(0) : >||Semi-Private||||||20170302072400||||Hospital Encounter|||||||||n|N<
1(0).0(0).ZPV(0) : >|||||||||||20170302072400<
0(0).MSH(0) : >|^~&|EPIC||||20170302082554|OLIVERMA|ADT^A02|77964.2|T|2.5.1<
0(0).EVN(0) : >|A02|20170302082554||ADT_EVENT|OLIVERMA^OLIVER^MARK^^^^^^ABQ^^^^^1LRH|20170302072551|1LRH^1LRH^FAC<
1(0).0(0).PID(0) : ><
1(0).0(0).PV1(0) : ><
1(1).0(0).PID(0) : >|2|205830^^^AHS^MR|0000000833^^^1ABQH^MR||NAVICARE^TWO^^^^^D||19770223|M|NAVICARE^THREE|White|888 PINE, # 88^^LAS VEGAS^NM^87701^US^L^^SAN MIGUEL|SAN |(888)555-4645^P^H^^^888^5554645~^NET^Internet^test@test.gov||ENG|MARRIED||1000100061441|555-55-4678|||NOT HISPANIC||||||||N<
1(1).0(0).ZPD(0) : >||||||ABQ SERVICE AREA^^10|N||N<
1(1).0(0).PD1(0) : >|||LOVELACE MEDICAL CENTER^^101002|1054^CHAMPION^PHYSICIAN^^^^^^PROVID^^^^PROVID~1105499994^CHAMPION^PHYSICIAN^^^^^^NPI^^^^NPI<
1(1).0(0).PV1(0) : >|2|I|1LRH22RS^206^206-1^1LRH^D^^^^^^DEPID|EL||1LRH22RS^201^201-1^1LRH^EVS ASSIGNED^^^^^^DEPID|1000^FAMILY MEDICINE^PHYSICIAN^^^^^^PROVID^^^^PROVID~1100099997^FAMILY MEDICINE^PHYSICIAN^^^^^^NPI^^^^NPI|||MED||||Phys/Clinic|||1111^LEAN^PHYSICIAN^^^^^^PROVID^^^^PROVID~1111199992^LEAN^PHYSICIAN^^^^^^NPI^^^^NPI|INP|1000100061441||||||||||||||||||||||Ad|||20170302071100<
1(1).0(0).PV2(0) : >||Semi-Private||||||20170302071100||||Hospital Encounter|||||||||n|N<
1(1).0(0).ZPV(0) : >|||||||||||20170302071100<
Migration Consultant
Coffee Regional Medical Center
Eastern Time Zone