001package org.hl7.fhir.convertors.conv10_50;
002
003import org.hl7.fhir.convertors.VersionConvertor_10_50;
004import org.hl7.fhir.convertors.VersionConvertor_30_50;
005import org.hl7.fhir.exceptions.FHIRException;
006
007public class AuditEvent10_50 {
008
009    public static org.hl7.fhir.dstu2.model.AuditEvent convertAuditEvent(org.hl7.fhir.r5.model.AuditEvent src) throws FHIRException {
010        if (src == null || src.isEmpty())
011            return null;
012        org.hl7.fhir.dstu2.model.AuditEvent tgt = new org.hl7.fhir.dstu2.model.AuditEvent();
013        VersionConvertor_10_50.copyDomainResource(src, tgt);
014        tgt.getEvent().setType(VersionConvertor_10_50.convertCoding(src.getType()));
015        for (org.hl7.fhir.r5.model.Coding t : src.getSubtype()) tgt.getEvent().addSubtype(VersionConvertor_10_50.convertCoding(t));
016        tgt.getEvent().setActionElement(convertAuditEventAction(src.getActionElement()));
017        tgt.getEvent().setDateTime(src.getRecorded());
018
019        if (src.hasOutcome() && src.getOutcome().hasCoding("http://terminology.hl7.org/CodeSystem/audit-event-outcome"))
020          tgt.getEvent().getOutcomeElement().setValueAsString(src.getOutcome().getCode("http://terminology.hl7.org/CodeSystem/audit-event-outcome"));
021        if (src.getOutcome().hasText())
022          tgt.getEvent().setOutcomeDescElement(VersionConvertor_10_50.convertString(src.getOutcome().getTextElement()));
023        for (org.hl7.fhir.r5.model.CodeableConcept t : src.getPurposeOfEvent()) for (org.hl7.fhir.r5.model.Coding cc : t.getCoding()) tgt.getEvent().addPurposeOfEvent(VersionConvertor_10_50.convertCoding(cc));
024        for (org.hl7.fhir.r5.model.AuditEvent.AuditEventAgentComponent t : src.getAgent()) tgt.addParticipant(convertAuditEventAgentComponent(t));
025        if (src.hasSource())
026            tgt.setSource(convertAuditEventSourceComponent(src.getSource()));
027        for (org.hl7.fhir.r5.model.AuditEvent.AuditEventEntityComponent t : src.getEntity()) tgt.addObject(convertAuditEventEntityComponent(t));
028        return tgt;
029    }
030
031    public static org.hl7.fhir.r5.model.AuditEvent convertAuditEvent(org.hl7.fhir.dstu2.model.AuditEvent src) throws FHIRException {
032        if (src == null || src.isEmpty())
033            return null;
034        org.hl7.fhir.r5.model.AuditEvent tgt = new org.hl7.fhir.r5.model.AuditEvent();
035        VersionConvertor_10_50.copyDomainResource(src, tgt);
036        if (src.hasEvent()) {
037            if (src.hasType())
038                tgt.setType(VersionConvertor_10_50.convertCoding(src.getEvent().getType()));
039            for (org.hl7.fhir.dstu2.model.Coding t : src.getEvent().getSubtype()) tgt.addSubtype(VersionConvertor_10_50.convertCoding(t));
040            tgt.setActionElement(convertAuditEventAction(src.getEvent().getActionElement()));
041            tgt.setRecorded(src.getEvent().getDateTime());
042          
043            if (src.getEvent().hasOutcome())
044              tgt.getOutcome().addCoding().setSystem("http://terminology.hl7.org/CodeSystem/audit-event-outcome").setCode(src.getEvent().getOutcome().toCode());
045            if (src.getEvent().hasOutcomeDesc())
046              tgt.getOutcome().setTextElement(VersionConvertor_10_50.convertString(src.getEvent().getOutcomeDescElement()));
047
048            for (org.hl7.fhir.dstu2.model.Coding t : src.getEvent().getPurposeOfEvent()) tgt.addPurposeOfEvent().addCoding(VersionConvertor_10_50.convertCoding(t));
049        }
050        for (org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantComponent t : src.getParticipant()) tgt.addAgent(convertAuditEventAgentComponent(t));
051        if (src.hasSource())
052            tgt.setSource(convertAuditEventSourceComponent(src.getSource()));
053        for (org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectComponent t : src.getObject()) tgt.addEntity(convertAuditEventEntityComponent(t));
054        return tgt;
055    }
056
057    static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.AuditEvent.AuditEventAction> convertAuditEventAction(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.AuditEvent.AuditEventAction> src) throws FHIRException {
058        if (src == null || src.isEmpty())
059            return null;
060        org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.AuditEvent.AuditEventAction> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.AuditEvent.AuditEventActionEnumFactory());
061        VersionConvertor_10_50.copyElement(src, tgt);
062        switch(src.getValue()) {
063            case C:
064                tgt.setValue(org.hl7.fhir.r5.model.AuditEvent.AuditEventAction.C);
065                break;
066            case R:
067                tgt.setValue(org.hl7.fhir.r5.model.AuditEvent.AuditEventAction.R);
068                break;
069            case U:
070                tgt.setValue(org.hl7.fhir.r5.model.AuditEvent.AuditEventAction.U);
071                break;
072            case D:
073                tgt.setValue(org.hl7.fhir.r5.model.AuditEvent.AuditEventAction.D);
074                break;
075            case E:
076                tgt.setValue(org.hl7.fhir.r5.model.AuditEvent.AuditEventAction.E);
077                break;
078            default:
079                tgt.setValue(org.hl7.fhir.r5.model.AuditEvent.AuditEventAction.NULL);
080                break;
081        }
082        return tgt;
083    }
084
085    static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.AuditEvent.AuditEventAction> convertAuditEventAction(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.AuditEvent.AuditEventAction> src) throws FHIRException {
086        if (src == null || src.isEmpty())
087            return null;
088        org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.AuditEvent.AuditEventAction> tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventActionEnumFactory());
089        VersionConvertor_10_50.copyElement(src, tgt);
090        switch(src.getValue()) {
091            case C:
092                tgt.setValue(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventAction.C);
093                break;
094            case R:
095                tgt.setValue(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventAction.R);
096                break;
097            case U:
098                tgt.setValue(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventAction.U);
099                break;
100            case D:
101                tgt.setValue(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventAction.D);
102                break;
103            case E:
104                tgt.setValue(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventAction.E);
105                break;
106            default:
107                tgt.setValue(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventAction.NULL);
108                break;
109        }
110        return tgt;
111    }
112
113    public static org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantComponent convertAuditEventAgentComponent(org.hl7.fhir.r5.model.AuditEvent.AuditEventAgentComponent src) throws FHIRException {
114        if (src == null || src.isEmpty())
115            return null;
116        org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantComponent();
117        VersionConvertor_10_50.copyElement(src, tgt);
118        for (org.hl7.fhir.r5.model.CodeableConcept t : src.getRole()) tgt.addRole(VersionConvertor_10_50.convertCodeableConcept(t));
119        if (src.hasWho()) {
120            if (src.getWho().hasIdentifier())
121                tgt.setUserId(VersionConvertor_10_50.convertIdentifier(src.getWho().getIdentifier()));
122            if (src.getWho().hasReference() || src.getWho().hasDisplay() || src.getWho().hasExtension() || src.getWho().hasId())
123                tgt.setReference(VersionConvertor_10_50.convertReference(src.getWho()));
124        }
125        if (src.hasAltIdElement())
126            tgt.setAltIdElement(VersionConvertor_10_50.convertString(src.getAltIdElement()));
127        if (src.hasNameElement())
128            tgt.setNameElement(VersionConvertor_10_50.convertString(src.getNameElement()));
129        if (src.hasRequestorElement())
130            tgt.setRequestorElement(VersionConvertor_10_50.convertBoolean(src.getRequestorElement()));
131        if (src.hasLocation())
132            tgt.setLocation(VersionConvertor_10_50.convertReference(src.getLocation()));
133        for (org.hl7.fhir.r5.model.UriType t : src.getPolicy()) tgt.addPolicy(t.getValue());
134        if (src.hasMedia())
135            tgt.setMedia(VersionConvertor_10_50.convertCoding(src.getMedia()));
136        if (src.hasNetwork())
137            tgt.setNetwork(convertAuditEventAgentNetworkComponent(src.getNetwork()));
138        for (org.hl7.fhir.r5.model.CodeableConcept t : src.getPurposeOfUse()) for (org.hl7.fhir.r5.model.Coding cc : t.getCoding()) tgt.addPurposeOfUse(VersionConvertor_10_50.convertCoding(cc));
139        return tgt;
140    }
141
142    public static org.hl7.fhir.r5.model.AuditEvent.AuditEventAgentComponent convertAuditEventAgentComponent(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantComponent src) throws FHIRException {
143        if (src == null || src.isEmpty())
144            return null;
145        org.hl7.fhir.r5.model.AuditEvent.AuditEventAgentComponent tgt = new org.hl7.fhir.r5.model.AuditEvent.AuditEventAgentComponent();
146        VersionConvertor_10_50.copyElement(src, tgt);
147        for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getRole()) tgt.addRole(VersionConvertor_10_50.convertCodeableConcept(t));
148        if (src.hasReference())
149            tgt.setWho(VersionConvertor_10_50.convertReference(src.getReference()));
150        if (src.hasUserId())
151            tgt.getWho().setIdentifier(VersionConvertor_10_50.convertIdentifier(src.getUserId()));
152        if (src.hasAltIdElement())
153            tgt.setAltIdElement(VersionConvertor_10_50.convertString(src.getAltIdElement()));
154        if (src.hasNameElement())
155            tgt.setNameElement(VersionConvertor_10_50.convertString(src.getNameElement()));
156        if (src.hasRequestorElement())
157            tgt.setRequestorElement(VersionConvertor_10_50.convertBoolean(src.getRequestorElement()));
158        if (src.hasLocation())
159            tgt.setLocation(VersionConvertor_10_50.convertReference(src.getLocation()));
160        for (org.hl7.fhir.dstu2.model.UriType t : src.getPolicy()) tgt.addPolicy(t.getValue());
161        if (src.hasMedia())
162            tgt.setMedia(VersionConvertor_10_50.convertCoding(src.getMedia()));
163        if (src.hasNetwork())
164            tgt.setNetwork(convertAuditEventAgentNetworkComponent(src.getNetwork()));
165        for (org.hl7.fhir.dstu2.model.Coding t : src.getPurposeOfUse()) tgt.addPurposeOfUse().addCoding(VersionConvertor_10_50.convertCoding(t));
166        return tgt;
167    }
168
169    public static org.hl7.fhir.r5.model.AuditEvent.AuditEventAgentNetworkComponent convertAuditEventAgentNetworkComponent(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent src) throws FHIRException {
170        if (src == null || src.isEmpty())
171            return null;
172        org.hl7.fhir.r5.model.AuditEvent.AuditEventAgentNetworkComponent tgt = new org.hl7.fhir.r5.model.AuditEvent.AuditEventAgentNetworkComponent();
173        VersionConvertor_10_50.copyElement(src, tgt);
174        if (src.hasAddressElement())
175            tgt.setAddressElement(VersionConvertor_10_50.convertString(src.getAddressElement()));
176        if (src.hasType())
177            tgt.setTypeElement(convertAuditEventParticipantNetworkType(src.getTypeElement()));
178        return tgt;
179    }
180
181    public static org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent convertAuditEventAgentNetworkComponent(org.hl7.fhir.r5.model.AuditEvent.AuditEventAgentNetworkComponent src) throws FHIRException {
182        if (src == null || src.isEmpty())
183            return null;
184        org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent();
185        VersionConvertor_10_50.copyElement(src, tgt);
186        if (src.hasAddressElement())
187            tgt.setAddressElement(VersionConvertor_10_50.convertString(src.getAddressElement()));
188        if (src.hasType())
189            tgt.setTypeElement(convertAuditEventParticipantNetworkType(src.getTypeElement()));
190        return tgt;
191    }
192
193    public static org.hl7.fhir.r5.model.AuditEvent.AuditEventEntityComponent convertAuditEventEntityComponent(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectComponent src) throws FHIRException {
194        if (src == null || src.isEmpty())
195            return null;
196        org.hl7.fhir.r5.model.AuditEvent.AuditEventEntityComponent tgt = new org.hl7.fhir.r5.model.AuditEvent.AuditEventEntityComponent();
197        VersionConvertor_10_50.copyElement(src, tgt);
198        if (src.hasIdentifier())
199            tgt.getWhat().setIdentifier(VersionConvertor_10_50.convertIdentifier(src.getIdentifier()));
200        if (src.hasReference())
201            tgt.setWhat(VersionConvertor_10_50.convertReference(src.getReference()));
202        if (src.hasType())
203            tgt.setType(VersionConvertor_10_50.convertCoding(src.getType()));
204        if (src.hasRole())
205            tgt.setRole(VersionConvertor_10_50.convertCoding(src.getRole()));
206        if (src.hasLifecycle())
207            tgt.setLifecycle(VersionConvertor_10_50.convertCoding(src.getLifecycle()));
208        for (org.hl7.fhir.dstu2.model.Coding t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_50.convertCoding(t));
209        if (src.hasNameElement())
210            tgt.setNameElement(VersionConvertor_10_50.convertString(src.getNameElement()));
211        if (src.hasQueryElement())
212            tgt.setQueryElement(VersionConvertor_10_50.convertBase64Binary(src.getQueryElement()));
213        for (org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectDetailComponent t : src.getDetail()) tgt.addDetail(convertAuditEventEntityDetailComponent(t));
214        return tgt;
215    }
216
217    public static org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectComponent convertAuditEventEntityComponent(org.hl7.fhir.r5.model.AuditEvent.AuditEventEntityComponent src) throws FHIRException {
218        if (src == null || src.isEmpty())
219            return null;
220        org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectComponent();
221        VersionConvertor_10_50.copyElement(src, tgt);
222        if (src.hasWhat()) {
223            if (src.getWhat().hasIdentifier())
224                tgt.setIdentifier(VersionConvertor_10_50.convertIdentifier(src.getWhat().getIdentifier()));
225            if (src.getWhat().hasReference() || src.getWhat().hasDisplay() || src.getWhat().hasExtension() || src.getWhat().hasId())
226                tgt.setReference(VersionConvertor_10_50.convertReference(src.getWhat()));
227        }
228        if (src.hasType())
229            tgt.setType(VersionConvertor_10_50.convertCoding(src.getType()));
230        if (src.hasRole())
231            tgt.setRole(VersionConvertor_10_50.convertCoding(src.getRole()));
232        if (src.hasLifecycle())
233            tgt.setLifecycle(VersionConvertor_10_50.convertCoding(src.getLifecycle()));
234        for (org.hl7.fhir.r5.model.Coding t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_50.convertCoding(t));
235        if (src.hasNameElement())
236            tgt.setNameElement(VersionConvertor_10_50.convertString(src.getNameElement()));
237        if (src.hasQueryElement())
238            tgt.setQueryElement(VersionConvertor_10_50.convertBase64Binary(src.getQueryElement()));
239        for (org.hl7.fhir.r5.model.AuditEvent.AuditEventEntityDetailComponent t : src.getDetail()) tgt.addDetail(convertAuditEventEntityDetailComponent(t));
240        return tgt;
241    }
242
243    public static org.hl7.fhir.r5.model.AuditEvent.AuditEventEntityDetailComponent convertAuditEventEntityDetailComponent(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectDetailComponent src) throws FHIRException {
244        if (src == null || src.isEmpty())
245            return null;
246        org.hl7.fhir.r5.model.AuditEvent.AuditEventEntityDetailComponent tgt = new org.hl7.fhir.r5.model.AuditEvent.AuditEventEntityDetailComponent();
247        VersionConvertor_10_50.copyElement(src, tgt);
248        if (src.hasTypeElement())
249            tgt.setTypeElement(VersionConvertor_10_50.convertString(src.getTypeElement()));
250        if (src.hasValue())
251            tgt.setValue(new org.hl7.fhir.r5.model.Base64BinaryType(src.getValue()));
252        return tgt;
253    }
254
255    public static org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectDetailComponent convertAuditEventEntityDetailComponent(org.hl7.fhir.r5.model.AuditEvent.AuditEventEntityDetailComponent src) throws FHIRException {
256        if (src == null || src.isEmpty())
257            return null;
258        org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectDetailComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectDetailComponent();
259        VersionConvertor_10_50.copyElement(src, tgt);
260        if (src.hasTypeElement())
261            tgt.setTypeElement(VersionConvertor_10_50.convertString(src.getTypeElement()));
262        if (src.hasValueStringType())
263            tgt.setValue(src.getValueStringType().getValue().getBytes());
264        else if (src.hasValueBase64BinaryType())
265            tgt.setValue(src.getValueBase64BinaryType().getValue());
266        return tgt;
267    }
268
269 
270
271    static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.AuditEvent.AuditEventAgentNetworkType> convertAuditEventParticipantNetworkType(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkType> src) throws FHIRException {
272        if (src == null || src.isEmpty())
273            return null;
274        org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.AuditEvent.AuditEventAgentNetworkType> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.AuditEvent.AuditEventAgentNetworkTypeEnumFactory());
275        VersionConvertor_10_50.copyElement(src, tgt);
276        switch(src.getValue()) {
277            case _1:
278                tgt.setValue(org.hl7.fhir.r5.model.AuditEvent.AuditEventAgentNetworkType._1);
279                break;
280            case _2:
281                tgt.setValue(org.hl7.fhir.r5.model.AuditEvent.AuditEventAgentNetworkType._2);
282                break;
283            case _3:
284                tgt.setValue(org.hl7.fhir.r5.model.AuditEvent.AuditEventAgentNetworkType._3);
285                break;
286            case _4:
287                tgt.setValue(org.hl7.fhir.r5.model.AuditEvent.AuditEventAgentNetworkType._4);
288                break;
289            case _5:
290                tgt.setValue(org.hl7.fhir.r5.model.AuditEvent.AuditEventAgentNetworkType._5);
291                break;
292            default:
293                tgt.setValue(org.hl7.fhir.r5.model.AuditEvent.AuditEventAgentNetworkType.NULL);
294                break;
295        }
296        return tgt;
297    }
298
299    static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkType> convertAuditEventParticipantNetworkType(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.AuditEvent.AuditEventAgentNetworkType> src) throws FHIRException {
300        if (src == null || src.isEmpty())
301            return null;
302        org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkType> tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkTypeEnumFactory());
303        VersionConvertor_10_50.copyElement(src, tgt);
304        switch(src.getValue()) {
305            case _1:
306                tgt.setValue(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkType._1);
307                break;
308            case _2:
309                tgt.setValue(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkType._2);
310                break;
311            case _3:
312                tgt.setValue(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkType._3);
313                break;
314            case _4:
315                tgt.setValue(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkType._4);
316                break;
317            case _5:
318                tgt.setValue(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkType._5);
319                break;
320            default:
321                tgt.setValue(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkType.NULL);
322                break;
323        }
324        return tgt;
325    }
326
327    public static org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent convertAuditEventSourceComponent(org.hl7.fhir.r5.model.AuditEvent.AuditEventSourceComponent src) throws FHIRException {
328        if (src == null || src.isEmpty())
329            return null;
330        org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent();
331        VersionConvertor_10_50.copyElement(src, tgt);
332        if (src.hasSiteElement())
333            tgt.setSiteElement(VersionConvertor_10_50.convertString(src.getSiteElement()));
334        if (src.hasObserver())
335            tgt.setIdentifier(VersionConvertor_10_50.convertIdentifier(src.getObserver().getIdentifier()));
336        for (org.hl7.fhir.r5.model.Coding t : src.getType()) tgt.addType(VersionConvertor_10_50.convertCoding(t));
337        return tgt;
338    }
339
340    public static org.hl7.fhir.r5.model.AuditEvent.AuditEventSourceComponent convertAuditEventSourceComponent(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent src) throws FHIRException {
341        if (src == null || src.isEmpty())
342            return null;
343        org.hl7.fhir.r5.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.r5.model.AuditEvent.AuditEventSourceComponent();
344        VersionConvertor_10_50.copyElement(src, tgt);
345        if (src.hasSiteElement())
346            tgt.setSiteElement(VersionConvertor_10_50.convertString(src.getSiteElement()));
347        if (src.hasIdentifier())
348            tgt.getObserver().setIdentifier(VersionConvertor_10_50.convertIdentifier(src.getIdentifier()));
349        for (org.hl7.fhir.dstu2.model.Coding t : src.getType()) tgt.addType(VersionConvertor_10_50.convertCoding(t));
350        return tgt;
351    }
352}