本文整理汇总了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));
}
示例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));
}
示例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;
}
示例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));
}
示例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
}