In Service class(by using record map as input) i am converting pdf to base 64 using below code  and the same source.encodedpdf is getting converted to HL7 in data transformation

Set pInput.LineTerminator $C(10)
Set tMax=$$$MaxLocalLength*.5\1
Set tMax=tMax-(tMax#57)
If $IsObject(pInput{
$$$TRACE("pInput = object")
Set tCurrLineLen = 0
Set tStream ##class(%Stream.FileBinary).%New()
While 'pInput.AtEnd 
$$$TRACE("Reading filestream")
Set tData pInput.Read(tMax)
Set tValue $SYSTEM.Encryption.Base64Encode(tData)
Set tSC tStream.Write(tValue)
If 'pInput.AtEnd {
Set tSC tStream.Write($C(10))
$$$TRACE("Adding terminator.")
}

My transformation is pretty much simple  actually 

<assign value='"Procedure notes"' property='target.{OBXgrp(1).OBX:5.2}' action='set' />
<assign value='"PDF"' property='target.{OBXgrp(1).OBX:5.3}' action='set' />
<assign value='"base64"' property='target.{OBXgrp(1).OBX:5.4}' action='set' />
<assign value='source.EncodedPdf.Read(9999999999)' property='target.{OBXgrp(1).OBX:5.5}' action='set' />
 

how do i avoid line breaks 

hi ,

this is how i am converting pdf to base 64

Set pInput.LineTerminator = $C(10)
Set tMax=$$$MaxLocalLength*.5\1
Set tMax=tMax-(tMax#57)
If $IsObject(pInput) {
$$$TRACE("pInput = object")
Set tCurrLineLen = 0
Set tStream = ##class(%Stream.FileBinary).%New()
While 'pInput.AtEnd 
$$$TRACE("Reading filestream")
Set tData = pInput.Read(tMax)
Set tValue = $SYSTEM.Encryption.Base64Encode(tData)
Set tSC = tStream.Write(tValue)
If 'pInput.AtEnd {
Set tSC = tStream.Write($C(10))
$$$TRACE("Adding terminator.")
}
 

Hi ,

I am able to execute the above date conversion in Ensemble data transformation 

when i am trying to do the same in IRIS i am only getting output upto 1974-11-01T00:00:00

Please refer to the below code i am using

<assign value='$translate($ZDT($ZDTH(source.MemberDOB),3)," ","T")_"Z"' property='target.Patient.BirthTime' action='set' />

Is there any difference i need to know in IRIS date and time conversions?

Hi ,

I am able to execute this code in terminal but not able use the same conversion in Data transformation still for me it is throwing Datatype validation error 

The reason why cannot change property of DOB to %String the many classes are dependent on the Source message class

Is there any other way  i can convert DOB form MM/DD/YYYY to YYYY-MM-DDT00:00:00Z ?