ED Coder · Apr 7, 2020 go to post

Hi Vic, 

Thank you for reviewing my question. I had to censor everything :) but the adapter status changed as soon as the end point was connected. I thought it was a status that I had to update on the job and that confused me. 

Regards,

Eric

ED Coder · Apr 7, 2020 go to post

Hi Cristiano, 

thank you for getting back to me. You were right, our end point was down, and automatically the adapter was dequeued. As soon the connection was re-established it worked. 

The adapter status confused me, sorry. 

thank you so much. 

Regards,

Eric

ED Coder · Oct 31, 2019 go to post

Hi Craig, thank you so much for replying to my query and also sharing an example for me. The above solution helped me.

Regards,

Eric

ED Coder · Sep 4, 2019 go to post

Thank You Guys, I found the method, and used your advice to getValueat(), this solved my question.

ED Coder · Sep 4, 2019 go to post

Hi, solved this by using the following function:

pRequest.SegCountGet() -> This gave me the number of segments in the HL7 Message, and because I knew that my required value is in the last segment in the 5th field, I could retrive it then using GetValueat()

ED Coder · Aug 30, 2019 go to post

Thank You Marc, I tried that in my function, and its giving me the following error

No such function found

Regards,

Eric

ED Coder · Aug 30, 2019 go to post

Hi Marc, thank you so much. Actually I had to edit my question. My aim is to get the 5th field value from the last OBX segment in my HL7 message. Because I can have varying number of OBX segments but I know that the value I want is in the last OBX segment. 

So I thought if I could get the number of segments in a message, and then index that to get the last segment I could get the value I want.

Is there a better way to do that?

Sorry for the confusion. Appreciate your help

ED Coder · Aug 26, 2019 go to post

Awesome!!! I've always got superb guidance, and direction to all my questions. Thank you guys !!

Nice to put faces to the people :) Great job guys !!

ED Coder · Aug 21, 2019 go to post

This was solved by writing a new function with the PrepareW command. I had the mySQL 8.0 Unicode driver installed. 

I cannot understand why I had to write a new function but it works. Following are the checks to consider (that I made):

1. Check the quotes against the values that you enter

2. Test with PrepareW statements

3. Increase the max_allocated_packet from 4M to 16M [in the more recent versions of mySQL it is default to 512M]

Regards,

Eric

ED Coder · Aug 21, 2019 go to post

Hi Eduard, After using the prepareW statements the select query started working.

I simply deleted the entire function, and re-wrote it again and it now works. Did nothing different, just deleted the function, and copied the code back into the new function.

Cannot understand what the issue was. crazy. but solved now

Eric

ED Coder · Aug 20, 2019 go to post

Hi Julius, updated the statements to include the W variant and still doesnt work for me.

I think it could be something with the statement, because a select statement doesnt give me an error. Can you spot anything in the following error message?

ED Coder · Aug 19, 2019 go to post

Hi Julius, Thank you

Yes, the driver installed is matching the cache architecture and using WINSQL I am able to successfully run the SELECT and INSERT query.

So its something in my code I guess? Will keep trying

Regards,

Eric

ED Coder · Aug 19, 2019 go to post

Thank you Eduard,

Same error running a SELECT statement as well.

Is there anything that you suggest before I consider having to make changes to the conf file?

Regards,

Eric

ED Coder · Aug 19, 2019 go to post

Hi Eduard, thank you. I tried the set param binding as well but it seems that it could be an issue with my Gateway connection.

I tried linking the table and then testing my query and got the following error. The connections are all fine so dont know what is causing this

Any advice or suggestions?

Regards,

Eric

ED Coder · Aug 19, 2019 go to post

Hi Julius, thank you for responding to my query. It seems like it is failing on "EXECUTE". 

The Error is : ERROR #6022: Gateway failed: Execute

Tried the set Param to bind the parameters and getting the same error. Any suggestions what could be causing this? The user has full access to the Database. It is a MYSQL DB, I have had no issues connecting to a SQL DB using the same steps.

ODBC Connection is successful. Driver I am using is MySQL ODBC 8.0 Unicode Driver

Any suggestions or advice on what I could check? I am able to ping the server as well

Regards,

Eric

ED Coder · Aug 16, 2019 go to post

Hi Guillaume, thank you so much for the screenshots and explaining it to me. I was able to establish the connection and no errors when my query runs but the data doesnt get updated in mySQL DB. Can you advice if my insert statement is correct?

set pQuery = "INSERT INTO TABLENAME(column1, column2, column3, column4, column5) "
 set pQuery = pQuery_"VALUES("_value1_","_value2_","_value3_","_value4_","_value5_")"
 set sc=conn.Prepare(hstmt,pQuery)

set sc=conn.Prepare(hstmt,pQuery)
   if $$$ISERR(sc) quit sc
   //Execute statement
   set sc=conn.Execute(hstmt)
   if $$$ISERR(sc) quit sc

ED Coder · Aug 16, 2019 go to post

Thank You Julius, I was able to connect to the mySQL DB using the SQL gateway Connection Class. I assumed that there would be a different class to connect.

ED Coder · Aug 14, 2019 go to post

You are spot on Jeff. Yes, I was thinking if I should update the schema.. but didnt do it. The message we are getting is an ORU_01 but has the EVN segment.  Thank You, now I know what caused my issue too.

ED Coder · Aug 9, 2019 go to post

Yes Jeff, I was looking at the cloned message that was sent across. I removed by index now, and it works. so looking good. Thank you so much for guiding me on this

ED Coder · Aug 8, 2019 go to post

Was able to solve this by the following code.

//create a copy of the request
s newREQ = request.%ConstructClone()
ind = ""
EVNSeg = newREQ.FindSegment("EVN",.ind)
if EVNSeg '= ""
{
res = newREQ.RemoveSegmentAt(ind)
}
request = newREQ
Quit request

ED Coder · Aug 8, 2019 go to post

Hi Jeff, I tried that, but I am losing the rest of my message. I must be doing something wrong. Can you advice? Following is the error I am getting  once I remove segment and pass the messsage

ED Coder · Aug 2, 2019 go to post

the message coming in is an ORU_R01 message, and contains an EVN segment, however in the schema 2.4 there is no EVN segment in the ORU message structure. so how can I remove the segment, is there a way to do that? Sorry for the hassle.  

I want to pass this message to the third party system having the EVN segment removed. Will keep trying but if you have any ideas would apprecaite.

Thank you

ED Coder · Aug 1, 2019 go to post

Hi Julian, thank you for pointing that out to me. Can you advice how I can remove that segment?

ED Coder · Jul 16, 2019 go to post

Thank You so much Jeff.. This has been so helpful. I appreciate your help in guiding me on this.

ED Coder · Jul 16, 2019 go to post

Hi Jeff, thank you so much for guiding me on this. I tried to do it the DTL way, but getting an error. Can you advice what I am missing? Tried adding the segments but still getting the same error.

Unfortunately, the vendors want it that way that the notes are in separate OBX segments. they are charging us a bomb if they need to make changes so trying to modify it

Below is the error I am getting:

ED Coder · Jul 16, 2019 go to post

I did the following so far:

1. Split the OBX: 5 into a list of values

I want to now insert each of them into new OBX segments: Highlighted where I have an issue.

ED Coder · Jul 16, 2019 go to post

Hi Jeff, thank you for responding to my query. Yes, I found that when I output to string the '.' doesnt appear. so am trying to do it in a different way. Do you by any chance have a sample code to build new message segments?

I was able to split the messages, but now trying to find out how to create additional OBX segments.  I tried InsertSegmentAt, NewSegment, but all of them are giving me errors.

Thank you once again

ED Coder · Jan 31, 2019 go to post

sorry everyone, I was able to fix the issue. it was an issue with the password to the database. So sorry. 

thank you for the input. Would have been nice to have a clearer error message though... didnt show me anything. to indicate that the connection was an issue

ED Coder · Jan 31, 2019 go to post

The above error is what I get from the prepare statement. It works perfect in our test environment but on deploying to the LIVE server it gives this error. It is the same code copied over. Baffles me.

ED Coder · Jan 30, 2019 go to post

Hi John, thank you for responding to my query. I have added a brief structure of my code in the question now. Would appreciate some help on this