source: WorldVistAEHR/trunk/r/OUTPATIENT_PHARMACY-PSO-APSP-HUIP/PSOLLU4.m@ 922

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

initial load of WorldVistAEHR

File size: 2.1 KB
Line 
1PSOLLU4 ;BIR/EJW - CHANGE CONTROL CODES ;05/23/2004
2 ;;7.0;OUTPATIENT PHARMACY;**161**;DEC 1997
3 ;
4 ;Read-only reference to %ZIS(2 supported by DBIA 3435
5 ;Reference to %ZIS(2 supported by DBIA 3884
6 ;
7 N IO,IOST
8 S %ZIS="MN"
9IO D ^%ZIS
10 I '$G(IOST(0)) W "No terminal type available." Q
11 I '$D(DUZ(0)) W "No DUZ defined." Q
12 I DUZ(0)'="@" W "FileMan access must be @." Q
13 I '$D(^%ZIS(2,IOST(0),55,"B","LL")) W "No CONTROL CODES defined." Q
14 W !!,"You will be copying the CONTROL CODES to device: ",IO K DIR W ! S DIR(0)="Y",DIR("B")="YES",DIR("A")="Are you sure" D ^DIR K DIR I Y'=1 G IO
15 W !,"Copying..."
16 S AB="PFI",NAME="PATIENT FILL INITIALIZATION",CODE="S PSOFONT=""F10"",PSOX=1210,PSOY=710,PSOYI=45,PSOHFONT=""F12"",PSOBYI=100" D FILE
17 S AB="PFDW",NAME="PHARMACY FILL DOCUMENT WARNING",CODE="S PSOY=1258,PSOX=660,PSOYI=30,PSOFONT=""F8"",PSOYM=1329" D FILE
18 S AB="MLI",NAME="MAILING LABEL INITIALIZATION",CODE="S PSOFONT=""F10"",PSOX=1680,PSOY=175,PSOYI=50" D FILE
19 S AB="RMI",NAME="RETURN MAIL INITIALIZATION",CODE="S PSOHFONT=""F8"",PSOFONT=""F10"",PSOX=1680,PSOY=35,PSORYI=40,PSOHYI=40,PSOTFONT=""F8"",PSOTY=550" D FILE
20 D CLEAN
21 Q
22FILE K DIC,DIE S DIC(0)="L",DA(1)=IOST(0),X=AB,DIC="^%ZIS(2,"_DA(1)_",55," D FILE^DICN
23 K DA,DR,DIE S DIE=DIC,DA=+Y,DA(1)=IOST(0)
24 S DR=".01////"_AB_";1////"_NAME_";2////"_CODE D ^DIE
25 Q
26 ;
27CLEAN ; REMOVE EXACT DUPLICATE CONTROL CODES RESULTING WHEN CHANGE CONTROL CODES ROUTINES ARE RUN MORE THAN ONCE
28 I '$G(DT) S DT=$$DT^XLFDT
29 I '$D(^XTMP("PSOLLU4")) S X1=DT,X2=+90 D C^%DTC S ^XTMP("PSOLLU4",0)=$G(X)_"^"_DT
30 I '$D(IOST(0)) Q
31 M ^XTMP("PSOLLU4",$J,IOST(0))=^%ZIS(2,IOST(0)) ; SAVE COPY OF SETTINGS BEFORE CLEAN-UP
32 S CODE="" F S CODE=$O(^%ZIS(2,IOST(0),55,"B",CODE)) Q:CODE="" S SEQ=0 F S SEQ=$O(^%ZIS(2,IOST(0),55,"B",CODE,SEQ)) Q:'SEQ D
33 .I '$D(^%ZIS(2,IOST(0),55,SEQ)) K ^%ZIS(2,IOST(0),55,"B",CODE,SEQ) Q
34 .S SEQ1=$O(^%ZIS(2,IOST(0),55,"B",CODE,SEQ)) I SEQ1="" Q
35 .S X0=$G(^%ZIS(2,IOST(0),55,SEQ,0)),X1=$G(^(1))
36 .S Z0=$G(^%ZIS(2,IOST(0),55,SEQ1,0)),Z1=$G(^(1))
37 .I X0'="",X1'="" D
38 ..I X0=Z0,X1=Z1 K ^%ZIS(2,IOST(0),55,"B",CODE,SEQ),^%ZIS(2,IOST(0),55,SEQ)
39 Q
40 ;
Note: See TracBrowser for help on using the repository browser.