本文整理汇总了Java中ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt类的典型用法代码示例。如果您正苦于以下问题:Java CodeableConceptDt类的具体用法?Java CodeableConceptDt怎么用?Java CodeableConceptDt使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CodeableConceptDt类属于ca.uhn.fhir.model.dstu2.composite包,在下文中一共展示了CodeableConceptDt类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: mapCodeToCodeableConcept
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; //导入依赖的package包/类
/**
* Helper function to convert a Code into a CodeableConceptDt. Takes an optional system, which
* replaces the Code.system in the resulting CodeableConceptDt if not null.
*
* @param from
* The Code to create a CodeableConcept from.
* @param system
* The system identifier, such as a URI. Optional; may be null.
* @return The converted CodeableConcept
*/
private static CodeableConceptDt mapCodeToCodeableConcept(Code from, String system) {
CodeableConceptDt to = new CodeableConceptDt();
if (from.display != null) {
to.setText(from.display);
}
CodingDt coding = new CodingDt();
coding.setCode(from.code);
coding.setDisplay(from.display);
if (system == null) {
coding.setSystem(from.system);
} else {
coding.setSystem(system);
}
to.addCoding(coding);
return to;
}
开发者ID:synthetichealth,项目名称:synthea_java,代码行数:31,代码来源:FhirDstu2.java
示例2: nonNull
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; //导入依赖的package包/类
@SuppressWarnings("unused")
public void nonNull() {
// START SNIPPET: nonNull
Observation observation = new Observation();
// None of these calls will not return null, but instead create their
// respective
// child elements.
List<IdentifierDt> identifierList = observation.getIdentifier();
CodeableConceptDt code = observation.getCode();
StringDt textElement = observation.getCode().getTextElement();
// DateTimeDt is a FHIR primitive however, so the following will return
// null
// unless a value has been placed there.
Date active = observation.addIdentifier().getPeriod().getStartElement().getValue();
// END SNIPPET: nonNull
}
开发者ID:gajen0981,项目名称:FHIR-Server,代码行数:20,代码来源:FhirDataModel.java
示例3: sendObservation
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; //导入依赖的package包/类
private Observation sendObservation(String code, String system) throws InterruptedException {
Observation observation = new Observation();
CodeableConceptDt codeableConcept = new CodeableConceptDt();
observation.setCode(codeableConcept);
CodingDt coding = codeableConcept.addCoding();
coding.setCode(code);
coding.setSystem(system);
observation.setStatus(ObservationStatusEnum.FINAL);
MethodOutcome methodOutcome = ourClient.create().resource(observation).execute();
String observationId = methodOutcome.getId().getIdPart();
observation.setId(observationId);
waitForQueueToDrain();
return observation;
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:19,代码来源:RestHookTestWithInterceptorRegisteredToDaoConfigDstu2Test.java
示例4: createObservation
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; //导入依赖的package包/类
@Test
public void createObservation() throws Exception {
Observation observation = new Observation();
CodeableConceptDt cc = new CodeableConceptDt();
observation.setCode(cc);
CodingDt coding = cc.addCoding();
coding.setCode("82313006");
coding.setSystem("SNOMED-CT");
ResourceReferenceDt reference = new ResourceReferenceDt();
reference.setReference("Patient/" + myPatientId);
observation.setSubject(reference);
observation.setStatus(ObservationStatusEnum.FINAL);
MethodOutcome methodOutcome2 = ourClient.create().resource(observation).execute();
String observationId = methodOutcome2.getId().getIdPart();
observation.setId(observationId);
ourLog.info("Observation id generated by server is: " + observationId);
ourLog.info("WS Messages: {}", mySocketImplementation.getMessages());
waitForSize(2, mySocketImplementation.getMessages());
assertThat(mySocketImplementation.getMessages(), contains("bound " + mySubscriptionId, "ping " + mySubscriptionId));
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:24,代码来源:WebsocketWithCriteriaDstu2Test.java
示例5: createObservationThatDoesNotMatch
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; //导入依赖的package包/类
@Test
public void createObservationThatDoesNotMatch() throws Exception {
Observation observation = new Observation();
CodeableConceptDt cc = new CodeableConceptDt();
observation.setCode(cc);
CodingDt coding = cc.addCoding();
coding.setCode("8231");
coding.setSystem("SNOMED-CT");
ResourceReferenceDt reference = new ResourceReferenceDt();
reference.setReference("Patient/" + myPatientId);
observation.setSubject(reference);
observation.setStatus(ObservationStatusEnum.FINAL);
MethodOutcome methodOutcome2 = ourClient.create().resource(observation).execute();
String observationId = methodOutcome2.getId().getIdPart();
observation.setId(observationId);
ourLog.info("Observation id generated by server is: " + observationId);
waitForSize(2, mySocketImplementation.getMessages());
ourLog.info("WS Messages: {}", mySocketImplementation.getMessages());
assertThat(mySocketImplementation.getMessages(), contains("bound " + mySubscriptionId));
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:24,代码来源:WebsocketWithCriteriaDstu2Test.java
示例6: sendObservation
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; //导入依赖的package包/类
private Observation sendObservation(String code, String system) {
Observation observation = new Observation();
CodeableConceptDt codeableConcept = new CodeableConceptDt();
observation.setCode(codeableConcept);
CodingDt coding = codeableConcept.addCoding();
coding.setCode(code);
coding.setSystem(system);
observation.setStatus(ObservationStatusEnum.FINAL);
MethodOutcome methodOutcome = ourClient.create().resource(observation).execute();
String observationId = methodOutcome.getId().getIdPart();
observation.setId(observationId);
return observation;
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:18,代码来源:EmailSubscriptionDstu2Test.java
示例7: createObservationThatDoesNotMatch
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; //导入依赖的package包/类
@Test
public void createObservationThatDoesNotMatch() throws Exception {
Observation observation = new Observation();
CodeableConceptDt cc = new CodeableConceptDt();
observation.setCode(cc);
CodingDt coding = cc.addCoding();
coding.setCode("8231");
coding.setSystem("SNOMED-CT");
ResourceReferenceDt reference = new ResourceReferenceDt();
reference.setReference("Patient/" + myPatientId);
observation.setSubject(reference);
observation.setStatus(ObservationStatusEnum.FINAL);
MethodOutcome methodOutcome2 = ourClient.create().resource(observation).execute();
String observationId = methodOutcome2.getId().getIdPart();
observation.setId(observationId);
ourLog.info("Observation id generated by server is: " + observationId);
ourLog.info("WS Messages: {}", mySocketImplementation.getMessages());
waitForSize(1, mySocketImplementation.getMessages());
assertThat(mySocketImplementation.getMessages(), contains("bound " + mySubscriptionId));
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:24,代码来源:WebsocketWithSubscriptionIdDstu2Test.java
示例8: testCD2CodeableConcept
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; //导入依赖的package包/类
@Test
public void testCD2CodeableConcept() {
// simple instance test
CD cd = DatatypesFactory.eINSTANCE.createCD();
cd.setCode("code");
cd.setCodeSystem("codeSystem");
cd.setCodeSystemVersion("codeSystemVersion");
cd.setDisplayName("displayName");
CodeableConceptDt codeableConcept = dtt.tCD2CodeableConcept(cd);
Assert.assertEquals("CD.code transformation failed", "code", codeableConcept.getCoding().get(0).getCode());
Assert.assertEquals("CD.codeSystem transformation failed", "urn:oid:codeSystem", codeableConcept.getCoding().get(0).getSystem());
Assert.assertEquals("CD.codeSystemVersion transformation failed", "codeSystemVersion", codeableConcept.getCoding().get(0).getVersion());
Assert.assertEquals("CD.displayName transformation failed", "displayName", codeableConcept.getCoding().get(0).getDisplay());
// null instance test
CD cd2 = null;
CodeableConceptDt codeableConcept2 = dtt.tCD2CodeableConcept( cd2 );
Assert.assertNull("CD null instance transform failed", codeableConcept2);
// nullFlavor instance test
CD cd3 = DatatypesFactory.eINSTANCE.createCD();
cd3.setNullFlavor(NullFlavor.NI);
CodeableConceptDt codeableConcept3 = dtt.tCD2CodeableConcept( cd3 );
Assert.assertNull("CodeableConcept.nullFlavor set instance transform failed", codeableConcept3);
}
开发者ID:srdc,项目名称:cda2fhir,代码行数:29,代码来源:DataTypesTransformerTest.java
示例9: resolveReturnType
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; //导入依赖的package包/类
protected Class resolveReturnType(Class clazz, Object target, String path) {
if (target instanceof PeriodDt) {
if (path.equals("start") || path.equals("end")) {
return DateTimeDt.class;
}
}
else if (target instanceof QuantityDt) {
if (path.equals("value")) {
return DecimalDt.class;
}
else if (path.equals("unit")) {
return StringDt.class;
}
}
else if (target instanceof CodingDt) {
if (path.equals("code")) {
return CodeDt.class;
}
else if (path.equals("system")) {
return UriDt.class;
}
else if (path.equals("version") || path.equals("display")) {
return StringDt.class;
}
}
else if (target instanceof CodeableConceptDt) {
if (path.equals("text")) {
return StringDt.class;
}
}
return clazz;
}
开发者ID:DBCG,项目名称:cql_engine,代码行数:33,代码来源:FhirDataProviderDstu2.java
示例10: resolveMedicationRequest
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; //导入依赖的package包/类
public static MedicationRequest resolveMedicationRequest(MedicationOrder order) throws FHIRException {
/*
* Required fields:
* MedicationOrder -> MedicationRequest
* medication -> medication
* dosageInstruction (Backbone) -> Dosage (Element)
*/
return new MedicationRequest()
.setStatus(MedicationRequest.MedicationRequestStatus.fromCode(order.getStatus()))
.setMedication(convertToCodeableConcept((CodeableConceptDt) order.getMedication()))
.setDosageInstruction(convertToDosage(order.getDosageInstruction()));
}
开发者ID:DBCG,项目名称:cqf-ruler,代码行数:13,代码来源:Dstu2ToStu3.java
示例11: convertToCodeableConcept
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; //导入依赖的package包/类
private static CodeableConcept convertToCodeableConcept(CodeableConceptDt conceptDt) {
CodeableConcept concept = new CodeableConcept().setText(conceptDt.getText() == null ? "" : conceptDt.getText());
concept.setId(conceptDt.getElementSpecificId());
List<Coding> codes = new ArrayList<>();
for (CodingDt code : conceptDt.getCoding()) {
codes.add(new Coding()
.setCode(code.getCode())
.setSystem(code.getSystem())
.setDisplay(code.getDisplay())
.setVersion(code.getVersion())
);
}
return concept.setCoding(codes);
}
开发者ID:DBCG,项目名称:cqf-ruler,代码行数:15,代码来源:Dstu2ToStu3.java
示例12: testUpdateLoop
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; //导入依赖的package包/类
@Test
public void testUpdateLoop() {
Assert.assertNotNull(kSession);
System.out.println(" ---- Starting testUpdateLoop() Test ---");
Patient patient = (Patient) new Patient().setId("Patient/1");
RiskAssessment riskAssessment = (RiskAssessment) new RiskAssessment().setId("RiskAssessment/1");
Observation smokerObservation = (Observation) new Observation()
.setCode(new CodeableConceptDt("http://snomed.info/sct", "428041000124106"))
.setId("Observation/1");
Observation bodyMassIndexObservation = (Observation) new Observation()
.setCode(new CodeableConceptDt("http://snomed.info/sct", "60621009"))
.setValue(new IntegerDt(45))
.setId("Observation/2");
kSession.insert(patient);
kSession.insert(riskAssessment);
kSession.insert(smokerObservation);
kSession.insert(bodyMassIndexObservation);
Assert.assertEquals(15, kSession.fireAllRules(15));
System.out.println(" ---- Finished testUpdateLoop() Test ---");
}
开发者ID:Salaboy,项目名称:drools-workshop,代码行数:28,代码来源:InfiniteLoopJUnitTest.java
示例13: createSnomedConditions
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; //导入依赖的package包/类
private List<Condition> createSnomedConditions(int number, Patient patient) {
List<Condition> conditions = new ArrayList<>();
for (int i = 0; i < number; i++) {
String code = null;
switch (random.nextInt(3)) {
case 0:
code = "195967001"; //Asthma (disorder)
break;
case 1:
code = "73211009"; //Diabetes mellitus (disorder)
break;
case 2:
code = "8098009"; //Sexually transmitted infectious disease (disorder)
break;
}
conditions.add((Condition) new Condition()
.setCode(new CodeableConceptDt("http://snomed.info/sct", code))
.setClinicalStatus(ConditionClinicalStatusCodesEnum.ACTIVE)
.setVerificationStatus(ConditionVerificationStatusEnum.CONFIRMED)
.setPatient(new ResourceReferenceDt(patient))
.setId("Condition/"+(i+1)));
}
return conditions;
}
开发者ID:Salaboy,项目名称:drools-workshop,代码行数:29,代码来源:QueryRulesJUnitTest.java
示例14: createAsthmaCondition
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; //导入依赖的package包/类
private Condition createAsthmaCondition(Patient patient, String id, Severity severity ){
return (Condition) new Condition()
.setCode(new CodeableConceptDt("http://snomed.info/sct", "195967001"))
.setClinicalStatus(ConditionClinicalStatusCodesEnum.ACTIVE)
.setVerificationStatus(ConditionVerificationStatusEnum.CONFIRMED)
.setSeverity(new CodeableConceptDt("http://snomed.info/sct", severity.code))
.setPatient(new ResourceReferenceDt(patient))
.setId(id);
}
开发者ID:Salaboy,项目名称:drools-workshop,代码行数:10,代码来源:SimpleInferenceRulesJUnitTest.java
示例15: generateBloodPressureObservations
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; //导入依赖的package包/类
private List<Observation> generateBloodPressureObservations(int amount) {
List<Observation> results = new ArrayList<>();
for (int i = 0; i < amount; i++) {
results.add((Observation) new Observation()
.setCode(new CodeableConceptDt("http://loinc.org", "55284-4")) //Diastolic
.setValue(new IntegerDt(random.nextInt(40)+60))
.setId("Observation/"+(i+1)));
}
return results;
}
开发者ID:Salaboy,项目名称:drools-workshop,代码行数:11,代码来源:AccumulationRulesJUnitTest.java
示例16: createAsthmaCondition
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; //导入依赖的package包/类
private Condition createAsthmaCondition(Patient patient, String id) {
return (Condition) new Condition()
.setCode(new CodeableConceptDt("http://snomed.info/sct", "195967001")) //Asthma (disorder)
.setClinicalStatus(ConditionClinicalStatusCodesEnum.ACTIVE)
.setVerificationStatus(ConditionVerificationStatusEnum.CONFIRMED)
.setPatient(new ResourceReferenceDt(patient))
.setId(id);
}
开发者ID:Salaboy,项目名称:drools-workshop,代码行数:9,代码来源:UsingGlobalsRulesJUnitTest.java
示例17: createDiabetesCondition
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; //导入依赖的package包/类
private Condition createDiabetesCondition(Patient patient, String id) {
return (Condition) new Condition()
.setCode(new CodeableConceptDt("http://snomed.info/sct", "73211009")) //Diabetes mellitus (disorder)
.setClinicalStatus(ConditionClinicalStatusCodesEnum.ACTIVE)
.setVerificationStatus(ConditionVerificationStatusEnum.CONFIRMED)
.setPatient(new ResourceReferenceDt(patient))
.setId(id);
}
开发者ID:Salaboy,项目名称:drools-workshop,代码行数:9,代码来源:UsingGlobalsRulesJUnitTest.java
示例18: testChoiceParamConcept
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; //导入依赖的package包/类
@Test
public void testChoiceParamConcept() {
Observation o1 = new Observation();
o1.getCode().addCoding().setSystem("foo").setCode("testChoiceParam01");
o1.setValue(new CodeableConceptDt("testChoiceParam01CCS", "testChoiceParam01CCV"));
IdDt id1 = ourObservationDao.create(o1).getId();
{
IBundleProvider found = ourObservationDao.search(Observation.SP_VALUE_CONCEPT, new TokenParam("testChoiceParam01CCS", "testChoiceParam01CCV"));
assertEquals(1, found.size());
assertEquals(id1, found.getResources(0, 1).get(0).getId());
}
}
开发者ID:gajen0981,项目名称:FHIR-Server,代码行数:14,代码来源:FhirResourceDaoDstu2Test.java
示例19: testDontUseBoundCodeForExampleBinding
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; //导入依赖的package包/类
/**
* See #320
*/
@Test
public void testDontUseBoundCodeForExampleBinding() {
Practitioner p = new Practitioner();
PractitionerRole role = p.addPractitionerRole();
CodeableConceptDt roleField = role.getRole();
assertEquals(CodeableConceptDt.class, roleField.getClass());
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:11,代码来源:ModelDstu2Test.java
示例20: validateCodeIsInContains
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; //导入依赖的package包/类
private ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.ValidateCodeResult validateCodeIsInContains(List<ExpansionContains> contains, String theSystem, String theCode, CodingDt theCoding,
CodeableConceptDt theCodeableConcept) {
for (ExpansionContains nextCode : contains) {
ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.ValidateCodeResult result = validateCodeIsInContains(nextCode.getContains(), theSystem, theCode, theCoding, theCodeableConcept);
if (result != null) {
return result;
}
String system = nextCode.getSystem();
String code = nextCode.getCode();
if (isNotBlank(theCode)) {
if (theCode.equals(code) && (isBlank(theSystem) || theSystem.equals(system))) {
return new ValidateCodeResult(true, "Validation succeeded", nextCode.getDisplay());
}
} else if (theCoding != null) {
if (StringUtils.equals(system, theCoding.getSystem()) && StringUtils.equals(code, theCoding.getCode())) {
return new ValidateCodeResult(true, "Validation succeeded", nextCode.getDisplay());
}
} else {
for (CodingDt next : theCodeableConcept.getCoding()) {
if (StringUtils.equals(system, next.getSystem()) && StringUtils.equals(code, next.getCode())) {
return new ValidateCodeResult(true, "Validation succeeded", nextCode.getDisplay());
}
}
}
}
return null;
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:32,代码来源:FhirResourceDaoValueSetDstu2.java
注:本文中的ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论