Rem
Rem $Header: ordim/admin/imxreins.sql /main/1 2009/09/23 11:46:47 dolin Exp $
Rem
Rem imxreins.sql
Rem
Rem Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
Rem
Rem NAME
Rem imxreins.sql
Rem
Rem DESCRIPTION
Rem This script inserts back the old version of oracle default documents
Rem that were updated during upgrade/patch into the dicom repository.
Rem
Rem NOTES
Rem Before running this script user must be connected as a user
Rem with authority to insert dicom repository documents and
Rem ordsys.ord_dicom_admin.editdatamodel has been called.
Rem After running this script
Rem ordsys.ord_dicom_admin.publishdatamodel has to be called.
Rem
-- insert the ordcmcmd.xml into the dicom repos
declare
xt sys.XMLtype;
ex exception;
pragma exception_init(ex, -53002);
ordcmXml varchar2(32767);
ordClob clob;
begin
sys.dbms_lob.createTemporary( ordClob, true, sys.dbms_lob.call );
ordcmXml := '' ||
'' ||
'' ||
'' ||
' ' ||
' ' ||
' Dongbai Guo' ||
' 2007-04-09' ||
' 1.0' ||
' Oracle default constraint module definition' ||
' DICOM Base Standard 2007 Part 3.3' ||
' 2007-01-01' ||
' Downloadable from http://medical.nema.org/' ||
' ' ||
' ' ||
'' ||
' Defines a code sequence macro' ||
' Defines a person identification macro' ||
' ' ||
' ' ||
' A subset of Patient Module defined in DICOM standard, ' ||
' PS 3.3-2007, Table C.7-1' ||
' ' ||
' ' ||
' ' ||
' 00100040' ||
' ' ||
' ' ||
' ' ||
' Patient''s Sex' ||
' ' ||
' 00100040' ||
' M' ||
' F' ||
' O' ||
' ' ||
' ' ||
' ' ||
' Referenced patient sequence constraint' ||
' ' ||
' ' ||
' ' ||
' 00081120' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 00081120.00081150' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 00081120.00081155' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Validation error: missing mandatory attribute for patient module' ||
' Warning: validation failure' ||
' ' ||
' ' ||
' ' ||
' ' ||
' A subset of General Study Module defined in DICOM standard, ' ||
' PS 3.3-2007, Table C.7-3' ||
' ' ||
' ' ||
' Referring Physician Identification Sequence' ||
' ' ||
' ' ||
' ' ||
' 00080096' ||
' ' ||
' ' ||
' ' ||
' ' ||
' PersonIdentifierMacro' ||
' ' ||
' PersonIDAttr' ||
' 00080096' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Study Instance UID' ||
' ' ||
' 0020000D' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' A subset of General Series Module defined in DICOM standard,' ||
' PS 3.3-2007, Table C.7-5a' ||
' ' ||
' ' ||
' ' ||
' 00080060' ||
' ' ||
' ' ||
' missing attribute 00080060 ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 0020000E' ||
' ' ||
' ' ||
' missing attribute 0020000E ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 00400260' ||
' ' ||
' ' ||
' ' ||
' ' ||
' CodeSequenceMacro' ||
' ' ||
' CodeAttr' ||
' 00400260' ||
' ' ||
' ' ||
' ' ||
' missing attribute 00400260.00080100 or 00400260.00080102 ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' GeneralSeriesModule is not satisfied' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' A subset of SOP Common Module defined in DICOM standard,' ||
' PS 3.3-2007, Table C.12-1' ||
' ' ||
' ' ||
' ' ||
' 00080016' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 00080018' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' A subset of Image Pixel Macro defined in DICOM standard,' ||
' PS 3.3-2007, Table C.7-11b' ||
' ' ||
' ' ||
' ' ||
' 00280002' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 00280004' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 00280004' ||
' MONOCHROME1' ||
' MONOCHROME2' ||
' PALETTE COLOR' ||
' RGB' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 00280010' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 00280011' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 00280100' ||
' 8' ||
' 12' ||
' 16' ||
' 24' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 00280101' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 00280102' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 00280103' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 00287FE0' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 7FE00010' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 00280002' ||
' 1' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 00280006' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 00280004' ||
' PALETTE COLOR' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 00089205' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 00089205' ||
' COLOR' ||
' MIXED' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 00281101' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 00281102' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 00281103' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 00281201' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 00281202' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 00281203' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
'';
sys.dbms_lob.write(ordClob, length(ordcmXml), 1, ordcmXml);
xt := new sys.XMLType(ordClob);
ordsys.ord_dicom_admin.insertDocument('ordcmcmd.xml','CONSTRAINT',xt);
sys.dbms_lob.freeTemporary(ordClob);
exception
-- rollback the datamodel
when others then
ord_dicom_admin.rollbackDataModel();
raise;
end;
/
-- insert the ordcmct.xml into the dicom repos
declare
xt sys.XMLtype;
ex exception;
pragma exception_init(ex, -53002);
ordcmXml varchar2(32767);
ordClob clob;
begin
sys.dbms_lob.createTemporary( ordClob, true, sys.dbms_lob.call );
ordcmXml := '' ||
'' ||
'' ||
'' ||
' ' ||
' ' ||
' Dongbai Guo' ||
' 2007-04-09' ||
' 1.0' ||
' Oracle default constraint rules' ||
' ' ||
' ' ||
' ' ||
' A subset of Image Pixel Macro defined in DICOM standard,' ||
' PS 3.3-2007, Table C.7-11b' ||
' ' ||
' ' ||
' A subset of General Study Module defined in DICOM standard, ' ||
' PS 3.3-2007, Table C.7-3' ||
' ' ||
' ' ||
' A subset of General Series Module defined in DICOM standard,' ||
' PS 3.3-2007, Table C.7-5a' ||
' ' ||
' ' ||
' A subset of SOP Common Module defined in DICOM standard,' ||
' PS 3.3-2007, Table C.12-1' ||
' ' ||
'' ||
' ' ||
' ' ||
' ImagePixelMacro' ||
' ' ||
' missing mandatory image attribute' ||
' ' ||
' ' ||
' ' ||
' ' ||
' SOPCommonModule' ||
' ' ||
' ' ||
' GeneralSeriesModule' ||
' ' ||
' ' ||
' GeneralStudyModule' ||
' ' ||
' ' ||
'';
sys.dbms_lob.write(ordClob, length(ordcmXml), 1, ordcmXml);
xt := new sys.XMLType(ordClob);
ordsys.ord_dicom_admin.insertDocument('ordcmct.xml','CONSTRAINT',xt);
sys.dbms_lob.freeTemporary(ordClob);
exception
-- rollback the datamodel
when others then
ord_dicom_admin.rollbackDataModel();
raise;
end;
/