Jump to content
Macro Express Forums
Sign in to follow this  
AnalystRN

Meditech and .CSV

Recommended Posts

From an excel .csv how can you send a variable, %T[3]%, which includes multiple rows under it.  So:

 

A

AA

AAA

AAAA

AAAAA

 

I want to send all of them in the example above.  But i seem to only be sending "A".  How can i accomplish that?  I am sending this variable into Meditech (Healthcare EHR program).

Share this post


Link to post
Share on other sites

Not sure I understand the issue, but the solution may be to output the first value, navigate to the next cell using this:

 

Text Type (Simulate Keystrokes): <ARROW DOWN>

 

... and then output the next value.

Share this post


Link to post
Share on other sites

Hopefully I can describe this better.  So if i send the %T[3]% it would send the "A" from my .csv in the example above.  How would I program the script to go down the list and send AA then AAA, etc from that .csv.

 

The script pulls from the .csv file and inputs the data in the Meditech program.  Currently the only way I have found to do it is to put the data directly into Macro Express. 

Share this post


Link to post
Share on other sites
Text File Begin Process: C:\Users\Me\Documents\tmp.csv
  Text Type (Simulate Keystrokes): %Value%<ENTER>
Text File End Process
<TEXT FILE BEGIN PROCESS Filename="C:\\Users\\Me\\Documents\\tmp.csv" Start_Record="1" Process_All="TRUE" Records="1" Variable="%Value%"/>
<TEXT TYPE Action="0" Text="%Value%<ENTER>"/>
<TEXT FILE END PROCESS/>

I have the values stored in a column in the file tmp.csv:

 

A

AA

AAA

etc.

 

The macro outputs each value followed by a new line.

 

Share this post


Link to post
Share on other sites

If it's only one column, then text is good. Use Text File Process. But nothing wrong with using CSV also. 

I would create an integer variable %Pointer% before the loop and each time it loops, increment it one. I despise the use of the stock variables as they were meant to make transition easier form ME3. Instead create an string array variable %Values%. each line that is read in, you send it to %values[%pointer%]%. IN this example yo would have 5 elements in the array numbered 1 to 5. 

Share this post


Link to post
Share on other sites

I'm almost there!  Here is what I have so far:

 

image.png.40d0d1a1ea85ae0f24f2124bdb864e0c.png

image.png.a45dcbefa2de5715f14ece71ee41c474.png

 

What this script is supposed to do is put data into the EHR from a .CSV file with about 5 column and 400+rows.  If the entry exists it should hit ESC then ENTER and move on to the next, if it does not exist it would build the entry.  It works for the most part but if an entry exists after Line 11 it skips down to Line 33 in the scripts and starts entering wrong data in wrong area.  Any ideas on what I've messed up??

Share this post


Link to post
Share on other sites

Are you still working on this?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...