本文整理汇总了Java中org.hl7.fhir.exceptions.FHIRException类的典型用法代码示例。如果您正苦于以下问题:Java FHIRException类的具体用法?Java FHIRException怎么用?Java FHIRException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FHIRException类属于org.hl7.fhir.exceptions包,在下文中一共展示了FHIRException类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: testCreateSimpleMappings
import org.hl7.fhir.exceptions.FHIRException; //导入依赖的package包/类
@Test
public void testCreateSimpleMappings() throws FHIRException {
ConceptMaps maps = ConceptMaps.getEmpty(spark)
.withConceptMaps(conceptMap("urn:cerner:map:testmap", "1"),
conceptMap("urn:cerner:map:othermap", "1"));
Dataset<Mapping> mappings = maps.getMappings();
Assert.assertEquals(2, mappings.count());
ConceptMap firstMap = maps.getConceptMap("urn:cerner:map:testmap", "1");
checkMap(firstMap, "urn:cerner:map:testmap", "1");
ConceptMap secondMap = maps.getConceptMap("urn:cerner:map:othermap", "1");
checkMap(secondMap, "urn:cerner:map:othermap", "1");
}
开发者ID:cerner,项目名称:bunsen,代码行数:18,代码来源:ConceptMapsTest.java
示例2: testAppendMappings
import org.hl7.fhir.exceptions.FHIRException; //导入依赖的package包/类
@Test
public void testAppendMappings() throws FHIRException {
ConceptMaps original = ConceptMaps.getEmpty(spark)
.withConceptMaps(conceptMap("urn:cerner:map:testmap", "1"),
conceptMap("urn:cerner:map:othermap", "1"));
ConceptMaps maps = original.withConceptMaps(
conceptMap("urn:cerner:map:newmap", "1"));
// The original should be unchanged.
Assert.assertEquals(2, original.getMappings().count());
Assert.assertEquals(3, maps.getMappings().count());
ConceptMap firstMap = maps.getConceptMap("urn:cerner:map:testmap", "1");
checkMap(firstMap, "urn:cerner:map:testmap", "1");
ConceptMap secondMap = maps.getConceptMap("urn:cerner:map:othermap", "1");
checkMap(secondMap, "urn:cerner:map:othermap", "1");
ConceptMap newMap = maps.getConceptMap("urn:cerner:map:newmap", "1");
checkMap(newMap, "urn:cerner:map:newmap", "1");
}
开发者ID:cerner,项目名称:bunsen,代码行数:24,代码来源:ConceptMapsTest.java
示例3: apply
import org.hl7.fhir.exceptions.FHIRException; //导入依赖的package包/类
@Operation(name = "$apply", idempotent = true)
public Resource apply(@IdParam IdType theId, @RequiredParam(name="patient") String patientId,
@OptionalParam(name="encounter") String encounterId,
@OptionalParam(name="practitioner") String practitionerId,
@OptionalParam(name="organization") String organizationId,
@OptionalParam(name="userType") String userType,
@OptionalParam(name="userLanguage") String userLanguage,
@OptionalParam(name="userTaskContext") String userTaskContext,
@OptionalParam(name="setting") String setting,
@OptionalParam(name="settingContext") String settingContext)
throws InternalErrorException, FHIRException, ClassNotFoundException, IllegalAccessException,
InstantiationException, ActivityDefinitionApplyException
{
ActivityDefinition activityDefinition = this.getDao().read(theId);
return resolveActivityDefinition(activityDefinition, patientId, practitionerId, organizationId);
}
开发者ID:DBCG,项目名称:cqf-ruler,代码行数:18,代码来源:FHIRActivityDefinitionResourceProvider.java
示例4: setProperty
import org.hl7.fhir.exceptions.FHIRException; //导入依赖的package包/类
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("origin")) {
this.origin = castToSimpleQuantity(value); // SimpleQuantity
} else if (name.equals("period")) {
this.period = castToDecimal(value); // DecimalType
} else if (name.equals("factor")) {
this.factor = castToDecimal(value); // DecimalType
} else if (name.equals("lowerLimit")) {
this.lowerLimit = castToDecimal(value); // DecimalType
} else if (name.equals("upperLimit")) {
this.upperLimit = castToDecimal(value); // DecimalType
} else if (name.equals("dimensions")) {
this.dimensions = castToPositiveInt(value); // PositiveIntType
} else if (name.equals("data")) {
this.data = castToString(value); // StringType
} else
return super.setProperty(name, value);
return value;
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:21,代码来源:SampledData.java
示例5: fromCode
import org.hl7.fhir.exceptions.FHIRException; //导入依赖的package包/类
public static AuditEventAgentNetworkType fromCode(String codeString) throws FHIRException {
if (codeString == null || "".equals(codeString))
return null;
if ("1".equals(codeString))
return _1;
if ("2".equals(codeString))
return _2;
if ("3".equals(codeString))
return _3;
if ("4".equals(codeString))
return _4;
if ("5".equals(codeString))
return _5;
if (Configuration.isAcceptInvalidEnums())
return null;
else
throw new FHIRException("Unknown AuditEventAgentNetworkType code '"+codeString+"'");
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:19,代码来源:AuditEvent.java
示例6: addChild
import org.hl7.fhir.exceptions.FHIRException; //导入依赖的package包/类
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("endpoint")) {
return addEndpoint();
}
else if (name.equals("reliableCache")) {
throw new FHIRException("Cannot call addChild on a primitive type Conformance.reliableCache");
}
else if (name.equals("documentation")) {
throw new FHIRException("Cannot call addChild on a primitive type Conformance.documentation");
}
else if (name.equals("event")) {
return addEvent();
}
else
return super.addChild(name);
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:18,代码来源:Conformance.java
示例7: convertMoney
import org.hl7.fhir.exceptions.FHIRException; //导入依赖的package包/类
public static org.hl7.fhir.dstu3.model.Money convertMoney(org.hl7.fhir.dstu2016may.model.Money src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.dstu3.model.Money tgt = new org.hl7.fhir.dstu3.model.Money();
copyElement(src, tgt);
if (src.hasValue())
tgt.setValue(src.getValue());
tgt.setComparator(convertQuantityComparator(src.getComparator()));
if (src.hasUnit())
tgt.setUnit(src.getUnit());
if (src.hasSystem())
tgt.setSystem(src.getSystem());
if (src.hasCode())
tgt.setCode(src.getCode());
return tgt;
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:17,代码来源:VersionConvertor_14_30.java
示例8: makeProperty
import org.hl7.fhir.exceptions.FHIRException; //导入依赖的package包/类
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 50511102: return getCategory();
case -1014418093: return getDefinition();
case 3059181: return getCode();
case 722137681: return addReasonCode();
case -1146218137: return addReasonReference();
case 3178259: return addGoal();
case -892481550: return getStatusElement();
case 2051346646: return getStatusReasonElement();
case 663275198: return getProhibitedElement();
case 1162627251: return getScheduled();
case -160710483: return getScheduled();
case 1901043637: return getLocation();
case 481140686: return addPerformer();
case 1753005361: return getProduct();
case -309474065: return getProduct();
case -768908335: return getDailyAmount();
case -1285004149: return getQuantity();
case -1724546052: return getDescriptionElement();
default: return super.makeProperty(hash, name);
}
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:26,代码来源:CarePlan.java
示例9: addChild
import org.hl7.fhir.exceptions.FHIRException; //导入依赖的package包/类
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("number")) {
throw new FHIRException("Cannot call addChild on a primitive type ExplanationOfBenefit.number");
}
else if (name.equals("type")) {
this.type = new CodeableConcept();
return this.type;
}
else if (name.equals("text")) {
throw new FHIRException("Cannot call addChild on a primitive type ExplanationOfBenefit.text");
}
else if (name.equals("language")) {
this.language = new CodeableConcept();
return this.language;
}
else
return super.addChild(name);
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:20,代码来源:ExplanationOfBenefit.java
示例10: fromType
import org.hl7.fhir.exceptions.FHIRException; //导入依赖的package包/类
public Enumeration<FilterOperator> fromType(Base code) throws FHIRException {
if (code == null || code.isEmpty())
return null;
String codeString = ((PrimitiveType) code).asStringValue();
if (codeString == null || "".equals(codeString))
return null;
if ("=".equals(codeString))
return new Enumeration<FilterOperator>(this, FilterOperator.EQUAL);
if ("is-a".equals(codeString))
return new Enumeration<FilterOperator>(this, FilterOperator.ISA);
if ("is-not-a".equals(codeString))
return new Enumeration<FilterOperator>(this, FilterOperator.ISNOTA);
if ("regex".equals(codeString))
return new Enumeration<FilterOperator>(this, FilterOperator.REGEX);
if ("in".equals(codeString))
return new Enumeration<FilterOperator>(this, FilterOperator.IN);
if ("not-in".equals(codeString))
return new Enumeration<FilterOperator>(this, FilterOperator.NOTIN);
throw new FHIRException("Unknown FilterOperator code '"+codeString+"'");
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:21,代码来源:ValueSet.java
示例11: fromType
import org.hl7.fhir.exceptions.FHIRException; //导入依赖的package包/类
public Enumeration<MediaStatus> fromType(Base code) throws FHIRException {
if (code == null)
return null;
if (code.isEmpty())
return new Enumeration<MediaStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue();
if (codeString == null || "".equals(codeString))
return null;
if ("preparation".equals(codeString))
return new Enumeration<MediaStatus>(this, MediaStatus.PREPARATION);
if ("in-progress".equals(codeString))
return new Enumeration<MediaStatus>(this, MediaStatus.INPROGRESS);
if ("not-done".equals(codeString))
return new Enumeration<MediaStatus>(this, MediaStatus.NOTDONE);
if ("suspended".equals(codeString))
return new Enumeration<MediaStatus>(this, MediaStatus.SUSPENDED);
if ("aborted".equals(codeString))
return new Enumeration<MediaStatus>(this, MediaStatus.ABORTED);
if ("completed".equals(codeString))
return new Enumeration<MediaStatus>(this, MediaStatus.COMPLETED);
if ("entered-in-error".equals(codeString))
return new Enumeration<MediaStatus>(this, MediaStatus.ENTEREDINERROR);
if ("unknown".equals(codeString))
return new Enumeration<MediaStatus>(this, MediaStatus.UNKNOWN);
throw new FHIRException("Unknown MediaStatus code '"+codeString+"'");
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:27,代码来源:Media.java
示例12: setProperty
import org.hl7.fhir.exceptions.FHIRException; //导入依赖的package包/类
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 116103: // use
value = new IdentifierUseEnumFactory().fromType(castToCode(value));
this.use = (Enumeration) value; // Enumeration<IdentifierUse>
return value;
case 3575610: // type
this.type = castToCodeableConcept(value); // CodeableConcept
return value;
case -887328209: // system
this.system = castToUri(value); // UriType
return value;
case 111972721: // value
this.value = castToString(value); // StringType
return value;
case -991726143: // period
this.period = castToPeriod(value); // Period
return value;
case -369881636: // assigner
this.assigner = castToReference(value); // Reference
return value;
default: return super.setProperty(hash, name, value);
}
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:27,代码来源:Identifier.java
示例13: getProperty
import org.hl7.fhir.exceptions.FHIRException; //导入依赖的package包/类
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
if (isPrimitive() && (hash == "value".hashCode()) && !Utilities.noString(value)) {
// String tn = getType();
// throw new Error(tn+" not done yet");
Base[] b = new Base[1];
b[0] = new StringType(value);
return b;
}
List<Base> result = new ArrayList<Base>();
if (children != null) {
for (Element child : children) {
if (child.getName().equals(name))
result.add(child);
if (child.getName().startsWith(name) && child.getProperty().isChoice() && child.getProperty().getName().equals(name+"[x]"))
result.add(child);
}
}
if (result.isEmpty() && checkValid) {
// throw new FHIRException("not determined yet");
}
return result.toArray(new Base[result.size()]);
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:25,代码来源:Element.java
示例14: setProperty
import org.hl7.fhir.exceptions.FHIRException; //导入依赖的package包/类
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("sequenceLinkId")) {
this.getSequenceLinkId().add(castToPositiveInt(value));
} else if (name.equals("revenue")) {
this.revenue = castToCodeableConcept(value); // CodeableConcept
} else if (name.equals("category")) {
this.category = castToCodeableConcept(value); // CodeableConcept
} else if (name.equals("service")) {
this.service = castToCodeableConcept(value); // CodeableConcept
} else if (name.equals("modifier")) {
this.getModifier().add(castToCodeableConcept(value));
} else if (name.equals("fee")) {
this.fee = castToMoney(value); // Money
} else if (name.equals("noteNumber")) {
this.getNoteNumber().add(castToPositiveInt(value));
} else if (name.equals("adjudication")) {
this.getAdjudication().add((AdjudicationComponent) value);
} else if (name.equals("detail")) {
this.getDetail().add((AddedItemsDetailComponent) value);
} else
return super.setProperty(name, value);
return value;
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:25,代码来源:ExplanationOfBenefit.java
示例15: fromCode
import org.hl7.fhir.exceptions.FHIRException; //导入依赖的package包/类
public static DataAbsentReason fromCode(String codeString) throws FHIRException {
if (codeString == null || "".equals(codeString))
return null;
if ("unknown".equals(codeString))
return UNKNOWN;
if ("asked".equals(codeString))
return ASKED;
if ("temp".equals(codeString))
return TEMP;
if ("not-asked".equals(codeString))
return NOTASKED;
if ("masked".equals(codeString))
return MASKED;
if ("unsupported".equals(codeString))
return UNSUPPORTED;
if ("astext".equals(codeString))
return ASTEXT;
if ("error".equals(codeString))
return ERROR;
if ("NaN".equals(codeString))
return NAN;
throw new FHIRException("Unknown DataAbsentReason code '"+codeString+"'");
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:24,代码来源:Enumerations.java
示例16: setProperty
import org.hl7.fhir.exceptions.FHIRException; //导入依赖的package包/类
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("code")) {
this.code = castToString(value); // StringType
} else if (name.equals("isDefault")) {
this.isDefault = castToBoolean(value); // BooleanType
} else if (name.equals("compositional")) {
this.compositional = castToBoolean(value); // BooleanType
} else if (name.equals("language")) {
this.getLanguage().add(castToCode(value));
} else if (name.equals("filter")) {
this.getFilter().add((TerminologyCapabilitiesCodeSystemVersionFilterComponent) value);
} else if (name.equals("property")) {
this.getProperty().add(castToCode(value));
} else
return super.setProperty(name, value);
return value;
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:19,代码来源:TerminologyCapabilities.java
示例17: getNamedProperty
import org.hl7.fhir.exceptions.FHIRException; //导入依赖的package包/类
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case 243769515: /*masterIdentifier*/ return new Property("masterIdentifier", "Identifier", "Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document.", 0, 1, masterIdentifier);
case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Other identifiers associated with the document, including version independent identifiers.", 0, java.lang.Integer.MAX_VALUE, identifier);
case -892481550: /*status*/ return new Property("status", "code", "The status of this document reference.", 0, 1, status);
case -23496886: /*docStatus*/ return new Property("docStatus", "code", "The status of the underlying document.", 0, 1, docStatus);
case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.", 0, 1, type);
case 94742904: /*class*/ return new Property("class", "CodeableConcept", "A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.", 0, 1, class_);
case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Practitioner|Group|Device)", "Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).", 0, 1, subject);
case 1028554472: /*created*/ return new Property("created", "dateTime", "When the document was created.", 0, 1, created);
case 3076014: /*date*/ return new Property("date", "instant", "When the document reference was created.", 0, 1, date);
case 92750597: /*agent*/ return new Property("agent", "", "An actor taking an active role in the document.", 0, java.lang.Integer.MAX_VALUE, agent);
case 1815000435: /*authenticator*/ return new Property("authenticator", "Reference(Practitioner|Organization)", "Which person or organization authenticates that this document is valid.", 0, 1, authenticator);
case 1611297262: /*custodian*/ return new Property("custodian", "Reference(Organization)", "Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.", 0, 1, custodian);
case -7765931: /*relatesTo*/ return new Property("relatesTo", "", "Relationships that this document has with other document references that already exist.", 0, java.lang.Integer.MAX_VALUE, relatesTo);
case -1724546052: /*description*/ return new Property("description", "string", "Human-readable description of the source document. This is sometimes known as the \"title\".", 0, 1, description);
case -722296940: /*securityLabel*/ return new Property("securityLabel", "CodeableConcept", "A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the \"reference\" to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to.", 0, java.lang.Integer.MAX_VALUE, securityLabel);
case 951530617: /*content*/ return new Property("content", "", "The document and format referenced. There may be multiple content element repetitions, each with a different format.", 0, java.lang.Integer.MAX_VALUE, content);
case 951530927: /*context*/ return new Property("context", "", "The clinical context in which the document was prepared.", 0, 1, context);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:25,代码来源:DocumentReference.java
示例18: makeProperty
import org.hl7.fhir.exceptions.FHIRException; //导入依赖的package包/类
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -740568643: return getEntity();
case -1298275357: return getEntity();
case -1618432855: return getIdentifier();
case -929905388: return getEffectiveTimeElement();
case -1285004149: return getQuantity();
case -486196699: return getUnitPrice();
case -1282148017: return getFactorElement();
case -982754077: return getPointsElement();
case 108957: return getNet();
default: return super.makeProperty(hash, name);
}
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:17,代码来源:Contract.java
示例19: setProperty
import org.hl7.fhir.exceptions.FHIRException; //导入依赖的package包/类
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3575610: // type
this.type = castToCode(value); // CodeType
return value;
case -309425751: // profile
this.getProfile().add(castToUri(value)); // UriType
return value;
case -1402857082: // mustSupport
this.getMustSupport().add(castToString(value)); // StringType
return value;
case -1303674939: // codeFilter
this.getCodeFilter().add((DataRequirementCodeFilterComponent) value); // DataRequirementCodeFilterComponent
return value;
case 149531846: // dateFilter
this.getDateFilter().add((DataRequirementDateFilterComponent) value); // DataRequirementDateFilterComponent
return value;
default: return super.setProperty(hash, name, value);
}
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:23,代码来源:DataRequirement.java
示例20: getNamedProperty
import org.hl7.fhir.exceptions.FHIRException; //导入依赖的package包/类
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "A business identifier assigned to a particular completed (or partially completed) questionnaire.", 0, 1, identifier);
case -332612366: /*basedOn*/ return new Property("basedOn", "Reference(CarePlan|ServiceRequest)", "The order, proposal or plan that is fulfilled in whole or in part by this QuestionnaireResponse. For example, a ServiceRequest seeking an intake assessment or a decision support recommendation to assess for post-partum depression.", 0, java.lang.Integer.MAX_VALUE, basedOn);
case -995410646: /*partOf*/ return new Property("partOf", "Reference(Observation|Procedure)", "A procedure or observation that this questionnaire was performed as part of the execution of. For example, the surgery a checklist was executed as part of.", 0, java.lang.Integer.MAX_VALUE, partOf);
case -1017049693: /*questionnaire*/ return new Property("questionnaire", "Reference(Questionnaire)", "The Questionnaire that defines and organizes the questions for which answers are being provided.", 0, 1, questionnaire);
case -892481550: /*status*/ return new Property("status", "code", "The position of the questionnaire response within its overall lifecycle.", 0, 1, status);
case -1867885268: /*subject*/ return new Property("subject", "Reference(Any)", "The subject of the questionnaire response. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information.", 0, 1, subject);
case 951530927: /*context*/ return new Property("context", "Reference(Encounter|EpisodeOfCare)", "The encounter or episode of care with primary association to the questionnaire response.", 0, 1, context);
case 1433073514: /*authored*/ return new Property("authored", "dateTime", "The date and/or time that this set of answers were last changed.", 0, 1, authored);
case -1406328437: /*author*/ return new Property("author", "Reference(Device|Practitioner|Patient|RelatedPerson)", "Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.", 0, 1, author);
case -896505829: /*source*/ return new Property("source", "Reference(Patient|Practitioner|RelatedPerson)", "The person who answered the questions about the subject.", 0, 1, source);
case 3242771: /*item*/ return new Property("item", "", "A group or question item from the original questionnaire for which answers are provided.", 0, java.lang.Integer.MAX_VALUE, item);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:19,代码来源:QuestionnaireResponse.java
注:本文中的org.hl7.fhir.exceptions.FHIRException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论