All I need to do is create a new stream and write the contents of pInput stream with $Char(13) removed and then pass the new stream to the superclass:

Class Utility.RecordMap.Service.ComplexBatchFileService Extends EnsLib.RecordMap.Service.ComplexBatchFileService
{ /// Parse the incoming file and send the resulting ComplexBatch to the targets in TargetConfigNames.
/// *** In Windows strip out any Char(13) *** Oliver T Wilms *** 2/11/2020
Method OnProcessInput(
pInput As %Stream.Object,
Output pOutput As %RegisteredObject,
ByRef pHint As %String) As %Status
{

Set tStatus = $$$OK
Try {
Set tLookAhead = ""
Set tmpStream = ##class(%Stream.GlobalCharacter).%New()
While 'pInput.AtEnd {
Set = pInput.Read(.len,.tStatus)
If ([ $Char(13)) {
Set = $Translate(x,$Char(13))
}
Do tmpStream.Write(x)
}
Set tStatus = ##super(tmpStream,.pOutput,.pHint)
}
Catch ex {
Set tStatus = $$$EnsSystemError
}
Quit tStatus
} }
 

Hello,

I am trying Zen Report and Zen Page. I have Zen Page that displays a calendar to choose Date. I can display Zen Report inside iFrame when User clicks a button. It looks good EXCEPT my line graph shows no data values. I copy my Report class below. I hope someone will tell me what I am missing or what is wrong. This is my first Zen Report. Thanks

/// AETMON.Report
Class AETMON.Report Extends %ZEN.Report.reportPage
{

/// Class name of application this report belongs to.
Parameter APPLICATION;

/// Specifies the default display mode used for this report if
/// the URL parameter, <var>$MODE</var>, is not present.
Parameter DEFAULTMODE As STRING [ Constraint = ",html,tohtml,toxslfo,pdf,xml,xslfo,excel,toexcel,ps,pdfprint,xlsx,tiff,displayxlsx,fo2pdf,foandpdf", Flags = ENUM ] = "html";

/// This is the optional XML namespace used for the report.
Parameter REPORTXMLNAMESPACE;

Property Availability As %ZEN.Datatype.list(DELIMITER = ",");

Property AvaiDateTime As %ZEN.Datatype.list(DELIMITER = ",");

Property CreatedDate As %ZEN.Datatype.string(ZENURL = "CreatedDate");

/// This XML defines the logical contents of this report.
XData ReportDefinition [ XMLNamespace = "http://www.intersystems.com/zen/report/definition]
{
<report xmlns="http://www.intersystems.com/zen/report/definition"
 name="Report" 
 sql="SELECT ID, CreatedDate, CreatedTime, availabilityStatus FROM AETMON.AvailabilityLog WHERE CREATEDDATE=ORDER BY CreatedDate, CreatedTime">
<parameter expression='..CreatedDate'/>
<group name="CreatedDate" breakOnField="CreatedDate">
<attribute name="Date" field="CreatedDate" />
<group name="record">
<attribute name="id" field="ID" />
<attribute name="Time" field="CreatedTime" />
<attribute name="Status" field="availabilityStatus" />
</group>
<aggregate name="Count" type="SUM" field="availabilityStatus" />
</group>
</report>
}

/// This XML defines the display for this report.
/// This is used to generate the XSLT stylesheets for both HTML and XSL-FO.
XData ReportDisplay [ XMLNamespace = "http://www.intersystems.com/zen/report/display]
{
<report xmlns="http://www.intersystems.com/zen/report/display"
 name="Report" title="AET Availability Report">
<!-- Optional Init element inserts custom XSLT instructions at the top level of the generated XSLT stylesheet. -->
<init ></init>
<!-- Optional Document element specifies page layout and style characteristics. -->
<document width="8.5in" height="11in" marginLeft="1.25in" marginRight="1.25in" marginTop="1.0in" marginBottom="1.0in" ></document>
<!-- Optional Pageheader element. -->
<pageheader ></pageheader>
<!-- Optional Pagefooter element. Does not apply in HTML output. -->
<pagefooter ></pagefooter>
<!-- Required Body element. -->
<body>
<class="banner1">AET Availability Report</p>
<clineChart
ongetData="getchartdata"
title="Availability"
height="400px" width="400px"
markersVisible="true"
plotStyle="stroke-width: 1px;"
seriesYAxes="0"
ongetLabelX="getAxisTime"
>
<yAxis minValue="0" maxValue="1" />
</clineChart>
<group name="CreatedDate" line="1px">
<table orient="row" width="6in">
<item field="@Date" width="2in">
<caption value="Date:" width="2in"/>
</item>
<group name="record" line="1px">
<table orient="row" width="6in">
<item field="@Time" width="2in">
<caption value="Time:" width="2in"/>
</item>
<item field="@Status" >
<caption value="Status:"/>
</item>
</table>
</group>
</table>
</group>
</body>
</report>
}

Method getAxisTime(
val,
yseries)
{
Set tTime = $Piece(..AvaiDateTime,",",(val+1))
Quit $ZTime(tTime)
}

Method getchartdata(
ByRef var,
chart)
{
Do ##class(AETMON.Utility).DebugAETMON("AETMON.Report getchartdata")
Try {
Set sc = $System.Status.OK()
Set tTestDate = "08/06/2019"
Set pFrom = $ZDateH(tTestDate)
Set pTo = $ZDateH(tTestDate)
// Get a resultset containing Availability data
Set sc = ##class(AETMON.AvailabilityLog).GetAvailability(pFrom,pTo,.rs)
Quit:$System.Status.IsError(sc)
Set tCount = 0
While (rs.%Next()) {
Set var(tCount,0) = rs.%Get("availabilityStatus")
Set var(tCount,1) = rs.%Get("CreatedTime")
If $Increment(tCount)
}
}
Catch(ex) {
Set sc = ex.AsStatus()
}
Set tCreatedTimes = var(0,1) _ "," _ var(1,1)
Do ##class(AETMON.Utility).DebugAETMON("AETMON.Report getchartdata ..AvaiDateTime = "_tCreatedTimes)
Set ..AvaiDateTime = tCreatedTimes
Quit sc
}

}
 

I am working on DTL to transform X12 HIPAA_5010:278Review into HIPAA_5010:278Response.

My challenges are I do not know an elegant way to create multiple 2000E loops in the target. The source can have only one loop 2000E, I need to create as many 2000E loops as I find authorizations.

On top of that, I may need to create possibly hundreds of 2000F loops under one or more 2000E loops. The source may have zero or many 2000F loops.

The scenario I have been working on has zero 2000F loops and I need to create about 600 2000F loops in the target. Any guidance will be appreciated. I am not sure if subtransform will work because I can only create a Document or a Segment, not a Loop in a transformation.