Rem
Rem imxreg.sql
Rem
Rem Copyright (c) 2004, 2009, Oracle and/or its affiliates.
Rem All rights reserved.
Rem
Rem NAME
Rem imxreg.sql
Rem
Rem DESCRIPTION
Rem This script registers the Oracle Multimedia XSD schemas with XDB.
Rem
Rem *!*!*!*!* This script is autogenerated by ordim/utl/setupview.pl *!*!*!*!*
Rem Do not edit it unless you know what you are doing. Edit setup_view.pl
Rem
Rem NOTES
Rem Before running this script user must be connected as a user
Rem with authority to register xml schemas
Rem
Rem
-- Register orddcmim.xsd with XDB under http://xmlns.oracle.com/ord/meta/dicomImage
declare
old_s sys.XMLType;
new_s sys.XMLType;
ordSchema varchar2(32767);
ordClob clob := null;
ex exception;
pragma exception_init( ex, -31085 );
begin
begin
sys.dbms_lob.createTemporary( ordClob, true, sys.dbms_lob.call );
ordSchema :=
'' ||
' ' ||
'' ||
'' ||
' ' ||
' Date: 21 Sept 2005' ||
' Version: 10gR2_release_10.2.0.2' ||
' Name: dicomImage.xsd' ||
' Author: Dongbai Guo' ||
'' ||
' Introduction' ||
' This schema defines the set of DICOM metadata for' ||
' ORDImage function getDicomMetadata().' ||
' The purpose of this set of functions is to extract from a DICOM image a set of' ||
' attributes to describe the image in XML, allowing easy browsing and retrieval.' ||
' ' ||
' Question mark "?" means optional items' ||
' ' ||
' The DICOM schema does not enforce the DICOM standard. By default, conformance ' ||
' is enforced by the getDicomMetadata code. If DICOM conformance is disabled by ' ||
' invoking the setDicomValidation method,we will extract metadata from ' ||
' images with missing or null mandatory DICOM attributes, and/or non-conformant ' ||
' DICOM attributes. For attributes with non-conformant values, the raw data ' ||
' will be placed in the rawValue attribute of the tag.' ||
'' ||
' Structure Overview' ||
' DICOM_IMAGE' ||
' ORD_DICOM_HEADER' ||
' VERSION' ||
' DICOM_STANDARD_VERSION' ||
' DICOM_STANDARD_RELEASE' ||
' FILE_META_HEADER' ||
' MEDIA_STORAGE_SOP_CLASS_UID' ||
' MEDIA_STORAGE_SOP_INSTANCE_UID' ||
' TRANSFER_SYNTAX_UID' ||
' IMPLEMENTATION_CLASS_UID' ||
' IMPLEMENTATION_VERSION_NAME' ||
' SOURCE_APPLICATION_ENTITY_TITLE' ||
' PATIENT' ||
' NAME' ||
' ID' ||
' BIRTH_DATE' ||
' SEX' ||
' GENERAL_STUDY' ||
' INSTANCE_UID' ||
' DATE' ||
' TIME' ||
' REFERING_PHYSICIANS_NAME' ||
' ID' ||
' ACCESSION_NUMBER' ||
' DESCRIPTION?' ||
' PATIENT_STUDY?' ||
' ADMITTING_DIAGNOSES_DESCRIPTION' ||
' ADMITTING_DIAGNOSES_CODE_SEQUENCE' ||
' GENERAL_SERIES' ||
' MODALITY' ||
' INSTANCE_UID' ||
' DATE' ||
' TIME' ||
' PERFORMING_PHYSICIANS_NAME' ||
' BODY_PART_EXAMINED' ||
' PATIENT_POSITION' ||
' PERFORMED_PROCEDURE_STEP_ID' ||
' PERFORMED_PROCEDURE_STEP_START_DATE' ||
' PERFORMED_PROCEDURE_STEP_START_TIME' ||
' PERFORMED_PROCEDURE_STEP_DESCRIPTION' ||
' PERFORMED_PROTOCOL_CODE_SEQUENCE' ||
' GENERAL_EQUIPMENT?' ||
' MANUFACTURER' ||
' GENERAL_IMAGE?' ||
' INSTANCE_NUMBER' ||
' ACQUISITION_NUMBER' ||
' ACQUISITION_DATE' ||
' ACQUISITION_TIME' ||
' ACQUISITION_DATETIME' ||
' PATIENT_ORIENTATION' ||
' FRAME_LATERALITY' ||
' ANATOMIC_REGION' ||
' IMAGE_PIXEL?' ||
' SAMPLES_PER_PIXEL' ||
' PHOTOMETRIC_INTERPRETATION' ||
' ROWS' ||
' COLUMNS' ||
' BIT_ALLOCATED' ||
' BIT_STORED' ||
' HIGH_BIT' ||
' PIXEL_REPRESENTATION' ||
' PLANAR_CONFIGURATION' ||
' PIXEL_ASPECT_RATIO' ||
'' ||
' SOP_COMMON' ||
' CLASS_UID' ||
' INSTANCE_UID ' ||
' SPECIFIC_CHARACTER_SET' ||
'' ||
' List of DICOM attribute tags appeared in this schema' ||
' (0002, 0002) MEDIA_STORAGE_SOP_CLASS_UID' ||
' (0002, 0003) MEDIA_STORAGE_SOP_INSTANCE_UID' ||
' (0002, 0010) TRANSFER_SYNTAX_UID' ||
' (0002, 0012) IMPLEMENTATION_CLASS_UID' ||
' (0002, 0013) IMPLEMENTATION_VERSION_NAME' ||
' (0002, 0016) SOURCE_APPLICATION_ENTITY_TITLE' ||
'' ||
'' ||
' (0008, 0005) SPECIFIC_CHARACTER_SET' ||
' (0008, 0016) SOP CLASS_UID' ||
' (0008, 0018) SOP INSTANCE_UID' ||
' (0008, 0020) STUDY DATE' ||
' (0008, 0021) SERIES DATE' ||
' (0008, 0022) ACQUISITION_DATE' ||
' (0008, 002A) ACQUISITION_DATETIME' ||
' (0008, 0030) STUDY TIME' ||
' (0008, 0031) SERIES TIME' ||
' (0008, 0032) ACQUISITION_TIME' ||
' (0008, 0050) ACCESSION_NUMBER' ||
' (0008, 0060) MODALITY' ||
' (0008, 0070) MANUFACTURER' ||
' (0008, 0090) REFERING_PHYSICIANS_NAME' ||
' (0008, 1030) STUDY DESCRIPTION' ||
' (0008, 1050) PERFORMING_PHYSICIANS_NAME' ||
' (0008, 1080) ADMITTING_DIAGNOSES_DESCRIPTION' ||
' (0008, 1084) ADMITTING_DIAGNOSES_CODE_SEQUENCE' ||
' (0008, 2218) ANATOMIC_REGION' ||
'' ||
' (0010, 0010) PATIENT NAME' ||
' (0010, 0020) PATIENT ID' ||
' (0010, 0030) PATIENT BIRTH_DATE' ||
' (0010, 0040) PATIENT SEX' ||
'' ||
' (0018, 0015) BODY_PART_EXAMINED' ||
' (0018, 5100) PATIENT_POSITION' ||
' ' ||
' (0020, 000D) STUDY INSTANCE_UID' ||
' (0020, 000E) SERIES INSTANCE_UID' ||
' (0020, 0010) STUDY ID' ||
' (0020, 0012) ACQUISITION_NUMBER' ||
' (0020, 0013) INSTANCE_NUMBER' ||
' (0020, 0020) PATIENT_ORIENTATION' ||
' (0020, 9072) FRAME_LATERALITY' ||
'' ||
' (0028, 0002) SAMPLES_PER_PIXEL' ||
' (0028, 0004) PHOTOMETRIC_INTERPRETATION' ||
' (0028, 0006) PLANAR_CONFIGURATION' ||
' (0028, 0010) ROWS' ||
' (0028, 0011) COLUMNS' ||
' (0028, 0034) PIXEL_ASPECT_RATIO' ||
' (0028, 0100) BIT_ALLOCATED' ||
' (0028, 0101) BIT_STORED' ||
' (0028, 0102) HIGH_BIT' ||
' (0028, 0103) PIXEL_REPRESENTATION' ||
'' ||
' (0040, 0244) PERFORMED_PROCEDURE_STEP_START_DATE' ||
' (0040, 0245) PERFORMED_PROCEDURE_STEP_START_TIME' ||
' (0040, 0253) PERFORMED_PROCEDURE_STEP_ID' ||
' (0040, 0254) PERFORMED_PROCEDURE_STEP_DESCRIPTION' ||
' (0040, 0260) PERFORMED_PROTOCOL_CODE_SEQUENCE' ||
'' ||
' ' ||
' ' ||
'' ||
'' ||
'' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ;
sys.dbms_lob.write(ordClob, length(ordSchema), 1, ordSchema);
ordSchema :=
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
'' ||
'' ||
'' ||
'' ||
'' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
'' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
'' ||
'' ||
'' ||
'' ||
'' ||
'' ||
'' ||
' ' ||
' ' ||
' ' ||
'' ||
'' ||
'' ||
'' ||
' ' ||
' ' ||
' ' ||
'' ||
'' ||
'' ||
'' ||
' ' ||
'' ||
'' ||
'' ||
'' ||
' ' ||
'' ||
'' ||
'' ||
'' ||
' ' ||
'' ||
'' ||
'' ||
'' ||
' ' ||
' ' ||
' ' ||
'' ||
'' ||
'' ||
'' ||
' ' ||
' ' ||
' ' ||
'' ||
'' ||
'' ||
'' ||
' ' ||
' ' ||
' ' ||
'' ||
'' ||
'' ||
'' ||
' ' ||
'' ||
'' ||
'' ||
'' ||
' ' ||
'' ||
'' ||
'' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
'' ||
'' ||
'' ||
'' ||
' ' ||
'' ||
'' ||
'' ||
'';
sys.dbms_lob.writeAppend(ordClob, length(ordSchema), ordSchema);
exception
when others then
raise;
end;
begin
begin
select schema into old_s
from sys.dba_xml_schemas
where owner='ORDSYS' and
schema_url='http://xmlns.oracle.com/ord/meta/dicomImage';
if (old_s.existsNode('/schema/complexType/attribute[@name="rawValue"]') = 0) then
new_s := sys.XMLType(ordClob);
xdb.dbms_xmlschema.copyEvolve
(schemaURLs=>xdb.xdb$string_list_t('http://xmlns.oracle.com/ord/meta/dicomImage'),
newSchemas=>sys.XMLSequenceType(new_s),
transforms=>NULL,
preserveOldDocs=>FALSE,
mapTabName=>NULL,
generateTables=>TRUE,
force=>FALSE,
schemaOwners=>xdb.xdb$string_list_t('ORDSYS')
);
end if;
sys.dbms_lob.freeTemporary(ordClob);
exception
when no_data_found then
xdb.dbms_xmlschema.registerSchema
(schemaURL=>'http://xmlns.oracle.com/ord/meta/dicomImage',
schemaDoc=>ordClob,
local=>FALSE,
genTypes=>TRUE,
genBean=>FALSE,
genTables=>FALSE,
force=>FALSE,
owner=>'ORDSYS'
);
when others then
raise;
end;
exception
when ex then
null;
when others then
raise;
end;
end;
/
-- Register ordexif.xsd with XDB under http://xmlns.oracle.com/ord/meta/exif
declare
ordSchema varchar2(32767);
ordClob clob := null;
ex exception;
pragma exception_init( ex, -31085 );
begin
sys.dbms_lob.createTemporary( ordClob, true, sys.dbms_lob.call );
ordSchema :=
'' ||
'' ||
'' ||
'' ||
' ' ||
' ' ||
' Change History' ||
' rabbott 11/06/2008 -- Make GPSVersionID optional' ||
' rabbott 2/10/2005 -- Add more comments' ||
' rabbott 6/10/2004 -- Created' ||
' ' ||
' Introduction' ||
'' ||
' This is the Oracle Multimedia schema for image metadata stored' ||
' in the EXIF format for digital still cameras. This schema supports' ||
' tags defined up to EXIF version 2.21' ||
'' ||
' Metadata extracted only from the 0th IFD. For JPEG images, this means' ||
' that the metadata comes from the main image in the file. Metadata is not' ||
' extracted for the thumbnail image (1st IFD).' ||
'' ||
' Structure' ||
'' ||
' This schema defines a single global element exifMetadata which' ||
' contains up to four child elements. Each child element contains tags' ||
' from a TIFF IFD directory as defined by the EXIF standard.' ||
'' ||
' TiffIfd contains tags from the TIFF IFD. ' ||
' ExifIfd contains tags from the EXIF IFD. ' ||
' GpsIfd contains tags from the GPS IFD. ' ||
' InteroperabilityIfd contains tags from the Interoperability IFD.' ||
'' ||
' All elements that derive directly from EXIF tags contain a required ' ||
' "tag" attribute. The value of this attribute is the Tag ID value as' ||
' defined in the EXIF standard.' ||
' ' ||
' Unsupported tags' ||
' The table below lists tags that are defined by the EXIF standard' ||
' but which the current version of Oracle Multimedia does not ' ||
' read from image files. Note that this schema does define data ' ||
' models for these tags and future versions of Oracle' ||
' Multimedia may parse these fields from image files. Those tags ' ||
' could be represented by documents conforming to this schema.' ||
'' ||
' These tags are from the TIFF IFD' ||
' tag 301: TransferFunction' ||
' tag 318: WhitePoint' ||
' tag 319: PrimaryChromaticities' ||
' tag 529: YCbCrCoefficients' ||
' tag 532: ReferenceWhiteBlack' ||
'' ||
' tag 273: StripOffsets' ||
' tag 278: RowsPerStrip' ||
' tag 279: StripByteCounts' ||
' tag 513: JPEGInterChangeFormat' ||
' tag 514: JPEGInterChangeFormatLength' ||
'' ||
' These tags are from the EXIF IFD' ||
'' ||
' tag 34855: ISOSpeedRatings' ||
' tag 34856: OECF' ||
' tag 37396: SubjectArea' ||
' tag 37500: MakerNote' ||
' tag 41484: SpatialFrequencyResponse' ||
' tag 41492: SubjectLocation' ||
' tag 41730: CFAPattern' ||
' tag 41995: DeviceSettingsDescription' ||
' tag 42016: ImageUniqueID' ||
'' ||
' ' ||
' ' ||
'' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' This attribute group defines a single attribute that is required' ||
' for all elements. The tag attribute value is the TIFF tag value ' ||
' (in decimal) that is the datasource for the tag.' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ;
sys.dbms_lob.write(ordClob, length(ordSchema), 1, ordSchema);
ordSchema :=
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' The enumerated datatype values refer to types ' ||
' defined by XML Schema' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Tags from the TIFF IFD' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Unit is pixels per ResolutionUnit' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Unit is pixels per Resolution Unit' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' Tags from the EXIF IFD' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' Units is seconds' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' The unit is the APEX Value' ||
' ' ||
' ' ||
' ' ||
' ' ||
' The unit is the APEX value' ||
' ' ||
' ' ||
' ' ||
' ' ||
' The unit is the APEX value' ||
' ' ||
' ' ||
' ' ||
' ' ||
' The unit is the APEX value' ||
' ' ||
' ' ||
' ' ||
' ' ||
' The unit is the APEX value' ||
' ' ||
' ' ||
' ' ||
' ' ||
' The unit is meters' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' The unit is millimeters.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' The unit is Beam Candle Power Seconds' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Not implemented' ||
' ' ||
' ' ||
' ' ||
' ' ||
' The unit is pixels' ||
' ' ||
' ' ||
' ' ||
' ' ||
' The unit is pixels' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' Tags from the GPS IFD' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Unit is decimal degrees' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Unit is decimal degrees' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Unit is meters' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' Tags from the Interoperability IFD' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
'';
sys.dbms_lob.writeAppend(ordClob, length(ordSchema), ordSchema);
xdb.dbms_xmlschema.registerSchema
(schemaURL=>'http://xmlns.oracle.com/ord/meta/exif',
schemaDoc=>ordClob,
local=>FALSE,
genTypes=>TRUE,
genBean=>FALSE,
genTables=>FALSE,
force=>FALSE,
owner=>'ORDSYS'
);
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
-- ignore duplicate registration
exception
when ex then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
when others then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
raise;
end;
/
-- Register ordcmdts.xsd with XDB under http://xmlns.oracle.com/ord/dicom/rpdatatype_1_0
declare
ordSchema varchar2(32767);
ordClob clob := null;
ex exception;
pragma exception_init( ex, -31085 );
begin
sys.dbms_lob.createTemporary( ordClob, true, sys.dbms_lob.call );
ordSchema :=
'' ||
'' ||
'' ||
'' ||
' ' ||
' ' ||
' Introduction' ||
' This schema defines the DICOM standard data types that are used ' ||
' by all other DICOM XML schema definitions.' ||
' ' ||
' Naming conventions:' ||
' All DICOM value representation (VR) types are named with a ' ||
' 2-character string, such as "AE" and "CS".' ||
' All DICOM attribute type definitions are named as VR_ATTR_T, ' ||
' where VR is replaced by the attribute''s 2-character VR.' ||
' ' ||
' Note that each item of a sequence type (SQ) is of DATASET_T type.' ||
' The DATASET_T type can recursively contain more attributes.' ||
' The element name of an attribute is its value representation (VR)' ||
' name. Oracle uses value representation names defined' ||
' by the DICOM standard part 5. The element' ||
' name to VR mappings are:' ||
' APPLICATION_ENTITY --- AE' ||
' AGE_STRING --- AS' ||
' ATTRIBUTE_TAG --- AT' ||
' CODE_STRING --- CS' ||
' DATE --- DA' ||
' DECIMAL_STRING --- DS' ||
' FLOAT_SINGLE --- FL' ||
' FLOAT_DOUBLE --- FD' ||
' INTEGER_STRING --- IS' ||
' LONG_STRING --- LO' ||
' LONG_TEXT --- LT' ||
' OTHER_BYTE --- OB' ||
' OTHER_FLOAT --- OF' ||
' OTHER_WORD --- OW' ||
' OTHER_WORD --- OWB' ||
' PERSON_NAME --- PN' ||
' SHORT_STRING --- SH' ||
' SIGNED_LONG --- SL' ||
' SEQUENCE --- SQ' ||
' SIGNED_SHORT --- SS' ||
' SHORT_TEXT --- ST' ||
' TIME --- TM' ||
' UNIQUE_ID --- UI' ||
' UNSIGNED_LONG --- UL' ||
' UNKNOWN --- UN' ||
' UNSIGNED_SHORT --- US' ||
' SIGNED_SHORT --- USS' ||
' UNLIMITED_TEXT --- UT' ||
' EXTENDED_TYPE --- EXT' ||
' EXCEPTION_TYPE --- EXP' ||
' The VR types "OWB'', "EXT", "EXP" and "USS" are ' ||
' Oracle-defined extensions.' ||
' Please refer to the individual data type documentation for ' ||
' more explanation.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM Value representation Application Entity' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM Value representation Age String. ' ||
' The age string can be expressed either in DICOM string ' ||
' format, or in number of days. When metadata is extracted ' ||
' from a DICOM object, both elements will be populated.' ||
' XML documents can represent age by either format. ' ||
' Age in number of days is converted into an age string when ' ||
' XML metadata is encoded into a DICOM object.' ||
' To convert from age string into the number of days: ' ||
' 365 * number_of_year or 31 * number_of_month. ' ||
' Because AGE_STRING is mandatory, it is not necessary to ' ||
' convert from the number of days into an age string. ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Attribute Tag. An attribute tag is expressed as two ' ||
' big-endian 2-byte hexadecimal number (group number followed by ' ||
' element number with no separator).' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Code String' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type DAte' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Decimal String' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Data Time' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type FLoating-point single' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Floating-point Double' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Integer String' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type LOng string' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Long Text' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Other Byte' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' VR type Other Float ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Other Word in base64binary encoding.' ||
' The mandatory attribute endian specifies the byte ' ||
' order of the binary value.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Person Name. Person Name can be' ||
' expressed either in component format or as a single ' ||
' concatentated string. When metadata is extracted from a ' ||
' DICOM object, the person name type is encoded with' ||
' both formats. Users can index and search DICOM ' ||
' metadata with either the component format or the ' ||
' concatenated string format.' ||
' In component format, a name has an optional "type" attribute that' ||
' indicates its encoding type. The value of the "type" attribute ' ||
' can be "unibyte", "ideographic" or "phonetic". A name may ' ||
' have up to five components: "FAMILY", "GIVEN", "MIDDLE",' ||
' "PREFIX", and "SUFFIX".' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type SHort string' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Signed Long' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type SeQuence. ' ||
' Note that item number can be explicitly encoded in XML. ' ||
' Number counts from 1 up.' ||
' Each item is a DATASET_T type, which may contain ' ||
' any combination of DICOM attributes.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Signed Short' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Short Text' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type TiMe' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Unique Identifier' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Unsigned Long' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type UNknown.' ||
' This type contains a base64 dump of its binary content. The mandatory' ||
' attribute "endian" specifies the byte order of this encoding.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Unsigned Short' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Unlimited Text' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM Extension type ' ||
' This type does not have direct mapping to any value ' ||
' representation (VR) types defined in Part 5 of the ' ||
' DICOM standard. ' ||
' It can accommodate future extensions to DICOM VR' ||
' types without modification to the XML schema definitions.' ||
' The VR element specifies the value representation.' ||
' The VALUE element specifies the XML value for the' ||
' corresponding data element. The exact XML schema ' ||
' definition can be introduced in the future.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM Exception type.' ||
' This type does not have direct mapping to any value ' ||
' representation (VR) types defined in Part 5 of the ' ||
' DICOM standard. ' ||
' It indicates an error situation. It is equivalent to ' ||
' an exception in the Java language.' ||
' The value of this data type is the original byte ' ||
' array of the data type in the DICOM object.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' The dataset type maps the DICOM concept dataset ' ||
' into an XML schema type(See the DICOM standard P3-5) .' ||
' A dataset may contain any number of DICOM attributes.' ||
' Each type of attribute has a name that reflects' ||
' the DICOM value representation of the attribute.' ||
' Each attribute is strongly typed, and its type matches its DICOM' ||
' VR. Note that DICOM attribute type SQ (sequence) may ' ||
' recursively contain items that are also of the dataset type.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Attribute value type (ATTR_VALUE_T) maps to a single DICOM' ||
' attribute value. Each type of attribute has a name that reflects' ||
' the DICOM value representation of the attribute.' ||
' Each attribute is strongly typed, and its type matches its DICOM' ||
' VR. Certain DICOM configuration files, such as constraint ' ||
' documents, use ATTR_VALUE_T.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Attribute group type (ATTR_GRP_T) is used by all DICOM attribute ' ||
' definitions. It defines XML attributes that are used by all DICOM' ||
' attribute types.' ||
' The "tag" attribute defines DICOM attributes in little-endian encoding.' ||
' The "definer" attribute specifies the organization that has' ||
' created the attribute. By default, all DICOM standard ' ||
' attributes have the definer name "DICOM".' ||
' The "name" attribute specifies the canonical attribute name' ||
' as defined by the data dictionary. For example, in ' ||
' an XML metadata schema definition, you can choose a tag' ||
' PATIENT_DATE_OF_BIRTH or "DOB" for DICOM attribute ' ||
' (0010,0030), but its name attribute should match that of the' ||
' DICOM standard: "Patient''s Birth Date".' ||
' The "number" attribute is an optional attribute to indicate the' ||
' ordering of a multivalued attributes. Number counts from 1 up.' ||
' The "truncated" attribute takes a Boolean value. If it is true,' ||
' it indicates that the original length of the DICOM attribute' ||
' exceeds the maximum length allowed for this XML value;therefore,' ||
' it is truncated in XML. When this attribute is true, ' ||
' xsi:nill="true" for this attribute.' ||
' Optionally, the "rawValue" attribute can be used to store ' ||
' values that do not conform to the DICOM standard. The ' ||
' associated attribute "byteOrderLE" specifies the byte order' ||
' of the byte stream for the "rawValue" attribute.' ||
' "offset" and "length" are Oracle-reserved attributes.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ;
sys.dbms_lob.write(ordClob, length(ordSchema), 1, ordSchema);
ordSchema :=
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' This attribute is useful for representing attributes whose' ||
' VR types are not supported natively by Oracle.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' This attribute type is useful for representing attributes that' ||
' are present in a DICOM object, but whose definition cannot' ||
' be found in the data dictionary. Such' ||
' attributes cannot be parsed or interpreted.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Each time the XML configuration document is modified, ' ||
' a new element, DOCUMENT_CHANGE_LOG, is ' ||
' added to the DOCUMENT_HEADER.' ||
' The change log describes who made what type of change to the ' ||
' XML document on which date. It also describes what DICOM' ||
' standard document the modification is based upon, either' ||
' a DICOM change proposal (CP) or a DICOM supplement. ' ||
' ' ||
' DOCUMENT_MODIFIER identifies the modifier of the present ' ||
' XML document. If it is generated by software, specify the name ' ||
' and version of the software.' ||
' DOCUMENT_MODIFICATION_DATE specifies the date when' ||
' this XML document is modified.' ||
' DOCUMENT_VERSION specifies the version of the document after ' ||
' the modification.' ||
' MODIFICATION_COMMENT briefly describes the modification.' ||
' BASE_DOCUMENT describes the document or DICOM standard' ||
' that the modification is based upon.' ||
' BASE_DOCUMENT_RELEASE_DATE specifies the release date of ' ||
' the base document.' ||
' BASE_DOCUMENT_DESCRIPTION briefly describes the base' ||
' document.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Attribute definer is identified by its name and UID. ' ||
' In Oracle''s implementation, the DICOM standard is given the' ||
' definer name "DICOM" and the UID "1.2.840.10008.1". ' ||
' All DICOM standard attributes are given the definer name "DICOM".' ||
' Users can introduce private attributes of their own and encode them' ||
' in an XML document. These private attributes are identified' ||
' with the definer''s name and UID. Oracle recommends that all DICOM ' ||
' private attributes be associated with a UID-qualified name.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' The attribute tag type differs from DICOM VR ' ||
' type AT in that it allows the wildcard character ''x''.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' The attribute range type defines a range of DICOM attributes. ' ||
' This data type is used in private attribute definitions.' ||
' Certain private attributes accept a range of attribute tags.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' The DICOM value locator type identifies a particular' ||
' DICOM attribute by "xxxxxxxx(definer)", where ' ||
' "xxxxxxxx" is the attribute tag and "definer" is the' ||
' attribute definer, which can be the DICOM standard' ||
' (DICOM) or other private sources. ' ||
' A locator path can also identify a particular ' ||
' descendent of a container type attribute (SQ).' ||
' The n-th item of a sequence attribute is denoted by' ||
' "xxxxxxxxx(definer)[n]". ' ||
' By default, the definer suffix "(definer)" can be ' ||
' omitted if the attribute is a DICOM standard tag. ' ||
' The index "n" of an item address "[n]" must be a ' ||
' positive integer. The item address suffix can be ' ||
' omitted if the item it pointed to is the first item ' ||
' of a sequence. ' ||
' For example, 00080096.00401101.00080100 is the code ' ||
' that identifies the first referring physician. The ' ||
' above value locator is equivalent to:' ||
' 00080096(DICOM)[1].00401101(DICOM)[1].00080100(DICOM)' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' VALUE_LOCATOR_MACRO_T is similar to the value locator' ||
' type, except that it permits the use of a macro within' ||
' the locator string.' ||
' So, the macro locator string can be:' ||
' ${TAG}(DICOM)[2].00080100' ||
' This string indicates the code value (0008,0100) of the second ' ||
' item of a sequence attribute identified by ${TAG}.' ||
' The macro parameter TAG can be replaced by a ' ||
' compatible attribute tag (code sequence attribute)' ||
' later.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM value multiplicity (VM) specification. ' ||
' This type is used in DICOM dictionary documents. ' ||
' Patterns of valid specifications are:' ||
' "k", "k-j", "k-n", "n", "k-kn".' ||
' In these patterns, k and j are integers, k is less ' ||
' than j, and n is the letter n.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM value representation types.' ||
' In the DICOM standard, VR for certain attributes ' ||
' is defined as "other word or byte", "US or SS", or' ||
' "See Note". Oracle has extended the list of VR types and ' ||
' introduced OWB (for "other word or byte"), ' ||
' USS (for "US or SS"), and ' ||
' EXP (where VR definition does not apply).' ||
' When an attribute of USS type is encoded into XML, it is' ||
' automatically encoded as a signed short type.' ||
' When an attribute of OWB type is encoded into XML, it is' ||
' automatically encoded into other word type.' ||
' An example of an attribute with VR type of EXP is' ||
' the sequence item (FFFE, E000).' ||
' For compatibility with future DICOM releases, if a new ' ||
' DICOM VR is introduced by the DICOM standard, ' ||
' users can mark such attributes as type "EXT??", ' ||
' where "??" should be replaced by the new VR name.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'';
sys.dbms_lob.writeAppend(ordClob, length(ordSchema), ordSchema);
xdb.dbms_xmlschema.registerSchema
(schemaURL=>'http://xmlns.oracle.com/ord/dicom/rpdatatype_1_0',
schemaDoc=>ordClob,
local=>FALSE,
genTypes=>TRUE,
genBean=>FALSE,
genTables=>FALSE,
force=>FALSE,
owner=>'ORDSYS'
);
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
-- ignore duplicate registration
exception
when ex then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
when others then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
raise;
end;
/
-- Register ordcmrdt.xsd with XDB under http://xmlns.oracle.com/ord/dicom/datatype_1_0
declare
ordSchema varchar2(32767);
ordClob clob := null;
ex exception;
pragma exception_init( ex, -31085 );
begin
sys.dbms_lob.createTemporary( ordClob, true, sys.dbms_lob.call );
ordSchema :=
'' ||
'' ||
'' ||
'' ||
' ' ||
' ' ||
' Introduction' ||
' This schema defines the DICOM standard data types that are used ' ||
' by all other DICOM XML schema definitions.' ||
' ' ||
' Naming conventions:' ||
' All DICOM value representation (VR) types are named with a ' ||
' 2-character string, such as "AE" and "CS".' ||
' All DICOM attribute type definitions are named as VR_ATTR_T, ' ||
' where VR is replaced by the attribute''s 2-character VR.' ||
' ' ||
' Note that each item of a sequence type (SQ) is of DATASET_T type.' ||
' The DATASET_T type can recursively contain more attributes.' ||
' The element name of an attribute is its value representation (VR)' ||
' name. Oracle uses value representation names defined' ||
' by the DICOM standard part 5. The element' ||
' name to VR mappings are:' ||
' APPLICATION_ENTITY --- AE' ||
' AGE_STRING --- AS' ||
' ATTRIBUTE_TAG --- AT' ||
' CODE_STRING --- CS' ||
' DATE --- DA' ||
' DECIMAL_STRING --- DS' ||
' FLOAT_SINGLE --- FL' ||
' FLOAT_DOUBLE --- FD' ||
' INTEGER_STRING --- IS' ||
' LONG_STRING --- LO' ||
' LONG_TEXT --- LT' ||
' OTHER_BYTE --- OB' ||
' OTHER_FLOAT --- OF' ||
' OTHER_WORD --- OW' ||
' OTHER_WORD --- OWB' ||
' PERSON_NAME --- PN' ||
' SHORT_STRING --- SH' ||
' SIGNED_LONG --- SL' ||
' SEQUENCE --- SQ' ||
' SIGNED_SHORT --- SS' ||
' SHORT_TEXT --- ST' ||
' TIME --- TM' ||
' UNIQUE_ID --- UI' ||
' UNSIGNED_LONG --- UL' ||
' UNKNOWN --- UN' ||
' UNSIGNED_SHORT --- US' ||
' SIGNED_SHORT --- USS' ||
' UNLIMITED_TEXT --- UT' ||
' EXTENDED_TYPE --- EXT' ||
' EXCEPTION_TYPE --- EXP' ||
' The VR types "OWB'', "EXT", "EXP" and "USS" are ' ||
' Oracle-defined extensions.' ||
' Please refer to the individual data type documentation for ' ||
' more explanation.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM Value representation Application Entity' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM Value representation Age String. ' ||
' The age string can be expressed either in DICOM string ' ||
' format, or in number of days. When metadata is extracted ' ||
' from a DICOM object, both elements will be populated.' ||
' XML documents can represent age by either format. ' ||
' Age in number of days is converted into an age string when ' ||
' XML metadata is encoded into a DICOM object.' ||
' To convert from age string into the number of days: ' ||
' 365 * number_of_year or 31 * number_of_month. ' ||
' Because AGE_STRING is mandatory, it is not necessary to ' ||
' convert from the number of days into an age string. ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Attribute Tag. An attribute tag is expressed as two ' ||
' big-endian 2-byte hexadecimal number (group number followed by ' ||
' element number with no separator).' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Code String' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type DAte' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Decimal String' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Data Time' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type FLoating-point single' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Floating-point Double' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Integer String' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type LOng string' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Long Text' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Other Byte' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' VR type Other Float ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Other Word in base64binary encoding.' ||
' The mandatory attribute endian specifies the byte ' ||
' order of the binary value.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Person Name. Person Name can be' ||
' expressed either in component format or as a single ' ||
' concatentated string. When metadata is extracted from a ' ||
' DICOM object, the person name type is encoded with' ||
' both formats. Users can index and search DICOM ' ||
' metadata with either the component format or the ' ||
' concatenated string format.' ||
' In component format, a name has an optional "type" attribute that' ||
' indicates its encoding type. The value of the "type" attribute ' ||
' can be "unibyte", "ideographic" or "phonetic". A name may ' ||
' have up to five components: "FAMILY", "GIVEN", "MIDDLE",' ||
' "PREFIX", and "SUFFIX".' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type SHort string' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Signed Long' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type SeQuence. ' ||
' Note that item number can be explicitly encoded in XML. ' ||
' Number counts from 1 up.' ||
' Each item is a DATASET_T type, which may contain ' ||
' any combination of DICOM attributes.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Signed Short' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Short Text' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type TiMe' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Unique Identifier' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Unsigned Long' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type UNknown.' ||
' This type contains a base64 dump of its binary content. The mandatory' ||
' attribute "endian" specifies the byte order of this encoding.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Unsigned Short' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Unlimited Text' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM Extension type ' ||
' This type does not have direct mapping to any value ' ||
' representation (VR) types defined in Part 5 of the ' ||
' DICOM standard. ' ||
' It can accommodate future extensions to DICOM VR' ||
' types without modification to the XML schema definitions.' ||
' The VR element specifies the value representation.' ||
' The VALUE element specifies the XML value for the' ||
' corresponding data element. The exact XML schema ' ||
' definition can be introduced in the future.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM Exception type.' ||
' This type does not have direct mapping to any value ' ||
' representation (VR) types defined in Part 5 of the ' ||
' DICOM standard. ' ||
' It indicates an error situation. It is equivalent to ' ||
' an exception in the Java language.' ||
' The value of this data type is the original byte ' ||
' array of the data type in the DICOM object.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' The dataset type maps the DICOM concept dataset ' ||
' into an XML schema type(See the DICOM standard P3-5) .' ||
' A dataset may contain any number of DICOM attributes.' ||
' Each type of attribute has a name that reflects' ||
' the DICOM value representation of the attribute.' ||
' Each attribute is strongly typed, and its type matches its DICOM' ||
' VR. Note that DICOM attribute type SQ (sequence) may ' ||
' recursively contain items that are also of the dataset type.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Attribute value type (ATTR_VALUE_T) maps to a single DICOM' ||
' attribute value. Each type of attribute has a name that reflects' ||
' the DICOM value representation of the attribute.' ||
' Each attribute is strongly typed, and its type matches its DICOM' ||
' VR. Certain DICOM configuration files, such as constraint ' ||
' documents, use ATTR_VALUE_T.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Attribute group type (ATTR_GRP_T) is used by all DICOM attribute ' ||
' definitions. It defines XML attributes that are used by all DICOM' ||
' attribute types.' ||
' The "tag" attribute defines DICOM attributes in little-endian encoding.' ||
' The "definer" attribute specifies the organization that has' ||
' created the attribute. By default, all DICOM standard ' ||
' attributes have the definer name "DICOM".' ||
' The "name" attribute specifies the canonical attribute name' ||
' as defined by the data dictionary. For example, in ' ||
' an XML metadata schema definition, you can choose a tag' ||
' PATIENT_DATE_OF_BIRTH or "DOB" for DICOM attribute ' ||
' (0010,0030), but its name attribute should match that of the' ||
' DICOM standard: "Patient''s Birth Date".' ||
' The "number" attribute is an optional attribute to indicate the' ||
' ordering of a multivalued attributes. Number counts from 1 up.' ||
' The "truncated" attribute takes a Boolean value. If it is true,' ||
' it indicates that the original length of the DICOM attribute' ||
' exceeds the maximum length allowed for this XML value;therefore,' ||
' it is truncated in XML. When this attribute is true, ' ||
' xsi:nill="true" for this attribute.' ||
' Optionally, the "rawValue" attribute can be used to store ' ||
' values that do not conform to the DICOM standard. The ' ||
' associated attribute "byteOrderLE" specifies the byte order' ||
' of the byte stream for the "rawValue" attribute.' ||
' "offset" and "length" are Oracle-reserved attributes.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ;
sys.dbms_lob.write(ordClob, length(ordSchema), 1, ordSchema);
ordSchema :=
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' This attribute is useful for representing attributes whose' ||
' VR types are not supported natively by Oracle.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' This attribute type is useful for representing attributes that' ||
' are present in a DICOM object, but whose definition cannot' ||
' be found in the data dictionary. Such' ||
' attributes cannot be parsed or interpreted.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Each time the XML configuration document is modified, ' ||
' a new element, DOCUMENT_CHANGE_LOG, is ' ||
' added to the DOCUMENT_HEADER.' ||
' The change log describes who made what type of change to the ' ||
' XML document on which date. It also describes what DICOM' ||
' standard document the modification is based upon, either' ||
' a DICOM change proposal (CP) or a DICOM supplement. ' ||
' ' ||
' DOCUMENT_MODIFIER identifies the modifier of the present ' ||
' XML document. If it is generated by software, specify the name ' ||
' and version of the software.' ||
' DOCUMENT_MODIFICATION_DATE specifies the date when' ||
' this XML document is modified.' ||
' DOCUMENT_VERSION specifies the version of the document after ' ||
' the modification.' ||
' MODIFICATION_COMMENT briefly describes the modification.' ||
' BASE_DOCUMENT describes the document or DICOM standard' ||
' that the modification is based upon.' ||
' BASE_DOCUMENT_RELEASE_DATE specifies the release date of ' ||
' the base document.' ||
' BASE_DOCUMENT_DESCRIPTION briefly describes the base' ||
' document.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Attribute definer is identified by its name and UID. ' ||
' In Oracle''s implementation, the DICOM standard is given the' ||
' definer name "DICOM" and the UID "1.2.840.10008.1". ' ||
' All DICOM standard attributes are given the definer name "DICOM".' ||
' Users can introduce private attributes of their own and encode them' ||
' in an XML document. These private attributes are identified' ||
' with the definer''s name and UID. Oracle recommends that all DICOM ' ||
' private attributes be associated with a UID-qualified name.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' The attribute tag type differs from DICOM VR ' ||
' type AT in that it allows the wildcard character ''x''.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' The attribute range type defines a range of DICOM attributes. ' ||
' This data type is used in private attribute definitions.' ||
' Certain private attributes accept a range of attribute tags.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' The DICOM value locator type identifies a particular' ||
' DICOM attribute by "xxxxxxxx(definer)", where ' ||
' "xxxxxxxx" is the attribute tag and "definer" is the' ||
' attribute definer, which can be the DICOM standard' ||
' (DICOM) or other private sources. ' ||
' A locator path can also identify a particular ' ||
' descendent of a container type attribute (SQ).' ||
' The n-th item of a sequence attribute is denoted by' ||
' "xxxxxxxxx(definer)[n]". ' ||
' By default, the definer suffix "(definer)" can be ' ||
' omitted if the attribute is a DICOM standard tag. ' ||
' The index "n" of an item address "[n]" must be a ' ||
' positive integer. The item address suffix can be ' ||
' omitted if the item it pointed to is the first item ' ||
' of a sequence. ' ||
' For example, 00080096.00401101.00080100 is the code ' ||
' that identifies the first referring physician. The ' ||
' above value locator is equivalent to:' ||
' 00080096(DICOM)[1].00401101(DICOM)[1].00080100(DICOM)' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' VALUE_LOCATOR_MACRO_T is similar to the value locator' ||
' type, except that it permits the use of a macro within' ||
' the locator string.' ||
' So, the macro locator string can be:' ||
' ${TAG}(DICOM)[2].00080100' ||
' This string indicates the code value (0008,0100) of the second ' ||
' item of a sequence attribute identified by ${TAG}.' ||
' The macro parameter TAG can be replaced by a ' ||
' compatible attribute tag (code sequence attribute)' ||
' later.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM value multiplicity (VM) specification. ' ||
' This type is used in DICOM dictionary documents. ' ||
' Patterns of valid specifications are:' ||
' "k", "k-j", "k-n", "n", "k-kn".' ||
' In these patterns, k and j are integers, k is less ' ||
' than j, and n is the letter n.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM value representation types.' ||
' In the DICOM standard, VR for certain attributes ' ||
' is defined as "other word or byte", "US or SS", or' ||
' "See Note". Oracle has extended the list of VR types and ' ||
' introduced OWB (for "other word or byte"), ' ||
' USS (for "US or SS"), and ' ||
' EXP (where VR definition does not apply).' ||
' When an attribute of USS type is encoded into XML, it is' ||
' automatically encoded as a signed short type.' ||
' When an attribute of OWB type is encoded into XML, it is' ||
' automatically encoded into other word type.' ||
' An example of an attribute with VR type of EXP is' ||
' the sequence item (FFFE, E000).' ||
' For compatibility with future DICOM releases, if a new ' ||
' DICOM VR is introduced by the DICOM standard, ' ||
' users can mark such attributes as type "EXT??", ' ||
' where "??" should be replaced by the new VR name.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'';
sys.dbms_lob.writeAppend(ordClob, length(ordSchema), ordSchema);
xdb.dbms_xmlschema.registerSchema
(schemaURL=>'http://xmlns.oracle.com/ord/dicom/datatype_1_0',
schemaDoc=>ordClob,
local=>FALSE,
genTypes=>TRUE,
genBean=>FALSE,
genTables=>FALSE,
force=>FALSE,
owner=>'ORDSYS'
);
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
-- ignore duplicate registration
exception
when ex then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
when others then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
raise;
end;
/
-- Register ordcmmddt.xsd with XDB under http://xmlns.oracle.com/ord/dicom/mddatatype_1_0
declare
ordSchema varchar2(32767);
ordClob clob := null;
ex exception;
pragma exception_init( ex, -31085 );
begin
sys.dbms_lob.createTemporary( ordClob, true, sys.dbms_lob.call );
ordSchema :=
'' ||
'' ||
'' ||
'' ||
' ' ||
' ' ||
' Introduction' ||
' This schema defines the data types that are used ' ||
' by DICOM metadata schemas.' ||
' ' ||
' Naming conventions:' ||
' All DICOM value representation (VR) types are named with a ' ||
' 2-character string, such as "AE" and "CS".' ||
' All DICOM attribute type definitions are named as VR_ATTR_T, ' ||
' where VR is replaced by the attribute''s 2-character VR.' ||
' ' ||
' Note that each item of a sequence type (SQ) is of DATASET_T type.' ||
' The DATASET_T type can recursively contain more attributes.' ||
' The element name of an attribute is its value representation (VR)' ||
' name. Oracle uses value representation names defined' ||
' by the DICOM standard part 5. The element' ||
' name to VR mappings are:' ||
' APPLICATION_ENTITY --- AE' ||
' AGE_STRING --- AS' ||
' ATTRIBUTE_TAG --- AT' ||
' CODE_STRING --- CS' ||
' DATE --- DA' ||
' DECIMAL_STRING --- DS' ||
' FLOAT_SINGLE --- FL' ||
' FLOAT_DOUBLE --- FD' ||
' INTEGER_STRING --- IS' ||
' LONG_STRING --- LO' ||
' LONG_TEXT --- LT' ||
' OTHER_BYTE --- OB' ||
' OTHER_FLOAT --- OF' ||
' OTHER_WORD --- OW' ||
' OTHER_WORD --- OWB' ||
' PERSON_NAME --- PN' ||
' SHORT_STRING --- SH' ||
' SIGNED_LONG --- SL' ||
' SEQUENCE --- SQ' ||
' SIGNED_SHORT --- SS' ||
' SHORT_TEXT --- ST' ||
' TIME --- TM' ||
' UNIQUE_ID --- UI' ||
' UNSIGNED_LONG --- UL' ||
' UNKNOWN --- UN' ||
' UNSIGNED_SHORT --- US' ||
' SIGNED_SHORT --- USS' ||
' UNLIMITED_TEXT --- UT' ||
' EXTENDED_TYPE --- EXT' ||
' EXCEPTION_TYPE --- EXP' ||
' The VR types "OWB'', "EXT", "EXP" and "USS" are ' ||
' Oracle-defined extensions.' ||
' Please refer to the individual data type documentation for ' ||
' more explanation.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM Value representation Application Entity' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM Value representation Age String. ' ||
' The age string can be expressed either in DICOM string ' ||
' format, or in number of days. When metadata is extracted ' ||
' from a DICOM object, both elements will be populated.' ||
' XML documents can represent age by either format. ' ||
' Age in number of days is converted into an age string when ' ||
' XML metadata is encoded into a DICOM object.' ||
' To convert from age string into the number of days: ' ||
' 365 * number_of_year or 31 * number_of_month. ' ||
' Because AGE_STRING is mandatory, it is not necessary to ' ||
' convert from the number of days into an age string. ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Attribute Tag. An attribute tag is expressed as two ' ||
' big-endian 2-byte hexadecimal number (group number followed by ' ||
' element number with no separator).' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Code String' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type DAte' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Decimal String' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Data Time' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type FLoating-point single' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Floating-point Double' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Integer String' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type LOng string' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Long Text' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Other Byte' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' VR type Other Float ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Other Word in base64binary encoding.' ||
' The mandatory attribute endian specifies the byte ' ||
' order of the binary value.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Person Name. Person Name can be' ||
' expressed either in component format or as a single ' ||
' concatentated string. When metadata is extracted from a ' ||
' DICOM object, the person name type is encoded with' ||
' both formats. Users can index and search DICOM ' ||
' metadata with either the component format or the ' ||
' concatenated string format.' ||
' In component format, a name has an optional "type" attribute that' ||
' indicates its encoding type. The value of the "type" attribute ' ||
' can be "unibyte", "ideographic" or "phonetic". A name may ' ||
' have up to five components: "FAMILY", "GIVEN", "MIDDLE",' ||
' "PREFIX", and "SUFFIX".' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type SHort string' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Signed Long' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type SeQuence. ' ||
' Note that item number can be explicitly encoded in XML. ' ||
' Number counts from 1 up.' ||
' Each item is a DATASET_T type, which may contain ' ||
' any combination of DICOM attributes.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Signed Short' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Short Text' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type TiMe' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Unique Identifier' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Unsigned Long' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type UNknown.' ||
' This type contains a base64 dump of its binary content. The mandatory' ||
' attribute "endian" specifies the byte order of this encoding.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Unsigned Short' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM VR type Unlimited Text' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM Extension type ' ||
' This type does not have direct mapping to any value ' ||
' representation (VR) types defined in Part 5 of the ' ||
' DICOM standard. ' ||
' It can accommodate future extensions to DICOM VR' ||
' types without modification to the XML schema definitions.' ||
' The VR element specifies the value representation.' ||
' The VALUE element specifies the XML value for the' ||
' corresponding data element. The exact XML schema ' ||
' definition can be introduced in the future.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM Exception type.' ||
' This type does not have direct mapping to any value ' ||
' representation (VR) types defined in Part 5 of the ' ||
' DICOM standard. ' ||
' It indicates an error situation. It is equivalent to ' ||
' an exception in the Java language.' ||
' The value of this data type is the original byte ' ||
' array of the data type in the DICOM object.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' The dataset type maps the DICOM concept dataset ' ||
' into an XML schema type(See the DICOM standard P3-5) .' ||
' A dataset may contain any number of DICOM attributes.' ||
' Each type of attribute has a name that reflects' ||
' the DICOM value representation of the attribute.' ||
' Each attribute is strongly typed, and its type matches its DICOM' ||
' VR. Note that DICOM attribute type SQ (sequence) may ' ||
' recursively contain items that are also of the dataset type.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Attribute value type (ATTR_VALUE_T) maps to a single DICOM' ||
' attribute value. Each type of attribute has a name that reflects' ||
' the DICOM value representation of the attribute.' ||
' Each attribute is strongly typed, and its type matches its DICOM' ||
' VR. Certain DICOM configuration files, such as constraint ' ||
' documents, use ATTR_VALUE_T.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Attribute group type (ATTR_GRP_T) is used by all DICOM attribute ' ||
' definitions. It defines XML attributes that are used by all DICOM' ||
' attribute types.' ||
' The "tag" attribute defines DICOM attributes in little-endian encoding.' ||
' The "definer" attribute specifies the organization that has' ||
' created the attribute. By default, all DICOM standard ' ||
' attributes have the definer name "DICOM".' ||
' The "name" attribute specifies the canonical attribute name' ||
' as defined by the data dictionary. For example, in ' ||
' an XML metadata schema definition, you can choose a tag' ||
' PATIENT_DATE_OF_BIRTH or "DOB" for DICOM attribute ' ||
' (0010,0030), but its name attribute should match that of the' ||
' DICOM standard: "Patient''s Birth Date".' ||
' The "number" attribute is an optional attribute to indicate the' ||
' ordering of a multivalued attributes. Number counts from 1 up.' ||
' The "truncated" attribute takes a Boolean value. If it is true,' ||
' it indicates that the original length of the DICOM attribute' ||
' exceeds the maximum length allowed for this XML value;therefore,' ||
' it is truncated in XML. When this attribute is true, ' ||
' xsi:nill="true" for this attribute.' ||
' Optionally, the "rawValue" attribute can be used to store ' ||
' values that do not conform to the DICOM standard. The ' ||
' associated attribute "byteOrderLE" specifies the byte order' ||
' of the byte stream for the "rawValue" attribute.' ||
' "offset" and "length" are Oracle-reserved attributes.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ;
sys.dbms_lob.write(ordClob, length(ordSchema), 1, ordSchema);
ordSchema :=
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' This attribute is useful for representing attributes whose' ||
' VR types are not supported natively by Oracle.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' This attribute type is useful for representing attributes that' ||
' are present in a DICOM object, but whose definition cannot' ||
' be found in the data dictionary. Such' ||
' attributes cannot be parsed or interpreted.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Each time the XML configuration document is modified, ' ||
' a new element, DOCUMENT_CHANGE_LOG, is ' ||
' added to the DOCUMENT_HEADER.' ||
' The change log describes who made what type of change to the ' ||
' XML document on which date. It also describes what DICOM' ||
' standard document the modification is based upon, either' ||
' a DICOM change proposal (CP) or a DICOM supplement. ' ||
' ' ||
' DOCUMENT_MODIFIER identifies the modifier of the present ' ||
' XML document. If it is generated by software, specify the name ' ||
' and version of the software.' ||
' DOCUMENT_MODIFICATION_DATE specifies the date when' ||
' this XML document is modified.' ||
' DOCUMENT_VERSION specifies the version of the document after ' ||
' the modification.' ||
' MODIFICATION_COMMENT briefly describes the modification.' ||
' BASE_DOCUMENT describes the document or DICOM standard' ||
' that the modification is based upon.' ||
' BASE_DOCUMENT_RELEASE_DATE specifies the release date of ' ||
' the base document.' ||
' BASE_DOCUMENT_DESCRIPTION briefly describes the base' ||
' document.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Attribute definer is identified by its name and UID. ' ||
' In Oracle''s implementation, the DICOM standard is given the' ||
' definer name "DICOM" and the UID "1.2.840.10008.1". ' ||
' All DICOM standard attributes are given the definer name "DICOM".' ||
' Users can introduce private attributes of their own and encode them' ||
' in an XML document. These private attributes are identified' ||
' with the definer''s name and UID. Oracle recommends that all DICOM ' ||
' private attributes be associated with a UID-qualified name.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' The attribute tag type differs from DICOM VR ' ||
' type AT in that it allows the wildcard character ''x''.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' The attribute range type defines a range of DICOM attributes. ' ||
' This data type is used in private attribute definitions.' ||
' Certain private attributes accept a range of attribute tags.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' The DICOM value locator type identifies a particular' ||
' DICOM attribute by "xxxxxxxx(definer)", where ' ||
' "xxxxxxxx" is the attribute tag and "definer" is the' ||
' attribute definer, which can be the DICOM standard' ||
' (DICOM) or other private sources. ' ||
' A locator path can also identify a particular ' ||
' descendent of a container type attribute (SQ).' ||
' The n-th item of a sequence attribute is denoted by' ||
' "xxxxxxxxx(definer)[n]". ' ||
' By default, the definer suffix "(definer)" can be ' ||
' omitted if the attribute is a DICOM standard tag. ' ||
' The index "n" of an item address "[n]" must be a ' ||
' positive integer. The item address suffix can be ' ||
' omitted if the item it pointed to is the first item ' ||
' of a sequence. ' ||
' For example, 00080096.00401101.00080100 is the code ' ||
' that identifies the first referring physician. The ' ||
' above value locator is equivalent to:' ||
' 00080096(DICOM)[1].00401101(DICOM)[1].00080100(DICOM)' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' VALUE_LOCATOR_MACRO_T is similar to the value locator' ||
' type, except that it permits the use of a macro within' ||
' the locator string.' ||
' So, the macro locator string can be:' ||
' ${TAG}(DICOM)[2].00080100' ||
' This string indicates the code value (0008,0100) of the second ' ||
' item of a sequence attribute identified by ${TAG}.' ||
' The macro parameter TAG can be replaced by a ' ||
' compatible attribute tag (code sequence attribute)' ||
' later.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM value multiplicity (VM) specification. ' ||
' This type is used in DICOM dictionary documents. ' ||
' Patterns of valid specifications are:' ||
' "k", "k-j", "k-n", "n", "k-kn".' ||
' In these patterns, k and j are integers, k is less ' ||
' than j, and n is the letter n.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' DICOM value representation types.' ||
' In the DICOM standard, VR for certain attributes ' ||
' is defined as "other word or byte", "US or SS", or' ||
' "See Note". Oracle has extended the list of VR types and ' ||
' introduced OWB (for "other word or byte"), ' ||
' USS (for "US or SS"), and ' ||
' EXP (where VR definition does not apply).' ||
' When an attribute of USS type is encoded into XML, it is' ||
' automatically encoded as a signed short type.' ||
' When an attribute of OWB type is encoded into XML, it is' ||
' automatically encoded into other word type.' ||
' An example of an attribute with VR type of EXP is' ||
' the sequence item (FFFE, E000).' ||
' For compatibility with future DICOM releases, if a new ' ||
' DICOM VR is introduced by the DICOM standard, ' ||
' users can mark such attributes as type "EXT??", ' ||
' where "??" should be replaced by the new VR name.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'';
sys.dbms_lob.writeAppend(ordClob, length(ordSchema), ordSchema);
xdb.dbms_xmlschema.registerSchema
(schemaURL=>'http://xmlns.oracle.com/ord/dicom/mddatatype_1_0',
schemaDoc=>ordClob,
local=>FALSE,
genTypes=>TRUE,
genBean=>FALSE,
genTables=>FALSE,
force=>FALSE,
owner=>'ORDSYS'
);
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
-- ignore duplicate registration
exception
when ex then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
when others then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
raise;
end;
/
-- Register ordimage.xsd with XDB under http://xmlns.oracle.com/ord/meta/ordimage
declare
ordSchema varchar2(32767);
ordClob clob := null;
ex exception;
pragma exception_init( ex, -31085 );
begin
sys.dbms_lob.createTemporary( ordClob, true, sys.dbms_lob.call );
ordSchema :=
'' ||
'' ||
'' ||
'' ||
' ' ||
' ' ||
' Change History' ||
' rabbott 2/10/2005 -- Add more comments' ||
' rabbott 6/10/2004 -- Created' ||
'' ||
' Introduction' ||
' Oracle Multimedia schema for ORDSYS.ORDImage attributes' ||
' Elements are optional and can appear in any order.' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
'';
sys.dbms_lob.write(ordClob, length(ordSchema), 1, ordSchema);
xdb.dbms_xmlschema.registerSchema
(schemaURL=>'http://xmlns.oracle.com/ord/meta/ordimage',
schemaDoc=>ordClob,
local=>FALSE,
genTypes=>TRUE,
genBean=>FALSE,
genTables=>FALSE,
force=>FALSE,
owner=>'ORDSYS'
);
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
-- ignore duplicate registration
exception
when ex then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
when others then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
raise;
end;
/
-- Register ordiptc.xsd with XDB under http://xmlns.oracle.com/ord/meta/iptc
declare
ordSchema varchar2(32767);
ordClob clob := null;
ex exception;
pragma exception_init( ex, -31085 );
begin
sys.dbms_lob.createTemporary( ordClob, true, sys.dbms_lob.call );
ordSchema :=
'' ||
'' ||
'' ||
'' ||
' ' ||
' ' ||
' Change History' ||
' rabbott 1/25/2005 -- Add more comments' ||
' rabbott 6/10/2004 -- Created' ||
' ' ||
' Introduction' ||
' This is the Oracle Multimedia schema for metadata stored in Application' ||
' record sets of the IPTC-NAA Information Interchange Model Version 4.' ||
' This metadata is often referred to as ''IPTC'' tags.' ||
'' ||
' For the JPEG file format, IPTC metadata is parsed from the APP13 marker.' ||
' For the TIFF file format, IPTC metadata is parsed from tag 33723.' ||
'' ||
' All tags with string values are decoded using the ISO-8859-1 character' ||
' set. The resulting strings may contain characters that are legal in the' ||
' character set but are illegal in XML documents. Illegal XML characters' ||
' are replaced with the space (0x20) character.' ||
'' ||
' Supported datasets' ||
' The following datasets from the application record are extracted.' ||
' ' ||
' 2:00 recordVersion' ||
' 2:05 objectName' ||
' 2:07 editStatus' ||
' 2:10 urgency' ||
' 2:15 category' ||
' 2:20 supplementalCategory' ||
' 2:22 fixtureIdentifer' ||
' 2:25 keyword' ||
' 2:26 contentLocation:code' ||
' 2:27 contentLocation:name' ||
' 2:40 instructions' ||
' 2:55 dateCreated' ||
' 2:60 timeCreated' ||
' 2:62 digitalCreationDate' ||
' 2:63 digitalCreationTime' ||
' 2:80 byline:author' ||
' 2:85 byline:authorTitle' ||
' 2:90 city' ||
' 2:92 subLocation' ||
' 2:95 provinceState' ||
' 2:100 country' ||
' 2:101 location' ||
' 2:103 transmissionReference' ||
' 2:105 headline' ||
' 2:110 credit' ||
' 2:115 source' ||
' 2:116 copyright' ||
' 2:118 contact' ||
' 2:120 caption' ||
' 2:122 captionWriter' ||
' 2:135 languageId' ||
' ' ||
' Structure' ||
' The schema defines a number of types, both simple and complex,' ||
' to represent some of the IPTC tags. The itpcMetadataType is defined ' ||
' as a sequence of all the supported IPTC tags. This type is used to define' ||
' a single global element that can appear in an instance document.' ||
'' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
'' ||
'';
sys.dbms_lob.write(ordClob, length(ordSchema), 1, ordSchema);
xdb.dbms_xmlschema.registerSchema
(schemaURL=>'http://xmlns.oracle.com/ord/meta/iptc',
schemaDoc=>ordClob,
local=>FALSE,
genTypes=>TRUE,
genBean=>FALSE,
genTables=>FALSE,
force=>FALSE,
owner=>'ORDSYS'
);
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
-- ignore duplicate registration
exception
when ex then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
when others then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
raise;
end;
/
-- Register ordxmp.xsd with XDB under http://xmlns.oracle.com/ord/meta/xmp
declare
ordSchema varchar2(32767);
ordClob clob := null;
ex exception;
pragma exception_init( ex, -31085 );
begin
sys.dbms_lob.createTemporary( ordClob, true, sys.dbms_lob.call );
ordSchema :=
'' ||
'' ||
'' ||
'' ||
' ' ||
' ' ||
' Change History' ||
' rabbott 1/25/2005 -- Add more comments' ||
' rabbott 6/10/2004 -- Created' ||
' ' ||
' Introduction' ||
' This is the Oracle Multimedia schema for metadata embedded in XMP packets.' ||
' The schema provides for a single element from the RDF namespace.' ||
' As defined in the January 2004 version of the XMP specification, ' ||
' this element should be an rdf:RDF element. ' ||
' XMP is defined by Adobe Systems Incorporated. For more information' ||
' about XMP, see the XMP Specification at the Adobe website.' ||
' ' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'';
sys.dbms_lob.write(ordClob, length(ordSchema), 1, ordSchema);
xdb.dbms_xmlschema.registerSchema
(schemaURL=>'http://xmlns.oracle.com/ord/meta/xmp',
schemaDoc=>ordClob,
local=>FALSE,
genTypes=>TRUE,
genBean=>FALSE,
genTables=>FALSE,
force=>FALSE,
owner=>'ORDSYS'
);
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
-- ignore duplicate registration
exception
when ex then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
when others then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
raise;
end;
/
-- Register ordcman.xsd with XDB under http://xmlns.oracle.com/ord/dicom/anonymity_1_0
declare
ordSchema varchar2(32767);
ordClob clob := null;
ex exception;
pragma exception_init( ex, -31085 );
begin
sys.dbms_lob.createTemporary( ordClob, true, sys.dbms_lob.call );
ordSchema :=
'' ||
'' ||
'' ||
'' ||
' ' ||
' ' ||
' ' ||
' Introduction ' ||
' This schema defines the DICOM anonymity document.' ||
' ' ||
' Structure Overview' ||
' Question mark "?" means optional items.' ||
' Plus "+" means one or more items.' ||
' Asterisk "*" means zero or more items.' ||
' ' ||
' ANONYMITY_RULE_DOCUMENT' ||
' DOCUMENT_HEADER?' ||
' DOCUMENT_CHANGE_LOG*' ||
' DOCUMENT_MODIFIER' ||
' DOCUMENT_MODIFICATION_DATE' ||
' DOCUMENT_VERSION?' ||
' MODIFICATION_COMMENT?' ||
' BASE_DOCUMENT?' ||
' BASE_DOCUMENT_RELEASE_DATE?' ||
' BASE_DOCUMENT_DESCRIPTION?' ||
' PRIVATE_ATTRIBUTES' ||
' UNDEFINED_STANDARD_ATTRIBUTES' ||
' UNDEFINED_PRIVATE_ATTRIBUTES' ||
' INDIVIDUAL_ATTRIBUTE*' ||
' ' ||
' The preceding element values specify the actions required to make ' ||
' a DICOM attribute, or a selected group of DICOM attributes, ' ||
' anonymous.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Specify the action required to make all private ' ||
' attributes anonymous.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Specify the action required to make all undefined ' ||
' standard attributes anonymous. Undefined standard ' ||
' attributes are not defined by the standard data dictionaries' ||
' when makeAnonymous or isAnonymous functions are invoked.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Specify the action required to make all undefined private ' ||
' attributes anonymous. Undefined private attributes are ' ||
' not defined by the private data dictionaries when ' ||
' makeAnonymous or isAnonymous functions are invoked. ' ||
' This element takes priority over the previous ' ||
' element PRIVATE_ATTRIBUTES.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Specify the action required to make an attribute anonymous.' ||
' This element overwrites the group specifications' ||
' specified in the preceding elements.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' The anonymity action type has an attribute action, ' ||
' which defines the action used to make an' ||
' attribute anonymous.' ||
' If the value of the action attribute is "none", no' ||
' action will be taken.' ||
' If the value of the action attribute is "remove", then ' ||
' the element does not require a value.(The default value' ||
' of the action attribute is "remove").' ||
' The selected candidate attribute will be removed from ' ||
' the DICOM object to make it anonymous.' ||
' If the value of the action attribute is "replace", then ' ||
' the string value encoded in the attribute will be cast ' ||
' into the corresponding type of the attribute and the' ||
' new value replaces the original.' ||
' If the value of the action attribute is "empty" , then the' ||
' attribute will be changed into zero length attribute (for future' ||
' use only).' ||
' If the value of the action attribute is "encrypt", then the string ' ||
' value encoded in the action attribute will be replaced with an' ||
' encrypted value (for future use only).' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' The anonymity action type for a group attribute is similar to' ||
' ANONYM_T except that it does not allow "replace" action.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'';
sys.dbms_lob.write(ordClob, length(ordSchema), 1, ordSchema);
xdb.dbms_xmlschema.registerSchema
(schemaURL=>'http://xmlns.oracle.com/ord/dicom/anonymity_1_0',
schemaDoc=>ordClob,
local=>FALSE,
genTypes=>TRUE,
genBean=>FALSE,
genTables=>FALSE,
force=>FALSE,
owner=>'ORDSYS'
);
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
-- ignore duplicate registration
exception
when ex then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
when others then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
raise;
end;
/
-- Register ordcmct.xsd with XDB under http://xmlns.oracle.com/ord/dicom/constraint_1_0
declare
ordSchema varchar2(32767);
ordClob clob := null;
ex exception;
pragma exception_init( ex, -31085 );
begin
sys.dbms_lob.createTemporary( ordClob, true, sys.dbms_lob.call );
ordSchema :=
'' ||
'' ||
'' ||
'' ||
' ' ||
' ' ||
' ' ||
'' ||
' Introduction' ||
' This schema defines the DICOM constraint document.' ||
' ' ||
' A DICOM constraint document defines rules ' ||
' to check the conformance of a DICOM content with respect to ' ||
' the DICOM standard and other organization-wide guidelines. ' ||
' This XML schema document defines the XML schema constraining ' ||
' constraint documents.' ||
' ' ||
' A constraint document defines one or more constraint rules. ' ||
' A constraint rule is the unit of invocation for conformance checking.' ||
' At run time, a user may invoke a PL/SQL' ||
' or Java function to check the conformance of a DICOM content' ||
' with respect to a particular rule. Each invocable rule' ||
' is defined as a GLOBAL_RULE, which can reference other global ' ||
' rules internally. ' ||
' A constraint rule can be decomposed into individual predicates. ' ||
' A predicate can be a logical statement, a relational statement ' ||
' comparing values, a function call evaluation that returns a' ||
' Boolean type, or a reference to other predicate definitions. ' ||
' Predicate definitions are recursive. A predicate can be a logical' ||
' statement, which includes the logical OR of two other predicates. ' ||
' Each predicate can be a relational predicate. For example:' ||
' (patientName=="Joe Smith" AND patientSex=="M")' ||
' After being translated into a predicate, the preceding example becomes: ' ||
' ' ||
' An example to find an object that has' ||
' (patientName="Joe Smith" AND patientSex=="M")' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 00100010' ||
' ' ||
' ' ||
' ' ||
' Smith' ||
' Joe' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' 00100040' ||
' ' ||
' M' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Constraint macros can be used to simplify the definition of ' ||
' complex constraint rules. Constraint macros follow the same predicate ' ||
' definition grammar as constraint rules. The operands in ' ||
' constraint macros can be variables rather than fixed values, as they are ' ||
' in constraint rules. The variables in a macro are substituted when the ' ||
' macro is invoked. For example, you can define a macro to compare' ||
' patient names ( patientName == $NAME ). When this macro is invoked,' ||
' the parameter NAME is assigned the value "Joe Smith" and the macro is' ||
' transformed into the predicate:( patientName == "Joe Smith").' ||
' As another example, you can define a macro to check if a DICOM attribute' ||
' is a code sequence attribute. A code sequence attribute must contain the' ||
' mandatory child attributes, code value and code scheme. This macro' ||
' checks whether the specified code sequence attribute contains these' ||
' mandatory child attributes. ' ||
'' ||
'' ||
' ' ||
' ' ||
' A subset of Code Sequence Macro defined in DICOM standard, ' ||
' PS3.3-2007, Table 8.8-1' ||
' ' ||
' ' ||
' CodeAttr' ||
' ' ||
' ' ||
' Code value must not be empty' ||
' ' ||
' ${CodeAttr}.00080100' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Code scheme designator must not be empty' ||
' ' ||
' ' ||
' ${CodeAttr}.00080102' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' You can separate a constraint definition into multiple files. ' ||
' Each file defines one or more constraint rules or macros. ' ||
' A file can import the macros and constraint rules that are ' ||
' defined in a difference file. You must specify the set of ' ||
' external rules or macros before referencing them in a file.' ||
' EXTERNAL_RULE_INCLUDE and EXTERNAL_MACRO_INCLUDE' ||
' statements serve this purpose.' ||
' ' ||
' Structure Overview' ||
' Question mark "?" means optional items.' ||
' Plus "+" means one or more items.' ||
' Asterisk "*" means zero or more items.' ||
'' ||
' ' ||
' CONFORMANCE_CONSTRAINT_DEFINITION' ||
' DOCUMENT_HEADER?' ||
' DOCUMENT_CHANGE_LOG+' ||
' DOCUMENT_MODIFIER' ||
' DOCUMENT_MODIFICATION_DATE' ||
' DOCUMENT_VERSION?' ||
' MODIFICATION_COMMENT?' ||
' BASE_DOCUMENT?' ||
' BASE_DOCUMENT_RELEASE_DATE?' ||
' BASE_DOCUMENT_DESCRIPTION?' ||
' EXTERNAL_MACRO_INCLUDE*' ||
' EXTERNAL_RULE_INCLUDE*' ||
' (GLOBAL_MACRO|GLOBAL_RULE)+' ||
' ' ||
' GLOBAL_RULE (name) | PREDICATE_DEFINITION (name)' ||
' DESCRIPTION?' ||
' PREDICATE_DEFINITION*' ||
' PREDICATE+' ||
' ACTION (when, action)*' ||
' ' ||
' GLOBAL_MACRO (name)' ||
' DESCRIPTION?' ||
' PARAMETER_DECLARATION+' ||
' PREDICATE_DEFINITION*' ||
' PREDICATE+' ||
' ACTION (when, action)*' ||
' ' ||
' PREDICATE' ||
' DESCRIPTION?' ||
' (LOGICAL|RELATIONAL|BOOLEAN_FUNC|INVOKE_MACRO|PREDICATE_REF|GLOBAL_RULE_REF)' ||
' ACTION (when, action)*' ||
' ' ||
' LOGICAL(operator)' ||
' PREDICATE+' ||
'' ||
' RELATIONAL(operator)' ||
' (ATTRIBUTE_TAG|FUNCTION)(ATTRIBUTE_TAG|STRING_VALUE|XML_VALUE|FUNCTION)+' ||
'' ||
' BOOLEAN_FUNC(operator)' ||
' (ATTRIBUTE_TAG|STRING_VALUE|XML_VALUE|FUNCTION)*' ||
'' ||
' INVOKE_MACRO' ||
' MACRO_NAME' ||
' PARAMETER+' ||
' NAME' ||
' VALUE' ||
'' ||
' FUNCTION(operator)' ||
' (ATTRIBUTE_TAG|STRING_VALUE|XML_VALUE|FUNCTION)*' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' A constraint document defines groups of predicates to validate the conformance of a DICOM content or a DICOM metadata document.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' A predicate group is the logical AND ' ||
' of a collection of predicates or predicate groups. ' ||
' Each predicate group has a name that is unique within ' ||
' its parent. Any other predicates can reference' ||
' this predicate group by its name. The value of the reference ' ||
' is the Boolean of the predicate group.' ||
' Optionally, a predicate group can contain a set of ' ||
' predicate definitions. These definitions are not part of the' ||
' logical AND component of the predicate group, but they' ||
' are meant to be referenced within the predicate group.' ||
' A predicate group has an optional action element that' ||
' specifies what action to take when the predicate evaluates to true' ||
' or false.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' A type to specify an action for a predicate value.' ||
' The "when" attribute specifies the predicate value.' ||
' The "action" attribute specifies the type of action.' ||
' When the action type is "log", "warning", or "error",' ||
' the string value of this attribute is returned' ||
' in a log file or as part of warning or error message.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' A derive B ( (NOT A) OR B )' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' gt greater than' ||
' ge greater than or equal to' ||
' lt less than' ||
' le less than or equal to' ||
' eq equal to' ||
' ne not equal to' ||
' in value in the set of' ||
' match attribute value matches pattern' ||
' The second operand must be a Java regular expression ' ||
' pattern as specified by JDK1.5 java.lang.String class ' ||
' documentation. The first operator should be a DICOM ' ||
' attribute tag. The tag should identify an attribute' ||
' that belongs to one of the following value representation ' ||
' types:' ||
' AE, AS, AT, CS, DA, DT, LO, LT, PN,' ||
' SH, ST, TM, UI and UT' ||
' Note that the operands must be compatible with each other ' ||
' when a predicate invokes relational operator. For example, ' ||
' (patientAge > 005M) is a valid predicate. But ' ||
' (patientAge > "Joe Smith") is not a valid predicate, because ' ||
' the operand "Joe Smith" cannot be cast into an instance ' ||
' of the patient age attribute.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' To allow future extensions, the set of allowed operators for Boolean ' ||
' function types are not fixed. Operator names are case-sensitive.' ||
' The current values for this operator ' ||
' are: "notEmpty", "occurs", "true", and "false". ' ||
' "occurs" takes a single operand ATTRIBUTE_TAG, ' ||
' and returns true if an attribute matching the tag exists. (The ' ||
' attribute value can be an empty string or null. For example, ' ||
' a DICOM type 2 attribute may be empty.); Otherwise, it returns' ||
' false.' ||
' "notEmpty" takes a single operand ATTRIBUTE_TAG. ' ||
' It returns true if an attribute matching the tag exists in ' ||
' a DICOM content and has a non-null value (e.g. a DICOM type 1 ' ||
' attribute); otherwise, it returns false.' ||
' "true" takes no operand and it always returns true.' ||
' "false" takes no operand and it always returns false.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' To allow future extensions, the set of allowed operators for ' ||
' function types are not fixed. Operator names are case-sensitive.' ||
' This feature is not supported for Oracle Database 11g Release 1.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'';
sys.dbms_lob.write(ordClob, length(ordSchema), 1, ordSchema);
xdb.dbms_xmlschema.registerSchema
(schemaURL=>'http://xmlns.oracle.com/ord/dicom/constraint_1_0',
schemaDoc=>ordClob,
local=>FALSE,
genTypes=>TRUE,
genBean=>FALSE,
genTables=>FALSE,
force=>FALSE,
owner=>'ORDSYS'
);
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
-- ignore duplicate registration
exception
when ex then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
when others then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
raise;
end;
/
-- Register ordcmmd.xsd with XDB under http://xmlns.oracle.com/ord/dicom/metadata_1_0
declare
ordSchema varchar2(32767);
ordClob clob := null;
ex exception;
pragma exception_init( ex, -31085 );
begin
sys.dbms_lob.createTemporary( ordClob, true, sys.dbms_lob.call );
ordSchema :=
'' ||
'' ||
'' ||
'' ||
' ' ||
' ' ||
' ' ||
' Introduction' ||
' This schema defines the default DICOM metadata schema used' ||
' by the ORDDicom object attribute (XMLType metadata).' ||
' ' ||
' ' ||
' ' ||
'';
sys.dbms_lob.write(ordClob, length(ordSchema), 1, ordSchema);
xdb.dbms_xmlschema.registerSchema
(schemaURL=>'http://xmlns.oracle.com/ord/dicom/metadata_1_0',
schemaDoc=>ordClob,
local=>FALSE,
genTypes=>TRUE,
genBean=>FALSE,
genTables=>FALSE,
force=>FALSE,
owner=>'ORDSYS'
);
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
-- ignore duplicate registration
exception
when ex then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
when others then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
raise;
end;
/
-- Register ordcmmp.xsd with XDB under http://xmlns.oracle.com/ord/dicom/mapping_1_0
declare
ordSchema varchar2(32767);
ordClob clob := null;
ex exception;
pragma exception_init( ex, -31085 );
begin
sys.dbms_lob.createTemporary( ordClob, true, sys.dbms_lob.call );
ordSchema :=
'' ||
'' ||
'' ||
'' ||
' ' ||
' ' ||
' ' ||
' This schema defines the DICOM (XML) mapping document.' ||
' It defines how each DICOM attribute maps to an element of the ' ||
' DICOM metadata document.' ||
' ' ||
' The mapping document is used by the metadata encoder to produce ' ||
' a DICOM metadata document. Each DICOM attribute is identified by ' ||
' a 4-byte hexadecimal attribute tag. Each DICOM attribute is mapped ' ||
' to an element of the XML metadata document designated by the PATH ' ||
' element. By default, a DICOM attribute can be null and is optional.' ||
' ' ||
' XML_MAPPING_DOCUMENT' ||
' Question mark "?" means optional items.' ||
' Plus "+" means one or more items.' ||
' Asterisk "*" means zero or more items.' ||
'' ||
' DOCUMENT_HEADER?' ||
' DOCUMENT_CHANGE_LOG*' ||
' DOCUMENT_MODIFIER' ||
' DOCUMENT_MODIFICATION_DATE' ||
' DOCUMENT_VERSION?' ||
' MODIFICATION_COMMENT?' ||
' BASE_DOCUMENT?' ||
' BASE_DOCUMENT_RELEASE_DATE?' ||
' BASE_DOCUMENT_DESCRIPTION?' ||
' NAMESPACE?' ||
' ROOT_ELEM_TAG' ||
' UNMAPPED_ELEM' ||
' MAPPED_ELEM' ||
' MAPPED_PATH+ (occurs?, notEmpty?, writeTag?, writeDefiner?, writeName?, writeRawValue)' ||
' {ATTRIBUTE_TAG(definer), PATH}+' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' The namespace of the XML metadata schema on which a mapping ' ||
' document is based. Metadata from a DICOM object can be' ||
' mapped into an XML document constrained by this XML' ||
' metadata schema. If the value of this element is an empty string,' ||
' the extracted XML metadata document is not ' ||
' associated with an XML schema.' ||
' The order of the MAPPED_PATH elements' ||
' MUST match the sequence of the corresponding XML ' ||
' elements in this namespace. ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' This element specifies the root element tag of ' ||
' an XML metadata document.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' This element specifies the XML path (appended to ' ||
' ROOT_ELEM_TAG) for unmapped attributes, that is, the set' ||
' of DICOM attributes that are present in a DICOM object, ' ||
' but whose mappings have not been defined by the' ||
' MAPPED_PATH elements of an XML mapping document.' ||
' This element is optional. If this element is omitted or empty, ' ||
' the unmapped attributes are appended to ROOT_ELEM_TAG. ' ||
' If an XML schema is used to constrain the metadata document,' ||
' the XML schema element pointed to by this element should' ||
' be of type dt:DATASET_T. See the DICOM data type definition' ||
' schema "http://xmlns.oracle.com/ord/dicom/datatype_1_0"' ||
' and dt:DATASET_T for more information.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' This element specifies the XML path for all mapped ' ||
' attributes, that is, the set of DICOM attributes that are ' ||
' present in a DICOM object, and whose mappings' ||
' are defined by the MAPPED_XPATH elements ' ||
' of an XML mapping document. This element' ||
' specifies a relative path from ROOT_ELEM_TAG.' ||
' For example, to map a DICOM attribute (0010,0010) to' ||
' the XML element at "/DICOM_METADATA/PATIENT/NAME",' ||
' specify the following ' ||
' The ROOT_ELEM_TAG element value is "DICOM_METADATA".' ||
' The MAPPED_ELEM element value is "PATIENT" and ' ||
' The MAPPED_PATH/PATH element value should be "NAME".' ||
' Alternatively, ' ||
' if the value of element MAPPED_ELEM is an empty string,' ||
' then the value of the element MAPPED_PATH/PATH' ||
' should be "PATIENT/NAME".' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' A MAPPED_PATH element contains attribute tag and' ||
' path pairs.' ||
' An attribute tag uniquely identifies an attribute within the' ||
' data dictionary. Wildcards are not allowed in an attribute' ||
' tag specification in this release.' ||
' The path consists of slash "/"-concatenated element names.' ||
' A path specifies the destination of an attribute in the ' ||
' DICOM XML metadata document. The mapped path' ||
' is the relative path from ROOT_ELEM_TAG and' ||
' MAPPED_ELEM. The absolute path is:' ||
' "${ROOT_ELEM_TAG} / ${MAPPED_ELEM} / ' ||
' ${MAPPED_PATH}".' ||
' The optional attribute "occurs" specifies whether the' ||
' attribute must exist in the original DICOM content.' ||
' (The attribute tag must exist, but the attribute value' ||
' can be an empty string, for example, a DICOM type 2 ' ||
' attribute.)' ||
' The optional attribute "notEmpty" specifies ' ||
' whether the attribute must have a value in ' ||
' the original DICOM content (type 1 in DICOM terms).' ||
' Depending on the run-time preferences, if the ' ||
' above "occurs'' or "notEmpty" condition is not ' ||
' met, an error may be thrown at run-time.' ||
' The optional attribute "writeTag" specifies whether to' ||
' add the attribute "tag" when writing the element.' ||
' The tag attribute is of type "dt:AT". The value of this' ||
' attribute is the DICOM attribute tag in little-endian ' ||
' encoding.' ||
' The optional attribute "writeDefiner" specifies whether' ||
' to add the attribute "definer" when writing the element.' ||
' The definer attribute is of type "dt:LO". The value of' ||
' this attribute is the same as the definer attribute of' ||
' ATTRIBUTE_TAG element of the mapping document.' ||
' The optional attribute "writeName" specifies whether' ||
' to add the attribute "name" when writing the element.' ||
' The name attribute is of type "dt:SHORT_STRING_T".' ||
' The value of this element is the attribute name' ||
' defined by the data dictionary.' ||
' The optional attribute "writeRawValue" specifies whether' ||
' to add the attribute "rawValue" when writing the element.' ||
' The raw value attribute is of type "xs:hexBinary".' ||
' This attribute only occurs when there is a parsing error' ||
' for this attribute and no XML value can be extracted for' ||
' the element. The value of this attribute is the ' ||
' hexadecimal dump of the original byte stream.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'';
sys.dbms_lob.write(ordClob, length(ordSchema), 1, ordSchema);
xdb.dbms_xmlschema.registerSchema
(schemaURL=>'http://xmlns.oracle.com/ord/dicom/mapping_1_0',
schemaDoc=>ordClob,
local=>FALSE,
genTypes=>TRUE,
genBean=>FALSE,
genTables=>FALSE,
force=>FALSE,
owner=>'ORDSYS'
);
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
-- ignore duplicate registration
exception
when ex then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
when others then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
raise;
end;
/
-- Register ordcmpf.xsd with XDB under http://xmlns.oracle.com/ord/dicom/preference_1_0
declare
ordSchema varchar2(32767);
ordClob clob := null;
ex exception;
pragma exception_init( ex, -31085 );
begin
sys.dbms_lob.createTemporary( ordClob, true, sys.dbms_lob.call );
ordSchema :=
'' ||
'' ||
'' ||
' ' ||
' ' ||
' ' ||
' Introduction' ||
' This schema defines the run-time preference settings for ' ||
' Oracle Multimedia DICOM features.' ||
'' ||
' Structure Overview' ||
' Question mark "?" means optional items.' ||
' Plus "+" means one or more items.' ||
' Asterisk "*" means zero or more items.' ||
'' ||
' DICOM_RUNTIME_PREFERENCES' ||
' DOCUMENT_HEADER?' ||
' DOCUMENT_CHANGE_LOG*' ||
' DOCUMENT_MODIFIER' ||
' DOCUMENT_MODIFICATION_DATE' ||
' DOCUMENT_VERSION?' ||
' MODIFICATION_COMMENT?' ||
' BASE_DOCUMENT?' ||
' BASE_DOCUMENT_RELEASE_DATE?' ||
' BASE_DOCUMENT_DESCRIPTION?' ||
' PREFERENCE_DEF+' ||
' PARAMETER' ||
' DESCRIPTION' ||
' VALUE' ||
' The allowed values for the PARAMETER element of a ' ||
' PREFERENCE_DEF entry and its corresponding ' ||
' VALUE element are as follows:' ||
' ' ||
' PARAMETER: XML_SKIP_ATTR' ||
' VALUE: an integer type (default 512, 128~ 32767)' ||
' DESCRIPTION: When encoding a DICOM attribute into XML, skip ' ||
' attributes whose (child) XML element sizes (in bytes) are ' ||
' larger than XML_SKIP_ATTR.' ||
' If an attribute is of simple type, this limit applies to the' ||
' whole attribute.' ||
' If the attribute type is SQ, this limit applies to its child ' ||
' items.' ||
' For example, if an attribute is of type SQ and it contains ' ||
' child items of type OB, the limit applies to ' ||
' each child instance of type OB. ' ||
' The smallest value allowed for this parameter is 128.' ||
' ' ||
' PARAMETER: AVG_ATTR_NUM' ||
' VALUE: an integer type (default 200, 20~2000)' ||
' DESCRIPTION: The average number of root-level attributes per ' ||
' DICOM object. This is a hint to the DICOM implementation.' ||
' Finding the optimal value for a database helps improve storage ' ||
' efficiency and performance. Too large a value may lead to wasted' ||
' memory, and too small a value may lead to poor performance. An' ||
' ideal value is one where most (suggested 95%) DICOM images' ||
' have less than $VALUE number of attributes.' ||
' The smallest value allowed for this parameter is 20.' ||
' The largest number allowed for this parameter is ' ||
' the total number of not retired standard attributes defined.' ||
' ' ||
' PARAMETER: CONFORMANCE_LEVEL' ||
' VALUE: enum { leastConform, ignoreException(default), mostConform}' ||
' DESCRIPTION: ' ||
' The option "leastConform" means that all functions try to ' ||
' maximize the processing of a DICOM object and ignore' ||
' any errors and exceptions.' ||
' "ignoreException" means that all functions ignore the' ||
' types of exceptions given in the parameter "IGNORED_EXP_LIST".' ||
' The default set of ignored exceptions includes: MISSING_ATTR, ' ||
' INVALID_LENGTH, MISSING_MAGIC, MISSING_HEADER, INVALID_VR, ' ||
' INVALID_VM, and PARSE_ERR.' ||
' "mostConform" means that all functions throw an exception' ||
' if a DICOM object contains nonconformant content. This does' ||
' not include backward compatibility cases allowed by ' ||
' the DICOM standard.' ||
' Note: By choosing an option other than "mostConform",' ||
' you risk accepting invalid DICOM objects, possibly getting' ||
' incorrect results. In this case, Oracle recommends setting the' ||
' LOGGING_LEVEL parameter to "warning" or a more detailed level, ' ||
' and then examining the log file for possible errors.' ||
' ' ||
' PARAMETER: IGNORED_EXP_LIST' ||
' VALUE: EmptySpace-separated exception names from the ' ||
' following list:' ||
' {MISSING_MAGIC, MISSING_HEADER, MISSING_ATTR,' ||
' FAULTY_VALUE, INVALID_LENGTH, ' ||
' INVALID_VM, INVALID_VR, UNSUPPORT_VALUE,' ||
' UNDEFINED_VALUE, NOT_AN_IMAGE, PARSE_ERR}' ||
' ' ||
' Default: {MISSING_ATTR INVALID_LENGTH MISSING_MAGIC' ||
' MISSING_HEADER INVALID_VR INVALID_VM PARSE_ERR}.' ||
' DESCRIPTION: This parameter is only effective when the value of' ||
' the CONFORMANCE_LEVEL parameter is "ignoreException". If' ||
' this is the case, the exceptions in the ignore exception list are' ||
' ignored at run time. However, if the LOGGING_LEVEL parameter' ||
' is set to "warning" or a more detailed level, the exception is ' ||
' logged. The program continues and skips the part ' ||
' of the DICOM object that has triggered an exception.' ||
' These exceptions are defined as follows:' ||
' MISSING_MAGIC: a DICOM object does not contain the file ' ||
' magic number "DICM".' ||
' MISSING_HEADER: a DICOM object does not have the file' ||
' meta header (not conformant to the DICOM standard part 10).' ||
' MISSING_ATTR: a DICOM object does not have the mandatory' ||
' attributes (type 1) required by the DICOM standard.' ||
' FAULTY_VALUE: a DICOM object has attribute values ' ||
' that lead to parsing errors.' ||
' INVALID_LENGTH: a DICOM object contains a length value that ' ||
' is not consistent with the DICOM encoding rules or a length ' ||
' that is not permitted by the DICOM data dictionary.' ||
' INVALID_VM: an attribute of a DICOM object has an invalid Value ' ||
' Multiplicity value (not consistent with the dictionary definition).' ||
' INVALID_VR: an attribute of a DICOM object has an invalid Value' ||
' Representation value, which can either conflict with the data' ||
' dictionary or has not been defined by the data dictionary.' ||
' UNSUPPORTED_VALUE: a DICOM object contains attribute' ||
' values that are outside of the supported range; ' ||
' for example, an unsupported pixel representation value.' ||
' UNDEFINED_VALUE: a DICOM object contains attribute' ||
' values that are not defined by the data model; for example,' ||
' an undefined transfer syntax UID, an undefined SOP' ||
' class UID, and so on.' ||
' NOT_AN_IMAGE: When an image content processing function' ||
' is invoked on a DICOM object, if the object''s SOP class UID is' ||
' defined but its classification is not "storageClass", or its' ||
' content type is not "image", an exception is thrown. It may' ||
' mean that the UID definition document is not up-to-date. An ' ||
' administrator can update the document to define the' ||
' SOP class UID as a "storageClass" of "image" type.' ||
' PARSE_ERR: When a DICOM object contains invalid data, a parse exception' ||
' is thrown. This exception is ignored, and the parsing process' ||
' continues. ' ||
' ' ||
' PARAMETER: OUTPUT_RAW_VALUE' ||
' VALUE: an integer value (default to 0, no output) (-1 ~ 32767)' ||
' DESCRIPTION: What to output in an XML metadata document' ||
' when the parsing of a DICOM object fails. The base64 encoding ' ||
' of the attribute''s byte value can be returned in the rawValue ' ||
' attribute of a DICOM XML element. The VALUE element specifies' ||
' the maximal length allowed for the rawValue attribute. ' ||
' If $VALUE == -1, (not recommended), the entire attribute up to 32k' ||
' is saved in the rawValue attribute in base64 encoding.' ||
' If $VALUE == 0, an empty string is saved in the rawValue ' ||
' attribute (recommended for production systems).' ||
' If $VALUE == N > 0, only the first N bytes of the attribute are' ||
' saved in the rawValue attribute.' ||
' A nonzero value for this parameter is useful for debugging ' ||
' purposes. For a production system, do NOT pick a value' ||
' larger than 64. The value -1 should never be used outside of' ||
' a development environment.' ||
' ' ||
' PARAMETER: LOGGING_LEVEL' ||
' VALUE: enum {debug, conformance, warning(default), error, none }' ||
' DESCRIPTION: The logging level, if ordered by the level of ' ||
' detail from the most to the least is: "debug", "conformance", ' ||
' "warning", "error", and "none".' ||
' "debug" means extensive logging of all steps; it should ' ||
' only be used for debugging purposes. ' ||
' "conformance" means to log all nonstandard conformance ' ||
' problems that are discovered. In general, nonconformance is very ' ||
' common for a DICOM object repository containing DICOM ' ||
' objects from different sources, for example, a hospital or an imaging ' ||
' center. This logging level may lead to large log files for ' ||
' most scenarios, and lower performance. ' ||
' "warning" means to log all recoverable messages that require ' ||
' operator attention. For example, if a user invokes an ' ||
' image processing function on a DICOM object and ' ||
' Oracle does not recognize this DICOM object as an image, ' ||
' a warning message is logged stating that this DICOM object ' ||
' is not defined as an image. The processing of the image ' ||
' content may continue if the CONFORMANCE_LEVEL' ||
' parameter is set to ignore "NOT_AN_IMAGE" exception. ' ||
' "error" means to log only irrecoverable messages. ' ||
' "none" means that logging is disabled. ' ||
' Note: Do not use the "debug" option for a deployed system. ' ||
' It adds significant overhead and slows down all ' ||
' DICOM related functions.' ||
' ' ||
' PARAMETER: VALIDATE_METADATA' ||
' VALUE: Boolean{true, false(default)}' ||
' DESCRIPTION: The DICOM function extractMetadata takes a ' ||
' mapping document as an input parameter. A mapping document' ||
' contains a namespace parameter (which can be empty). If an' ||
' XML schema is registered at this namespace, and the value of' ||
' the VALIDATE_METADATA parameter is true, the extractMetadata' ||
' function validates the resulting XML document against the' ||
' designated schema.' ||
' If the value of this parameter is false, the resulting XML document' ||
' is not validated.' ||
' ' ||
' PARAMETER: EXP_IF_NULL_ATTR_IN_CONSTRAINT' ||
' VALUE: Boolean{true(default), false}' ||
' DESCRIPTION: A DICOM object may not contain certain attributes' ||
' that are used in a constraint predicate. The object may' ||
' contain an attribute, but its value is empty. Both cases' ||
' result to a null value attribute. So a constraint' ||
' predicate involving this attribute has a null ' ||
' parameter value such as (null== MY_VALUE). ' ||
' If this preference parameter is set to true,' ||
' an exception is thrown if the first occurrence of a ' ||
' a null-value attribute is not guarded by the "notEmpty" ' ||
' Boolean function. If this parameter is set to false, ' ||
' no exception is thrown and the predicate evaluates to ' ||
' false. To avoid confusion, it is always better to guard an ' ||
' attribute with "notEmpty" Boolean functions before using' ||
' the attribute value in a predicate.' ||
' ' ||
' PARAMETER: MAX_RECURSION_DEPTH' ||
' VALUE: an integer type (default 16, 1 ~ 32767)' ||
' DESCRIPTION: This parameter restricts the number of levels of ' ||
' recursions when evaluating a recursive constraint on a DICOM' ||
' object. If the recursion level exceeds this number, an exception' ||
' is thrown. ' ||
' ' ||
'' ||
' PARAMETER: MANDATE_ATTR_TAGS_IN_STL ' ||
' VALUE: Boolean{false(default), true}' ||
' DESCRIPTION: This parameter is used to enforce that all tags ' ||
' used by the constraint and mapping documents must be listed in the' ||
' STORED_TAG_LIST(STL) document. This rule is not enforced by default.' ||
' If this preference parameter is set to true, the rule is enforced. ' ||
' If an existing STL document does not satisfy this rule,' ||
' the preference value cannot be set to true until the' ||
' STL document is deleted. ' ||
'' ||
' PARAMETER: SQ_WRITE_LEN' ||
' VALUE: boolean{true(default), false}' ||
' DESCRIPTION: This parameter determines how the DICOM' ||
' sequence (SQ) types are encoded by the DICOM function writeMetadata().' ||
' If the value of this parameter is true, the SQ types are encoded' ||
' with explicit length and without item or sequence delimitors.' ||
' This is the default behavior and allows DICOM viewers to skip' ||
' the sequence attributes easily.' ||
' If the value of this parameter is false, the SQ types are encoded' ||
' with variable (or undefined) length and terminated with' ||
' sequence delimitors. This allows backward compatibility with some' ||
' older DICOM viewers and Dicom applications as they only support' ||
' undefined length for SQ types.' ||
'' ||
' PARAMETER: SPECIFIC_CHARACTER_SET' ||
' VALUE: enum {ASCII(default), ISO_IR 100, ISO_IR 101, ISO_IR 109, ' ||
' ISO_IR 110, ISO_IR 144, ISO_IR 127, ISO_IR 126,' ||
' ISO_IR 138, ISO_IR 148, ISO_IR 13, ISO_IR 166,' ||
' ISO_IR 192, GB18030}' ||
' DESCRIPTION: This parameter determines how data elements with value' ||
' representations of SH (Short String), LO (Long String), ST (Short Text)' ||
' LT (Long Text), PN (Person Name) or UT (Unlimited Text) are decoded' ||
' when the Specific Character Set (0008,0005) Attribute is missing.' ||
' The DICOM standard states that the default character set ' ||
' (ISO-IR 6, or ASCII) shall be used for decoding when the Specific' ||
' Character Set (0008,0005) Attribute is not specified. This parameter' ||
' allows an application to specify a different character set to ' ||
' use in these cases.' ||
'' ||
' PARAMETER: BINARY_SKIP_INVALID_ATTR' ||
' VALUE: boolean{false(default), true}' ||
' DESCRIPTION: It is possible that a DICOM object contains one or more' ||
' attribute values that do not conform to the DICOM specification. In the ' ||
' event that such an attribute is present in a DICOM object, this ' ||
' parameter determines whether or not to "skip" (i.e. not include) the ' ||
' value of that attribute in the binary output when making a copy of the' ||
' object in question. The default behavior, specified by setting this' ||
' parameter to "false", is to not skip these values and to include them' ||
' as-is in the coresponding output. When an attribute is skipped, its' ||
' value is included in the output truncated to length 0.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Each PREFERENCE_DEF entry describes one parameter' ||
' that a repository administrator may modify to adjust the' ||
' run-time behavior of the DICOM functionality.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'';
sys.dbms_lob.write(ordClob, length(ordSchema), 1, ordSchema);
xdb.dbms_xmlschema.registerSchema
(schemaURL=>'http://xmlns.oracle.com/ord/dicom/preference_1_0',
schemaDoc=>ordClob,
local=>FALSE,
genTypes=>TRUE,
genBean=>FALSE,
genTables=>FALSE,
force=>FALSE,
owner=>'ORDSYS'
);
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
-- ignore duplicate registration
exception
when ex then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
when others then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
raise;
end;
/
-- Register ordcmpv.xsd with XDB under http://xmlns.oracle.com/ord/dicom/privateDictionary_1_0
declare
ordSchema varchar2(32767);
ordClob clob := null;
ex exception;
pragma exception_init( ex, -31085 );
begin
sys.dbms_lob.createTemporary( ordClob, true, sys.dbms_lob.call );
ordSchema :=
'' ||
'' ||
'' ||
'' ||
' ' ||
' ' ||
' ' ||
' Introduction' ||
' This schema defines the private attributes created by modality ' ||
' manufacturers or organizations other than the DICOM ' ||
' standard committee.' ||
'' ||
' Structure Overview' ||
' Question mark "?" means optional items.' ||
' Plus "+" means one or more items.' ||
' Asterisk "*" means zero or more items.' ||
'' ||
' DICOM_PRIVATE_ATTRIBUTES' ||
' DOCUMENT_HEADER?' ||
' DOCUMENT_CHANGE_LOG*' ||
' DOCUMENT_MODIFIER' ||
' DOCUMENT_MODIFICATION_DATE' ||
' DOCUMENT_VERSION?' ||
' MODIFICATION_COMMENT?' ||
' BASE_DOCUMENT?' ||
' BASE_DOCUMENT_RELEASE_DATE?' ||
' BASE_DOCUMENT_DESCRIPTION?' ||
' ATTRIBUTE_DEFINERS?' ||
' DEFINER+' ||
' NAME' ||
' ID?' ||
' PRIVATE_ATTRIBUTE_DEFINITION+' ||
' (TAG|TAG_RANGE)' ||
' NAME' ||
' DEFINER' ||
' VR?' ||
' VM?' ||
' RETIRED?' ||
' DOCUMENT_HEADER is an optional header to specify the' ||
' modification history. See dt:DOCUMENT_HEADER_T' ||
' for more information.' ||
' ATTRIBUTE_DEFINERS specify the owner of each' ||
' private attribute. See dt:ATTR_DEFINER_T for more' ||
' information.' ||
'' ||
' A private dictionary contains one or more private attribute' ||
' definitions.' ||
' Each private attribute specification takes a tag specification,' ||
' a name, a value representation type, a value multiplicity' ||
' type, and a retired flag. See dt:VR_T dt:VM_T for the allowed' ||
' values for the value representation and value multiplicity elements.' ||
' ' ||
' Note: Private attribute tags allow three specification types.' ||
' The tag can be a 4-byte hexadecimal number, a ' ||
' wildcard type such as "0039xx01", or a range type such' ||
' as "0039xx01~0041xx01".' ||
' ' ||
' Multiple attribute definitions cannot be associated with' ||
' the same definer-tag pair in a dictionary. For example, a simple ' ||
' attribute definition ("oracle", 60100010) matches a wildcard ' ||
' attribute ("oracle", 60xx0010), they cannot coexist in the private ' ||
' dictionary. Similarly, a range attribute definition ("Oracle", {6000-60FF})' ||
' overlaps a range attribute definition ("Oracle", {6010-6020}), they ' ||
' cannot coexist in the private dictionary. As a rule, an attribute ' ||
' must not match two entries in the dictionary.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'';
sys.dbms_lob.write(ordClob, length(ordSchema), 1, ordSchema);
xdb.dbms_xmlschema.registerSchema
(schemaURL=>'http://xmlns.oracle.com/ord/dicom/privateDictionary_1_0',
schemaDoc=>ordClob,
local=>FALSE,
genTypes=>TRUE,
genBean=>FALSE,
genTables=>FALSE,
force=>FALSE,
owner=>'ORDSYS'
);
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
-- ignore duplicate registration
exception
when ex then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
when others then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
raise;
end;
/
-- Register ordcmsd.xsd with XDB under http://xmlns.oracle.com/ord/dicom/standardDictionary_1_0
declare
ordSchema varchar2(32767);
ordClob clob := null;
ex exception;
pragma exception_init( ex, -31085 );
begin
sys.dbms_lob.createTemporary( ordClob, true, sys.dbms_lob.call );
ordSchema :=
'' ||
'' ||
'' ||
' ' ||
' ' ||
' ' ||
' Introduction' ||
' This schema defines the data dictionary that lists the DICOM ' ||
' standard attributes as published by the DICOM standard committee.' ||
' No other attributes, such as those defined by a modality ' ||
' manufacturer or an organization other than NEMA,' ||
' should be included in the standard data dictionary.' ||
'' ||
' Structure Overview' ||
' Question mark "?" means optional items.' ||
' Plus "+" means one or more items.' ||
' Asterisk "*" means zero or more items.' ||
'' ||
' DICOM_STANDARD_ATTRIBUTES' ||
' DOCUMENT_HEADER?' ||
' DOCUMENT_CHANGE_LOG*' ||
' DOCUMENT_MODIFIER' ||
' DOCUMENT_MODIFICATION_DATE' ||
' DOCUMENT_VERSION?' ||
' MODIFICATION_COMMENT?' ||
' BASE_DOCUMENT?' ||
' BASE_DOCUMENT_RELEASE_DATE?' ||
' BASE_DOCUMENT_DESCRIPTION?' ||
' ATTRIBUTE_DEFINERS?' ||
' DEFINER+' ||
' NAME' ||
' ID?' ||
' STANDARD_ATTRIBUTE_DEFINITION+' ||
' TAG' ||
' NAME' ||
' VR?' ||
' VM?' ||
' RETIRED?' ||
' ' ||
' DOCUMENT_HEADER is an optional header to specify the' ||
' modification history. See dt:DOCUMENT_HEADER_T' ||
' for more information.' ||
'' ||
' ATTRIBUTE_DEFINERS specify the owner of each' ||
' attribute. See dt:ATTR_DEFINER_T for more' ||
' information. All DICOM standard attributes must have' ||
' definer name "DICOM" and UID "1.2.840.10008.1".' ||
'' ||
' A standard dictionary contains one or more standard attribute' ||
' definitions.' ||
'' ||
' Each standard attribute specification takes a tag specification,' ||
' a name, a value representation type, a value multiplicity' ||
' type, and a retired flag. See DICOM P3-6 2007 for a ' ||
' description of these elements. See dt:VR_T dt:VM_T for the allowed ' ||
' values of value representation and value multiplicity elements.' ||
' ' ||
' Note: Wildcard character "x" can be used to specify' ||
' standard attribute tags (for example, 60xx0010 for overlay rows).' ||
' ' ||
' Multiple attribute definitions must not be associated with' ||
' the same tag in a standard dictionary. For example, the' ||
' attribute definition 60100010 matches the wildcard ' ||
' attribute 60xx0010, they cannot coexist in ' ||
' the dictionary. As a rule, an attribute must not match two ' ||
' entries in the dictionary.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'';
sys.dbms_lob.write(ordClob, length(ordSchema), 1, ordSchema);
xdb.dbms_xmlschema.registerSchema
(schemaURL=>'http://xmlns.oracle.com/ord/dicom/standardDictionary_1_0',
schemaDoc=>ordClob,
local=>FALSE,
genTypes=>TRUE,
genBean=>FALSE,
genTables=>FALSE,
force=>FALSE,
owner=>'ORDSYS'
);
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
-- ignore duplicate registration
exception
when ex then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
when others then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
raise;
end;
/
-- Register ordcmss.xsd with XDB under http://xmlns.oracle.com/ord/dicom/orddicom_1_0
declare
ordSchema varchar2(32767);
ordClob clob := null;
ex exception;
pragma exception_init( ex, -31085 );
begin
sys.dbms_lob.createTemporary( ordClob, true, sys.dbms_lob.call );
ordSchema :=
'' ||
'' ||
'' ||
'' ||
' ' ||
' ' ||
' ' ||
' Introduction' ||
' This is the ORDDicom schema for Oracle-reserved data types.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Any attribute type (ANY_ATTR_T) maps to a single DICOM' ||
' attribute type. Each attribute type has a name that reflects' ||
' the DICOM value representation of the attribute.' ||
' Each attribute is strongly typed and its type matches its DICOM' ||
' VR. Certain DICOM configuration files, such as constraint ' ||
' document, use ANY_ATTR_T.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Database table storage type for constraint operand' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'';
sys.dbms_lob.write(ordClob, length(ordSchema), 1, ordSchema);
xdb.dbms_xmlschema.registerSchema
(schemaURL=>'http://xmlns.oracle.com/ord/dicom/orddicom_1_0',
schemaDoc=>ordClob,
local=>FALSE,
genTypes=>TRUE,
genBean=>FALSE,
genTables=>FALSE,
force=>FALSE,
owner=>'ORDSYS'
);
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
-- ignore duplicate registration
exception
when ex then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
when others then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
raise;
end;
/
-- Register ordcmui.xsd with XDB under http://xmlns.oracle.com/ord/dicom/UIDdefinition_1_0
declare
ordSchema varchar2(32767);
ordClob clob := null;
ex exception;
pragma exception_init( ex, -31085 );
begin
sys.dbms_lob.createTemporary( ordClob, true, sys.dbms_lob.call );
ordSchema :=
'' ||
'' ||
'' ||
' ' ||
' ' ||
' ' ||
' Introduction' ||
' This schema defines DICOM UIDs. ' ||
' User can update this file to support new DICOM object types.' ||
'' ||
' Structure Overview' ||
' Question mark "?" means optional items.' ||
' Plus "+" means one or more items.' ||
' Asterisk "*" means zero or more items.' ||
'' ||
' DICOM_UID_DEFINITIONS' ||
' DOCUMENT_HEADER?' ||
' DOCUMENT_CHANGE_LOG*' ||
' DOCUMENT_MODIFIER' ||
' DOCUMENT_MODIFICATION_DATE' ||
' DOCUMENT_VERSION?' ||
' MODIFICATION_COMMENT?' ||
' BASE_DOCUMENT?' ||
' BASE_DOCUMENT_RELEASE_DATE?' ||
' BASE_DOCUMENT_DESCRIPTION?' ||
' UID_DEF (classification, isLE?, isEVR?, isCompressed?,retired?, contentType?)+' ||
' UID' ||
' NAME' ||
' DESCRIPTION?' ||
'' ||
' A UID_DEF entry describes a UID value.' ||
' The mandatory classification attribute specifies what' ||
' a UID is. Its value can be "transferSyntax", "storageClass",' ||
' "frameOfRef", "ldapOID", "entityID", or "other".' ||
' "transferSyntax" means that the UID identifies transfer syntax.' ||
' "storageClass" means that the UID identifies a storage class.' ||
' "frameOfRef" means that the UID is a well-known frame of reference.' ||
' "ldapOID" means that the UID is an LDAP OID.' ||
' "entityID" means that the UID identifies an entity, which can be' ||
' an organization or a device manufacturer.' ||
' "other" means that the UID does not fall into any of the previous ' ||
' categories.' ||
' ' ||
' For entries that have a classification type of ' ||
' "transferSyntax", the attributes "isLE", "isEVR", and ' ||
' "isCompressed" further define the transfer syntax. These ' ||
' attributes are ignored for all other classification types.' ||
' The "isLE" attribute specifies whether the binary stream' ||
' will be encoded with little-endian byte order(defaults to true). ' ||
' The "isEVR" attribute specifies whether the binary stream ' ||
' will use the explicit VR encoding rule (defaults to true). ' ||
' The "isCompressed" attribute specifies whether the ' ||
' transfer syntax means that the image content is compressed ' ||
' (defaults to true).' ||
' ' ||
' If an entry has a classification type of "storageClass", ' ||
' the "contentType" attribute further specifies the primary' ||
' content of a DICOM object belonging to this class. ' ||
' The value of this attribute can be "image", "waveform",' ||
' "report" or "other".' ||
' "image" can be single-frame, multi-frame images, or video. ' ||
' "waveform" can be ECG, EEG, or any other 1D signal. ' ||
' "report" means a structured report. ' ||
' "other" means overlay, GSPS, KO, or any other object types that ' ||
' do not belong to the previous categories.' ||
' For example "Ultrasound Multi-frame Image Storage" SOP' ||
' class has a UID of "1.2.840.10008.5.1.4.1.1.3.1". Its ' ||
' primary content is image.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'';
sys.dbms_lob.write(ordClob, length(ordSchema), 1, ordSchema);
xdb.dbms_xmlschema.registerSchema
(schemaURL=>'http://xmlns.oracle.com/ord/dicom/UIDdefinition_1_0',
schemaDoc=>ordClob,
local=>FALSE,
genTypes=>TRUE,
genBean=>FALSE,
genTables=>FALSE,
force=>FALSE,
owner=>'ORDSYS'
);
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
-- ignore duplicate registration
exception
when ex then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
when others then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
raise;
end;
/
-- Register ordcmstl.xsd with XDB under http://xmlns.oracle.com/ord/dicom/attributeTag_1_0
declare
ordSchema varchar2(32767);
ordClob clob := null;
ex exception;
pragma exception_init( ex, -31085 );
begin
sys.dbms_lob.createTemporary( ordClob, true, sys.dbms_lob.call );
ordSchema :=
'' ||
'' ||
'' ||
'' ||
' ' ||
' ' ||
' ' ||
' Introduction' ||
' This schema defines the STORED_TAG_LIST document. ' ||
' This document lists the attribute tags that are' ||
' persistently stored in the metadata attribute of the ORDDICOM object.' ||
'' ||
' Structure Overview:' ||
' Question mark "?" means optional items.' ||
' Plus "+" means one or more items.' ||
' Asterisk "*" means zero or more items.' ||
'' ||
' ATTRIBUTE_TAG_LIST' ||
' DOCUMENT_HEADER?' ||
' DOCUMENT_CHANGE_LOG*' ||
' DOCUMENT_MODIFIER' ||
' DOCUMENT_MODIFICATION_DATE' ||
' DOCUMENT_VERSION?' ||
' MODIFICATION_COMMENT?' ||
' BASE_DOCUMENT?' ||
' BASE_DOCUMENT_RELEASE_DATE?' ||
' BASE_DOCUMENT_DESCRIPTION?' ||
' ATTRIBUTE_TAG+' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Each ATTRIBUTE_TAG entry describes one locator path of a' ||
' DICOM attribute in the list.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'';
sys.dbms_lob.write(ordClob, length(ordSchema), 1, ordSchema);
xdb.dbms_xmlschema.registerSchema
(schemaURL=>'http://xmlns.oracle.com/ord/dicom/attributeTag_1_0',
schemaDoc=>ordClob,
local=>FALSE,
genTypes=>FALSE,
genBean=>FALSE,
genTables=>FALSE,
force=>FALSE,
owner=>'ORDSYS'
);
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
-- ignore duplicate registration
exception
when ex then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
when others then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
raise;
end;
/
-- Register ordcmmft.xsd with XDB under http://xmlns.oracle.com/ord/dicom/manifest_1_0
declare
ordSchema varchar2(32767);
ordClob clob := null;
ex exception;
pragma exception_init( ex, -31085 );
begin
sys.dbms_lob.createTemporary( ordClob, true, sys.dbms_lob.call );
ordSchema :=
'' ||
'' ||
' ' ||
'' ||
' ' ||
' ' ||
' This schema defines a DICOM manifest file. This file specifies the' ||
' document name, type, and the order in which the configuration ' ||
' documents are loaded into the DICOM data model repository. ' ||
' This manifest file is created by the exportDataModel procedure ' ||
' and is used by the importDataModel procedure in the data model ' ||
' repository (ord_dicom_admin) API.' ||
'' ||
' The DOCUMENT_VERSION in the DOCUMENT_HEADER represents the repository' ||
' version. This value identifies a set of configuration documents in ' ||
' the repository. This value is for future use when we may maintain and' ||
' export multiple versions of the data model repository.' ||
' ' ||
' DICOM_MANIFEST' ||
' DOCUMENT_HEADER?' ||
' DOCUMENT_CHANGE_LOG*' ||
' DOCUMENT_MODIFIER' ||
' DOCUMENT_MODIFICATION_DATE' ||
' DOCUMENT_VERSION?' ||
' MODIFICATION_COMMENT?' ||
' BASE_DOCUMENT?' ||
' BASE_DOCUMENT_RELEASE_DATE?' ||
' BASE_DOCUMENT_DESCRIPTION?' ||
'' ||
' DOCUMENT_DEF+' ||
' NAME' ||
' TYPE' ||
' LOAD_ORDER' ||
' ' ||
'' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Name of a document in the dicom data model repository.' ||
' This is the file name of the XML document that has been ' ||
' exported from the repository or is being loaded into ' ||
' the repository. ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' The document types supported in the data model repository.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' Each document definition defines a document that to be' ||
' inserted into or exported from the data model repository.' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
' ' ||
'' ||
'' ||
'';
sys.dbms_lob.write(ordClob, length(ordSchema), 1, ordSchema);
xdb.dbms_xmlschema.registerSchema
(schemaURL=>'http://xmlns.oracle.com/ord/dicom/manifest_1_0',
schemaDoc=>ordClob,
local=>FALSE,
genTypes=>FALSE,
genBean=>FALSE,
genTables=>FALSE,
force=>FALSE,
owner=>'ORDSYS'
);
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
-- ignore duplicate registration
exception
when ex then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
when others then
if(ordCLob is not null) then
sys.dbms_lob.freeTemporary(ordClob);
ordClob := null;
end if;
raise;
end;
/