source: FOIAVistA/trunk/r/DENTAL-DEN/DENTCRDI.m@ 1094

Last change on this file since 1094 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.4 KB
Line 
1DENTCRDI ;ISC2/HCD,SAW-INITIALIZE CARD READER ; 6/27/88 3:49 PM ;
2 ;VERSION 1.2
3 S Z1=0 G:'$D(^DENT(225,0)) W F Z3=0:1:2 S Z1=$O(^(Z1)) Q:Z1'>0 S Z2=Z1
4 G:Z3=0 W I Z3>1 S DIC="^DENT(225,",DIC(0)="AEMNQZ" D ^DIC G EXIT:Y<0
5 S Z=$S(Z3=1:Z2,1:+Y) G W:'$D(^DENT(225,Z,0)) S IOP=$P(^(0),"^",2) G W:IOP=""
6 D ^%ZIS I POP W !,"The port is in use. Try again later" G EXIT
7 K IOP S X1="4 0 0 50 85 10 4 0 9 3 25 6 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0 75 1 1 0 ",Z(1)=0 W !,"Initializing card reader" U IO X ^%ZOSF("TYPE-AHEAD")
8INIT U IO W *27,"Z0",*13 H 1
9 W *27,"C14800",*13 H 1 W *27,"M150",*13 H 1 W *27,"M310",*13 H 1
10 W *27,"M69",*13 H 1 W *27,"M975",*13 H 1 W *27,"O16",*13 H 1
11 W *27,"H71",*13 H 1 W *27,"M44",*13 H 1 W *27,"T51",*13 H 1
12 W *27,"S",*13 R X:5 I X'=X1 S Z(1)=Z(1)+1 U IO(0) G C:Z(1)=5 W !,"Card reader did not respond correctly. I will try to initialize it again." G INIT
13 W *27,"R",*13 G W2
14C S Z(1)=0
15C1 U IO W *18,"R7777",*18,"H00",*18,"E",*13 H 1
16 R X:5 I X'="G" S Z(1)=Z(1)+1 U IO(0) G W1:Z(1)=5 W !,"Card reader did not respond correctly. I will try to initialize it again." G C1
17 G W2
18W W !!,"A card reader device has not been entered for your station in the Dental Site",!,"Parameter file. One must be entered before you can run this option" G EXIT
19W1 W !!,"Initialization unsuccessful after 8 attempts. Initialization aborted" G EX
20W2 U IO(0) W !!,"Initialization complete."
21EX X ^%ZIS("C")
22EXIT S IOP=$I D ^%ZIS K DIC,IOP,X,X1,Y,Z,Z1,Z2,Z3 Q
Note: See TracBrowser for help on using the repository browser.