1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package ca.uhn.fhir.model.dstu.composite;
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39 import java.util.List;
40
41 import ca.uhn.fhir.model.api.BaseIdentifiableElement;
42 import ca.uhn.fhir.model.api.ICompositeDatatype;
43 import ca.uhn.fhir.model.api.IElement;
44 import ca.uhn.fhir.model.api.annotation.Child;
45 import ca.uhn.fhir.model.api.annotation.DatatypeDef;
46 import ca.uhn.fhir.model.dstu.valueset.NarrativeStatusEnum;
47 import ca.uhn.fhir.model.primitive.BoundCodeDt;
48 import ca.uhn.fhir.model.primitive.CodeDt;
49 import ca.uhn.fhir.model.primitive.XhtmlDt;
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65 @DatatypeDef(name="Narrative")
66 public class NarrativeDt extends BaseIdentifiableElement implements ICompositeDatatype {
67
68 @Child(name="status", type=CodeDt.class, order=0, min=1, max=1)
69 private BoundCodeDt<NarrativeStatusEnum> myStatus;
70
71 @Child(name="div", type=XhtmlDt.class, order=1, min=1, max=1)
72 private XhtmlDt myDiv;
73
74 public NarrativeDt() {
75
76 }
77
78 public NarrativeDt(XhtmlDt theDiv, NarrativeStatusEnum theStatus) {
79 setDiv(theDiv);
80 setStatus(theStatus);
81 }
82
83 @Override
84 public boolean isEmpty() {
85 return ca.uhn.fhir.util.ElementUtil.isEmpty( myStatus, myDiv );
86 }
87
88
89 @Override
90 public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
91 return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements( theType, myStatus, myDiv );
92 }
93
94
95
96
97
98
99
100
101
102
103
104 public BoundCodeDt<NarrativeStatusEnum> getStatus() {
105 if (myStatus == null) {
106 myStatus = new BoundCodeDt<NarrativeStatusEnum>(NarrativeStatusEnum.VALUESET_BINDER);
107 }
108 return myStatus;
109 }
110
111
112
113
114
115
116
117
118
119 public void setStatus(BoundCodeDt<NarrativeStatusEnum> theValue) {
120 myStatus = theValue;
121 }
122
123
124
125
126
127
128
129
130
131 public void setStatus(NarrativeStatusEnum theValue) {
132 getStatus().setValueAsEnum(theValue);
133 }
134
135
136
137
138
139
140
141
142
143
144
145
146 public XhtmlDt getDiv() {
147 if (myDiv == null) {
148 myDiv = new XhtmlDt();
149 }
150 return myDiv;
151 }
152
153
154
155
156
157
158
159
160
161 public void setDiv(XhtmlDt theValue) {
162 myDiv = theValue;
163 }
164
165
166
167
168
169 public void setDiv(String theTextDiv) {
170 myDiv = new XhtmlDt(theTextDiv);
171 }
172
173
174
175
176 }