Question
· Apr 22, 2016

Transformations

Hi this is my first post, so a little about my background. I've been programming in PHP/JavaScript for about 10 years.  
I've got quite a bit of knowledge surrounding object orientated programming and know the basics.

Last year I looked into the Mirth integration engine and did some work around that.

I've now moved jobs and I'm doing some work (surprise, surprise) with Ensemble.

I've done the tutorial and understand the basics of the web 'frontend' and what an integration engine can do. I'm now being asked to write a transformation to take a hl7 message and create a html one which is then base64'ed and outputted to a file.

So at present I've created my service, processor and  output.

Service is very simple Inbound file adapter,  processor that can accept that.

and finally a operation that has a class name of

EnsLib.File.PassthroughOperation

and a adapter of 

EnsLib.File.OutboundAdapter

I think those are correct but if not someone tell me what I'm meant to use!

So now I need to create a transformation that can process the hl7 message, take the relevant bits and create the html message.

It seems (again point me in the right direction if I'm wrong) that I have to create a transformation class.

and this is my start

/// Convert a hl7 message to html base 64
Class Tutorial.TransformToHTMLBase64 Extends Ens.DataTransform
{

ClassMethod Transform(source As EnsLib.HL7.Service.FileService, target As EnsLib.File.PassthroughOperation) As %Status
{

 Set $ZT="Trap",tSC=$$$OK

 set target = "test"
 
 Exit
  Quit tsc
}

}

It doesn't want to compile, probably because the target is wrong?

But now I'm stuck. 
I guess there are some video tutorials on this site but at present my trust has blocked them. I'm reading the generic docs which show how to get started in this language, but it's slow going.

Any help would be appreciated.

Thanks

Richard

Discussion (1)0
Log in or sign up to continue

Richard

welcome to the community. I think you are misunderstanding a few things and making life hard for yourself. If you are just processing HL7 messages you probably don't need to do any coding until you get to more advanced topics. The graphical editors will do nearly everything you need.

I suggest you watch the  getting started videos at

http://video.intersystems.com/video/Video.Pages.VideoLibrary.cls?video=1...

below the first video there is a playlist of  topics including one on transformations. Notice that there is an odd shaped arrow to the right of the three playlist items visible on the screen so you can scroll across and see the others,

You can probably watch all seven videos in about an hour and you will be ready to start.

Enjoy

dave