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


Java Patient.getIdElement方法代码示例

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


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

示例1: testOverrideResourceIdWithBundleEntryFullUrlEnabled

import org.hl7.fhir.instance.model.Patient; //导入方法依赖的package包/类
@Test
public void testOverrideResourceIdWithBundleEntryFullUrlEnabled() {
	String tmp = "<Bundle xmlns=\"http://hl7.org/fhir\"><entry><fullUrl value=\"http://lalaland.org/patient/pat1\"/><resource><Patient xmlns=\"http://hl7.org/fhir\"><id value=\"patxuzos\"/></Patient></resource></entry></Bundle>";
	Bundle bundle = (Bundle) ourCtx.newXmlParser().parseResource(tmp);
	assertEquals(1, bundle.getEntry().size());
	{
		Patient o1 = (Patient) bundle.getEntry().get(0).getResource();
		IIdType o1Id = o1.getIdElement();
		assertEquals("http://lalaland.org", o1Id.getBaseUrl());
		assertEquals("patient", o1Id.getResourceType());
		assertEquals("pat1", o1Id.getIdPart());
		assertFalse(o1Id.hasVersionIdPart());
	}
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:15,代码来源:XmlParserHl7OrgDstu2Test.java

示例2: testOverrideResourceIdWithBundleEntryFullUrlDisabled_ConfiguredOnFhirContext

import org.hl7.fhir.instance.model.Patient; //导入方法依赖的package包/类
@Test
public void testOverrideResourceIdWithBundleEntryFullUrlDisabled_ConfiguredOnFhirContext() {
	String tmp = "<Bundle xmlns=\"http://hl7.org/fhir\"><entry><fullUrl value=\"http://lalaland.org/patient/pat1\"/><resource><Patient xmlns=\"http://hl7.org/fhir\"><id value=\"patxuzos\"/></Patient></resource></entry></Bundle>";
	ourCtx.getParserOptions().setOverrideResourceIdWithBundleEntryFullUrl(false);
	Bundle bundle = (Bundle) ourCtx.newXmlParser().parseResource(tmp);
	assertEquals(1, bundle.getEntry().size());
	{
		Patient o1 = (Patient) bundle.getEntry().get(0).getResource();
		IIdType o1Id = o1.getIdElement();
		assertFalse(o1Id.hasBaseUrl());
		assertEquals("Patient", o1Id.getResourceType());
		assertEquals("patxuzos", o1Id.getIdPart());
		assertFalse(o1Id.hasVersionIdPart());
	}
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:16,代码来源:XmlParserHl7OrgDstu2Test.java

示例3: testOverrideResourceIdWithBundleEntryFullUrlDisabled_ConfiguredOnParser

import org.hl7.fhir.instance.model.Patient; //导入方法依赖的package包/类
@Test
public void testOverrideResourceIdWithBundleEntryFullUrlDisabled_ConfiguredOnParser() {
	String tmp = "<Bundle xmlns=\"http://hl7.org/fhir\"><entry><fullUrl value=\"http://lalaland.org/patient/pat1\"/><resource><Patient xmlns=\"http://hl7.org/fhir\"><id value=\"patxuzos\"/></Patient></resource></entry></Bundle>";
	Bundle bundle = (Bundle) ourCtx.newXmlParser().setOverrideResourceIdWithBundleEntryFullUrl(false).parseResource(tmp);
	assertEquals(1, bundle.getEntry().size());
	{
		Patient o1 = (Patient) bundle.getEntry().get(0).getResource();
		IIdType o1Id = o1.getIdElement();
		assertFalse(o1Id.hasBaseUrl());
		assertEquals("Patient", o1Id.getResourceType());
		assertEquals("patxuzos", o1Id.getIdPart());
		assertFalse(o1Id.hasVersionIdPart());
	}
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:15,代码来源:XmlParserHl7OrgDstu2Test.java

示例4: createPatient

import org.hl7.fhir.instance.model.Patient; //导入方法依赖的package包/类
@Create()
public MethodOutcome createPatient(@ResourceParam Patient thePatient, @ConditionalUrlParam String theConditional, @IdParam IdType theIdParam) {
	ourLastConditionalUrl = theConditional;
	ourLastId = thePatient.getIdElement();
	ourLastIdParam = theIdParam;
	return new MethodOutcome(new IdType("Patient/001/_history/002"));
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:8,代码来源:CreateConditionalHl7OrgTest.java


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