| /** |
| */ |
| package org.hl7.fhir.impl; |
| |
| import java.util.Collection; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| import org.eclipse.emf.common.notify.NotificationChain; |
| |
| import org.eclipse.emf.common.util.EList; |
| |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.InternalEObject; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| |
| import org.eclipse.emf.ecore.util.EObjectContainmentEList; |
| import org.eclipse.emf.ecore.util.InternalEList; |
| |
| import org.hl7.fhir.Attachment; |
| import org.hl7.fhir.CodeableConcept; |
| import org.hl7.fhir.DateTime; |
| import org.hl7.fhir.FhirPackage; |
| import org.hl7.fhir.ObservationComponent; |
| import org.hl7.fhir.ObservationReferenceRange; |
| import org.hl7.fhir.Period; |
| import org.hl7.fhir.Quantity; |
| import org.hl7.fhir.Range; |
| import org.hl7.fhir.Ratio; |
| import org.hl7.fhir.SampledData; |
| import org.hl7.fhir.Time; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Observation Component</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.hl7.fhir.impl.ObservationComponentImpl#getCode <em>Code</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ObservationComponentImpl#getValueQuantity <em>Value Quantity</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ObservationComponentImpl#getValueCodeableConcept <em>Value Codeable Concept</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ObservationComponentImpl#getValueString <em>Value String</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ObservationComponentImpl#getValueRange <em>Value Range</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ObservationComponentImpl#getValueRatio <em>Value Ratio</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ObservationComponentImpl#getValueSampledData <em>Value Sampled Data</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ObservationComponentImpl#getValueAttachment <em>Value Attachment</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ObservationComponentImpl#getValueTime <em>Value Time</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ObservationComponentImpl#getValueDateTime <em>Value Date Time</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ObservationComponentImpl#getValuePeriod <em>Value Period</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ObservationComponentImpl#getDataAbsentReason <em>Data Absent Reason</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ObservationComponentImpl#getReferenceRange <em>Reference Range</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class ObservationComponentImpl extends BackboneElementImpl implements ObservationComponent { |
| /** |
| * The cached value of the '{@link #getCode() <em>Code</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getCode() |
| * @generated |
| * @ordered |
| */ |
| protected CodeableConcept code; |
| |
| /** |
| * The cached value of the '{@link #getValueQuantity() <em>Value Quantity</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getValueQuantity() |
| * @generated |
| * @ordered |
| */ |
| protected Quantity valueQuantity; |
| |
| /** |
| * The cached value of the '{@link #getValueCodeableConcept() <em>Value Codeable Concept</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getValueCodeableConcept() |
| * @generated |
| * @ordered |
| */ |
| protected CodeableConcept valueCodeableConcept; |
| |
| /** |
| * The cached value of the '{@link #getValueString() <em>Value String</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getValueString() |
| * @generated |
| * @ordered |
| */ |
| protected org.hl7.fhir.String valueString; |
| |
| /** |
| * The cached value of the '{@link #getValueRange() <em>Value Range</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getValueRange() |
| * @generated |
| * @ordered |
| */ |
| protected Range valueRange; |
| |
| /** |
| * The cached value of the '{@link #getValueRatio() <em>Value Ratio</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getValueRatio() |
| * @generated |
| * @ordered |
| */ |
| protected Ratio valueRatio; |
| |
| /** |
| * The cached value of the '{@link #getValueSampledData() <em>Value Sampled Data</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getValueSampledData() |
| * @generated |
| * @ordered |
| */ |
| protected SampledData valueSampledData; |
| |
| /** |
| * The cached value of the '{@link #getValueAttachment() <em>Value Attachment</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getValueAttachment() |
| * @generated |
| * @ordered |
| */ |
| protected Attachment valueAttachment; |
| |
| /** |
| * The cached value of the '{@link #getValueTime() <em>Value Time</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getValueTime() |
| * @generated |
| * @ordered |
| */ |
| protected Time valueTime; |
| |
| /** |
| * The cached value of the '{@link #getValueDateTime() <em>Value Date Time</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getValueDateTime() |
| * @generated |
| * @ordered |
| */ |
| protected DateTime valueDateTime; |
| |
| /** |
| * The cached value of the '{@link #getValuePeriod() <em>Value Period</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getValuePeriod() |
| * @generated |
| * @ordered |
| */ |
| protected Period valuePeriod; |
| |
| /** |
| * The cached value of the '{@link #getDataAbsentReason() <em>Data Absent Reason</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getDataAbsentReason() |
| * @generated |
| * @ordered |
| */ |
| protected CodeableConcept dataAbsentReason; |
| |
| /** |
| * The cached value of the '{@link #getReferenceRange() <em>Reference Range</em>}' containment reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getReferenceRange() |
| * @generated |
| * @ordered |
| */ |
| protected EList<ObservationReferenceRange> referenceRange; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ObservationComponentImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return FhirPackage.eINSTANCE.getObservationComponent(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public CodeableConcept getCode() { |
| return code; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetCode(CodeableConcept newCode, NotificationChain msgs) { |
| CodeableConcept oldCode = code; |
| code = newCode; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.OBSERVATION_COMPONENT__CODE, oldCode, newCode); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setCode(CodeableConcept newCode) { |
| if (newCode != code) { |
| NotificationChain msgs = null; |
| if (code != null) |
| msgs = ((InternalEObject)code).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.OBSERVATION_COMPONENT__CODE, null, msgs); |
| if (newCode != null) |
| msgs = ((InternalEObject)newCode).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.OBSERVATION_COMPONENT__CODE, null, msgs); |
| msgs = basicSetCode(newCode, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.OBSERVATION_COMPONENT__CODE, newCode, newCode)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Quantity getValueQuantity() { |
| return valueQuantity; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetValueQuantity(Quantity newValueQuantity, NotificationChain msgs) { |
| Quantity oldValueQuantity = valueQuantity; |
| valueQuantity = newValueQuantity; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.OBSERVATION_COMPONENT__VALUE_QUANTITY, oldValueQuantity, newValueQuantity); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setValueQuantity(Quantity newValueQuantity) { |
| if (newValueQuantity != valueQuantity) { |
| NotificationChain msgs = null; |
| if (valueQuantity != null) |
| msgs = ((InternalEObject)valueQuantity).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.OBSERVATION_COMPONENT__VALUE_QUANTITY, null, msgs); |
| if (newValueQuantity != null) |
| msgs = ((InternalEObject)newValueQuantity).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.OBSERVATION_COMPONENT__VALUE_QUANTITY, null, msgs); |
| msgs = basicSetValueQuantity(newValueQuantity, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.OBSERVATION_COMPONENT__VALUE_QUANTITY, newValueQuantity, newValueQuantity)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public CodeableConcept getValueCodeableConcept() { |
| return valueCodeableConcept; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetValueCodeableConcept(CodeableConcept newValueCodeableConcept, NotificationChain msgs) { |
| CodeableConcept oldValueCodeableConcept = valueCodeableConcept; |
| valueCodeableConcept = newValueCodeableConcept; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.OBSERVATION_COMPONENT__VALUE_CODEABLE_CONCEPT, oldValueCodeableConcept, newValueCodeableConcept); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setValueCodeableConcept(CodeableConcept newValueCodeableConcept) { |
| if (newValueCodeableConcept != valueCodeableConcept) { |
| NotificationChain msgs = null; |
| if (valueCodeableConcept != null) |
| msgs = ((InternalEObject)valueCodeableConcept).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.OBSERVATION_COMPONENT__VALUE_CODEABLE_CONCEPT, null, msgs); |
| if (newValueCodeableConcept != null) |
| msgs = ((InternalEObject)newValueCodeableConcept).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.OBSERVATION_COMPONENT__VALUE_CODEABLE_CONCEPT, null, msgs); |
| msgs = basicSetValueCodeableConcept(newValueCodeableConcept, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.OBSERVATION_COMPONENT__VALUE_CODEABLE_CONCEPT, newValueCodeableConcept, newValueCodeableConcept)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.hl7.fhir.String getValueString() { |
| return valueString; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetValueString(org.hl7.fhir.String newValueString, NotificationChain msgs) { |
| org.hl7.fhir.String oldValueString = valueString; |
| valueString = newValueString; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.OBSERVATION_COMPONENT__VALUE_STRING, oldValueString, newValueString); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setValueString(org.hl7.fhir.String newValueString) { |
| if (newValueString != valueString) { |
| NotificationChain msgs = null; |
| if (valueString != null) |
| msgs = ((InternalEObject)valueString).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.OBSERVATION_COMPONENT__VALUE_STRING, null, msgs); |
| if (newValueString != null) |
| msgs = ((InternalEObject)newValueString).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.OBSERVATION_COMPONENT__VALUE_STRING, null, msgs); |
| msgs = basicSetValueString(newValueString, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.OBSERVATION_COMPONENT__VALUE_STRING, newValueString, newValueString)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Range getValueRange() { |
| return valueRange; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetValueRange(Range newValueRange, NotificationChain msgs) { |
| Range oldValueRange = valueRange; |
| valueRange = newValueRange; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.OBSERVATION_COMPONENT__VALUE_RANGE, oldValueRange, newValueRange); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setValueRange(Range newValueRange) { |
| if (newValueRange != valueRange) { |
| NotificationChain msgs = null; |
| if (valueRange != null) |
| msgs = ((InternalEObject)valueRange).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.OBSERVATION_COMPONENT__VALUE_RANGE, null, msgs); |
| if (newValueRange != null) |
| msgs = ((InternalEObject)newValueRange).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.OBSERVATION_COMPONENT__VALUE_RANGE, null, msgs); |
| msgs = basicSetValueRange(newValueRange, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.OBSERVATION_COMPONENT__VALUE_RANGE, newValueRange, newValueRange)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Ratio getValueRatio() { |
| return valueRatio; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetValueRatio(Ratio newValueRatio, NotificationChain msgs) { |
| Ratio oldValueRatio = valueRatio; |
| valueRatio = newValueRatio; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.OBSERVATION_COMPONENT__VALUE_RATIO, oldValueRatio, newValueRatio); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setValueRatio(Ratio newValueRatio) { |
| if (newValueRatio != valueRatio) { |
| NotificationChain msgs = null; |
| if (valueRatio != null) |
| msgs = ((InternalEObject)valueRatio).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.OBSERVATION_COMPONENT__VALUE_RATIO, null, msgs); |
| if (newValueRatio != null) |
| msgs = ((InternalEObject)newValueRatio).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.OBSERVATION_COMPONENT__VALUE_RATIO, null, msgs); |
| msgs = basicSetValueRatio(newValueRatio, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.OBSERVATION_COMPONENT__VALUE_RATIO, newValueRatio, newValueRatio)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public SampledData getValueSampledData() { |
| return valueSampledData; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetValueSampledData(SampledData newValueSampledData, NotificationChain msgs) { |
| SampledData oldValueSampledData = valueSampledData; |
| valueSampledData = newValueSampledData; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.OBSERVATION_COMPONENT__VALUE_SAMPLED_DATA, oldValueSampledData, newValueSampledData); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setValueSampledData(SampledData newValueSampledData) { |
| if (newValueSampledData != valueSampledData) { |
| NotificationChain msgs = null; |
| if (valueSampledData != null) |
| msgs = ((InternalEObject)valueSampledData).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.OBSERVATION_COMPONENT__VALUE_SAMPLED_DATA, null, msgs); |
| if (newValueSampledData != null) |
| msgs = ((InternalEObject)newValueSampledData).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.OBSERVATION_COMPONENT__VALUE_SAMPLED_DATA, null, msgs); |
| msgs = basicSetValueSampledData(newValueSampledData, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.OBSERVATION_COMPONENT__VALUE_SAMPLED_DATA, newValueSampledData, newValueSampledData)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Attachment getValueAttachment() { |
| return valueAttachment; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetValueAttachment(Attachment newValueAttachment, NotificationChain msgs) { |
| Attachment oldValueAttachment = valueAttachment; |
| valueAttachment = newValueAttachment; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.OBSERVATION_COMPONENT__VALUE_ATTACHMENT, oldValueAttachment, newValueAttachment); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setValueAttachment(Attachment newValueAttachment) { |
| if (newValueAttachment != valueAttachment) { |
| NotificationChain msgs = null; |
| if (valueAttachment != null) |
| msgs = ((InternalEObject)valueAttachment).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.OBSERVATION_COMPONENT__VALUE_ATTACHMENT, null, msgs); |
| if (newValueAttachment != null) |
| msgs = ((InternalEObject)newValueAttachment).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.OBSERVATION_COMPONENT__VALUE_ATTACHMENT, null, msgs); |
| msgs = basicSetValueAttachment(newValueAttachment, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.OBSERVATION_COMPONENT__VALUE_ATTACHMENT, newValueAttachment, newValueAttachment)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Time getValueTime() { |
| return valueTime; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetValueTime(Time newValueTime, NotificationChain msgs) { |
| Time oldValueTime = valueTime; |
| valueTime = newValueTime; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.OBSERVATION_COMPONENT__VALUE_TIME, oldValueTime, newValueTime); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setValueTime(Time newValueTime) { |
| if (newValueTime != valueTime) { |
| NotificationChain msgs = null; |
| if (valueTime != null) |
| msgs = ((InternalEObject)valueTime).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.OBSERVATION_COMPONENT__VALUE_TIME, null, msgs); |
| if (newValueTime != null) |
| msgs = ((InternalEObject)newValueTime).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.OBSERVATION_COMPONENT__VALUE_TIME, null, msgs); |
| msgs = basicSetValueTime(newValueTime, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.OBSERVATION_COMPONENT__VALUE_TIME, newValueTime, newValueTime)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public DateTime getValueDateTime() { |
| return valueDateTime; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetValueDateTime(DateTime newValueDateTime, NotificationChain msgs) { |
| DateTime oldValueDateTime = valueDateTime; |
| valueDateTime = newValueDateTime; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.OBSERVATION_COMPONENT__VALUE_DATE_TIME, oldValueDateTime, newValueDateTime); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setValueDateTime(DateTime newValueDateTime) { |
| if (newValueDateTime != valueDateTime) { |
| NotificationChain msgs = null; |
| if (valueDateTime != null) |
| msgs = ((InternalEObject)valueDateTime).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.OBSERVATION_COMPONENT__VALUE_DATE_TIME, null, msgs); |
| if (newValueDateTime != null) |
| msgs = ((InternalEObject)newValueDateTime).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.OBSERVATION_COMPONENT__VALUE_DATE_TIME, null, msgs); |
| msgs = basicSetValueDateTime(newValueDateTime, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.OBSERVATION_COMPONENT__VALUE_DATE_TIME, newValueDateTime, newValueDateTime)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Period getValuePeriod() { |
| return valuePeriod; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetValuePeriod(Period newValuePeriod, NotificationChain msgs) { |
| Period oldValuePeriod = valuePeriod; |
| valuePeriod = newValuePeriod; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.OBSERVATION_COMPONENT__VALUE_PERIOD, oldValuePeriod, newValuePeriod); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setValuePeriod(Period newValuePeriod) { |
| if (newValuePeriod != valuePeriod) { |
| NotificationChain msgs = null; |
| if (valuePeriod != null) |
| msgs = ((InternalEObject)valuePeriod).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.OBSERVATION_COMPONENT__VALUE_PERIOD, null, msgs); |
| if (newValuePeriod != null) |
| msgs = ((InternalEObject)newValuePeriod).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.OBSERVATION_COMPONENT__VALUE_PERIOD, null, msgs); |
| msgs = basicSetValuePeriod(newValuePeriod, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.OBSERVATION_COMPONENT__VALUE_PERIOD, newValuePeriod, newValuePeriod)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public CodeableConcept getDataAbsentReason() { |
| return dataAbsentReason; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetDataAbsentReason(CodeableConcept newDataAbsentReason, NotificationChain msgs) { |
| CodeableConcept oldDataAbsentReason = dataAbsentReason; |
| dataAbsentReason = newDataAbsentReason; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.OBSERVATION_COMPONENT__DATA_ABSENT_REASON, oldDataAbsentReason, newDataAbsentReason); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setDataAbsentReason(CodeableConcept newDataAbsentReason) { |
| if (newDataAbsentReason != dataAbsentReason) { |
| NotificationChain msgs = null; |
| if (dataAbsentReason != null) |
| msgs = ((InternalEObject)dataAbsentReason).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.OBSERVATION_COMPONENT__DATA_ABSENT_REASON, null, msgs); |
| if (newDataAbsentReason != null) |
| msgs = ((InternalEObject)newDataAbsentReason).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.OBSERVATION_COMPONENT__DATA_ABSENT_REASON, null, msgs); |
| msgs = basicSetDataAbsentReason(newDataAbsentReason, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.OBSERVATION_COMPONENT__DATA_ABSENT_REASON, newDataAbsentReason, newDataAbsentReason)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EList<ObservationReferenceRange> getReferenceRange() { |
| if (referenceRange == null) { |
| referenceRange = new EObjectContainmentEList<ObservationReferenceRange>(ObservationReferenceRange.class, this, FhirPackage.OBSERVATION_COMPONENT__REFERENCE_RANGE); |
| } |
| return referenceRange; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case FhirPackage.OBSERVATION_COMPONENT__CODE: |
| return basicSetCode(null, msgs); |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_QUANTITY: |
| return basicSetValueQuantity(null, msgs); |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_CODEABLE_CONCEPT: |
| return basicSetValueCodeableConcept(null, msgs); |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_STRING: |
| return basicSetValueString(null, msgs); |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_RANGE: |
| return basicSetValueRange(null, msgs); |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_RATIO: |
| return basicSetValueRatio(null, msgs); |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_SAMPLED_DATA: |
| return basicSetValueSampledData(null, msgs); |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_ATTACHMENT: |
| return basicSetValueAttachment(null, msgs); |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_TIME: |
| return basicSetValueTime(null, msgs); |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_DATE_TIME: |
| return basicSetValueDateTime(null, msgs); |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_PERIOD: |
| return basicSetValuePeriod(null, msgs); |
| case FhirPackage.OBSERVATION_COMPONENT__DATA_ABSENT_REASON: |
| return basicSetDataAbsentReason(null, msgs); |
| case FhirPackage.OBSERVATION_COMPONENT__REFERENCE_RANGE: |
| return ((InternalEList<?>)getReferenceRange()).basicRemove(otherEnd, msgs); |
| } |
| return super.eInverseRemove(otherEnd, featureID, msgs); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case FhirPackage.OBSERVATION_COMPONENT__CODE: |
| return getCode(); |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_QUANTITY: |
| return getValueQuantity(); |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_CODEABLE_CONCEPT: |
| return getValueCodeableConcept(); |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_STRING: |
| return getValueString(); |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_RANGE: |
| return getValueRange(); |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_RATIO: |
| return getValueRatio(); |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_SAMPLED_DATA: |
| return getValueSampledData(); |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_ATTACHMENT: |
| return getValueAttachment(); |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_TIME: |
| return getValueTime(); |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_DATE_TIME: |
| return getValueDateTime(); |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_PERIOD: |
| return getValuePeriod(); |
| case FhirPackage.OBSERVATION_COMPONENT__DATA_ABSENT_REASON: |
| return getDataAbsentReason(); |
| case FhirPackage.OBSERVATION_COMPONENT__REFERENCE_RANGE: |
| return getReferenceRange(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @SuppressWarnings("unchecked") |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case FhirPackage.OBSERVATION_COMPONENT__CODE: |
| setCode((CodeableConcept)newValue); |
| return; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_QUANTITY: |
| setValueQuantity((Quantity)newValue); |
| return; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_CODEABLE_CONCEPT: |
| setValueCodeableConcept((CodeableConcept)newValue); |
| return; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_STRING: |
| setValueString((org.hl7.fhir.String)newValue); |
| return; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_RANGE: |
| setValueRange((Range)newValue); |
| return; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_RATIO: |
| setValueRatio((Ratio)newValue); |
| return; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_SAMPLED_DATA: |
| setValueSampledData((SampledData)newValue); |
| return; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_ATTACHMENT: |
| setValueAttachment((Attachment)newValue); |
| return; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_TIME: |
| setValueTime((Time)newValue); |
| return; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_DATE_TIME: |
| setValueDateTime((DateTime)newValue); |
| return; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_PERIOD: |
| setValuePeriod((Period)newValue); |
| return; |
| case FhirPackage.OBSERVATION_COMPONENT__DATA_ABSENT_REASON: |
| setDataAbsentReason((CodeableConcept)newValue); |
| return; |
| case FhirPackage.OBSERVATION_COMPONENT__REFERENCE_RANGE: |
| getReferenceRange().clear(); |
| getReferenceRange().addAll((Collection<? extends ObservationReferenceRange>)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case FhirPackage.OBSERVATION_COMPONENT__CODE: |
| setCode((CodeableConcept)null); |
| return; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_QUANTITY: |
| setValueQuantity((Quantity)null); |
| return; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_CODEABLE_CONCEPT: |
| setValueCodeableConcept((CodeableConcept)null); |
| return; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_STRING: |
| setValueString((org.hl7.fhir.String)null); |
| return; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_RANGE: |
| setValueRange((Range)null); |
| return; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_RATIO: |
| setValueRatio((Ratio)null); |
| return; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_SAMPLED_DATA: |
| setValueSampledData((SampledData)null); |
| return; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_ATTACHMENT: |
| setValueAttachment((Attachment)null); |
| return; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_TIME: |
| setValueTime((Time)null); |
| return; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_DATE_TIME: |
| setValueDateTime((DateTime)null); |
| return; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_PERIOD: |
| setValuePeriod((Period)null); |
| return; |
| case FhirPackage.OBSERVATION_COMPONENT__DATA_ABSENT_REASON: |
| setDataAbsentReason((CodeableConcept)null); |
| return; |
| case FhirPackage.OBSERVATION_COMPONENT__REFERENCE_RANGE: |
| getReferenceRange().clear(); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case FhirPackage.OBSERVATION_COMPONENT__CODE: |
| return code != null; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_QUANTITY: |
| return valueQuantity != null; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_CODEABLE_CONCEPT: |
| return valueCodeableConcept != null; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_STRING: |
| return valueString != null; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_RANGE: |
| return valueRange != null; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_RATIO: |
| return valueRatio != null; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_SAMPLED_DATA: |
| return valueSampledData != null; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_ATTACHMENT: |
| return valueAttachment != null; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_TIME: |
| return valueTime != null; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_DATE_TIME: |
| return valueDateTime != null; |
| case FhirPackage.OBSERVATION_COMPONENT__VALUE_PERIOD: |
| return valuePeriod != null; |
| case FhirPackage.OBSERVATION_COMPONENT__DATA_ABSENT_REASON: |
| return dataAbsentReason != null; |
| case FhirPackage.OBSERVATION_COMPONENT__REFERENCE_RANGE: |
| return referenceRange != null && !referenceRange.isEmpty(); |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //ObservationComponentImpl |