org.hl7.fhir.dstu3.model.Bundle.getEntryFirstRep()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(146)

本文整理了Java中org.hl7.fhir.dstu3.model.Bundle.getEntryFirstRep()方法的一些代码示例,展示了Bundle.getEntryFirstRep()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bundle.getEntryFirstRep()方法的具体详情如下:
包路径:org.hl7.fhir.dstu3.model.Bundle
类名称:Bundle
方法名:getEntryFirstRep

Bundle.getEntryFirstRep介绍

暂无

代码示例

代码示例来源:origin: jamesagnew/hapi-fhir

org.hl7.fhir.dstu3.model.ConceptMap conceptMap = (org.hl7.fhir.dstu3.model.ConceptMap) response.getEntryFirstRep().getResource();
  convertConceptMapToCsv(conceptMap);
} else {

代码示例来源:origin: org.hspconsortium.carewebframework/cwf-fhir-client

@Test
public void testClient() {
  FhirContext ctx = new FhirContext(FhirVersionEnum.DSTU3);
  GenericClient client = (GenericClient) ctx.newRestfulGenericClient(FHIR_EP);
  //client.registerInterceptor(new BasicAuthInterceptor("user123", "user321$"));
  client.setDontValidateConformance(true);
  Bundle bundle = client.search().forResource(Patient.class).count(1).returnBundle(Bundle.class).execute();
  assertTrue("No patient resources returned.", bundle.getEntry().size() > 0);
  Patient patient = (Patient) bundle.getEntryFirstRep().getResource();
  String patient_id = patient.getIdElement().getIdPart();
  Patient patient1 = client.read(Patient.class, "Patient/" + patient_id);
  assertEquals(patient_id, patient1.getIdElement().getIdPart());
  bundle = client.search().byUrl("Patient?_id=" + patient_id).returnBundle(Bundle.class).execute();
  assertEquals(1, bundle.getEntry().size());
  Patient patient2 = (Patient) bundle.getEntry().get(0).getResource();
  assertEquals(patient_id, patient2.getIdElement().getIdPart());
}

相关文章