DENTE0 ;ISC2/SAW,HAG-EDIT/DELETE DENTAL NON CLINICAL TIME DATA ;4/29/96 13:54
;;1.2;DENTAL;**14,20**;Apr 15, 1996
NCLIN ;NON CLINICAL TIME
S DLAYGO=226
NCLIN1 W !! S DIC="^DENT(226,",DIC("S")="I '$D(^DENT(226,+Y,.1))",DIC(0)="AELMNQ" D ^DIC K DLAYGO G:Y<0 EXIT S DA=+Y D LOCK^DENTE1 G:DENTL=0 NCLIN S DR="[DENT NONCLIN]",DIE("NO^")=1,DIE=DIC D ^DIE W ! L G NCLIN
SITE ;SITE PARAMETERS
W !! S DIC="^DENT(225,",DIC(0)="AELMQ",DLAYGO=225 D ^DIC K DLAYGO G:Y<0 EXIT S DA=+Y D LOCK^DENTE1 G:DENTL=0 SITE S DR=".01;1;2",DIE=DIC D ^DIE W ! L G SITE
DELNC ;DELETE NON CLINICAL TIME
W !! S DIC="^DENT(226,",DIC(0)="AEMNQ" D ^DIC G:Y<0 EXIT S DA=+Y D LOCK^DENTE1 G:DENTL=0 DELNC
NC0 W !!,"Would you like a display of the data for this Non Clinical Time entry" S %=1 D YN^DICN D:%=0 Q1 G NC0:%=0 I %<0 L G DELNC
I %=1 W !! S DR=0 D EN^DIQ
NC1 W !!,"Are you sure you want to delete this entry" S %=2 D YN^DICN D:%=0 Q2 G NC1:%=0 I %'=1 L W !,"Nothing deleted." G DELNC
S DIK=DIC D ^DIK W !!,"Entry deleted." R X:2 G DELNC
Q
CHK S TEMP=Y,TEMP(0)=Y(0),TEMP(0,0)=Y(0,0),D=$P(TEMP,"^",2),DT1=$E(D,1,5)_"00",DENTSTA=$P(TEMP(0),"^",STA) D CHK1
I $D(DENTF) S DIK="^DENT(H,",DA=DENTDA D ^DIK K DIK W *7,!!,"An entry already exists for station ",DENTSTA," for ",$P(TEMP(0,0)," ")," ",$P(TEMP(0,0)," ",4),". Only one entry allowed",!,"per station per month."
K TEMP
Q
CHK1 F I=0:0 S DT1=$O(^DENT(H,"B",DT1)) Q:DT1=""!($D(DENTF))!($E(DT1,1,5)>$E(D,1,5)) I DT1'=D S F=$O(^DENT(H,"B",DT1,"")),DENTSTA2=$P(^DENT(H,F,0),"^",STA) S:DENTSTA=DENTSTA2 DENTF=1 Q:$D(DENTF)
Q
Q1 W !!,"Press return or enter 'Y' or 'Yes' to display the data entry.",!,"Enter 'N' or 'No' if you do not want to display the data entry.",!,"Enter an uparrow (^) to exit." Q
Q2 W !!,"Press return or enter 'N' or 'No' if you do not want to delete the",!,"data entry. Enter 'Y' or 'Yes' if you want to delete the data entry.",!,"Enter an uparrow (^) to exit." Q
EXIT Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDENTE0 1954 printed Dec 13, 2024@01:46:34 Page 2
DENTE0 ;ISC2/SAW,HAG-EDIT/DELETE DENTAL NON CLINICAL TIME DATA ;4/29/96 13:54
+1 ;;1.2;DENTAL;**14,20**;Apr 15, 1996
NCLIN ;NON CLINICAL TIME
+1 SET DLAYGO=226
NCLIN1 WRITE !!
SET DIC="^DENT(226,"
SET DIC("S")="I '$D(^DENT(226,+Y,.1))"
SET DIC(0)="AELMNQ"
DO ^DIC
KILL DLAYGO
if Y<0
GOTO EXIT
SET DA=+Y
DO LOCK^DENTE1
if DENTL=0
GOTO NCLIN
SET DR="[DENT NONCLIN]"
SET DIE("NO^")=1
SET DIE=DIC
DO ^DIE
WRITE !
LOCK
GOTO NCLIN
SITE ;SITE PARAMETERS
+1 WRITE !!
SET DIC="^DENT(225,"
SET DIC(0)="AELMQ"
SET DLAYGO=225
DO ^DIC
KILL DLAYGO
if Y<0
GOTO EXIT
SET DA=+Y
DO LOCK^DENTE1
if DENTL=0
GOTO SITE
SET DR=".01;1;2"
SET DIE=DIC
DO ^DIE
WRITE !
LOCK
GOTO SITE
DELNC ;DELETE NON CLINICAL TIME
+1 WRITE !!
SET DIC="^DENT(226,"
SET DIC(0)="AEMNQ"
DO ^DIC
if Y<0
GOTO EXIT
SET DA=+Y
DO LOCK^DENTE1
if DENTL=0
GOTO DELNC
NC0 WRITE !!,"Would you like a display of the data for this Non Clinical Time entry"
SET %=1
DO YN^DICN
if %=0
DO Q1
if %=0
GOTO NC0
IF %<0
LOCK
GOTO DELNC
+1 IF %=1
WRITE !!
SET DR=0
DO EN^DIQ
NC1 WRITE !!,"Are you sure you want to delete this entry"
SET %=2
DO YN^DICN
if %=0
DO Q2
if %=0
GOTO NC1
IF %'=1
LOCK
WRITE !,"Nothing deleted."
GOTO DELNC
+1 SET DIK=DIC
DO ^DIK
WRITE !!,"Entry deleted."
READ X:2
GOTO DELNC
+2 QUIT
CHK SET TEMP=Y
SET TEMP(0)=Y(0)
SET TEMP(0,0)=Y(0,0)
SET D=$PIECE(TEMP,"^",2)
SET DT1=$EXTRACT(D,1,5)_"00"
SET DENTSTA=$PIECE(TEMP(0),"^",STA)
DO CHK1
+1 IF $DATA(DENTF)
SET DIK="^DENT(H,"
SET DA=DENTDA
DO ^DIK
KILL DIK
WRITE *7,!!,"An entry already exists for station ",DENTSTA," for ",$PIECE(TEMP(0,0)," ")," ",$PIECE(TEMP(0,0)," ",4),". Only one entry allowed",!,"per station per month."
+2 KILL TEMP
+3 QUIT
CHK1 FOR I=0:0
SET DT1=$ORDER(^DENT(H,"B",DT1))
if DT1=""!($DATA(DENTF))!($EXTRACT(DT1,1,5)>$EXTRACT(D,1,5))
QUIT
IF DT1'=D
SET F=$ORDER(^DENT(H,"B",DT1,""))
SET DENTSTA2=$PIECE(^DENT(H,F,0),"^",STA)
if DENTSTA=DENTSTA2
SET DENTF=1
if $DATA(DENTF)
QUIT
+1 QUIT
Q1 WRITE !!,"Press return or enter 'Y' or 'Yes' to display the data entry.",!,"Enter 'N' or 'No' if you do not want to display the data entry.",!,"Enter an uparrow (^) to exit."
QUIT
Q2 WRITE !!,"Press return or enter 'N' or 'No' if you do not want to delete the",!,"data entry. Enter 'Y' or 'Yes' if you want to delete the data entry.",!,"Enter an uparrow (^) to exit."
QUIT
EXIT QUIT