Codota Logo
Guide.getOntology
Code IndexAdd Codota to your IDE (free)

How to use
getOntology
method
in
se.cambio.cds.gdl.model.Guide

Best Java code snippets using se.cambio.cds.gdl.model.Guide.getOntology (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: org.gdl-lang.gdl-tools/cds-core

public static TermDefinition getTermDefinition(Guide guide, String lang) {
  TermDefinition termDefinition = null;
  if (guide.getOntology() != null) {
    if (guide.getOntology().getTermDefinitions() != null) {
      termDefinition = guide.getOntology().getTermDefinitions().get(lang);
      if (termDefinition == null) {
        termDefinition = guide.getOntology().getTermDefinitions().get(lang);
      }
    }
  }
  if (termDefinition == null) {
    termDefinition = new TermDefinition();
    guide.getOntology().getTermDefinitions().put(lang, termDefinition);
  }
  return termDefinition;
}
origin: org.gdl-lang.gdl-tools/cds-core

private static Set<CodePhrase> getResolvedCodePhrases(Collection<Guide> guides, CodePhrase predicateCodePhrase) {
  if (!"local".equals(predicateCodePhrase.getTerminologyId().getValue())) {
    return Collections.singleton(predicateCodePhrase);
  }
  Set<CodePhrase> codePhrases = new HashSet<>();
  if (guides != null) {
    for (Guide guide : guides) {
      if (guide.getOntology().getTermBindings() != null) {
        for (String terminologyId : guide.getOntology().getTermBindings().keySet()) {
          TermBinding termBinding = guide.getOntology().getTermBindings().get(terminologyId);
          if (termBinding != null) {
            Binding binding = termBinding.getBindings().get(predicateCodePhrase.getCodeString());
            if (binding != null && binding.getCodes() != null) {
              codePhrases.addAll(binding.getCodes());
            }
          }
        }
      }
    }
  } else {
    codePhrases.add(predicateCodePhrase);
  }
  return codePhrases;
}
origin: org.gdl-lang.gdl-tools/cds-core

private static DvCodedText getResolvedCodedText(DvCodedText dvCT, Guide guide) {
  CodePhrase cf = null;
  List<TermMapping> mappings = new ArrayList<>();
  if (guide.getOntology().getTermBindings() != null) {
    for (Map.Entry<String, TermBinding> entry : guide.getOntology().getTermBindings().entrySet()) {
      TermBinding termBinding = entry.getValue();
      if (termBinding != null) {
        Binding binding = termBinding.getBindings().get(dvCT.getDefiningCode().getCodeString());
        if (binding != null && binding.getCodes() != null && !binding.getCodes().isEmpty()) {
          cf = binding.getCodes().get(0);
          for (CodePhrase codePhrase : binding.getCodes()) {
            mappings.add(new TermMapping(codePhrase, Match.EQUIVALENT, null, null));
          }
        }
      }
    }
  }
  if (!mappings.isEmpty() && cf != null) {
    return new DvCodedText(dvCT.getValue(), mappings, null, null, null, null, cf, null);
  } else {
    return dvCT;
  }
}
origin: org.gdl-lang.gdl-tools/cds-core

@Override
public Map<String, Object> getEntityObjectsMap() throws InternalErrorException {
  String lang = getLanguage();
  ReadableGuide readableGuide = guideImporter.importGuide(getEntity(), lang);
  Collection<String> htmlReadableRules = getHTMLReadableRules(readableGuide, lang);
  List<RuleLine> definitionRuleLines = readableGuide.getDefinitionRuleLines().getRuleLines();
  Collection<String> definitionsHtmlEhr = getHTMLRuleLines(getDefinitionRuleLinesByDomainId(definitionRuleLines, Domains.EHR_ID), lang);
  Collection<String> definitionsHtmlCds = getHTMLRuleLines(getDefinitionRuleLinesByDomainId(definitionRuleLines, Domains.CDS_ID), lang);
  Collection<String> definitionsHtmlAny = getHTMLRuleLines(getDefinitionRuleLinesByDomainId(definitionRuleLines, null), lang);
  Collection<String> preconditionsHtml = getHTMLRuleLines(readableGuide.getPreconditionRuleLines().getRuleLines(), lang);
  Collection<String> defaultActionsHtml = getHTMLRuleLines(readableGuide.getDefaultActions().getRuleLines(), lang);
  Map<String, Object> objectMap = new HashMap<>();
  objectMap.put("guide", getEntity());
  objectMap.put("guide_details", getEntity().getDescription().getDetails().get(lang));
  objectMap.put("guide_definitions_ehr", definitionsHtmlEhr);
  objectMap.put("guide_definitions_cds", definitionsHtmlCds);
  objectMap.put("guide_definitions_any", definitionsHtmlAny);
  objectMap.put("guide_preconditions", preconditionsHtml);
  objectMap.put("guide_default_actions", defaultActionsHtml);
  objectMap.put("guide_rules", htmlReadableRules);
  objectMap.put("guide_terms", getEntity().getOntology().getTermDefinitions().get(lang).getTerms());
  return objectMap;
}
se.cambio.cds.gdl.modelGuidegetOntology

Popular methods of Guide

  • getDefinition
  • getId
  • getDescription

Popular in Java

  • Making http requests using okhttp
  • findViewById (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • getApplicationContext (Context)
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • JPanel (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now