001package org.hl7.fhir.convertors.conv30_50.resources30_50;
002
003import org.hl7.fhir.convertors.context.ConversionContext30_50;
004import org.hl7.fhir.convertors.conv30_50.datatypes30_50.ContactDetail30_50;
005import org.hl7.fhir.convertors.conv30_50.datatypes30_50.Reference30_50;
006import org.hl7.fhir.convertors.conv30_50.datatypes30_50.UsageContext30_50;
007import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.CodeableConcept30_50;
008import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Identifier30_50;
009import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Boolean30_50;
010import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.DateTime30_50;
011import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Id30_50;
012import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.MarkDown30_50;
013import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.String30_50;
014import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Uri30_50;
015import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Url43_50;
016import org.hl7.fhir.dstu3.model.Extension;
017import org.hl7.fhir.exceptions.FHIRException;
018import org.hl7.fhir.r5.model.CanonicalType;
019import org.hl7.fhir.r5.model.CodeableConcept;
020import org.hl7.fhir.r5.model.ContactDetail;
021import org.hl7.fhir.r5.model.Enumeration;
022import org.hl7.fhir.r5.model.Enumerations.PublicationStatus;
023import org.hl7.fhir.r5.model.Reference;
024import org.hl7.fhir.r5.model.Requirements.ConformanceExpectation;
025import org.hl7.fhir.r5.model.Requirements.RequirementsStatementComponent;
026import org.hl7.fhir.r5.model.UrlType;
027import org.hl7.fhir.r5.model.UsageContext;
028
029/*
030  Copyright (c) 2011+, HL7, Inc.
031  All rights reserved.
032  
033  Redistribution and use in source and binary forms, with or without modification, 
034  are permitted provided that the following conditions are met:
035  
036   * Redistributions of source code must retain the above copyright notice, this 
037     list of conditions and the following disclaimer.
038   * Redistributions in binary form must reproduce the above copyright notice, 
039     this list of conditions and the following disclaimer in the documentation 
040     and/or other materials provided with the distribution.
041   * Neither the name of HL7 nor the names of its contributors may be used to 
042     endorse or promote products derived from this software without specific 
043     prior written permission.
044  
045  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
046  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
047  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
048  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
049  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
050  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
051  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
052  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
053  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
054  POSSIBILITY OF SUCH DAMAGE.
055  
056*/
057// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
058public class Requirements30_50 {
059
060  public static final String URL_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.url";
061  public static final String VERSION_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.version";
062  public static final String NAME_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.name";
063  public static final String TITLE_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.title";
064  public static final String STATUS_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.status";
065  public static final String EXPERIMENTAL_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.experimental";
066  public static final String DATE_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.date";
067  public static final String PUBLISHER_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.publisher";
068  public static final String CONTACT_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.contact";
069  public static final String DESCRIPTION_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.description";
070  public static final String USE_CONTEXT_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.useContext";
071  public static final String JURISDICTION_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.jurisdiction";
072  public static final String PURPOSE_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.purpose";
073  public static final String COPYRIGHT_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.copyright";
074  public static final String COPYRIGHT_LABEL_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.copyrightLabel";
075  public static final String DERIVED_FROM_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.derivedFrom";
076  public static final String ACTOR_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.actor";
077  public static final String REFERENCE_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.reference";
078  public static final String STATEMENT_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement";
079
080  private static final String[] IGNORED_EXTENSION_URLS = new String[]{
081    URL_EXTENSION_URL,
082    VERSION_EXTENSION_URL,
083    NAME_EXTENSION_URL,
084    TITLE_EXTENSION_URL,
085    STATUS_EXTENSION_URL,
086    EXPERIMENTAL_EXTENSION_URL,
087    DATE_EXTENSION_URL,
088    PUBLISHER_EXTENSION_URL,
089    CONTACT_EXTENSION_URL,
090    DESCRIPTION_EXTENSION_URL,
091    USE_CONTEXT_EXTENSION_URL,
092    JURISDICTION_EXTENSION_URL,
093    PURPOSE_EXTENSION_URL,
094    COPYRIGHT_EXTENSION_URL,
095    COPYRIGHT_LABEL_EXTENSION_URL,
096    DERIVED_FROM_EXTENSION_URL,
097    ACTOR_EXTENSION_URL,
098    REFERENCE_EXTENSION_URL,
099    STATEMENT_EXTENSION_URL
100  };
101  public static org.hl7.fhir.r5.model.Requirements convertRequirements(org.hl7.fhir.dstu3.model.Basic src) throws FHIRException {
102    if (src == null)
103      return null;
104    if (!src.getCode().hasCoding("http://hl7.org/fhir/fhir-types", "Requirements")) {
105      throw new FHIRException("Error in logic: this basic resource is not an Requirements");
106    }
107    org.hl7.fhir.r5.model.Requirements tgt = new org.hl7.fhir.r5.model.Requirements();
108
109    ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyDomainResource(src, tgt, IGNORED_EXTENSION_URLS);
110    
111    for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())
112      tgt.addIdentifier(Identifier30_50.convertIdentifier(t));
113
114    if (src.hasExtension(URL_EXTENSION_URL)) {
115      tgt.setUrlElement(Uri30_50.convertUri((org.hl7.fhir.dstu3.model.UriType) src.getExtensionByUrl(URL_EXTENSION_URL).getValue()));
116    }
117    if (src.hasExtension(VERSION_EXTENSION_URL)) {
118      tgt.setVersionElement(String30_50.convertString((org.hl7.fhir.dstu3.model.StringType) src.getExtensionByUrl(VERSION_EXTENSION_URL).getValue()));
119    }
120    if (src.hasExtension(NAME_EXTENSION_URL)) {
121      tgt.setNameElement(String30_50.convertString((org.hl7.fhir.dstu3.model.StringType) src.getExtensionByUrl(NAME_EXTENSION_URL).getValue()));
122    }
123    if (src.hasExtension(TITLE_EXTENSION_URL)) {
124      tgt.setTitleElement(String30_50.convertString((org.hl7.fhir.dstu3.model.StringType) src.getExtensionByUrl(TITLE_EXTENSION_URL).getValue()));
125    }
126    if (src.hasExtension(STATUS_EXTENSION_URL)) {
127      tgt.setStatus(PublicationStatus.fromCode(src.getExtensionByUrl(STATUS_EXTENSION_URL).getValue().primitiveValue()));
128    }
129    if (src.hasExtension(EXPERIMENTAL_EXTENSION_URL)) {
130      tgt.setExperimentalElement(Boolean30_50.convertBoolean((org.hl7.fhir.dstu3.model.BooleanType) src.getExtensionByUrl(EXPERIMENTAL_EXTENSION_URL).getValue()));
131    }
132    if (src.hasExtension(DATE_EXTENSION_URL)) {
133      tgt.setDateElement(DateTime30_50.convertDateTime((org.hl7.fhir.dstu3.model.DateTimeType) src.getExtensionByUrl(DATE_EXTENSION_URL).getValue()));
134    }
135    if (src.hasExtension(PUBLISHER_EXTENSION_URL)) {
136      tgt.setPublisherElement(String30_50.convertString((org.hl7.fhir.dstu3.model.StringType) src.getExtensionByUrl(PUBLISHER_EXTENSION_URL).getValue()));
137    }
138    for (org.hl7.fhir.dstu3.model.Extension ext : src.getExtensionsByUrl(CONTACT_EXTENSION_URL)) {
139      tgt.addContact(ContactDetail30_50.convertContactDetail((org.hl7.fhir.dstu3.model.ContactDetail) ext.getValue()));
140    }
141    if (src.hasExtension(DESCRIPTION_EXTENSION_URL)) {
142      tgt.setPublisherElement(MarkDown30_50.convertMarkdown((org.hl7.fhir.dstu3.model.MarkdownType) src.getExtensionByUrl(DESCRIPTION_EXTENSION_URL).getValue()));
143    }
144    for (org.hl7.fhir.dstu3.model.Extension ext : src.getExtensionsByUrl(USE_CONTEXT_EXTENSION_URL)) {
145      tgt.addUseContext(UsageContext30_50.convertUsageContext((org.hl7.fhir.dstu3.model.UsageContext) ext.getValue()));
146    }
147    for (org.hl7.fhir.dstu3.model.Extension ext : src.getExtensionsByUrl(JURISDICTION_EXTENSION_URL)) {
148      tgt.addJurisdiction(CodeableConcept30_50.convertCodeableConcept((org.hl7.fhir.dstu3.model.CodeableConcept) ext.getValue()));
149    }
150    if (src.hasExtension(PURPOSE_EXTENSION_URL)) {
151      tgt.setPurposeElement(MarkDown30_50.convertMarkdown((org.hl7.fhir.dstu3.model.MarkdownType) src.getExtensionByUrl(PURPOSE_EXTENSION_URL).getValue()));
152    }
153    if (src.hasExtension(COPYRIGHT_EXTENSION_URL)) {
154      tgt.setCopyrightElement(MarkDown30_50.convertMarkdown((org.hl7.fhir.dstu3.model.MarkdownType) src.getExtensionByUrl(COPYRIGHT_EXTENSION_URL).getValue()));
155    }
156    if (src.hasExtension(COPYRIGHT_LABEL_EXTENSION_URL)) {
157      tgt.setCopyrightLabelElement(String30_50.convertString((org.hl7.fhir.dstu3.model.StringType) src.getExtensionByUrl(COPYRIGHT_LABEL_EXTENSION_URL).getValue()));
158    }
159    for (org.hl7.fhir.dstu3.model.Extension ext : src.getExtensionsByUrl(DERIVED_FROM_EXTENSION_URL)) {
160      tgt.getDerivedFrom().add(Uri30_50.convertCanonical((org.hl7.fhir.dstu3.model.UriType) ext.getValue()));
161    }
162    for (org.hl7.fhir.dstu3.model.Extension ext : src.getExtensionsByUrl(ACTOR_EXTENSION_URL)) {
163      tgt.getActor().add(Uri30_50.convertCanonical((org.hl7.fhir.dstu3.model.UriType) ext.getValue()));
164    }
165    for (org.hl7.fhir.dstu3.model.Extension ext : src.getExtensionsByUrl(REFERENCE_EXTENSION_URL)) {
166      tgt.getReference().add(Uri30_50.convertUrl((org.hl7.fhir.dstu3.model.UriType) ext.getValue()));
167    }
168    for (org.hl7.fhir.dstu3.model.Extension ext : src.getExtensionsByUrl(STATEMENT_EXTENSION_URL)) {
169      convertRequirementsStatement(ext, tgt.addStatement());
170    }
171    return tgt;
172  }
173
174
175  public static org.hl7.fhir.dstu3.model.Basic convertRequirements(org.hl7.fhir.r5.model.Requirements src) throws FHIRException {
176    if (src == null)
177      return null;
178    org.hl7.fhir.dstu3.model.Basic tgt = new org.hl7.fhir.dstu3.model.Basic();
179    ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyDomainResource(src, tgt);
180    tgt.getCode().getCodingFirstRep().setSystem("http://hl7.org/fhir/fhir-types").setCode("Requirements"); // note use of R5 type system
181    
182    for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
183      tgt.addIdentifier(Identifier30_50.convertIdentifier(t));
184    if (src.hasUrl()) {
185      tgt.addExtension(URL_EXTENSION_URL, Uri30_50.convertUri(src.getUrlElement()));
186    }
187    if (src.hasVersion()) {
188      tgt.addExtension(VERSION_EXTENSION_URL, String30_50.convertString(src.getVersionElement()));
189    }
190    if (src.hasName()) {
191      tgt.addExtension(NAME_EXTENSION_URL, String30_50.convertString(src.getNameElement()));
192    }
193    if (src.hasTitle()) {
194      tgt.addExtension(TITLE_EXTENSION_URL, String30_50.convertString(src.getTitleElement()));
195    }
196    if (src.hasStatus()) {
197      tgt.addExtension(STATUS_EXTENSION_URL, new org.hl7.fhir.dstu3.model.CodeType(src.getStatus().toCode()));
198    }
199    if (src.hasExperimental()) {
200      tgt.addExtension(EXPERIMENTAL_EXTENSION_URL, Boolean30_50.convertBoolean(src.getExperimentalElement()));
201    }
202    if (src.hasDate()) {
203      tgt.addExtension(DATE_EXTENSION_URL, DateTime30_50.convertDateTime(src.getDateElement()));
204    }
205    if (src.hasPublisher()) {
206      tgt.addExtension(PUBLISHER_EXTENSION_URL, String30_50.convertString(src.getPublisherElement()));
207    }
208    for (ContactDetail cd : src.getContact()) {
209      tgt.addExtension(CONTACT_EXTENSION_URL, ContactDetail30_50.convertContactDetail(cd));
210    }
211    if (src.hasDescription()) {
212      tgt.addExtension(DESCRIPTION_EXTENSION_URL, MarkDown30_50.convertMarkdown(src.getDescriptionElement()));
213    }
214    for (UsageContext cd : src.getUseContext()) {
215      tgt.addExtension(USE_CONTEXT_EXTENSION_URL, UsageContext30_50.convertUsageContext(cd));
216    }
217    for (CodeableConcept cd : src.getJurisdiction()) {
218      tgt.addExtension(JURISDICTION_EXTENSION_URL, CodeableConcept30_50.convertCodeableConcept(cd));
219    }
220    if (src.hasPurpose()) {
221      tgt.addExtension(PURPOSE_EXTENSION_URL, MarkDown30_50.convertMarkdown(src.getPurposeElement()));
222    }
223    if (src.hasCopyright()) {
224      tgt.addExtension(COPYRIGHT_EXTENSION_URL, MarkDown30_50.convertMarkdown(src.getCopyrightElement()));
225    }
226    if (src.hasCopyrightLabel()) {
227      tgt.addExtension(COPYRIGHT_LABEL_EXTENSION_URL, String30_50.convertString(src.getCopyrightLabelElement()));
228    }
229    for (CanonicalType ref : src.getDerivedFrom()) {
230      tgt.addExtension(DERIVED_FROM_EXTENSION_URL, Uri30_50.convertCanonical(ref));
231    }
232    for (CanonicalType ref : src.getActor()) {
233      tgt.addExtension(ACTOR_EXTENSION_URL, Uri30_50.convertCanonical(ref));
234    }
235    for (UrlType ref : src.getReference()) {
236      tgt.addExtension(REFERENCE_EXTENSION_URL, Uri30_50.convertUrl(ref));
237    }
238    for (RequirementsStatementComponent ref : src.getStatement()) {
239      org.hl7.fhir.dstu3.model.Extension tgte = new org.hl7.fhir.dstu3.model.Extension(STATEMENT_EXTENSION_URL);
240      tgt.addExtension(tgte);
241      convertRequirementsStatement(ref, tgte);
242    }
243
244    return tgt;
245  }
246
247  private static void convertRequirementsStatement(RequirementsStatementComponent src, Extension tgt) {
248    ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
249    if (src.hasKey()) {
250      tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.key", Id30_50.convertId(src.getKeyElement()));
251    }
252    if (src.hasLabel()) {
253      tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.label", String30_50.convertString(src.getLabelElement()));
254    }
255    for (Enumeration<ConformanceExpectation> t : src.getConformance()) {
256      tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.conformance", new org.hl7.fhir.dstu3.model.CodeType(t.getCode()));
257    }
258    if (src.hasRequirement()) {
259      tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.requirement", MarkDown30_50.convertMarkdown(src.getRequirementElement()));
260    }
261    if (src.hasDerivedFrom()) {
262      tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.derivedFrom", String30_50.convertString(src.getDerivedFromElement()));
263    }
264    for (UrlType ref : src.getSatisfiedBy()) {
265      tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.satisfiedBy", Uri30_50.convertUrl(ref));
266    }
267    for (UrlType ref : src.getReference()) {
268      tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.reference", Uri30_50.convertUrl(ref));
269    }
270    for (Reference ref : src.getSource()) {
271      tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.source", Reference30_50.convertReference(ref));
272    }
273  }
274
275
276  private static void convertRequirementsStatement(Extension src, RequirementsStatementComponent tgt) {
277    ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt, 
278        "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.key",
279        "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.label",
280        "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.conformance",
281        "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.requirement",
282        "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.derivedFrom",
283        "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.satisfiedBy",
284        "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.reference",
285        "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.source"
286        );
287    if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.key")) {
288      tgt.setKeyElement(Id30_50.convertId((org.hl7.fhir.dstu3.model.IdType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.key").getValue()));
289    }
290    if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.label")) {
291      tgt.setLabelElement(String30_50.convertString((org.hl7.fhir.dstu3.model.StringType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.label").getValue()));
292    }
293    for (org.hl7.fhir.dstu3.model.Extension ext : src.getExtensionsByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.conformance")) {
294      tgt.addConformance(ConformanceExpectation.fromCode(ext.getValue().primitiveValue()));
295    }
296    if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.requirement")) {
297      tgt.setRequirementElement(MarkDown30_50.convertMarkdown((org.hl7.fhir.dstu3.model.MarkdownType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.requirement").getValue()));
298    }
299    if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.derivedFrom")) {
300      tgt.setDerivedFromElement(String30_50.convertString((org.hl7.fhir.dstu3.model.StringType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.derivedFrom").getValue()));
301    }
302    for (org.hl7.fhir.dstu3.model.Extension ext : src.getExtensionsByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.satisfiedBy")) {
303      tgt.getSatisfiedBy().add(Uri30_50.convertUrl((org.hl7.fhir.dstu3.model.UriType) ext.getValue()));
304    }
305    for (org.hl7.fhir.dstu3.model.Extension ext : src.getExtensionsByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.reference")) {
306      tgt.getReference().add(Uri30_50.convertUrl((org.hl7.fhir.dstu3.model.UriType) ext.getValue()));
307    }
308    for (org.hl7.fhir.dstu3.model.Extension ext : src.getExtensionsByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.source")) {
309      tgt.getSource().add(Reference30_50.convertReference((org.hl7.fhir.dstu3.model.Reference) ext.getValue()));
310    }
311  }
312}