All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.somda.sdc.biceps.model.participant.ImagingProcedure Maven / Gradle / Ivy


package org.somda.sdc.biceps.model.participant;

import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlType;
import org.jetbrains.annotations.Nullable;
import org.jvnet.jaxb.lang.CopyStrategy;
import org.jvnet.jaxb.lang.CopyTo;
import org.jvnet.jaxb.lang.JAXBCopyStrategy;
import org.jvnet.jaxb.lang.JAXBToStringStrategy;
import org.jvnet.jaxb.lang.ToString;
import org.jvnet.jaxb.lang.ToStringStrategy;
import org.jvnet.jaxb.locator.ObjectLocator;
import org.jvnet.jaxb.locator.util.LocatorUtils;
import org.somda.sdc.biceps.model.extension.ExtensionType;


/**
 * ImagingProcedure provides identifiers used by the DICOM and HL7 standard to identify the requested imaging procedures resulting from an order in a the hospital. Often these identifiers are created/assigned by the main hospital information system or departmental information systems and are taken over into any medical images by DICOM equipment in the context of this procedure.
 * The listed ELEMENTs have been taken over from the IHE Radiology Technical Framework's RAD-4 transaction ("Procedure Scheduled") and re-uses the identifiers listed for the HL7 Version 2.5.1 IPC segment group of the OBR segment. Therefore, it is recommended to comply to the underlying HL7 and DICOM data types in order to have seamless integration with other clinical IT such as DICOM modalities or image archives (PACS).
 * 
 * In order to comply to the hierarchy behind the given identifiers, the following rules (taken from IHE) SHALL apply: if a Requested Procedure is comprised of multiple Scheduled Procedure Steps and/or if a Scheduled Procedure Step is comprised of multiple Protocol Codes, each applicable Scheduled Procedure Step / Protocol Code combination is included as a separate ProcedureDetails structure, i.e., the complex type "ProcedureDetails" occurs the same amount of times as there are different Scheduled Procedure Step IDs plus the amount of different Scheduled Procedure Step / Protocol Code combinations.
 * 
 * 

Java class for ImagingProcedure complex type

. * *

The following schema fragment specifies the expected content contained within this class.

* *
{@code
 * 
 *   
 *     
 *       
 *         
 *         
 *         
 *         
 *         
 *         
 *         
 *       
 *     
 *   
 * 
 * }
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ImagingProcedure", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant", propOrder = { "extension", "accessionIdentifier", "requestedProcedureId", "studyInstanceUid", "scheduledProcedureStepId", "modality", "protocolCode" }) public class ImagingProcedure implements Cloneable, CopyTo, ToString { @XmlElement(name = "Extension", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/extension") protected ExtensionType extension; /** * The Accession Identifier (in DICOM "Accession ID") is an identifier of an "Imaging Service Request", and is (in this ProcedureDetails context) at the top of the hierarchy. A limit of sixteen (16) characters is required to allow compatibility with DICOM. * */ @XmlElement(name = "AccessionIdentifier", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant", required = true) protected InstanceIdentifier accessionIdentifier; /** * An pm:ImagingProcedure/pm:AccessionIdentifier can result in various Requested Procedures, each identified uniquely (within the context of the pm:ImagingProcedure/pm:AccessionIdentifier) through a RequestedProcedureID. A limit of sixteen (16) characters is required to allow compatibility with DICOM. * */ @XmlElement(name = "RequestedProcedureId", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant", required = true) protected InstanceIdentifier requestedProcedureId; /** * The Study Instance UID is a world-wide unique identifier used by DICOM modalities to group together images in a so-called Study. This grouping is REQUIRED. Under the Study, the modality creates one or more so-called Series which again contain the images. The Series identification ("Series Instance UID") is part of the Procedure Details which refer to a planning process, since a modality is responsible to decide how many Series are created and how their identifiers should look like. * A limit of sixty-four (64) characters is required to allow compatibility with DICOM, with only numbers and dot characters permitted (e.g. 1.2.134124.4.12.34). * */ @XmlElement(name = "StudyInstanceUid", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant", required = true) protected InstanceIdentifier studyInstanceUid; /** * Under a Study (i.e. a Study Instance UID), a Procedure reflected by these ProcedureDetails can be planned in a finer granularity by scheduling different steps that should be performed (usually at a DICOM modality), the so-called "Scheduled Procedure Step"s. Each of these steps is identified by a Scheduled Procedure Step ID. A limit of sixteen (16) characters is required to allow compatibility with DICOM. * */ @XmlElement(name = "ScheduledProcedureStepId", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant", required = true) protected InstanceIdentifier scheduledProcedureStepId; /** * The field modality describes the type of equipment (usually DICOM equipment) used. DICOM offers a list of short identifiers for different device categories, e.g. CT for "Computer Tomography" or US for "Ultrasound". It is advised to follow the list of terms defined in the DICOM standard part 3. A limit of sixteen (16) characters for the first component is required to allow compatibility with DICOM. * */ @XmlElement(name = "Modality", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant") protected CodedValue modality; /** * Below each Scheduled Procedure Step the work can be defined in more detail by defining one or more Protocol Codes under it. A limit of sixteen (16) characters for the first component and sixty-four (64) characters for the second component is required to allow compatibility with DICOM. * */ @XmlElement(name = "ProtocolCode", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant") protected CodedValue protocolCode; /** * Gets the value of the extension property. * * @return * possible object is * {@link ExtensionType } * */ @Nullable public ExtensionType getExtension() { return extension; } /** * Sets the value of the extension property. * * @param value * allowed object is * {@link ExtensionType } * */ public void setExtension( @Nullable ExtensionType value) { this.extension = value; } /** * The Accession Identifier (in DICOM "Accession ID") is an identifier of an "Imaging Service Request", and is (in this ProcedureDetails context) at the top of the hierarchy. A limit of sixteen (16) characters is required to allow compatibility with DICOM. * * @return * possible object is * {@link InstanceIdentifier } * */ public InstanceIdentifier getAccessionIdentifier() { return accessionIdentifier; } /** * Sets the value of the accessionIdentifier property. * * @param value * allowed object is * {@link InstanceIdentifier } * * @see #getAccessionIdentifier() */ public void setAccessionIdentifier(InstanceIdentifier value) { this.accessionIdentifier = value; } /** * An pm:ImagingProcedure/pm:AccessionIdentifier can result in various Requested Procedures, each identified uniquely (within the context of the pm:ImagingProcedure/pm:AccessionIdentifier) through a RequestedProcedureID. A limit of sixteen (16) characters is required to allow compatibility with DICOM. * * @return * possible object is * {@link InstanceIdentifier } * */ public InstanceIdentifier getRequestedProcedureId() { return requestedProcedureId; } /** * Sets the value of the requestedProcedureId property. * * @param value * allowed object is * {@link InstanceIdentifier } * * @see #getRequestedProcedureId() */ public void setRequestedProcedureId(InstanceIdentifier value) { this.requestedProcedureId = value; } /** * The Study Instance UID is a world-wide unique identifier used by DICOM modalities to group together images in a so-called Study. This grouping is REQUIRED. Under the Study, the modality creates one or more so-called Series which again contain the images. The Series identification ("Series Instance UID") is part of the Procedure Details which refer to a planning process, since a modality is responsible to decide how many Series are created and how their identifiers should look like. * A limit of sixty-four (64) characters is required to allow compatibility with DICOM, with only numbers and dot characters permitted (e.g. 1.2.134124.4.12.34). * * @return * possible object is * {@link InstanceIdentifier } * */ public InstanceIdentifier getStudyInstanceUid() { return studyInstanceUid; } /** * Sets the value of the studyInstanceUid property. * * @param value * allowed object is * {@link InstanceIdentifier } * * @see #getStudyInstanceUid() */ public void setStudyInstanceUid(InstanceIdentifier value) { this.studyInstanceUid = value; } /** * Under a Study (i.e. a Study Instance UID), a Procedure reflected by these ProcedureDetails can be planned in a finer granularity by scheduling different steps that should be performed (usually at a DICOM modality), the so-called "Scheduled Procedure Step"s. Each of these steps is identified by a Scheduled Procedure Step ID. A limit of sixteen (16) characters is required to allow compatibility with DICOM. * * @return * possible object is * {@link InstanceIdentifier } * */ public InstanceIdentifier getScheduledProcedureStepId() { return scheduledProcedureStepId; } /** * Sets the value of the scheduledProcedureStepId property. * * @param value * allowed object is * {@link InstanceIdentifier } * * @see #getScheduledProcedureStepId() */ public void setScheduledProcedureStepId(InstanceIdentifier value) { this.scheduledProcedureStepId = value; } /** * The field modality describes the type of equipment (usually DICOM equipment) used. DICOM offers a list of short identifiers for different device categories, e.g. CT for "Computer Tomography" or US for "Ultrasound". It is advised to follow the list of terms defined in the DICOM standard part 3. A limit of sixteen (16) characters for the first component is required to allow compatibility with DICOM. * * @return * possible object is * {@link CodedValue } * */ @Nullable public CodedValue getModality() { return modality; } /** * Sets the value of the modality property. * * @param value * allowed object is * {@link CodedValue } * * @see #getModality() */ public void setModality( @Nullable CodedValue value) { this.modality = value; } /** * Below each Scheduled Procedure Step the work can be defined in more detail by defining one or more Protocol Codes under it. A limit of sixteen (16) characters for the first component and sixty-four (64) characters for the second component is required to allow compatibility with DICOM. * * @return * possible object is * {@link CodedValue } * */ @Nullable public CodedValue getProtocolCode() { return protocolCode; } /** * Sets the value of the protocolCode property. * * @param value * allowed object is * {@link CodedValue } * * @see #getProtocolCode() */ public void setProtocolCode( @Nullable CodedValue value) { this.protocolCode = value; } @Override public boolean equals(Object object) { if ((object == null)||(this.getClass()!= object.getClass())) { return false; } if (this == object) { return true; } final ImagingProcedure that = ((ImagingProcedure) object); { ExtensionType leftExtension; leftExtension = this.getExtension(); ExtensionType rightExtension; rightExtension = that.getExtension(); if (this.extension!= null) { if (that.extension!= null) { if (!leftExtension.equals(rightExtension)) { return false; } } else { return false; } } else { if (that.extension!= null) { return false; } } } { InstanceIdentifier leftAccessionIdentifier; leftAccessionIdentifier = this.getAccessionIdentifier(); InstanceIdentifier rightAccessionIdentifier; rightAccessionIdentifier = that.getAccessionIdentifier(); if (this.accessionIdentifier!= null) { if (that.accessionIdentifier!= null) { if (!leftAccessionIdentifier.equals(rightAccessionIdentifier)) { return false; } } else { return false; } } else { if (that.accessionIdentifier!= null) { return false; } } } { InstanceIdentifier leftRequestedProcedureId; leftRequestedProcedureId = this.getRequestedProcedureId(); InstanceIdentifier rightRequestedProcedureId; rightRequestedProcedureId = that.getRequestedProcedureId(); if (this.requestedProcedureId!= null) { if (that.requestedProcedureId!= null) { if (!leftRequestedProcedureId.equals(rightRequestedProcedureId)) { return false; } } else { return false; } } else { if (that.requestedProcedureId!= null) { return false; } } } { InstanceIdentifier leftStudyInstanceUid; leftStudyInstanceUid = this.getStudyInstanceUid(); InstanceIdentifier rightStudyInstanceUid; rightStudyInstanceUid = that.getStudyInstanceUid(); if (this.studyInstanceUid!= null) { if (that.studyInstanceUid!= null) { if (!leftStudyInstanceUid.equals(rightStudyInstanceUid)) { return false; } } else { return false; } } else { if (that.studyInstanceUid!= null) { return false; } } } { InstanceIdentifier leftScheduledProcedureStepId; leftScheduledProcedureStepId = this.getScheduledProcedureStepId(); InstanceIdentifier rightScheduledProcedureStepId; rightScheduledProcedureStepId = that.getScheduledProcedureStepId(); if (this.scheduledProcedureStepId!= null) { if (that.scheduledProcedureStepId!= null) { if (!leftScheduledProcedureStepId.equals(rightScheduledProcedureStepId)) { return false; } } else { return false; } } else { if (that.scheduledProcedureStepId!= null) { return false; } } } { CodedValue leftModality; leftModality = this.getModality(); CodedValue rightModality; rightModality = that.getModality(); if (this.modality!= null) { if (that.modality!= null) { if (!leftModality.equals(rightModality)) { return false; } } else { return false; } } else { if (that.modality!= null) { return false; } } } { CodedValue leftProtocolCode; leftProtocolCode = this.getProtocolCode(); CodedValue rightProtocolCode; rightProtocolCode = that.getProtocolCode(); if (this.protocolCode!= null) { if (that.protocolCode!= null) { if (!leftProtocolCode.equals(rightProtocolCode)) { return false; } } else { return false; } } else { if (that.protocolCode!= null) { return false; } } } return true; } @Override public int hashCode() { int currentHashCode = 1; { currentHashCode = (currentHashCode* 31); ExtensionType theExtension; theExtension = this.getExtension(); if (this.extension!= null) { currentHashCode += theExtension.hashCode(); } } { currentHashCode = (currentHashCode* 31); InstanceIdentifier theAccessionIdentifier; theAccessionIdentifier = this.getAccessionIdentifier(); if (this.accessionIdentifier!= null) { currentHashCode += theAccessionIdentifier.hashCode(); } } { currentHashCode = (currentHashCode* 31); InstanceIdentifier theRequestedProcedureId; theRequestedProcedureId = this.getRequestedProcedureId(); if (this.requestedProcedureId!= null) { currentHashCode += theRequestedProcedureId.hashCode(); } } { currentHashCode = (currentHashCode* 31); InstanceIdentifier theStudyInstanceUid; theStudyInstanceUid = this.getStudyInstanceUid(); if (this.studyInstanceUid!= null) { currentHashCode += theStudyInstanceUid.hashCode(); } } { currentHashCode = (currentHashCode* 31); InstanceIdentifier theScheduledProcedureStepId; theScheduledProcedureStepId = this.getScheduledProcedureStepId(); if (this.scheduledProcedureStepId!= null) { currentHashCode += theScheduledProcedureStepId.hashCode(); } } { currentHashCode = (currentHashCode* 31); CodedValue theModality; theModality = this.getModality(); if (this.modality!= null) { currentHashCode += theModality.hashCode(); } } { currentHashCode = (currentHashCode* 31); CodedValue theProtocolCode; theProtocolCode = this.getProtocolCode(); if (this.protocolCode!= null) { currentHashCode += theProtocolCode.hashCode(); } } return currentHashCode; } @Override public String toString() { final ToStringStrategy strategy = JAXBToStringStrategy.getInstance(); final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); } @Override public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; } @Override public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { ExtensionType theExtension; theExtension = this.getExtension(); strategy.appendField(locator, this, "extension", buffer, theExtension, (this.extension!= null)); } { InstanceIdentifier theAccessionIdentifier; theAccessionIdentifier = this.getAccessionIdentifier(); strategy.appendField(locator, this, "accessionIdentifier", buffer, theAccessionIdentifier, (this.accessionIdentifier!= null)); } { InstanceIdentifier theRequestedProcedureId; theRequestedProcedureId = this.getRequestedProcedureId(); strategy.appendField(locator, this, "requestedProcedureId", buffer, theRequestedProcedureId, (this.requestedProcedureId!= null)); } { InstanceIdentifier theStudyInstanceUid; theStudyInstanceUid = this.getStudyInstanceUid(); strategy.appendField(locator, this, "studyInstanceUid", buffer, theStudyInstanceUid, (this.studyInstanceUid!= null)); } { InstanceIdentifier theScheduledProcedureStepId; theScheduledProcedureStepId = this.getScheduledProcedureStepId(); strategy.appendField(locator, this, "scheduledProcedureStepId", buffer, theScheduledProcedureStepId, (this.scheduledProcedureStepId!= null)); } { CodedValue theModality; theModality = this.getModality(); strategy.appendField(locator, this, "modality", buffer, theModality, (this.modality!= null)); } { CodedValue theProtocolCode; theProtocolCode = this.getProtocolCode(); strategy.appendField(locator, this, "protocolCode", buffer, theProtocolCode, (this.protocolCode!= null)); } return buffer; } @Override public Object clone() { return copyTo(createNewInstance()); } @Override public Object copyTo(Object target) { final CopyStrategy strategy = JAXBCopyStrategy.getInstance(); return copyTo(null, target, strategy); } @Override public Object copyTo(ObjectLocator locator, Object target, CopyStrategy strategy) { final Object draftCopy = ((target == null)?createNewInstance():target); if (draftCopy instanceof ImagingProcedure) { final ImagingProcedure copy = ((ImagingProcedure) draftCopy); { Boolean extensionShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.extension!= null)); if (extensionShouldBeCopiedAndSet == Boolean.TRUE) { ExtensionType sourceExtension; sourceExtension = this.getExtension(); ExtensionType copyExtension = ((ExtensionType) strategy.copy(LocatorUtils.property(locator, "extension", sourceExtension), sourceExtension, (this.extension!= null))); copy.setExtension(copyExtension); } else { if (extensionShouldBeCopiedAndSet == Boolean.FALSE) { copy.extension = null; } } } { Boolean accessionIdentifierShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.accessionIdentifier!= null)); if (accessionIdentifierShouldBeCopiedAndSet == Boolean.TRUE) { InstanceIdentifier sourceAccessionIdentifier; sourceAccessionIdentifier = this.getAccessionIdentifier(); InstanceIdentifier copyAccessionIdentifier = ((InstanceIdentifier) strategy.copy(LocatorUtils.property(locator, "accessionIdentifier", sourceAccessionIdentifier), sourceAccessionIdentifier, (this.accessionIdentifier!= null))); copy.setAccessionIdentifier(copyAccessionIdentifier); } else { if (accessionIdentifierShouldBeCopiedAndSet == Boolean.FALSE) { copy.accessionIdentifier = null; } } } { Boolean requestedProcedureIdShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.requestedProcedureId!= null)); if (requestedProcedureIdShouldBeCopiedAndSet == Boolean.TRUE) { InstanceIdentifier sourceRequestedProcedureId; sourceRequestedProcedureId = this.getRequestedProcedureId(); InstanceIdentifier copyRequestedProcedureId = ((InstanceIdentifier) strategy.copy(LocatorUtils.property(locator, "requestedProcedureId", sourceRequestedProcedureId), sourceRequestedProcedureId, (this.requestedProcedureId!= null))); copy.setRequestedProcedureId(copyRequestedProcedureId); } else { if (requestedProcedureIdShouldBeCopiedAndSet == Boolean.FALSE) { copy.requestedProcedureId = null; } } } { Boolean studyInstanceUidShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.studyInstanceUid!= null)); if (studyInstanceUidShouldBeCopiedAndSet == Boolean.TRUE) { InstanceIdentifier sourceStudyInstanceUid; sourceStudyInstanceUid = this.getStudyInstanceUid(); InstanceIdentifier copyStudyInstanceUid = ((InstanceIdentifier) strategy.copy(LocatorUtils.property(locator, "studyInstanceUid", sourceStudyInstanceUid), sourceStudyInstanceUid, (this.studyInstanceUid!= null))); copy.setStudyInstanceUid(copyStudyInstanceUid); } else { if (studyInstanceUidShouldBeCopiedAndSet == Boolean.FALSE) { copy.studyInstanceUid = null; } } } { Boolean scheduledProcedureStepIdShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.scheduledProcedureStepId!= null)); if (scheduledProcedureStepIdShouldBeCopiedAndSet == Boolean.TRUE) { InstanceIdentifier sourceScheduledProcedureStepId; sourceScheduledProcedureStepId = this.getScheduledProcedureStepId(); InstanceIdentifier copyScheduledProcedureStepId = ((InstanceIdentifier) strategy.copy(LocatorUtils.property(locator, "scheduledProcedureStepId", sourceScheduledProcedureStepId), sourceScheduledProcedureStepId, (this.scheduledProcedureStepId!= null))); copy.setScheduledProcedureStepId(copyScheduledProcedureStepId); } else { if (scheduledProcedureStepIdShouldBeCopiedAndSet == Boolean.FALSE) { copy.scheduledProcedureStepId = null; } } } { Boolean modalityShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.modality!= null)); if (modalityShouldBeCopiedAndSet == Boolean.TRUE) { CodedValue sourceModality; sourceModality = this.getModality(); CodedValue copyModality = ((CodedValue) strategy.copy(LocatorUtils.property(locator, "modality", sourceModality), sourceModality, (this.modality!= null))); copy.setModality(copyModality); } else { if (modalityShouldBeCopiedAndSet == Boolean.FALSE) { copy.modality = null; } } } { Boolean protocolCodeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.protocolCode!= null)); if (protocolCodeShouldBeCopiedAndSet == Boolean.TRUE) { CodedValue sourceProtocolCode; sourceProtocolCode = this.getProtocolCode(); CodedValue copyProtocolCode = ((CodedValue) strategy.copy(LocatorUtils.property(locator, "protocolCode", sourceProtocolCode), sourceProtocolCode, (this.protocolCode!= null))); copy.setProtocolCode(copyProtocolCode); } else { if (protocolCodeShouldBeCopiedAndSet == Boolean.FALSE) { copy.protocolCode = null; } } } } return draftCopy; } @Override public Object createNewInstance() { return new ImagingProcedure(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy