Ok, quick and dirty, try this

stream.Filename filename
propertyPath "PIDgrpgrp(1).ORCgrp(1).OBXgrp(1).OBX:5(1)"
tSC seg.StoreFieldStreamBase64(.stream,$P(propertyPath,":",2),,0)

set tSegString=""
    set tSegStringCleared="" 
    set tSegString = target.GetValueAt("
    set tSegStringCleared = $translate(tSegString,$c(13,10))
    set tSC = target.SetValueAt(tSegStringCleared,"target.{

I'll ask again so I understand you correctly. 

You want to have another OBX segment with each CRLF or another OBX:5(*) field?
More segments would create too much overhead. 
I think the IHE Radiology Profile recommends a new segment every 62k bit.

With repeated fields in OBX:5 it's not HL7 standard conform.

Or would you like an OBX:5 field with the value ABCDEFGHIJKL...

Hi, this is my method to remove the crlf. 
I check every stream and remove it. 

You could also change the operation, but the problem remains if you exchange data with other systems.

ClassMethod PDFfromBase64Stream(pFilename As %String, Base64Stream As %Stream.GlobalCharacter) As %Status
 set SGB1=##class(%Stream.GlobalBinary).%New()
 set SGB2=##class(%Stream.GlobalBinary).%New()
 set FBS = ##class(%Stream.FileBinary).%New()
 set sc = FBS.FilenameSet(pFilename)
 Do FBS.Rewind()
 Do Base64Stream.Rewind()    
    while 'Base64Stream.AtEnd{
        set temp=Base64Stream.Read()
        set temp=$translate(temp, $c(13,10))
        set temp=$REPLACE(temp, "\r\n","")
        do SGB1.Write(temp)}
do SGB1.Rewind()
    while 'SGB1.AtEnd{
        set temp=SGB1.Read(5700)
        set temp=$system.Encryption.Base64Decode(temp)
        do SGB2.Write(temp)}
do FBS.CopyFrom(SGB2)
set sc = FBS.%Save()
quit sc

Hi, excuse the late reply.

the problem was an error in Ensemble 2016.1 version regarding the resource query in the Ens.DeepSee.ActivityVolumeAndDurationKPI  

// Parameter RESOURCE = "%Ens_Dashboard:USE";

Parameter RESOURCE = "%Ens_Dashboard";

After adding the permissions it worked so far, but I had to add the deep sea resource to the user.

DB_activity rw
%DeepSee_Portal u   
%Ens_Dashboard u


Kind regards


Hi, thank you so much, yes, it works the way you described it. 
I have extended the call with a username/password. This also works as long as I assign %ALL permissions to this user. 
Unfortunately, it does not work with any other role.  

The %Ens_Dashboard: Use is assigned to the user, also the RW authorization for the db's.
I'm sure it's a little something.... 


Not connected with datasource


Kind regards