command line

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf command line

  • Creator
    Topic
  • #52229
    Earl Coppedge Jr
    Participant

      We are about to make a change to a variant that lots of our xlt translation programs use.  Is there a way to reconfigure batches of the translations via a command line or script?

      We are running cloverleaf 5.7 on a linux box.

    Viewing 7 reply threads
    • Author
      Replies
      • #73503
        Jim Kosloskey
        Participant

          Earl,

          I am not aware of such a command (up to Cloverleaf 5.6 that is).

          Don’t forget you also will need to either purge caches or stop/start the processes to pick up the new variant structure in the engine itself.

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

        • #73504
          Rob Lindsey
          Participant

            I am not aware of any command line utility that is shipped with CL.

            You could write something in PERL, TCL, or any other language that you have access to to make the changes to the “flat” files.  Just a word of warning here… always, always make a backup before you make any changes via another method.

          • #73505
            Jim Kosloskey
            Participant

              And realize there will be no revision files created for any tracking or backup.

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

            • #73506
              Keith Oulson
              Participant

                I’d be very interested in the results of this project – if you have a moment.

              • #73507

                In the past I have used both perl and vim to make bulk changes to xlates using regular expressions.

                -- Max Drown (Infor)

              • #73508
                Scott Folley
                Participant

                  Reconfiguring the translates is fairly simple because it is just a matter of modifying the xlt_infile or xlt_outfile in the header.  You could likely (assuming you are on a unix platform) use a sed command to do this part.  That comes with the usual caveats that the rest of the folks have already addressed.

                  The real problem will be if the HL7 paths change due to the difference in the variant and that is VERY LIKELY.  In those cases writing a script that would accomplish this automatically would be very challenging (not impossible I suppose but extremely intensive).  First you would have to keep a copy of both of the variants, find the instances where they are different, and then replace the paths that differ with the path in the new variant.  Even this sounds great in theory but then you have to consider the iterates and automagically modifying the iterate variables…etc, etc….

                • #73509

                  It’s not that challenging at all actually. Be glad to help if needed.

                  -- Max Drown (Infor)

                • #73510
                  Scott Folley
                  Participant

                    Excellent, I would like to see that as well…

                Viewing 7 reply threads
                • The forum ‘Cloverleaf’ is closed to new topics and replies.