flat file to ORU

Homepage Clovertech Forums Cloverleaf flat file to ORU

  • Creator
    Topic
  • #117253
    Timothy O’Donnell
    Participant

    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

Viewing 2 reply threads
  • Author
    Replies
    • #117254
      Jim Kosloskey
      Participant

      What release of Cloverleaf?

      One challenge is how to specify the repetition characteristics of the second VRL in the HRL definition.

      How is each record (the fixed and variable portion combined) termination specified in the file?

      If you would like I can work with you on this – email me to set up time, etc.

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

    • #117319
      Timothy O’Donnell
      Participant

      Jim,

      Release is 6.1.4

      I don’t have any control really over how the file is formatted but each of the fields, except the last, is a single, non-repeating field. The last field will have a variable amount of subfields, all delineated by a tilde. I’ve tried the HRL configuration but I don’t have a good way to keep looping through that last field and its subfield because essentially I’d want to keep doing that for as long as the subfield has values.

      I think I need v.6.2 or higher to iterate from a list variable, and then I could use that function to easily resolve my problem.

      -Timothy

    • #117321
      Jim Kosloskey
      Participant

      How is the record terminated?

      I can work with you on this if you like – email ma.

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

Viewing 2 reply threads
  • You must be logged in to reply to this topic.

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,292
Replies
34,435
Topic Tags
286
Empty Topic Tags
10