Transformer DataReader (SQL Server) to HL7

jeudi 22 janvier 2015

I use the mirth connect 3.0 and I'm trying to write a transfomer script to modify the NK1 and AL1 segments in a message I want which all segments appear together.

The communication is DataReader to HL7.



---------------------------------------------------------

My Result Message:

---------------------------------------------------------

MSH|^~&|ADT4||eHs||201501151703||ADT^A04^ADT_A04|| P|2.8|||

EVN|A04|201501151703|20150115 170341||administrator|

PID|332|ZZZZZ00006|||Lennon^John^Amaro||19600101|M ||White|Buffalo Av^^Buffalo^New York^14222^<none>||(716)123-4455||French|S|||123-13-2546|324223423424||Central American||||||<none>||||||||||||teste@teste||||

PV1|ZZZZZ00006||^^Test|E||||||||||||||<none>|||||| ||||||||||||||||||||2014-12-18 15:36:46.0

NK1|1|Barton^Julie|Emergency contact|100 Fairway Drive, Suite 130^^VERNON HILLS^Illinois^60061|(131)231-2313|(131)231-2313|||||||||||||||||||

AL1|1||0000000002^Penicillins|S||||

DG1|1||150|Malignant neoplasm of esophagus|2014-12-04 12:52:14.0||||

DG1|2||V17.4|Family history of cardiovascular disease - other|2014-12-04 12:55:11.0||||

IN1|1||ZZZZZ00002|Evergreen|1 Seneca Place^^Greenwich^Connecticut^06830^US|||teste|test e|||||||||||||||||||||||||||123132546|||||

NK1|2|Figueiredo^Raj|Brother|1 Seneca Place^^Greenwich^Connecticut^06830|(324)242-4444|(324)234-8211|||||||||||||||||||

AL1|2||0000000002^Penicillins|O||||

AL1|3||0000000003^Alcohol|O||||

DG1|3||V17.4|Family history of cardiovascular disease - other|2014-12-04 12:55:11.0||||



---------------------------------------------------------

What I want

---------------------------------------------------------

MSH|^~&|ADT4||eHs||201501151703||ADT^A04^ADT_A04|| P|2.8|||

EVN|A04|201501151703|20150115 170341||administrator|

PID|332|ZZZZZ00006|||Lennon^John^Amaro||19600101|M ||White|Buffalo Av^^Buffalo^New York^14222^<none>||(716)123-4455||French|S|||123-13-2546|324223423424||Central American||||||<none>||||||||||||teste@teste||||

PV1|ZZZZZ00006||^^Test|E||||||||||||||<none>|||||| ||||||||||||||||||||2014-12-18 15:36:46.0

NK1|1|Barton^Julie|Emergency contact|100 Fairway Drive, Suite 130^^VERNON HILLS^Illinois^60061|(131)231-2313|(131)231-2313|||||||||||||||||||

NK1|2|Figueiredo^Raj|Brother|1 Seneca Place^^Greenwich^Connecticut^06830|(324)242-4444|(324)234-8211|||||||||||||||||||

AL1|1||0000000002^Penicillins|S||||

AL1|2||0000000002^Penicillins|O||||

AL1|3||0000000003^Alcohol|O||||

DG1|1||150|Malignant neoplasm of esophagus|2014-12-04 12:52:14.0||||

DG1|2||V17.4|Family history of cardiovascular disease - other|2014-12-04 12:55:11.0||||

DG1|3||V17.4|Family history of cardiovascular disease - other|2014-12-04 12:55:11.0||||

IN1|1||ZZZZZ00002|Evergreen|1 Seneca Place^^Greenwich^Connecticut^06830^US|||teste|test e|||||||||||||||||||||||||||123132546|||||



Any idea?





Transformer DataReader (SQL Server) to HL7

0 commentaires:

Enregistrer un commentaire