001package org.hl7.fhir.convertors.conv40_50;
002
003
004import org.hl7.fhir.convertors.VersionConvertor_40_50;
005import org.hl7.fhir.exceptions.FHIRException;
006import org.hl7.fhir.r5.model.CodeableReference;
007
008/*
009  Copyright (c) 2011+, HL7, Inc.
010  All rights reserved.
011  
012  Redistribution and use in source and binary forms, with or without modification, 
013  are permitted provided that the following conditions are met:
014  
015   * Redistributions of source code must retain the above copyright notice, this 
016     list of conditions and the following disclaimer.
017   * Redistributions in binary form must reproduce the above copyright notice, 
018     this list of conditions and the following disclaimer in the documentation 
019     and/or other materials provided with the distribution.
020   * Neither the name of HL7 nor the names of its contributors may be used to 
021     endorse or promote products derived from this software without specific 
022     prior written permission.
023  
024  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
025  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
026  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
027  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
028  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
029  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
030  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
031  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
032  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
033  POSSIBILITY OF SUCH DAMAGE.
034  
035*/
036// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
037public class RequestGroup40_50 extends VersionConvertor_40_50 {
038
039    public static org.hl7.fhir.r5.model.RequestGroup convertRequestGroup(org.hl7.fhir.r4.model.RequestGroup src) throws FHIRException {
040        if (src == null)
041            return null;
042        org.hl7.fhir.r5.model.RequestGroup tgt = new org.hl7.fhir.r5.model.RequestGroup();
043        copyDomainResource(src, tgt);
044        for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t));
045        for (org.hl7.fhir.r4.model.CanonicalType t : src.getInstantiatesCanonical()) tgt.getInstantiatesCanonical().add(convertCanonical(t));
046        for (org.hl7.fhir.r4.model.UriType t : src.getInstantiatesUri()) tgt.getInstantiatesUri().add(convertUri(t));
047        for (org.hl7.fhir.r4.model.Reference t : src.getBasedOn()) tgt.addBasedOn(convertReference(t));
048        for (org.hl7.fhir.r4.model.Reference t : src.getReplaces()) tgt.addReplaces(convertReference(t));
049        if (src.hasGroupIdentifier())
050            tgt.setGroupIdentifier(convertIdentifier(src.getGroupIdentifier()));
051        if (src.hasStatus())
052            tgt.setStatusElement(convertRequestStatus(src.getStatusElement()));
053        if (src.hasIntent())
054            tgt.setIntentElement(convertRequestIntent(src.getIntentElement()));
055        if (src.hasPriority())
056            tgt.setPriorityElement(convertRequestPriority(src.getPriorityElement()));
057        if (src.hasCode())
058            tgt.setCode(convertCodeableConcept(src.getCode()));
059        if (src.hasSubject())
060            tgt.setSubject(convertReference(src.getSubject()));
061        if (src.hasEncounter())
062            tgt.setEncounter(convertReference(src.getEncounter()));
063        if (src.hasAuthoredOn())
064            tgt.setAuthoredOnElement(convertDateTime(src.getAuthoredOnElement()));
065        if (src.hasAuthor())
066            tgt.setAuthor(convertReference(src.getAuthor()));
067        for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode()) tgt.addReason(convertCodeableConceptToCodeableReference(t));
068        for (org.hl7.fhir.r4.model.Reference t : src.getReasonReference()) tgt.addReason(convertReferenceToCodeableReference(t));
069        for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) tgt.addNote(convertAnnotation(t));
070        for (org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionComponent t : src.getAction()) tgt.addAction(convertRequestGroupActionComponent(t));
071        return tgt;
072    }
073
074    public static org.hl7.fhir.r4.model.RequestGroup convertRequestGroup(org.hl7.fhir.r5.model.RequestGroup src) throws FHIRException {
075        if (src == null)
076            return null;
077        org.hl7.fhir.r4.model.RequestGroup tgt = new org.hl7.fhir.r4.model.RequestGroup();
078        copyDomainResource(src, tgt);
079        for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t));
080        for (org.hl7.fhir.r5.model.CanonicalType t : src.getInstantiatesCanonical()) tgt.getInstantiatesCanonical().add(convertCanonical(t));
081        for (org.hl7.fhir.r5.model.UriType t : src.getInstantiatesUri()) tgt.getInstantiatesUri().add(convertUri(t));
082        for (org.hl7.fhir.r5.model.Reference t : src.getBasedOn()) tgt.addBasedOn(convertReference(t));
083        for (org.hl7.fhir.r5.model.Reference t : src.getReplaces()) tgt.addReplaces(convertReference(t));
084        if (src.hasGroupIdentifier())
085            tgt.setGroupIdentifier(convertIdentifier(src.getGroupIdentifier()));
086        if (src.hasStatus())
087            tgt.setStatusElement(convertRequestStatus(src.getStatusElement()));
088        if (src.hasIntent())
089            tgt.setIntentElement(convertRequestIntent(src.getIntentElement()));
090        if (src.hasPriority())
091            tgt.setPriorityElement(convertRequestPriority(src.getPriorityElement()));
092        if (src.hasCode())
093            tgt.setCode(convertCodeableConcept(src.getCode()));
094        if (src.hasSubject())
095            tgt.setSubject(convertReference(src.getSubject()));
096        if (src.hasEncounter())
097            tgt.setEncounter(convertReference(src.getEncounter()));
098        if (src.hasAuthoredOn())
099            tgt.setAuthoredOnElement(convertDateTime(src.getAuthoredOnElement()));
100        if (src.hasAuthor())
101            tgt.setAuthor(convertReference(src.getAuthor()));
102        for (CodeableReference t : src.getReason()) if (t.hasConcept())
103            tgt.addReasonCode(convertCodeableConcept(t.getConcept()));
104        for (CodeableReference t : src.getReason()) if (t.hasReference())
105            tgt.addReasonReference(convertReference(t.getReference()));
106        for (org.hl7.fhir.r5.model.Annotation t : src.getNote()) tgt.addNote(convertAnnotation(t));
107        for (org.hl7.fhir.r5.model.RequestGroup.RequestGroupActionComponent t : src.getAction()) tgt.addAction(convertRequestGroupActionComponent(t));
108        return tgt;
109    }
110
111    static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RequestStatus> convertRequestStatus(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.RequestStatus> src) throws FHIRException {
112        if (src == null || src.isEmpty())
113            return null;
114        org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RequestStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.RequestStatusEnumFactory());
115        VersionConvertor_40_50.copyElement(src, tgt);
116        switch(src.getValue()) {
117            case DRAFT:
118                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestStatus.DRAFT);
119                break;
120            case ACTIVE:
121                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestStatus.ACTIVE);
122                break;
123            case ONHOLD:
124                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestStatus.ONHOLD);
125                break;
126            case REVOKED:
127                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestStatus.REVOKED);
128                break;
129            case COMPLETED:
130                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestStatus.COMPLETED);
131                break;
132            case ENTEREDINERROR:
133                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestStatus.ENTEREDINERROR);
134                break;
135            case UNKNOWN:
136                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestStatus.UNKNOWN);
137                break;
138            default:
139                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestStatus.NULL);
140                break;
141        }
142        return tgt;
143    }
144
145    static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.RequestStatus> convertRequestStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RequestStatus> src) throws FHIRException {
146        if (src == null || src.isEmpty())
147            return null;
148        org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.RequestStatus> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.RequestGroup.RequestStatusEnumFactory());
149        VersionConvertor_40_50.copyElement(src, tgt);
150        switch(src.getValue()) {
151            case DRAFT:
152                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.RequestStatus.DRAFT);
153                break;
154            case ACTIVE:
155                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.RequestStatus.ACTIVE);
156                break;
157            case ONHOLD:
158                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.RequestStatus.ONHOLD);
159                break;
160            case REVOKED:
161                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.RequestStatus.REVOKED);
162                break;
163            case COMPLETED:
164                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.RequestStatus.COMPLETED);
165                break;
166            case ENTEREDINERROR:
167                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.RequestStatus.ENTEREDINERROR);
168                break;
169            case UNKNOWN:
170                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.RequestStatus.UNKNOWN);
171                break;
172            default:
173                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.RequestStatus.NULL);
174                break;
175        }
176        return tgt;
177    }
178
179    static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RequestIntent> convertRequestIntent(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.RequestIntent> src) throws FHIRException {
180        if (src == null || src.isEmpty())
181            return null;
182        org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RequestIntent> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.RequestIntentEnumFactory());
183        VersionConvertor_40_50.copyElement(src, tgt);
184        switch(src.getValue()) {
185            case PROPOSAL:
186                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestIntent.PROPOSAL);
187                break;
188            case PLAN:
189                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestIntent.PLAN);
190                break;
191            case DIRECTIVE:
192                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestIntent.DIRECTIVE);
193                break;
194            case ORDER:
195                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestIntent.ORDER);
196                break;
197            case ORIGINALORDER:
198                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestIntent.ORIGINALORDER);
199                break;
200            case REFLEXORDER:
201                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestIntent.REFLEXORDER);
202                break;
203            case FILLERORDER:
204                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestIntent.FILLERORDER);
205                break;
206            case INSTANCEORDER:
207                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestIntent.INSTANCEORDER);
208                break;
209            case OPTION:
210                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestIntent.OPTION);
211                break;
212            default:
213                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestIntent.NULL);
214                break;
215        }
216        return tgt;
217    }
218
219    static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.RequestIntent> convertRequestIntent(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RequestIntent> src) throws FHIRException {
220        if (src == null || src.isEmpty())
221            return null;
222        org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.RequestIntent> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.RequestGroup.RequestIntentEnumFactory());
223        VersionConvertor_40_50.copyElement(src, tgt);
224        switch(src.getValue()) {
225            case PROPOSAL:
226                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.RequestIntent.PROPOSAL);
227                break;
228            case PLAN:
229                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.RequestIntent.PLAN);
230                break;
231            case DIRECTIVE:
232                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.RequestIntent.DIRECTIVE);
233                break;
234            case ORDER:
235                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.RequestIntent.ORDER);
236                break;
237            case ORIGINALORDER:
238                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.RequestIntent.ORIGINALORDER);
239                break;
240            case REFLEXORDER:
241                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.RequestIntent.REFLEXORDER);
242                break;
243            case FILLERORDER:
244                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.RequestIntent.FILLERORDER);
245                break;
246            case INSTANCEORDER:
247                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.RequestIntent.INSTANCEORDER);
248                break;
249            case OPTION:
250                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.RequestIntent.OPTION);
251                break;
252            default:
253                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.RequestIntent.NULL);
254                break;
255        }
256        return tgt;
257    }
258
259    static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RequestPriority> convertRequestPriority(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.RequestPriority> src) throws FHIRException {
260        if (src == null || src.isEmpty())
261            return null;
262        org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RequestPriority> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.RequestPriorityEnumFactory());
263        VersionConvertor_40_50.copyElement(src, tgt);
264        switch(src.getValue()) {
265            case ROUTINE:
266                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestPriority.ROUTINE);
267                break;
268            case URGENT:
269                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestPriority.URGENT);
270                break;
271            case ASAP:
272                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestPriority.ASAP);
273                break;
274            case STAT:
275                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestPriority.STAT);
276                break;
277            default:
278                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestPriority.NULL);
279                break;
280        }
281        return tgt;
282    }
283
284    static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.RequestPriority> convertRequestPriority(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RequestPriority> src) throws FHIRException {
285        if (src == null || src.isEmpty())
286            return null;
287        org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.RequestPriority> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.RequestGroup.RequestPriorityEnumFactory());
288        VersionConvertor_40_50.copyElement(src, tgt);
289        switch(src.getValue()) {
290            case ROUTINE:
291                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.RequestPriority.ROUTINE);
292                break;
293            case URGENT:
294                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.RequestPriority.URGENT);
295                break;
296            case ASAP:
297                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.RequestPriority.ASAP);
298                break;
299            case STAT:
300                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.RequestPriority.STAT);
301                break;
302            default:
303                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.RequestPriority.NULL);
304                break;
305        }
306        return tgt;
307    }
308
309    public static org.hl7.fhir.r5.model.RequestGroup.RequestGroupActionComponent convertRequestGroupActionComponent(org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionComponent src) throws FHIRException {
310        if (src == null)
311            return null;
312        org.hl7.fhir.r5.model.RequestGroup.RequestGroupActionComponent tgt = new org.hl7.fhir.r5.model.RequestGroup.RequestGroupActionComponent();
313        copyElement(src, tgt);
314        if (src.hasPrefix())
315            tgt.setPrefixElement(convertString(src.getPrefixElement()));
316        if (src.hasTitle())
317            tgt.setTitleElement(convertString(src.getTitleElement()));
318        if (src.hasDescription())
319            tgt.setDescriptionElement(convertString(src.getDescriptionElement()));
320        if (src.hasTextEquivalent())
321            tgt.setTextEquivalentElement(convertString(src.getTextEquivalentElement()));
322        if (src.hasPriority())
323            tgt.setPriorityElement(convertRequestPriority(src.getPriorityElement()));
324        for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCode()) tgt.addCode(convertCodeableConcept(t));
325        for (org.hl7.fhir.r4.model.RelatedArtifact t : src.getDocumentation()) tgt.addDocumentation(convertRelatedArtifact(t));
326        for (org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionConditionComponent t : src.getCondition()) tgt.addCondition(convertRequestGroupActionConditionComponent(t));
327        for (org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionRelatedActionComponent t : src.getRelatedAction()) tgt.addRelatedAction(convertRequestGroupActionRelatedActionComponent(t));
328        if (src.hasTiming())
329            tgt.setTiming(convertType(src.getTiming()));
330        for (org.hl7.fhir.r4.model.Reference t : src.getParticipant()) tgt.addParticipant(convertReference(t));
331        if (src.hasType())
332            tgt.setType(convertCodeableConcept(src.getType()));
333        if (src.hasGroupingBehavior())
334            tgt.setGroupingBehaviorElement(convertActionGroupingBehavior(src.getGroupingBehaviorElement()));
335        if (src.hasSelectionBehavior())
336            tgt.setSelectionBehaviorElement(convertActionSelectionBehavior(src.getSelectionBehaviorElement()));
337        if (src.hasRequiredBehavior())
338            tgt.setRequiredBehaviorElement(convertActionRequiredBehavior(src.getRequiredBehaviorElement()));
339        if (src.hasPrecheckBehavior())
340            tgt.setPrecheckBehaviorElement(convertActionPrecheckBehavior(src.getPrecheckBehaviorElement()));
341        if (src.hasCardinalityBehavior())
342            tgt.setCardinalityBehaviorElement(convertActionCardinalityBehavior(src.getCardinalityBehaviorElement()));
343        if (src.hasResource())
344            tgt.setResource(convertReference(src.getResource()));
345        for (org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionComponent t : src.getAction()) tgt.addAction(convertRequestGroupActionComponent(t));
346        return tgt;
347    }
348
349    public static org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionComponent convertRequestGroupActionComponent(org.hl7.fhir.r5.model.RequestGroup.RequestGroupActionComponent src) throws FHIRException {
350        if (src == null)
351            return null;
352        org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionComponent tgt = new org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionComponent();
353        copyElement(src, tgt);
354        if (src.hasPrefix())
355            tgt.setPrefixElement(convertString(src.getPrefixElement()));
356        if (src.hasTitle())
357            tgt.setTitleElement(convertString(src.getTitleElement()));
358        if (src.hasDescription())
359            tgt.setDescriptionElement(convertString(src.getDescriptionElement()));
360        if (src.hasTextEquivalent())
361            tgt.setTextEquivalentElement(convertString(src.getTextEquivalentElement()));
362        if (src.hasPriority())
363            tgt.setPriorityElement(convertRequestPriority(src.getPriorityElement()));
364        for (org.hl7.fhir.r5.model.CodeableConcept t : src.getCode()) tgt.addCode(convertCodeableConcept(t));
365        for (org.hl7.fhir.r5.model.RelatedArtifact t : src.getDocumentation()) tgt.addDocumentation(convertRelatedArtifact(t));
366        for (org.hl7.fhir.r5.model.RequestGroup.RequestGroupActionConditionComponent t : src.getCondition()) tgt.addCondition(convertRequestGroupActionConditionComponent(t));
367        for (org.hl7.fhir.r5.model.RequestGroup.RequestGroupActionRelatedActionComponent t : src.getRelatedAction()) tgt.addRelatedAction(convertRequestGroupActionRelatedActionComponent(t));
368        if (src.hasTiming())
369            tgt.setTiming(convertType(src.getTiming()));
370        for (org.hl7.fhir.r5.model.Reference t : src.getParticipant()) tgt.addParticipant(convertReference(t));
371        if (src.hasType())
372            tgt.setType(convertCodeableConcept(src.getType()));
373        if (src.hasGroupingBehavior())
374            tgt.setGroupingBehaviorElement(convertActionGroupingBehavior(src.getGroupingBehaviorElement()));
375        if (src.hasSelectionBehavior())
376            tgt.setSelectionBehaviorElement(convertActionSelectionBehavior(src.getSelectionBehaviorElement()));
377        if (src.hasRequiredBehavior())
378            tgt.setRequiredBehaviorElement(convertActionRequiredBehavior(src.getRequiredBehaviorElement()));
379        if (src.hasPrecheckBehavior())
380            tgt.setPrecheckBehaviorElement(convertActionPrecheckBehavior(src.getPrecheckBehaviorElement()));
381        if (src.hasCardinalityBehavior())
382            tgt.setCardinalityBehaviorElement(convertActionCardinalityBehavior(src.getCardinalityBehaviorElement()));
383        if (src.hasResource())
384            tgt.setResource(convertReference(src.getResource()));
385        for (org.hl7.fhir.r5.model.RequestGroup.RequestGroupActionComponent t : src.getAction()) tgt.addAction(convertRequestGroupActionComponent(t));
386        return tgt;
387    }
388
389    static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ActionGroupingBehavior> convertActionGroupingBehavior(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.ActionGroupingBehavior> src) throws FHIRException {
390        if (src == null || src.isEmpty())
391            return null;
392        org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ActionGroupingBehavior> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.ActionGroupingBehaviorEnumFactory());
393        VersionConvertor_40_50.copyElement(src, tgt);
394        switch(src.getValue()) {
395            case VISUALGROUP:
396                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionGroupingBehavior.VISUALGROUP);
397                break;
398            case LOGICALGROUP:
399                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionGroupingBehavior.LOGICALGROUP);
400                break;
401            case SENTENCEGROUP:
402                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionGroupingBehavior.SENTENCEGROUP);
403                break;
404            default:
405                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionGroupingBehavior.NULL);
406                break;
407        }
408        return tgt;
409    }
410
411    static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.ActionGroupingBehavior> convertActionGroupingBehavior(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ActionGroupingBehavior> src) throws FHIRException {
412        if (src == null || src.isEmpty())
413            return null;
414        org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.ActionGroupingBehavior> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.RequestGroup.ActionGroupingBehaviorEnumFactory());
415        VersionConvertor_40_50.copyElement(src, tgt);
416        switch(src.getValue()) {
417            case VISUALGROUP:
418                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionGroupingBehavior.VISUALGROUP);
419                break;
420            case LOGICALGROUP:
421                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionGroupingBehavior.LOGICALGROUP);
422                break;
423            case SENTENCEGROUP:
424                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionGroupingBehavior.SENTENCEGROUP);
425                break;
426            default:
427                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionGroupingBehavior.NULL);
428                break;
429        }
430        return tgt;
431    }
432
433    static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ActionSelectionBehavior> convertActionSelectionBehavior(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.ActionSelectionBehavior> src) throws FHIRException {
434        if (src == null || src.isEmpty())
435            return null;
436        org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ActionSelectionBehavior> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.ActionSelectionBehaviorEnumFactory());
437        VersionConvertor_40_50.copyElement(src, tgt);
438        switch(src.getValue()) {
439            case ANY:
440                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionSelectionBehavior.ANY);
441                break;
442            case ALL:
443                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionSelectionBehavior.ALL);
444                break;
445            case ALLORNONE:
446                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionSelectionBehavior.ALLORNONE);
447                break;
448            case EXACTLYONE:
449                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionSelectionBehavior.EXACTLYONE);
450                break;
451            case ATMOSTONE:
452                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionSelectionBehavior.ATMOSTONE);
453                break;
454            case ONEORMORE:
455                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionSelectionBehavior.ONEORMORE);
456                break;
457            default:
458                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionSelectionBehavior.NULL);
459                break;
460        }
461        return tgt;
462    }
463
464    static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.ActionSelectionBehavior> convertActionSelectionBehavior(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ActionSelectionBehavior> src) throws FHIRException {
465        if (src == null || src.isEmpty())
466            return null;
467        org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.ActionSelectionBehavior> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.RequestGroup.ActionSelectionBehaviorEnumFactory());
468        VersionConvertor_40_50.copyElement(src, tgt);
469        switch(src.getValue()) {
470            case ANY:
471                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionSelectionBehavior.ANY);
472                break;
473            case ALL:
474                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionSelectionBehavior.ALL);
475                break;
476            case ALLORNONE:
477                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionSelectionBehavior.ALLORNONE);
478                break;
479            case EXACTLYONE:
480                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionSelectionBehavior.EXACTLYONE);
481                break;
482            case ATMOSTONE:
483                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionSelectionBehavior.ATMOSTONE);
484                break;
485            case ONEORMORE:
486                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionSelectionBehavior.ONEORMORE);
487                break;
488            default:
489                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionSelectionBehavior.NULL);
490                break;
491        }
492        return tgt;
493    }
494
495    static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ActionRequiredBehavior> convertActionRequiredBehavior(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.ActionRequiredBehavior> src) throws FHIRException {
496        if (src == null || src.isEmpty())
497            return null;
498        org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ActionRequiredBehavior> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.ActionRequiredBehaviorEnumFactory());
499        VersionConvertor_40_50.copyElement(src, tgt);
500        switch(src.getValue()) {
501            case MUST:
502                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionRequiredBehavior.MUST);
503                break;
504            case COULD:
505                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionRequiredBehavior.COULD);
506                break;
507            case MUSTUNLESSDOCUMENTED:
508                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionRequiredBehavior.MUSTUNLESSDOCUMENTED);
509                break;
510            default:
511                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionRequiredBehavior.NULL);
512                break;
513        }
514        return tgt;
515    }
516
517    static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.ActionRequiredBehavior> convertActionRequiredBehavior(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ActionRequiredBehavior> src) throws FHIRException {
518        if (src == null || src.isEmpty())
519            return null;
520        org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.ActionRequiredBehavior> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.RequestGroup.ActionRequiredBehaviorEnumFactory());
521        VersionConvertor_40_50.copyElement(src, tgt);
522        switch(src.getValue()) {
523            case MUST:
524                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionRequiredBehavior.MUST);
525                break;
526            case COULD:
527                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionRequiredBehavior.COULD);
528                break;
529            case MUSTUNLESSDOCUMENTED:
530                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionRequiredBehavior.MUSTUNLESSDOCUMENTED);
531                break;
532            default:
533                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionRequiredBehavior.NULL);
534                break;
535        }
536        return tgt;
537    }
538
539    static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ActionPrecheckBehavior> convertActionPrecheckBehavior(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.ActionPrecheckBehavior> src) throws FHIRException {
540        if (src == null || src.isEmpty())
541            return null;
542        org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ActionPrecheckBehavior> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.ActionPrecheckBehaviorEnumFactory());
543        VersionConvertor_40_50.copyElement(src, tgt);
544        switch(src.getValue()) {
545            case YES:
546                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionPrecheckBehavior.YES);
547                break;
548            case NO:
549                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionPrecheckBehavior.NO);
550                break;
551            default:
552                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionPrecheckBehavior.NULL);
553                break;
554        }
555        return tgt;
556    }
557
558    static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.ActionPrecheckBehavior> convertActionPrecheckBehavior(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ActionPrecheckBehavior> src) throws FHIRException {
559        if (src == null || src.isEmpty())
560            return null;
561        org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.ActionPrecheckBehavior> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.RequestGroup.ActionPrecheckBehaviorEnumFactory());
562        VersionConvertor_40_50.copyElement(src, tgt);
563        switch(src.getValue()) {
564            case YES:
565                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionPrecheckBehavior.YES);
566                break;
567            case NO:
568                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionPrecheckBehavior.NO);
569                break;
570            default:
571                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionPrecheckBehavior.NULL);
572                break;
573        }
574        return tgt;
575    }
576
577    static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ActionCardinalityBehavior> convertActionCardinalityBehavior(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.ActionCardinalityBehavior> src) throws FHIRException {
578        if (src == null || src.isEmpty())
579            return null;
580        org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ActionCardinalityBehavior> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.ActionCardinalityBehaviorEnumFactory());
581        VersionConvertor_40_50.copyElement(src, tgt);
582        switch(src.getValue()) {
583            case SINGLE:
584                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionCardinalityBehavior.SINGLE);
585                break;
586            case MULTIPLE:
587                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionCardinalityBehavior.MULTIPLE);
588                break;
589            default:
590                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionCardinalityBehavior.NULL);
591                break;
592        }
593        return tgt;
594    }
595
596    static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.ActionCardinalityBehavior> convertActionCardinalityBehavior(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ActionCardinalityBehavior> src) throws FHIRException {
597        if (src == null || src.isEmpty())
598            return null;
599        org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.ActionCardinalityBehavior> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.RequestGroup.ActionCardinalityBehaviorEnumFactory());
600        VersionConvertor_40_50.copyElement(src, tgt);
601        switch(src.getValue()) {
602            case SINGLE:
603                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionCardinalityBehavior.SINGLE);
604                break;
605            case MULTIPLE:
606                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionCardinalityBehavior.MULTIPLE);
607                break;
608            default:
609                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionCardinalityBehavior.NULL);
610                break;
611        }
612        return tgt;
613    }
614
615    public static org.hl7.fhir.r5.model.RequestGroup.RequestGroupActionConditionComponent convertRequestGroupActionConditionComponent(org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionConditionComponent src) throws FHIRException {
616        if (src == null)
617            return null;
618        org.hl7.fhir.r5.model.RequestGroup.RequestGroupActionConditionComponent tgt = new org.hl7.fhir.r5.model.RequestGroup.RequestGroupActionConditionComponent();
619        copyElement(src, tgt);
620        if (src.hasKind())
621            tgt.setKindElement(convertActionConditionKind(src.getKindElement()));
622        if (src.hasExpression())
623            tgt.setExpression(convertExpression(src.getExpression()));
624        return tgt;
625    }
626
627    public static org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionConditionComponent convertRequestGroupActionConditionComponent(org.hl7.fhir.r5.model.RequestGroup.RequestGroupActionConditionComponent src) throws FHIRException {
628        if (src == null)
629            return null;
630        org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionConditionComponent tgt = new org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionConditionComponent();
631        copyElement(src, tgt);
632        if (src.hasKind())
633            tgt.setKindElement(convertActionConditionKind(src.getKindElement()));
634        if (src.hasExpression())
635            tgt.setExpression(convertExpression(src.getExpression()));
636        return tgt;
637    }
638
639    static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ActionConditionKind> convertActionConditionKind(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.ActionConditionKind> src) throws FHIRException {
640        if (src == null || src.isEmpty())
641            return null;
642        org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ActionConditionKind> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.ActionConditionKindEnumFactory());
643        VersionConvertor_40_50.copyElement(src, tgt);
644        switch(src.getValue()) {
645            case APPLICABILITY:
646                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionConditionKind.APPLICABILITY);
647                break;
648            case START:
649                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionConditionKind.START);
650                break;
651            case STOP:
652                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionConditionKind.STOP);
653                break;
654            default:
655                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionConditionKind.NULL);
656                break;
657        }
658        return tgt;
659    }
660
661    static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.ActionConditionKind> convertActionConditionKind(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ActionConditionKind> src) throws FHIRException {
662        if (src == null || src.isEmpty())
663            return null;
664        org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.ActionConditionKind> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.RequestGroup.ActionConditionKindEnumFactory());
665        VersionConvertor_40_50.copyElement(src, tgt);
666        switch(src.getValue()) {
667            case APPLICABILITY:
668                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionConditionKind.APPLICABILITY);
669                break;
670            case START:
671                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionConditionKind.START);
672                break;
673            case STOP:
674                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionConditionKind.STOP);
675                break;
676            default:
677                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionConditionKind.NULL);
678                break;
679        }
680        return tgt;
681    }
682
683    public static org.hl7.fhir.r5.model.RequestGroup.RequestGroupActionRelatedActionComponent convertRequestGroupActionRelatedActionComponent(org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionRelatedActionComponent src) throws FHIRException {
684        if (src == null)
685            return null;
686        org.hl7.fhir.r5.model.RequestGroup.RequestGroupActionRelatedActionComponent tgt = new org.hl7.fhir.r5.model.RequestGroup.RequestGroupActionRelatedActionComponent();
687        copyElement(src, tgt);
688        if (src.hasActionId())
689            tgt.setActionIdElement(convertId(src.getActionIdElement()));
690        if (src.hasRelationship())
691            tgt.setRelationshipElement(convertActionRelationshipType(src.getRelationshipElement()));
692        if (src.hasOffset())
693            tgt.setOffset(convertType(src.getOffset()));
694        return tgt;
695    }
696
697    public static org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionRelatedActionComponent convertRequestGroupActionRelatedActionComponent(org.hl7.fhir.r5.model.RequestGroup.RequestGroupActionRelatedActionComponent src) throws FHIRException {
698        if (src == null)
699            return null;
700        org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionRelatedActionComponent tgt = new org.hl7.fhir.r4.model.RequestGroup.RequestGroupActionRelatedActionComponent();
701        copyElement(src, tgt);
702        if (src.hasActionId())
703            tgt.setActionIdElement(convertId(src.getActionIdElement()));
704        if (src.hasRelationship())
705            tgt.setRelationshipElement(convertActionRelationshipType(src.getRelationshipElement()));
706        if (src.hasOffset())
707            tgt.setOffset(convertType(src.getOffset()));
708        return tgt;
709    }
710
711    static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ActionRelationshipType> convertActionRelationshipType(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.ActionRelationshipType> src) throws FHIRException {
712        if (src == null || src.isEmpty())
713            return null;
714        org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ActionRelationshipType> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.ActionRelationshipTypeEnumFactory());
715        VersionConvertor_40_50.copyElement(src, tgt);
716        switch(src.getValue()) {
717            case BEFORESTART:
718                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionRelationshipType.BEFORESTART);
719                break;
720            case BEFORE:
721                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionRelationshipType.BEFORE);
722                break;
723            case BEFOREEND:
724                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionRelationshipType.BEFOREEND);
725                break;
726            case CONCURRENTWITHSTART:
727                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionRelationshipType.CONCURRENTWITHSTART);
728                break;
729            case CONCURRENT:
730                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionRelationshipType.CONCURRENT);
731                break;
732            case CONCURRENTWITHEND:
733                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionRelationshipType.CONCURRENTWITHEND);
734                break;
735            case AFTERSTART:
736                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionRelationshipType.AFTERSTART);
737                break;
738            case AFTER:
739                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionRelationshipType.AFTER);
740                break;
741            case AFTEREND:
742                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionRelationshipType.AFTEREND);
743                break;
744            default:
745                tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ActionRelationshipType.NULL);
746                break;
747        }
748        return tgt;
749    }
750
751    static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.ActionRelationshipType> convertActionRelationshipType(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ActionRelationshipType> src) throws FHIRException {
752        if (src == null || src.isEmpty())
753            return null;
754        org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.RequestGroup.ActionRelationshipType> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.RequestGroup.ActionRelationshipTypeEnumFactory());
755        VersionConvertor_40_50.copyElement(src, tgt);
756        switch(src.getValue()) {
757            case BEFORESTART:
758                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionRelationshipType.BEFORESTART);
759                break;
760            case BEFORE:
761                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionRelationshipType.BEFORE);
762                break;
763            case BEFOREEND:
764                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionRelationshipType.BEFOREEND);
765                break;
766            case CONCURRENTWITHSTART:
767                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionRelationshipType.CONCURRENTWITHSTART);
768                break;
769            case CONCURRENT:
770                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionRelationshipType.CONCURRENT);
771                break;
772            case CONCURRENTWITHEND:
773                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionRelationshipType.CONCURRENTWITHEND);
774                break;
775            case AFTERSTART:
776                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionRelationshipType.AFTERSTART);
777                break;
778            case AFTER:
779                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionRelationshipType.AFTER);
780                break;
781            case AFTEREND:
782                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionRelationshipType.AFTEREND);
783                break;
784            default:
785                tgt.setValue(org.hl7.fhir.r4.model.RequestGroup.ActionRelationshipType.NULL);
786                break;
787        }
788        return tgt;
789    }
790}