本文整理汇总了Java中ca.uhn.fhir.model.primitive.BoundCodeDt类的典型用法代码示例。如果您正苦于以下问题:Java BoundCodeDt类的具体用法?Java BoundCodeDt怎么用?Java BoundCodeDt使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BoundCodeDt类属于ca.uhn.fhir.model.primitive包,在下文中一共展示了BoundCodeDt类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: clear
import ca.uhn.fhir.model.primitive.BoundCodeDt; //导入依赖的package包/类
private void clear() {
setMissing(null);
myQuantity.setComparator((BoundCodeDt<QuantityCompararatorEnum>) null);
myQuantity.setCode((CodeDt) null);
myQuantity.setSystem((UriDt) null);
myQuantity.setUnits((StringDt) null);
myQuantity.setValue((DecimalDt) null);
myApproximate = false;
}
示例2: getWorkflowAction
import ca.uhn.fhir.model.primitive.BoundCodeDt; //导入依赖的package包/类
public BoundCodeDt<WorkflowActionEnum> getWorkflowAction() {
if (workflowAction == null) {
workflowAction = new BoundCodeDt<WorkflowActionEnum>(WorkflowActionEnum.VALUESET_BINDER);
}
return workflowAction;
}
示例3: getServerConformance
import ca.uhn.fhir.model.primitive.BoundCodeDt; //导入依赖的package包/类
@Override
public Conformance getServerConformance(HttpServletRequest theRequest) {
Conformance retVal = myCachedValue;
Map<String, Long> counts = mySystemDao.getResourceCounts();
FhirContext ctx = myRestfulServer.getFhirContext();
retVal = super.getServerConformance(theRequest);
for (Rest nextRest : retVal.getRest()) {
for (RestResource nextResource : nextRest.getResource()) {
// Add resource counts
Long count = counts.get(nextResource.getTypeElement().getValueAsString());
if (count != null) {
nextResource.addUndeclaredExtension(false, ExtensionConstants.CONF_RESOURCE_COUNT, new DecimalDt(count));
}
// Add chained params
for (RestResourceSearchParam nextParam : nextResource.getSearchParam()) {
if (nextParam.getTypeElement().getValueAsEnum() == SearchParamTypeEnum.REFERENCE) {
List<BoundCodeDt<ResourceTypeEnum>> targets = nextParam.getTarget();
for (BoundCodeDt<ResourceTypeEnum> next : targets) {
RuntimeResourceDefinition def = ctx.getResourceDefinition(next.getValue());
for (RuntimeSearchParam nextChainedParam : def.getSearchParams()) {
nextParam.addChain(nextChainedParam.getName());
}
}
}
}
}
}
retVal.getImplementation().setDescription(myImplementationDescription);
myCachedValue = retVal;
return retVal;
}
示例4: getServerConformance
import ca.uhn.fhir.model.primitive.BoundCodeDt; //导入依赖的package包/类
@Override
public Conformance getServerConformance(HttpServletRequest theRequest) {
Conformance retVal = myCachedValue;
Map<String, Long> counts = mySystemDao.getResourceCounts();
FhirContext ctx = myRestfulServer.getFhirContext();
retVal = super.getServerConformance(theRequest);
for (Rest nextRest : retVal.getRest()) {
for (RestResource nextResource : nextRest.getResource()) {
// Add resource counts
Long count = counts.get(nextResource.getType().getValueAsString());
if (count != null) {
nextResource.addUndeclaredExtension(false, ExtensionConstants.CONF_RESOURCE_COUNT, new DecimalDt(count));
}
// Add chained params
for (RestResourceSearchParam nextParam : nextResource.getSearchParam()) {
if (nextParam.getType().getValueAsEnum() == SearchParamTypeEnum.REFERENCE) {
List<BoundCodeDt<ResourceTypeEnum>> targets = nextParam.getTarget();
for (BoundCodeDt<ResourceTypeEnum> next : targets) {
RuntimeResourceDefinition def = ctx.getResourceDefinition(next.getValue());
for (RuntimeSearchParam nextChainedParam : def.getSearchParams()) {
nextParam.addChain(nextChainedParam.getName());
}
}
}
}
}
}
retVal.getImplementation().setDescription(myImplementationDescription);
myCachedValue = retVal;
return retVal;
}
示例5: getBoundCodeBinder
import ca.uhn.fhir.model.primitive.BoundCodeDt; //导入依赖的package包/类
@SuppressWarnings("unchecked")
static IValueSetEnumBinder<Enum<?>> getBoundCodeBinder(Field theNext) {
Class<?> bound = getGenericCollectionTypeOfCodedField(theNext);
if (bound == null) {
throw new ConfigurationException("Field '" + theNext + "' has no parameter for " + BoundCodeDt.class.getSimpleName() + " to determine enum type");
}
String fieldName = "VALUESET_BINDER";
try {
Field bindingField = bound.getField(fieldName);
return (IValueSetEnumBinder<Enum<?>>) bindingField.get(null);
} catch (Exception e) {
throw new ConfigurationException("Field '" + theNext + "' has type parameter " + bound.getCanonicalName() + " but this class has no valueset binding field (must have a field called " + fieldName + ")", e);
}
}
示例6: setComparator
import ca.uhn.fhir.model.primitive.BoundCodeDt; //导入依赖的package包/类
/**
* Sets the value(s) for <b>comparator</b> ()
*
* <p>
* <b>Definition:</b>
* How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value
* </p>
*/
public QuantityDt setComparator(QuantityComparatorEnum theValue) {
setComparator(new BoundCodeDt<QuantityComparatorEnum>(QuantityComparatorEnum.VALUESET_BINDER, theValue));
/*
getComparatorElement().setValueAsEnum(theValue);
*/
return this;
}
示例7: testParseBoundCodeDtJson
import ca.uhn.fhir.model.primitive.BoundCodeDt; //导入依赖的package包/类
@Test
public void testParseBoundCodeDtJson() {
IParser jsonParser = FhirContext.forDstu2().newJsonParser();
TestOutcome outcome = new TestOutcome();
outcome.setElement(new BoundCodeDt<OutcomeEnum>(new OutcomeBinder(), OutcomeEnum.ITEM1));
String xmlResource = jsonParser.encodeResourceToString(outcome);
TestOutcome operationOutcome = jsonParser.parseResource(TestOutcome.class, xmlResource);
assertNotNull(operationOutcome.getElement());
assertTrue(operationOutcome.getElement() instanceof BoundCodeDt);
assertEquals(outcome.getElement(), operationOutcome.getElement());
}
示例8: testParseBoundCodeDtXml
import ca.uhn.fhir.model.primitive.BoundCodeDt; //导入依赖的package包/类
@Test
public void testParseBoundCodeDtXml() {
IParser xmlParser = FhirContext.forDstu2().newXmlParser();
TestOutcome outcome = new TestOutcome();
outcome.setElement(new BoundCodeDt<OutcomeEnum>(new OutcomeBinder(), OutcomeEnum.ITEM1));
String xmlResource = xmlParser.encodeResourceToString(outcome);
TestOutcome operationOutcome = xmlParser.parseResource(TestOutcome.class, xmlResource);
assertNotNull(operationOutcome.getElement());
assertTrue(operationOutcome.getElement() instanceof BoundCodeDt);
assertEquals(outcome.getElement(), operationOutcome.getElement());
}
示例9: validateResourceForStorage
import ca.uhn.fhir.model.primitive.BoundCodeDt; //导入依赖的package包/类
@Override
protected void validateResourceForStorage(SearchParameter theResource, ResourceTable theEntityToSave) {
super.validateResourceForStorage(theResource, theEntityToSave);
Enum<?> status = theResource.getStatusElement().getValueAsEnum();
List<BoundCodeDt<ResourceTypeEnum>> base = Collections.emptyList();
if (theResource.getBase() != null) {
base = Arrays.asList(theResource.getBaseElement());
}
String expression = theResource.getXpath();
FhirContext context = getContext();
SearchParamTypeEnum type = theResource.getTypeElement().getValueAsEnum();
FhirResourceDaoSearchParameterR4.validateSearchParam(type, status, base, expression, context);
}
示例10: addField
import ca.uhn.fhir.model.primitive.BoundCodeDt; //导入依赖的package包/类
private void addField(JavaClassSource javaClass, Map<String, ResourceParser.FieldInfo> fieldInfo, ElementDefinitionDt element, String elementName) {
if (!element.getSlicing().getDiscriminator().isEmpty()) {
sliced.add(element.getPath());
slicedPathToEnumType.put(element.getPath(), element.getShort());
lastSlicedValue = new CompositeValue(element.getPath(), element.getSlicing().getDescription());
slicePathToValues.put(element.getPath(), lastSlicedValue);
} else {
// The ElementDefinition is part of the last slice.
if (lastSlicedValue != null && element.getPath().startsWith(lastSlicedValue.path)) {
if (element.getPath().equals(lastSlicedValue.path)) {
// This defines the name of slice.
lastSlicedValueField = new CompositeValueField(element.getName());
lastSlicedValue.fields.add(lastSlicedValueField);
} else if (element.getPath().equals(lastSlicedValue.path + ".code.coding.system")) {
lastSlicedValueField.url = ((UriDt) element.getFixed()).getValue();
} else if (element.getPath().equals(lastSlicedValue.path + ".code.coding.code")) {
lastSlicedValueField.fixedCode = String.valueOf(element.getFixed());
} else if (element.getPath().equals(lastSlicedValue.path + ".value[x]")) {
lastSlicedValueField.type = String.valueOf(element.getFixed());
}
return;
} else if (elementName.indexOf('.') != -1) {
//Dont know why we need theese sub elements. (.code and .code.system etc..)
return;
}
}
ResourceParser.FieldInfo inheritedField = fieldInfo.get(elementName.toLowerCase());
FieldSource<JavaClassSource> field = javaClass.addField().setName("my" + StringUtils.capitalize(elementName)).setPrivate();
existingFieldsChanged.add(field);
if (Collection.class.isAssignableFrom(inheritedField.getType())) {
List<Class<?>> cl = FluentIterable.from(element.getType()).transform(new TypeClassFunction(inheritedField)).toList();
if (cl.size() == 0) {
setFieldTypeGeneric(javaClass, inheritedField, field);
} else {
String args = Joiner.on(',').join(FluentIterable.from(cl).transform(new ClassToSimpleNameFunction()));
field.setType(inheritedField.getType().getCanonicalName() + "<" + args + ">");
}
} else {
if (element.getBinding() != null && isBindingStrengthNotExample(element.getBinding()) && element.getBinding().getValueSet() instanceof ResourceReferenceDt) {
ResourceReferenceDt ref = (ResourceReferenceDt) element.getBinding().getValueSet();
if (ref.getReference().getValue().startsWith(HL7_FHIR_REFERENCE_URL_START)) {
if (BoundCodeableConceptDt.class.isAssignableFrom(inheritedField.getType())) {
setFieldTypeGeneric(javaClass, inheritedField, field);
} else if (BoundCodeDt.class.isAssignableFrom(inheritedField.getType())) {
setFieldTypeGeneric(javaClass, inheritedField, field);
} else {
field.setType(inheritedField.getType());
}
} else {
field.setType(inheritedField.getType());
}
} else {
field.setType(inheritedField.getType());
}
}
List<Class<?>> fieldType = FluentIterable.from(element.getType()).transform(new TypeClassFunction(inheritedField)).toList();
AnnotationSource<JavaClassSource> childAnnotation = addFieldChildAnnotation(element, elementName, field, false);
childAnnotation.setClassArrayValue("type", fieldType.toArray(new Class[fieldType.size()]));
addFieldDescriptionAnnotation(element, field);
}
示例11: getType
import ca.uhn.fhir.model.primitive.BoundCodeDt; //导入依赖的package包/类
public BoundCodeDt<BundleTypeEnum> getType() {
if (myType == null) {
myType = new BoundCodeDt<BundleTypeEnum>(BundleTypeEnum.VALUESET_BINDER);
}
return myType;
}
示例12: getSearchMode
import ca.uhn.fhir.model.primitive.BoundCodeDt; //导入依赖的package包/类
public BoundCodeDt<BundleEntrySearchModeEnum> getSearchMode() {
if (mySearchMode == null) {
mySearchMode = new BoundCodeDt<BundleEntrySearchModeEnum>(BundleEntrySearchModeEnum.VALUESET_BINDER);
}
return mySearchMode;
}
示例13: setSearchMode
import ca.uhn.fhir.model.primitive.BoundCodeDt; //导入依赖的package包/类
public void setSearchMode(BoundCodeDt<BundleEntrySearchModeEnum> theSearchMode) {
mySearchMode = theSearchMode;
}
示例14: getTransactionMethod
import ca.uhn.fhir.model.primitive.BoundCodeDt; //导入依赖的package包/类
public BoundCodeDt<BundleEntryTransactionMethodEnum> getTransactionMethod() {
if (myTransactionOperation == null) {
myTransactionOperation = new BoundCodeDt<BundleEntryTransactionMethodEnum>(BundleEntryTransactionMethodEnum.VALUESET_BINDER);
}
return myTransactionOperation;
}
示例15: setTransactionMethod
import ca.uhn.fhir.model.primitive.BoundCodeDt; //导入依赖的package包/类
public void setTransactionMethod(BoundCodeDt<BundleEntryTransactionMethodEnum> theTransactionOperation) {
myTransactionOperation = theTransactionOperation;
}