001package org.hl7.fhir.convertors.advisors.impl;
002
003import java.util.Arrays;
004import java.util.List;
005
006import javax.annotation.Nonnull;
007
008import org.hl7.fhir.convertors.advisors.interfaces.BaseAdvisor50;
009import org.hl7.fhir.exceptions.FHIRException;
010
011public class BaseAdvisor_40_50 extends BaseAdvisor50<org.hl7.fhir.r4.model.Extension> {
012
013  private static final List<String> TestScriptIgnoredUrls = Arrays.asList("http://hl7.org/fhir/5.0/StructureDefinition/extension-TestScript.scope");
014
015  public BaseAdvisor_40_50() {
016  }
017
018  public BaseAdvisor_40_50(Boolean failFast) {
019    this.failFast = failFast;
020  }
021  
022
023  @Override
024  public boolean ignoreExtension(@Nonnull String path,
025                                 @Nonnull String url) throws FHIRException {
026    List<String> paths = Arrays.asList(path.split(","));
027    if ((paths.get(paths.size() - 1).equals("TestScript")) && (TestScriptIgnoredUrls.contains(url))) {
028      return true;
029    } else
030      return false;
031  }
032
033}