Good morning! I’ve been asked to take a flat-file with demographic and report information and turn each line into an ORU to send to a downstream system.
I was able to achieve this with a tcl script but I’m looking to see if it can be done via xlate instead using VRL.
The format of the file is varying data fields delineated by pipes | except for the report text itself where each new text line is delineated by a tilde ~ in the last data field. Each line on the flat file is on ORU report. I don’t have much control over the format of the flat file.
I’ve looked at other responses on the forums and I’ve seen solutions where I would create an HRL then two VRLs (one for all segments up to the OBXs, and one for the OBXs) but since the flat file is one line per report, I’m not sure if the HRL setup above would work.
Any help would be appreciated. I’d rather do this via xlate if I can but if not, I can fall back on the tcl.
Sample flat file format (this is just one line, each file could have thousands):
M00000|Test|Male|A|19610720|M|V000000|DIS IN|CARDIAC|LOCATION|10000000IMG|TESTMD|CT|CHWO|CT Chest W/O Contrast||20200629095800|Test|Doctor|0500-00000|Signed|TESTRAD|Test|Radiologist|MD|Reason for Procedure: chest pain ~ ~Admitting Diagnosis: “Chest pain” ~…………………………………………….. ~ ~CT CHEST WITHOUT CONTRAST ~ ~A CT acquisition was performed from the thoracic inlet through the diaphragms. Intravenous contrast w~as not administered. Thin section high-resolution images of the pulmonary parenchyma were reconstruct~ed from the original CT data set. Dose reduction techniques were utilized (automated exposure control~, mA/kV adjustment for patient size, iterative reconstruction). ~ ~ ~ FINDINGS: Normal chest xray
-Timothy