I have been using the following settings in the device and terminal types. I have printed to multiple printers and sent multiple labels/prescriptions to an single printer over a very short period of time. It has not failed me yet, Kevin is correct the key is in the PRE-OPEN EXECUTE, I just set IO equal to $I with a piece in the middle consisting of $J(job) and the second peice of $H(time) this give the TEMP file its own unique name.

You do not have th have the printer name in the temporary file just SOMETHING.TMP, you need the format SOMETHING.TMP because the PRE-OPEN EXECUTE in the DEVICE does a $P looking for a ".". You also need to have the DEVICE Name equal to the Linux name for the printer, this is the ION variable so "lpr" know what printer to use. I do suggest leaving the TEMP file name the same as the device name so if you have a failure you at least know the device name that failed. It is the CLOSE EXECUTE in the TERMINAL TYPE that triggers the "lpr" to print.

Let me know if this works.

Mark


Select TERMINAL TYPE NAME: P-HPMES
ANOTHER ONE:
STANDARD CAPTIONED OUTPUT? Yes//   (Yes)
Include COMPUTED fields: (N/Y/R/B): NO// BOTH Computed Fields and Record Number
(IEN)

NUMBER: 198                             NAME: P-HPMES
RIGHT MARGIN: 80                      FORM FEED: #
PAGE LENGTH: 64                       BACK SPACE: $C(8)
OPEN EXECUTE: W *27,"E",*27,"&k2G"
CLOSE EXECUTE: W *27,"E" U IO K IO(1,IO) C IO ZSYSTEM "lpr -r -l -P "_ION_" "_IO



Attached below are the DEVICE's for reference.

OUTPUT FROM WHAT FILE: TERMINAL TYPE// DEVICE
Select DEVICE NAME: HP2200      BASEMENT     /home/pharmacy/t/HP2200.TMP
ANOTHER ONE: HP4050      OFFICE     /home/pharmacy/t/HP4050.TMP
ANOTHER ONE:
STANDARD CAPTIONED OUTPUT? Yes//   (Yes)
Include COMPUTED fields: (N/Y/R/B): NO// BOTH Computed Fields and Record Number
(IEN)

NUMBER: 42                              NAME: HP2200
$I: /home/epharmacy/t/HP2200.TMP      ASK DEVICE: NO
ASK PARAMETERS: NO                    QUEUING: ALLOWED
LOCATION OF TERMINAL: BASEMENT        ASK HOST FILE: NO
PRE-OPEN EXECUTE: S IO=$P(IO,".")_"."_$J_$P($H,",",2)_"."_$P(IO,".",2)
SUBTYPE: P-HPMES                      TYPE: HOST FILE SERVER


NUMBER: 40                              NAME: HP4050
$I: /home/pharmacy/t/HP4050.TMP      ASK DEVICE: NO
ASK PARAMETERS: NO                    LOCATION OF TERMINAL: OFFICE
ASK HOST FILE: NO
PRE-OPEN EXECUTE: S IO=$P(IO,".")_"."_$J_$P($H,",",2)_"."_$P(IO,".",2)
SUBTYPE: P-HPMES                      TYPE: HOST FILE SERVER

Ruben Safir wrote:

On Fri, 2005-06-10 at 14:58, Ismet Kursunoglu, MD wrote:
Thanks, I can now continue to work on this - lots of power under the hood with endless possibilities with the CUPS server now accepting the print jobs.

I am really also very impressed with Samba 3.0x and their Cups integration. Amazing work.


Maybe, but I can't tell you how bad SAMBA is as a protocol.  All the
SMB/CIF networking is a disaster.  It floods your network, and is slow.

Ruben

Kevin Toppenberg wrote:
Ismet, as I look more closely at what you have, I see
that you are already fairly close to what I have done.

The differences that I see are that you have:
PRINT SERVER NAME OR ADDRESS: 192.168.0.105

REMOTE PRINTER NAME: HL1240
In my system, I don't use this.  Instead, the printer
output should be written to the file specified in IO
(which is set in the PRE-OPEN EXECUTE code), and then
the function in POST-CLOSE EXECUTE (DO
FINISH^ZZZPRNTR("HL1240") ) should pass a signal to
the linux lpr command to print the file.

So VistA doesn't need to know the ip address of the
printer.  It is shielded from all that.  That is
defined at the Linux OS level.

Kevin


--- Kevin Toppenberg <[EMAIL PROTECTED]> wrote:


I have written my process to a web page on the
wikki. Here is the link. See if that gets you going.


http://openforum.worldvista.org/~forum/index.php?title=Setting_up_a_Linux_Printer

Kevin

--- "Ismet Kursunoglu, MD" <[EMAIL PROTECTED]>
wrote:


Kevin mentioned in one of his very helpful notes
to

this list,

"Printing success & description of method"
Kevin Toppenberg Mon, 10 Jan 2005 17:57:07 -0800]

the entries for the device file including the
following:

PRE-OPEN EXECUTE: DO SETJOB^ZZZPRNTR(.IO) ;Note:
Change IO (output file)

What should the output file be? Is that the spool
directory for the client, the URI of the printer or the type of file
i.e. PDF/PS

I have setup CUPS on one of the LAN servers here
(in

this case running under FreeBSD 4.8) and can print from all the
Linux

workstations as well as from a Windows 2000 Pro box. I think I am
almost

there in printing
from within VistA/GT.M/Debian.  This is what I

have

so far: (the printer is a Brother 1240 laser)

OUTPUT FROM WHAT FILE: DEVICE//
Select DEVICE NAME: test-LINUX-PRINTER      HOME
LAN

  $I:
ANOTHER ONE:
STANDARD CAPTIONED OUTPUT? Yes//   (Yes)
Include COMPUTED fields:  (N/Y/R/B): NO//  - No
record number (IEN), no Computed
Fields

NAME: TEST-LINUX-PRINTER                $I: $I:
 ASK DEVICE: NO                        ASK
PARAMETERS: NO
 SIGN-ON/SYSTEM DEVICE: YES            QUEUING:
ALLOWED
 LOCATION OF TERMINAL: HOME LAN        LOCAL
SYNONYM: HL1240
 ASK HOST FILE: NO                     ASK HFS
I/O

OPERATION: NO
MNEMONIC: HL1240
 POST-CLOSE EXECUTE: DO
FINISH^ZZZPRNTR("HL1240")

 PRE-OPEN EXECUTE: DO SETJOB^ZZZPRNTR(.IO)
 SUBTYPE: P-HPLASER-P12                USE
TIMEOUT

ON OPENS: NO
 TYPE: TERMINAL
 PRINT SERVER NAME OR ADDRESS: 192.168.0.105
 REMOTE PRINTER NAME: HL1240           ASK
DEVICE

TYPE AT SIGN-ON: YES, ASK

Also should one use the URI/IPP or the IP address
for the printer address?

Thank you.

Ismet

--
Ismet B. Kursunoglu, MD, FCCP
Medical Director
Alaska Clinic, LLC
3750 Country Field Circle, UNIT B
Wasilla, Alaska 99654
[EMAIL PROTECTED]
(907)357-7240



-------------------------------------------------------

This SF.Net email is sponsored by: NEC IT Guy
Games.

How far can you shotput
a projector? How fast can you ride your desk chair
down the office luge track?
If you want to score the big prize, get to know
the

little guy. Play to win an NEC 61" plasma display:
http://www.necitguy.com/?r=20
_______________________________________________
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/hardhats-members

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam
protection around http://mail.yahoo.com



-------------------------------------------------------

This SF.Net email is sponsored by: NEC IT Guy Games.
How far can you shotput
a projector? How fast can you ride your desk chair
down the office luge track?
If you want to score the big prize, get to know the
little guy. Play to win an NEC 61" plasma display:
http://www.necitguy.com/?r=20
_______________________________________________
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/hardhats-members



__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members




-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members

Reply via email to