Teletip Düzeltme Adimlari Triger


Meddata teletip için gerekli güncel triger bilgisi



--KOD--



CREATE OR REPLACE TRIGGER MEDDATAPACS.STUDIESTRIGGER1 AFTER INSERT OR UPDATE
ON MEDDATAPACS.STUDIES FOR EACH ROW
DECLARE
ISTEK_NO1 NUMBER;
BEGIN
IF UPDATING THEN
IF (IS_NUMBER(:OLD.ACCESSIONNUMBER)=1) THEN
UPDATE HASTANE.RAD_SONUC
SET IMAGENO=:OLD.STUDYUID
WHERE ISTEK_NO=:OLD.ACCESSIONNUMBER;
UPDATE HASTANE.ISTEKMAIN
SET IMAGENO=:OLD.STUDYUID
WHERE ISTEK_NO=:OLD.ACCESSIONNUMBER;

ELSE
UPDATE HASTANE.RAD_SONUC
SET IMAGENO=:OLD.STUDYUID
WHERE ROWID1=:OLD.ACCESSIONNUMBER;
SELECT ISTEK_NO INTO ISTEK_NO1 FROM HASTANE.ISLEMYAP WHERE ROWID1=:OLD.ACCESSIONNUMBER;
UPDATE HASTANE.ISTEKMAIN
SET IMAGENO=:OLD.STUDYUID
WHERE ISTEK_NO=ISTEK_NO1;
END IF;

ELSIF INSERTING THEN
UPDATE MEDDATAPACS.APPLYTABLE
SET TAMAM='T'
WHERE ACCESS_ID=:NEW.ACCESSIONNUMBER;

UPDATE HASTANE.ISLEMYAP
SET IMAGENO=:NEW.STUDYUID
WHERE ROWID1=:NEW.ACCESSIONNUMBER;


INSERT INTO MEDDATAPACS.KOS_LIST
(STUDYUID,TARIH,ACCESS_NO)
VALUES
(:NEW.STUDYUID,SYSDATE,:NEW.ACCESSIONNUMBER);

IF (IS_NUMBER(:NEW.ACCESSIONNUMBER)=1) THEN
UPDATE HASTANE.RAD_SONUC
SET IMAGENO=:NEW.STUDYUID
WHERE ISTEK_NO=:NEW.ACCESSIONNUMBER;
UPDATE HASTANE.ISTEKMAIN
SET IMAJDURUM=12,IMAGENO=:NEW.STUDYUID
WHERE ISTEK_NO=:NEW.ACCESSIONNUMBER;

ELSE
UPDATE HASTANE.RAD_SONUC
SET IMAGENO=:NEW.STUDYUID
WHERE ROWID1=:NEW.ACCESSIONNUMBER;
BEGIN
SELECT ISTEK_NO INTO ISTEK_NO1 FROM HASTANE.ISLEMYAP WHERE ROWID1=:NEW.ACCESSIONNUMBER;
EXCEPTION WHEN NO_DATA_FOUND THEN
ISTEK_NO1 := NULL;
END;
IF NOT (ISTEK_NO1 IS NULL) THEN
UPDATE HASTANE.ISTEKMAIN
SET IMAJDURUM=12,IMAGENO=:NEW.STUDYUID
WHERE ISTEK_NO=ISTEK_NO1;
END IF;
END IF;

END IF;
END;
/

teletip,meddata,meddatapacs



Fastreport,meddata,convert,IntToStr

meddata server kurulum,meddata user script,oracle scriptler

meddata,pl sql,kurum bazli indirim,grup bazli indirim

meddata,islemtipi, Check-up,

meddata,icmal,çift kayit

meddata,barkot,fr3

meddata,efatura,efatura programi

medula,dönem sonlandirma,

e fatura kurumlari,efatura kurum bilgileri

meddata,dogum sonrasi muayene,dogum sonrasi gelen hasta

Bizi Takip Edin :