Codota Logo
Enumeration
Code IndexAdd Codota to your IDE (free)

How to use
Enumeration
in
org.hl7.fhir.dstu3.model

Best Java code snippets using org.hl7.fhir.dstu3.model.Enumeration (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: jamesagnew/hapi-fhir

@Override
public String getBundleType(Bundle theRequest) {
  if (theRequest.getType() == null) {
    return null;
  }
  return theRequest.getTypeElement().getValue().toCode();
}
origin: jamesagnew/hapi-fhir

private void verifyStatusOk(RestOperationTypeEnum theOperation, IBaseResource theOldResourceOrNull, IBaseResource theResource) {
  Subscription subscription = (Subscription) theResource;
  SubscriptionStatus newStatus = subscription.getStatusElement().getValue();
  if (newStatus == SubscriptionStatus.REQUESTED || newStatus == SubscriptionStatus.OFF) {
    return;
  }
  if (newStatus == null) {
    String actualCode = subscription.getStatusElement().getValueAsString();
    throw new UnprocessableEntityException("Can not " + theOperation.getCode() + " resource: Subscription.status must be populated on this server" + ((isNotBlank(actualCode)) ? " (invalid value " + actualCode + ")" : ""));
  }
  if (theOldResourceOrNull != null) {
    try {
      Subscription existing = (Subscription) theOldResourceOrNull;
      SubscriptionStatus existingStatus = existing.getStatusElement().getValue();
      if (existingStatus != newStatus) {
        verifyActiveStatus(theOperation, subscription, newStatus, existingStatus);
      }
    } catch (ResourceNotFoundException e) {
      verifyActiveStatus(theOperation, subscription, newStatus, null);
    }
  } else {
    verifyActiveStatus(theOperation, subscription, newStatus, null);
  }
}
origin: jamesagnew/hapi-fhir

@Override
protected IBaseOperationOutcome createOperationOutcome(String theSeverity, String theMessage, String theCode) {
  OperationOutcome oo = new OperationOutcome();
  OperationOutcomeIssueComponent issue = oo.addIssue();
  issue.getSeverityElement().setValueAsString(theSeverity);
  issue.setDiagnostics(theMessage);
  try {
    issue.setCode(org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.fromCode(theCode));
  } catch (FHIRException e) {
    ourLog.error("Unknown code: {}", theCode);
  }
  return oo;
}
origin: jamesagnew/hapi-fhir

private static <T extends Enum<?>> String extractSystem(Enumeration<T> theBoundCode) {
  if (theBoundCode.getValue() != null) {
    return theBoundCode.getEnumFactory().toSystem(theBoundCode.getValue());
  }
  return null;
}
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

/**
 * @param value The type of relationship that this composition has with anther composition or document.
 */
public CompositionRelatesToComponent setCode(DocumentRelationshipType value) { 
  if (this.code == null)
   this.code = new Enumeration<DocumentRelationshipType>(new DocumentRelationshipTypeEnumFactory());
  this.code.setValue(value);
 return this;
}
origin: jamesagnew/hapi-fhir

    continue;
  systems.add(nextValue.getSystemElement().getValueAsString());
  codes.add(nextValue.getValueElement().getValue());
} else if (nextObject instanceof Enumeration<?>) {
  Enumeration<?> obj = (Enumeration<?>) nextObject;
  String system = extractSystem(obj);
  String code = obj.getValueAsString();
  if (isNotBlank(code)) {
    systems.add(system);
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

@Override
public void addRootPropertiesToBundle(String theId, String theServerBase, String theLinkSelf, String theLinkPrev, String theLinkNext, Integer theTotalResults, BundleTypeEnum theBundleType,
                   IPrimitiveType<Date> theLastUpdated) {
 ensureBundle();
 myBase = theServerBase;
 if (myBundle.getIdElement().isEmpty()) {
  myBundle.setId(theId);
 }
 if (myBundle.getIdElement().isEmpty()) {
  myBundle.setId(UUID.randomUUID().toString());
 }
 if (myBundle.getMeta().getLastUpdated() == null && theLastUpdated != null) {
  myBundle.getMeta().getLastUpdatedElement().setValueAsString(theLastUpdated.getValueAsString());
 }
 if (!hasLink(Constants.LINK_SELF, myBundle) && isNotBlank(theLinkSelf)) {
  myBundle.addLink().setRelation(Constants.LINK_SELF).setUrl(theLinkSelf);
 }
 if (!hasLink(Constants.LINK_NEXT, myBundle) && isNotBlank(theLinkNext)) {
  myBundle.addLink().setRelation(Constants.LINK_NEXT).setUrl(theLinkNext);
 }
 if (!hasLink(Constants.LINK_PREVIOUS, myBundle) && isNotBlank(theLinkPrev)) {
  myBundle.addLink().setRelation(Constants.LINK_PREVIOUS).setUrl(theLinkPrev);
 }
 if (myBundle.getTypeElement().isEmpty() && theBundleType != null) {
  myBundle.getTypeElement().setValueAsString(theBundleType.getCode());
 }
 if (myBundle.getTotalElement().isEmpty() && theTotalResults != null) {
  myBundle.getTotalElement().setValue(theTotalResults);
 }
}
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

/**
 * @param value The status of this measure. Enables tracking the life-cycle of the content.
 */
public Measure setStatus(PublicationStatus value) { 
  if (this.status == null)
   this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
  this.status.setValue(value);
 return this;
}
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

public String toSystem() {
  return getEnumFactory().toSystem(getValue());
}
origin: jamesagnew/hapi-fhir

@Override
protected ResourceTable updateEntity(RequestDetails theRequest, IBaseResource theResource, ResourceTable theEntity, Date theDeletedTimestampOrNull, boolean thePerformIndexing,
                         boolean theUpdateVersion, Date theUpdateTime, boolean theForceUpdate, boolean theCreateNewHistoryEntry) {
  ResourceTable retVal = super.updateEntity(theRequest, theResource, theEntity, theDeletedTimestampOrNull, thePerformIndexing, theUpdateVersion, theUpdateTime, theForceUpdate, theCreateNewHistoryEntry);
  CodeSystem cs = (CodeSystem) theResource;
  if (cs != null && isNotBlank(cs.getUrl())) {
    String codeSystemUrl = cs.getUrl();
    Long codeSystemResourcePid = retVal.getId();
    if (retVal.getDeleted() != null) {
      // deleting
    } else if (cs.getContent() == CodeSystemContentMode.COMPLETE || cs.getContent() == null) {
      ourLog.info("CodeSystem {} has a status of {}, going to store concepts in terminology tables", retVal.getIdDt().getValue(), cs.getContentElement().getValueAsString());
      TermCodeSystemVersion persCs = new TermCodeSystemVersion();
      persCs.setResource(retVal);
      persCs.getConcepts().addAll(toPersistedConcepts(cs.getConcept(), persCs));
      ourLog.info("Code system has {} concepts", persCs.getConcepts().size());
      myTerminologySvc.storeNewCodeSystemVersion(codeSystemResourcePid, codeSystemUrl, cs.getName(), persCs);
    }
  }
  return retVal;
}
origin: jamesagnew/hapi-fhir

@Override
public String getEntryRequestVerb(Bundle.BundleEntryComponent theEntry) {
  String retVal = null;
  Bundle.HTTPVerb value = theEntry.getRequest().getMethodElement().getValue();
  if (value != null) {
    retVal = value.toCode();
  }
  return retVal;
}
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

/**
 * @param value How much of the content of the code system - the concepts and codes it defines - are represented in this resource.
 */
public CodeSystem setContent(CodeSystemContentMode value) { 
  if (this.content == null)
   this.content = new Enumeration<CodeSystemContentMode>(new CodeSystemContentModeEnumFactory());
  this.content.setValue(value);
 return this;
}
origin: ca.uhn.hapi.fhir/hapi-fhir-jpaserver-base

private void verifyStatusOk(RestOperationTypeEnum theOperation, IBaseResource theOldResourceOrNull, IBaseResource theResource) {
  Subscription subscription = (Subscription) theResource;
  SubscriptionStatus newStatus = subscription.getStatusElement().getValue();
  if (newStatus == SubscriptionStatus.REQUESTED || newStatus == SubscriptionStatus.OFF) {
    return;
  }
  if (newStatus == null) {
    String actualCode = subscription.getStatusElement().getValueAsString();
    throw new UnprocessableEntityException("Can not " + theOperation.getCode() + " resource: Subscription.status must be populated on this server" + ((isNotBlank(actualCode)) ? " (invalid value " + actualCode + ")" : ""));
  }
  if (theOldResourceOrNull != null) {
    try {
      Subscription existing = (Subscription) theOldResourceOrNull;
      SubscriptionStatus existingStatus = existing.getStatusElement().getValue();
      if (existingStatus != newStatus) {
        verifyActiveStatus(theOperation, subscription, newStatus, existingStatus);
      }
    } catch (ResourceNotFoundException e) {
      verifyActiveStatus(theOperation, subscription, newStatus, null);
    }
  } else {
    verifyActiveStatus(theOperation, subscription, newStatus, null);
  }
}
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

/**
 * Constructor
 */
public Enumeration(EnumFactory<T> theEnumFactory, String theValue) {
  if (theEnumFactory == null)
    throw new IllegalArgumentException("An enumeration factory must be provided");
  myEnumFactory = theEnumFactory;
  setValueAsString(theValue);
}
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

public String getStatusAsString() {
  return getStatusElement().getValueAsString();
} 
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

/**
 * @return The mode of this event declaration - whether application is sender or receiver.
 */
public EventCapabilityMode getMode() { 
 return this.mode == null ? null : this.mode.getValue();
}
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

/**
 * @param value Defines which action to take if there is no match in the group. One of 3 actions is possible: use the unmapped code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL).
 */
public ConceptMapGroupUnmappedComponent setMode(ConceptMapGroupUnmappedMode value) { 
  if (this.mode == null)
   this.mode = new Enumeration<ConceptMapGroupUnmappedMode>(new ConceptMapGroupUnmappedModeEnumFactory());
  this.mode.setValue(value);
 return this;
}
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

public INarrative setStatusAsString(String theString) {
  getStatusElement().setValueAsString(theString);
  return this;
}
origin: ca.uhn.hapi.fhir/hapi-fhir-jpaserver-base

@Override
protected ResourceTable updateEntity(RequestDetails theRequest, IBaseResource theResource, ResourceTable theEntity, Date theDeletedTimestampOrNull, boolean thePerformIndexing,
                         boolean theUpdateVersion, Date theUpdateTime, boolean theForceUpdate, boolean theCreateNewHistoryEntry) {
  ResourceTable retVal = super.updateEntity(theRequest, theResource, theEntity, theDeletedTimestampOrNull, thePerformIndexing, theUpdateVersion, theUpdateTime, theForceUpdate, theCreateNewHistoryEntry);
  CodeSystem cs = (CodeSystem) theResource;
  if (cs != null && isNotBlank(cs.getUrl())) {
    String codeSystemUrl = cs.getUrl();
    Long codeSystemResourcePid = retVal.getId();
    if (retVal.getDeleted() != null) {
      // deleting
    } else if (cs.getContent() == CodeSystemContentMode.COMPLETE || cs.getContent() == null) {
      ourLog.info("CodeSystem {} has a status of {}, going to store concepts in terminology tables", retVal.getIdDt().getValue(), cs.getContentElement().getValueAsString());
      TermCodeSystemVersion persCs = new TermCodeSystemVersion();
      persCs.setResource(retVal);
      persCs.getConcepts().addAll(toPersistedConcepts(cs.getConcept(), persCs));
      ourLog.info("Code system has {} concepts", persCs.getConcepts().size());
      myTerminologySvc.storeNewCodeSystemVersion(codeSystemResourcePid, codeSystemUrl, cs.getName(), persCs);
    }
  }
  return retVal;
}
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

/**
 * @return How the resource reference is interpreted when testing consent restrictions.
 */
public ConsentDataMeaning getMeaning() { 
 return this.meaning == null ? null : this.meaning.getValue();
}
org.hl7.fhir.dstu3.modelEnumeration

Javadoc

Primitive type "code" in FHIR, where the code is tied to an enumerated list of possible values

Most used methods

  • getValue
  • getValueAsString
  • setValueAsString
  • getEnumFactory
    Provides the enum factory which binds this enumeration to a specific ValueSet
  • setValue
  • <init>
    Constructor
  • asStringValue
  • copy
  • isEmpty

Popular in Java

  • Making http requests using okhttp
  • getExternalFilesDir (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • getApplicationContext (Context)
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • 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