Question
Warren Baldock · Mar 14

Conversion of .rtf documents to HL7 (Not embed)

Hi everyone,

Does anyone have any experience / examples of converting an .rtf file into an HL7 message (ORU^R01). My example is a histology report which is placed on a server to pick up and then convert if possible for downstream systems who receive HL7.

Struggling to find any sort of examples or even whether its feasible at this stage - there are certainly better knowledged people on here than me so thought id ask.

With thanks

Warren

Product version: HealthShare 2017.2
$ZV: 2017.2.2HS.9688.0
0
0 144
Discussion (3)1
Log in or sign up to continue

You may try an external RTF parser to run your conversion  using CPIPE or $ZF(-100-)
and then consume the result. 
1 Example of many others in Google:  striprtf (py) 
Once you move to a version supporting Embedded Python you can run it even internal
 

Thanks for your replies Robert and Eduard.

I have walked through the LibreOffice Method that you have written Eduard and im getting an error message as follows in terminal - any ideas what i need to look at?

set sc = ##class(Converter.LibreOffice).convert("C:\Temp\HN.rtf","C:\Temp\HN.txt","txt") write sc

0 @Š>zrunCommandViaZFInternal+11^Converter.LibreOffice.1ö DEPLOR524è8^zrunCommandViaZFInternal+11^Converter.LibreOffice.1^1+e^zrunCommandViaZF+1^Converter.Common.1^1#e^zexecute+5^Converter.Common.1^10e^zexecuteConverCommand: soffice --headless --writer --convert-to txt --outdir C:\InterSystems\TEST\mgr\Temp\473785 C:\Temp\HN.rtf Error code: Output: ” DEPLOR524†$e^zexecute+16^Converter.Common.1^10e^zexecuteConvert+21^Converter.LibreOffice.1^1)e^zconvert+11^Converter.LibreOffice.1^1e^^^0

I can see each time that a new folder is created within C:\InterSystems\TEST\mgr\Temp\ - in the example above its 473785 so Im thinking its not a permissions issue?

Thanks for your help