Announcement

Collapse
No announcement yet.

PLZ give a solution urgently------

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PLZ give a solution urgently------

    sir,
    I installed Mirth 1.6,the database using is MySql(using SQLyog tool).The problem i am facing is that: I can't retrieve the 'from_date' field from the database to Mirth using the 'select Query'.

    so plz give a solution as soon as possible for the above problem.

    Post edited by: salini.a, at: 02/07/2008 07:38

  • #2
    Re:PLZ give a solution urgently------

    Post your channel.

    Do you have a syntax error in your query?
    Reid Hospital and Healthcare

    Comment


    • #3
      Re:PLZ give a solution urgently------

      I am attaching here my chnnel and the printscreen. msgA01.xml (11698 bytes)

      Comment


      • #4
        Re:PLZ give a solution urgently------

        There is no syntax error in the query.I think there is a mystification with the 'from_date' and the keyword 'from' in the 'select * from' query.I have no permission to edit the database field name.
        I am here attaching the print screen of the edit channel.Plz verify that and give an apt solution for that. newmirth-57d6a74f2997a5e6a2a5589d247881b6.doc (95744 bytes)

        Comment


        • #5
          Re:PLZ give a solution urgently------

          Try using column alias for the from_date field, like,

          SELECT patient_id, visit_id, to_date,
          from_date AS TestDateField,
          admission_type, expected_discharge_date, ....

          NOTE: Your select statement in the screenshot looks okay. The above suggestion is only to troubleshoot the problem.

          Hope this helps!

          Comment


          • #6
            Re:PLZ give a solution urgently------

            I think in SQL Server you can put brackets around the column name if that column name is a keyword in SQL Server (i.e. [from_date]), but I don't think that is your problem.

            I was looking at your query and your transformer. With the Limit 10, I believe you are returning 10 records from your query, correct? I think I would try returning 1 record from your query and see if that will solve your problem. I doubt that Mirth will automatically loop through each of the 10 results to produce 10 different files. I think you need to write some javascript to account for that.

            Are you getting any file01.txt that you are trying to create?
            Reid Hospital and Healthcare

            Comment


            • #7
              Re:PLZ give a solution urgently------

              Thanks for ur immediate responds.
              I tried as you mentioned in the reply mails.But unfortunately I couldn't solve the problem.can u give another proper solution?

              Comment


              • #8
                Re:PLZ give a solution urgently------

                I tried to put bracket before and after the 'from_date' in the query that has written in the sql window of the mirth.But again I can't retrieve the same field.Plz verify the attached file. newmirth-22e4c616a7a0402cfcd50aa1fc50d358.doc (100352 bytes)

                Comment


                • #9
                  Re:PLZ give a solution urgently------

                  Looks like this is an issue:
                  http://www.mirthproject.org/index.ph...d=5062&catid=5

                  Try creating a database VIEW and modifiy your select statement to use the view instead of the base table.

                  Sample pseudo-code:
                  CREATE VIEW vwPatientData
                  SELECT patient_id, visit_id, to_date,
                  from_date AS FrDt,
                  admission_type, expected_discharge_date, ....

                  SELECT statment in your channel would be something like:

                  SELECT patient_id, visit_id, to_date,
                  FrDt,
                  admission_type, expected_discharge_date, ....
                  FROM vwPatientData
                  This workaround assumes you have permission to create views.

                  Hope this helps!

                  Post edited by: nshaik, at: 02/08/2008 09:00

                  Comment

                  Working...
                  X