当前位置: 首页>>代码示例>>Java>>正文


Java Observation.setStatus方法代码示例

本文整理汇总了Java中ca.uhn.fhir.model.dstu2.resource.Observation.setStatus方法的典型用法代码示例。如果您正苦于以下问题:Java Observation.setStatus方法的具体用法?Java Observation.setStatus怎么用?Java Observation.setStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ca.uhn.fhir.model.dstu2.resource.Observation的用法示例。


在下文中一共展示了Observation.setStatus方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: sendObservation

import ca.uhn.fhir.model.dstu2.resource.Observation; //导入方法依赖的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

示例2: createObservation

import ca.uhn.fhir.model.dstu2.resource.Observation; //导入方法依赖的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

示例3: createObservationThatDoesNotMatch

import ca.uhn.fhir.model.dstu2.resource.Observation; //导入方法依赖的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

示例4: sendObservation

import ca.uhn.fhir.model.dstu2.resource.Observation; //导入方法依赖的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

示例5: createObservationThatDoesNotMatch

import ca.uhn.fhir.model.dstu2.resource.Observation; //导入方法依赖的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

示例6: main

import ca.uhn.fhir.model.dstu2.resource.Observation; //导入方法依赖的package包/类
public static void main(String[] args) {
   tmp();
   
   
   datatypes();

   // START SNIPPET: observation
   // Create an Observation instance
   Observation observation = new Observation();
   
   // Give the observation a status
   observation.setStatus(ObservationStatusEnum.FINAL);
   
   // Give the observation a code (what kind of observation is this)
   CodingDt coding = observation.getCode().addCoding();
   coding.setCode("29463-7").setSystem("http://loinc.org").setDisplay("Body Weight");
   
   // Create a quantity datatype
   QuantityDt value = new QuantityDt();
   value.setValue(83.9).setSystem("http://unitsofmeasure.org").setCode("kg");
   observation.setValue(value);
   
   // Set the reference range
   SimpleQuantityDt low = new SimpleQuantityDt();
   low.setValue(45).setSystem("http://unitsofmeasure.org").setCode("kg");
   observation.getReferenceRangeFirstRep().setLow(low);
   SimpleQuantityDt high = new SimpleQuantityDt();
   low.setValue(90).setSystem("http://unitsofmeasure.org").setCode("kg");
   observation.getReferenceRangeFirstRep().setHigh(high);
   
   // END SNIPPET: observation
   
   
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:35,代码来源:FhirDataModel.java


注:本文中的ca.uhn.fhir.model.dstu2.resource.Observation.setStatus方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。