Jump to content
Macro Express Forums

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).

Link to comment
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. 

Link to comment
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.

 

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

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. 

Link to comment
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??

Link to comment
Share on other sites

  • 3 months later...

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...
×
×
  • Create New...