fw4spl
core/fwMedData/include/fwMedData/Patient.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2017.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #ifndef __FWMEDDATA_PATIENT_HPP__
8 #define __FWMEDDATA_PATIENT_HPP__
9 
10 #include "fwMedData/config.hpp"
11 #include "fwMedData/types.hpp"
12 
13 #include <fwData/factory/new.hpp>
14 #include <fwData/Object.hpp>
15 
16 fwCampAutoDeclareDataMacro((fwMedData)(Patient), FWMEDDATA_API);
17 
18 namespace fwMedData
19 {
20 
24 class FWMEDDATA_CLASS_API Patient : public ::fwData::Object
25 {
26 
27 public:
28  fwCoreClassDefinitionsWithFactoryMacro( (Patient)(::fwData::Object), (()), ::fwData::factory::New< Patient >);
29 
30  fwCampMakeFriendDataMacro((fwMedData)(Patient));
31 
36  FWMEDDATA_API Patient(::fwData::Object::Key key);
37 
39  FWMEDDATA_API virtual ~Patient();
40 
42  FWMEDDATA_API void shallowCopy( const ::fwData::Object::csptr& _source ) override;
43 
45  FWMEDDATA_API void cachedDeepCopy( const ::fwData::Object::csptr& _source, DeepCopyCacheType& cache ) override;
46 
54  const DicomValueType& getName () const;
55  void setName(const DicomValueType& val);
61  const DicomValueType& getPatientId () const;
62  void setPatientId (const DicomValueType& val);
68  const DicomValueType& getBirthdate () const;
69  void setBirthdate (const DicomValueType& val);
76  const DicomValueType& getSex () const;
77  void setSex (const DicomValueType& val);
82 protected:
83 
85  DicomValueType m_name;
86 
88  DicomValueType m_patientId;
89 
91  DicomValueType m_birthdate;
92 
94  DicomValueType m_sex;
95 };
96 
97 //-----------------------------------------------------------------------------
98 
99 inline const DicomValueType& Patient::getName () const
100 {
101  return m_name;
102 }
103 
104 //-----------------------------------------------------------------------------
105 
106 inline void Patient::setName(const DicomValueType& val)
107 {
108  m_name = val;
109 }
110 
111 //-----------------------------------------------------------------------------
112 
113 inline const DicomValueType& Patient::getPatientId () const
114 {
115  return m_patientId;
116 }
117 
118 //-----------------------------------------------------------------------------
119 
120 inline void Patient::setPatientId (const DicomValueType& val)
121 {
122  m_patientId = val;
123 }
124 
125 //-----------------------------------------------------------------------------
126 
127 inline const DicomValueType& Patient::getBirthdate () const
128 {
129  return m_birthdate;
130 }
131 
132 //-----------------------------------------------------------------------------
133 
134 inline void Patient::setBirthdate (const DicomValueType& val)
135 {
136  m_birthdate = val;
137 }
138 
139 //-----------------------------------------------------------------------------
140 
141 inline const DicomValueType& Patient::getSex () const
142 {
143  return m_sex;
144 }
145 
146 //-----------------------------------------------------------------------------
147 
148 inline void Patient::setSex (const DicomValueType& val)
149 {
150  m_sex = val;
151 }
152 
153 //-----------------------------------------------------------------------------
154 
155 } //end namespace fwMedData
156 
157 #endif // __FWMEDDATA_PATIENT_HPP__
158 
DicomValueType m_patientId
Primary hospital identification.
This class contains helper to generate Medical Data (SeriesDB, ImageSeries, ...). ...
Namespace containing medical data.
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
void setPatientId(const DicomValueType &val)
Primary hospital identification number or code for the patient (0010,0020)
const DicomValueType & getBirthdate() const
Birthdate of the patient (0010,0030)
const DicomValueType & getSex() const
Sex of the named patient (0010,0040) Enumerated Values: M = male, F = female, O = other...
void setBirthdate(const DicomValueType &val)
Birthdate of the patient (0010,0030)
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.
void setName(const DicomValueType &val)
Patient&#39;s full name (0010,0010)
const DicomValueType & getPatientId() const
Primary hospital identification number or code for the patient (0010,0020)
Base class for each data object.
DicomValueType m_sex
Patient&#39;s sex.
void setSex(const DicomValueType &val)
Sex of the named patient (0010,0040) Enumerated Values: M = male, F = female, O = other...
const DicomValueType & getName() const
Patient&#39;s full name (0010,0010)