source: WorldVistAEHR/trunk/r/CLINICAL_MONITORING_SYSTEM-QAM/QAMDUP0.m@ 623

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

initial load of WorldVistAEHR

File size: 1.4 KB
Line 
1QAMDUP0 ;HISC/DAD-COPY OLD MONITOR TO NEW ONE ;2/10/92 07:33
2 ;;1.0;Clinical Monitoring System;;09/13/1993
3EN1 K DIC,DIDEL,DINUM,DLAYGO S DIC="^QA(743,",DIC(0)="AEMNQZ",DIC("A")="Select MONITOR TO COPY: " W ! D ^DIC K DIC G:Y'>0 EXIT
4 S QAMD0=+Y,QAMCODE=$E("Copy of "_$P(Y(0),"^"),1,30),QAMTITLE=$E("Copy of "_$P(Y(0),"^",2),1,30)
5 S QAMS0=$O(^QA(743,"B",QAMCODE,0)) I QAMS0 W !!?5,"*** A `",QAMCODE,"' already exists! ***",*7 S QAMD0=QAMS0 G EDIT
6ASK W !!,"Are you sure you want to copy this monitor" S %=2 D YN^DICN G EN1:%=2,EXIT:%=-1
7 I '% W !!?5,"Answering Y(es) produces a duplicate copy of the selected monitor",!?5,"which you may then edit. Answering N(o) takes you back to the",!?5,"previous prompt." G ASK
8 W !!,"Copying monitor, please wait..."
9 S QAMZERO=^QA(743,0),QAMS0=$P(QAMZERO,"^",3)+1 F QAMS0=QAMS0:1 L +^QA(743,QAMS0,0):0 Q:$T&('$D(^QA(743,QAMS0,0))) L -^QA(743,QAMS0,0):0
10 S $P(^QA(743,0),"^",3,4)=QAMS0_"^"_($P(QAMZERO,"^",4)+1)
11 S %X="^QA(743,"_QAMD0_",",%Y="^QA(743,"_QAMS0_"," L -^QA(743,QAMS0,0):0 D %XY^%RCR S DIK="^QA(743,",DA=QAMS0 D IX^DIK S QAMD0=QAMS0
12EDIT K DR S DIE="^QA(743,",DR=".01///"_QAMCODE_";.02///"_QAMTITLE_";7///UNDER CONSTRUCTION;54///OFF",DA=QAMD0 D ^DIE S QAMFIN=0
13 W !!,"You may now edit the copy of the monitor, please change the CODE and TITLE.",! D EN2^QAMEDT0 G EN1
14EXIT ;
15 K %,%DT,%X,%Y,D0,D1,DA,DI,DIC,DIE,DIK,DQ,DR,J,QA,QAM,QAMAUTO,QAMCODE,QAMD0,QAMD1,QAMDFLT,QAMFIN,QAMPCODE,QAMS0,QAMTITLE,QAMZERO,X,Y
16 Q
Note: See TracBrowser for help on using the repository browser.