Tabnine Logo
TerminologyID
Code IndexAdd Tabnine to your IDE (free)

How to use
TerminologyID
in
org.openehr.rm.support.identification

Best Java code snippets using org.openehr.rm.support.identification.TerminologyID (Showing top 20 results out of 315)

origin: org.gdl-lang.gdl-tools/cds-core

private static boolean isLocalTerminology(CodePhrase elementCodePhrase) {
  return "local".equals(elementCodePhrase.getTerminologyId().getValue());
}
origin: openEHR/java-libs

/**
 * Constructs a CodePhrase by terminologyId and codeString
 *
 * @param terminologyId
 * @param codeString
 * @throws IllegalArgumentException if terminolgy null
 *          or codeString null or empty
 */
public CodePhrase(String terminologyID, String codeString) {
  if(terminologyID == null) {
    throw new IllegalArgumentException("null terminologyId");
  }
  if(StringUtils.isEmpty(codeString)) {
    throw new IllegalArgumentException("empty codeString");
  }
  this.terminologyId =  new TerminologyID(terminologyID);
  this.codeString = codeString;
}
origin: openEHR/java-libs

private boolean isLocallyDefined(CodePhrase code) {
  return "local".equalsIgnoreCase(code.getTerminologyId().toString())
  && code.getCodeString().startsWith("at");
}

origin: openEHR/java-libs

@Override
public boolean validValue(CodePhrase value) {
  if(value == null) {
    return false;
  }
  if(terminologyId != null 
      && !terminologyId.equals(value.getTerminologyId())) {
    return false;
  }
  if(codeList != null && !codeList.contains(value.getCodeString())) {
    return false;
  }

  return true;
}
origin: org.gdl-lang.gdl-tools/cds-core

private void filterIsA(
    PredicateGeneratedElementInstance predicate, Collection<ArchetypeReference> ehrArchetypeReferences, boolean negation) {
  final Set<ArchetypeReference> archetypeReferencesToRemove = new HashSet<>();
  final Set<CodePhrase> codePhrases = getCodePhrases(predicate);
  ElementInstance elementInstance;
  for (ArchetypeReference archetypeReference : ehrArchetypeReferences) {
    elementInstance = archetypeReference.getElementInstancesMap().get(predicate.getId());
    if (elementInstance != null && codePhrases != null) {
      CodePhrase codePhrase = getCodePhrase(elementInstance);
      try {
        if (codePhrase != null) {
          if ("local".equalsIgnoreCase(codePhrase.getTerminologyId().name())) {
            filterIsALocalTerminology(negation, archetypeReferencesToRemove, codePhrases, elementInstance, codePhrase);
          } else {
            filterIsAExternalTerminology(negation, archetypeReferencesToRemove, codePhrases, elementInstance, codePhrase);
          }
        } else {
          archetypeReferencesToRemove.add(elementInstance.getArchetypeReference());
        }
      } catch (Exception exception) {
        archetypeReferencesToRemove.add(elementInstance.getArchetypeReference());
        logger.warn("Filter isA ", exception);
      }
    }
  }
  ehrArchetypeReferences.removeAll(archetypeReferencesToRemove);
}
origin: org.openehr.java-libs/openehr-ap

@Override
public boolean validValue(CodePhrase value) {
  if(value == null) {
    return false;
  }
  if(terminologyId != null 
      && !terminologyId.equals(value.getTerminologyId())) {
    return false;
  }
  if(codeList != null && !codeList.contains(value.getCodeString())) {
    return false;
  }

  return true;
}
origin: openEHR/java-libs

    CodePhrase code = ord.getSymbol();
    if ("local".equalsIgnoreCase(
        code.getTerminologyId().name())) {
      codes.add(code.getCodeString());
CCodePhrase ccod = (CCodePhrase) cobj;
List<String> list = ccod.getCodeList();
if ("local".equalsIgnoreCase(ccod.getTerminologyId().name())
    && list != null) {
  for (String code : list) {
origin: openEHR/java-libs

private boolean isOpenEHRTerm(CodePhrase code) {
  return "openehr".equalsIgnoreCase(code.getTerminologyId().getValue());
}

origin: org.openehr.java-libs/openehr-rm-core

/**
 * Constructs a CodePhrase by terminologyId and codeString
 *
 * @param terminologyId
 * @param codeString
 * @throws IllegalArgumentException if terminolgy null
 *          or codeString null or empty
 */
public CodePhrase(String terminologyID, String codeString) {
  if(terminologyID == null) {
    throw new IllegalArgumentException("null terminologyId");
  }
  if(StringUtils.isEmpty(codeString)) {
    throw new IllegalArgumentException("empty codeString");
  }
  this.terminologyId =  new TerminologyID(terminologyID);
  this.codeString = codeString;
}
origin: org.openehr.java-libs/oet-parser

/**
 * Retrieves the text for given code_prhase
 * 
 * @param codePhrase
 * @return
 */
public String getText(CodePhrase codePhrase, String path) {
  return getText(codePhrase.getTerminologyId().toString(), 
      codePhrase.getCodeString(), path);
}
 
origin: org.openehr.java-libs/openehr-rm-core

/**
 * Tests if two instances are strictly comparable.
 *
 * @param ordered
 * @return true if two instances are strictly comparable
 */
public boolean isStrictlyComparableTo(DvOrdered ordered) {
  if (!(ordered instanceof DvOrdinal)) {
    return false;
  }
  final DvOrdinal dvOrdinal = (DvOrdinal) ordered;
  if (!symbol.getDefiningCode().getTerminologyId().equals(
      dvOrdinal.symbol.getDefiningCode().getTerminologyId())) {
    return false;
  }
  // todo: check if symbols are from same subset or value range in the same vocabulary
  return true;
}
origin: org.openehr.java-libs/adl-serializer

protected void printOrdinal(Ordinal ordinal, Writer out) 
    throws IOException {
  CodePhrase symbol = ordinal.getSymbol();
  out.write(Integer.toString(ordinal.getValue()));
  out.write("|[");
  out.write(symbol.getTerminologyId().getValue());
  out.write("::");
  out.write(symbol.getCodeString());
  out.write("]");		
}
origin: org.openehr.java-libs/openehr-ap

/**
 * Convenience constructor to create CCodePhrase with only terminologyId
 * and single code
 * 
 * @param path
 * @param terminologyId
 * @param code
 */
public CCodePhrase(String path, String terminologyId, String code) {
  
  super(false, path, CODE_PHRASE, new Interval<Integer>(0, 1), null, null, 
      null, null);
  
  ArrayList<String> codeList = new ArrayList<String>();
  codeList.add(code);
  
  this.codeList = codeList;
  this.terminologyId = new TerminologyID(terminologyId);
}
origin: openEHR/java-libs

/**
 * Retrieves the text for given code_prhase
 * 
 * @param codePhrase
 * @return
 */
public String getText(CodePhrase codePhrase, String path) {
  return getText(codePhrase.getTerminologyId().toString(), 
      codePhrase.getCodeString(), path);
}
 
origin: openEHR/java-libs

/**
 * Tests if two instances are strictly comparable.
 *
 * @param ordered
 * @return true if two instances are strictly comparable
 */
public boolean isStrictlyComparableTo(DvOrdered ordered) {
  if (!(ordered instanceof DvOrdinal)) {
    return false;
  }
  final DvOrdinal dvOrdinal = (DvOrdinal) ordered;
  if (!symbol.getDefiningCode().getTerminologyId().equals(
      dvOrdinal.symbol.getDefiningCode().getTerminologyId())) {
    return false;
  }
  // todo: check if symbols are from same subset or value range in the same vocabulary
  return true;
}
origin: openEHR/java-libs

protected void printOrdinal(Ordinal ordinal, Writer out) 
    throws IOException {
  CodePhrase symbol = ordinal.getSymbol();
  out.write(Integer.toString(ordinal.getValue()));
  out.write("|[");
  out.write(symbol.getTerminologyId().getValue());
  out.write("::");
  out.write(symbol.getCodeString());
  out.write("]");		
}
origin: openEHR/java-libs

/**
 * Convenience constructor to create CCodePhrase with only terminologyId
 * and single code
 * 
 * @param path
 * @param terminologyId
 * @param code
 */
public CCodePhrase(String path, String terminologyId, String code) {
  
  super(false, path, CODE_PHRASE, new Interval<Integer>(0, 1), null, null, 
      null, null);
  
  ArrayList<String> codeList = new ArrayList<String>();
  codeList.add(code);
  
  this.codeList = codeList;
  this.terminologyId = new TerminologyID(terminologyId);
}
origin: openEHR/java-libs

private void validateCCodePhrase(CCodePhrase ccodephrase,
    List<ValidationError> errors) {
  if (ccodephrase.getCodeList() == null
      || !TerminologyService.OPENEHR.equalsIgnoreCase(
          ccodephrase.getTerminologyId().toString())) {
    return;
  }
  StringBuffer buf = new StringBuffer();
  for (String code : ccodephrase.getCodeList()) {
    if (!openEHRTerminology.allCodes().contains(
        new CodePhrase(TerminologyService.OPENEHR, code))) {
      buf.append(code + ", ");
    }
  }
  String codes = buf.toString();
  if (codes.length() != 0) {
    ValidationError error = new ValidationError(ErrorType.VOTC, null,
        codes, ccodephrase.path());
    errors.add(error);
  }
}
origin: org.gdl-lang.gdl-tools/cds-core

private static Term getTerm(TermDefinition termDefinition, CodePhrase cp) {
  if (cp.getTerminologyId().getValue().equals(OpenEHRConst.LOCAL)) {
    if (termDefinition != null) {
      return termDefinition.getTerms().get(cp.getCodeString());
    }
  }
  return null;
}
origin: org.openehr.java-libs/openehr-ap

/**
 * Creates a single required CCodePhrase with terminologyId and codeList
 * 
 * @param path
 * @param terminologyId
 * @param codeList
 * @return
 */
public static CCodePhrase singleRequired(String path, String terminologyId, 
    List<String> codeList) {
  Interval<Integer> occurrences = new Interval<Integer>(1,1);
  TerminologyID tid = new TerminologyID(terminologyId);
  return new CCodePhrase(path, occurrences, null, 
      null, tid, codeList, null, null);
}
 
org.openehr.rm.support.identificationTerminologyID

Javadoc

Terminology identifier. Instances of this class are immutable.

Most used methods

  • getValue
  • <init>
    Constructs a TerminologyID by name and version
  • toString
  • equals
  • name
    Name of this terminology ID
  • loadValue
  • toValue

Popular in Java

  • Start an intent from android
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (ScheduledExecutorService)
  • compareTo (BigDecimal)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now