I hope someone can help, because I am banging my head with this. I have looked into $ZF, LineTerminatorSet, and more, and I am thinking there must be some Cache Property or Method that I could call to do what I am trying to do.
The problem is I have to develop HL7 reports that require either carriage return or carriage return and line. It varies depending on which client it is. We decided we would make a global which is site specific and provides us flexibility. If the global isn't defined, we default to $c(13).
This is the global is set to
$g(^MEL("HEDIS",SITEID,"Out","Info","EOL"))="$c(13,10)"
This is the code.
i $E(TBLTYP)="E" {
s eol=""
s eol=$g(^MEL("HEDIS",SITEID,"Out","Info","EOL"))
if eol="" { s eol=$c(13) }
s SEGMENT=SEGMENT_eol
}
Well what is happening is as follows:
|ORU^R01|20160225163327|P|2.3$c(13,10)
As you can see it didn't insert the CR/LF. It actually displayed $c(13,10). I am using Notepad ++ to open the file, and have it set to see all characters.
Went back to the drawing board and did this:
i $E(TBLTYP)="E" {
set eol=$c(13)
set override=$g(^MEL("HEDIS",SITEID,"Out","Info","EOL"))
if override'="" { xecute "set eol="_override }
set SEGMENT=SEGMENT_eol
}
I really don't think this is the best way of doing this Is there some Cache Function/Utility that can do this?
Thanks
Melissa