• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Organization类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.hl7.fhir.dstu3.model.Organization的典型用法代码示例。如果您正苦于以下问题:Java Organization类的具体用法?Java Organization怎么用?Java Organization使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Organization类属于org.hl7.fhir.dstu3.model包,在下文中一共展示了Organization类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: testSearchIncludesReferences

import org.hl7.fhir.dstu3.model.Organization; //导入依赖的package包/类
@Test
public void testSearchIncludesReferences() throws Exception {
	HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient?_pretty=true&_include=Patient:organization&_include=Organization:" + Organization.SP_PARTOF);
	HttpResponse status = ourClient.execute(httpGet);
	String responseContent = IOUtils.toString(status.getEntity().getContent(), StandardCharsets.UTF_8);
	IOUtils.closeQuietly(status.getEntity().getContent());
	ourLog.info(responseContent);
	assertEquals(200, status.getStatusLine().getStatusCode());
	
	// Response should include both the patient, and the organization that was referred to
	// by a linked resource
	
	assertThat(responseContent, containsString("<name value=\"child\"/>"));
	assertThat(responseContent, containsString("<name value=\"parent\"/>"));
	assertThat(responseContent, containsString("<name value=\"grandparent\"/>"));
	assertThat(responseContent, containsString("<mode value=\"include\"/>"));
	
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:19,代码来源:SearchWithIncludesDstu3Test.java


示例2: search

import org.hl7.fhir.dstu3.model.Organization; //导入依赖的package包/类
@Search()
public List<Patient> search(@IncludeParam() Set<Include> theIncludes) {
	ourLog.info("Includes: {}", theIncludes);
	
	// Grandparent has ID, other orgs don't
	Organization gp = new Organization();
	gp.setId("Organization/GP");
	gp.setName("grandparent");
	
	Organization parent = new Organization();
	parent.setName("parent");
	parent.getPartOf().setResource(gp);
	
	Organization child = new Organization();
	child.setName("child");
	child.getPartOf().setResource(parent);
	
	Patient patient = new Patient();
	patient.setId("Patient/FOO");
	patient.getManagingOrganization().setResource(child);

	ArrayList<Patient> retVal = new ArrayList<Patient>();
	retVal.add(patient);
	return retVal;
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:26,代码来源:SearchWithIncludesDstu3Test.java


示例3: testGetResourceReferenceInExtension

import org.hl7.fhir.dstu3.model.Organization; //导入依赖的package包/类
@Test
public void testGetResourceReferenceInExtension() {
	Patient p = new Patient();
	p.addName().setFamily("PATIENT");

	Organization o = new Organization();
	o.setName("ORG");
	Reference ref = new Reference(o);
	Extension ext = new Extension("urn:foo", ref);
	p.addExtension(ext);

	FhirTerser t = ourCtx.newTerser();
	List<IBaseReference> refs = t.getAllPopulatedChildElementsOfType(p, IBaseReference.class);
	assertEquals(1, refs.size());
	assertSame(ref, refs.get(0));
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:17,代码来源:FhirTerserDstu3Test.java


示例4: testDeleteFail

import org.hl7.fhir.dstu3.model.Organization; //导入依赖的package包/类
@Test
public void testDeleteFail() throws Exception {
	Organization o = new Organization();
	o.setName("FOO");
	IIdType oid = myOrganizationDao.create(o).getId().toUnqualifiedVersionless();
	
	Patient p = new Patient();
	p.setManagingOrganization(new Reference(oid));
	IIdType pid = myPatientDao.create(p).getId().toUnqualifiedVersionless();
	
	try {
		myOrganizationDao.delete(oid);
		fail();
	} catch (ResourceVersionConflictException e) {
		assertEquals("Unable to delete Organization/"+oid.getIdPart()+" because at least one resource has a reference to this resource. First reference found was resource Organization/"+oid.getIdPart()+" in path Patient.managingOrganization", e.getMessage());
	}

	myPatientDao.delete(pid);
	myOrganizationDao.delete(oid);

}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:22,代码来源:FhirResourceDaoDstu3ReferentialIntegrityTest.java


示例5: testDeleteAllow

import org.hl7.fhir.dstu3.model.Organization; //导入依赖的package包/类
@Test
public void testDeleteAllow() throws Exception {
	myDaoConfig.setEnforceReferentialIntegrityOnDelete(false);
	
	Organization o = new Organization();
	o.setName("FOO");
	IIdType oid = myOrganizationDao.create(o).getId().toUnqualifiedVersionless();
	
	Patient p = new Patient();
	p.setManagingOrganization(new Reference(oid));
	IIdType pid = myPatientDao.create(p).getId().toUnqualifiedVersionless();
	
	myOrganizationDao.delete(oid);
	myPatientDao.delete(pid);

}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:17,代码来源:FhirResourceDaoDstu3ReferentialIntegrityTest.java


示例6: testExternalReferenceBlockedByDefault

import org.hl7.fhir.dstu3.model.Organization; //导入依赖的package包/类
@Test
public void testExternalReferenceBlockedByDefault() {
	Organization org = new Organization();
	org.setId("FOO");
	org.setName("Org Name");
	myOrganizationDao.update(org, mySrd);
	
	Patient p = new Patient();
	p.getManagingOrganization().setReference("http://example.com/base/Organization/FOO");
	try {
		myPatientDao.create(p, mySrd);
		fail();
	} catch (InvalidRequestException e) {
		assertEquals("Resource contains external reference to URL \"http://example.com/base/Organization/FOO\" but this server is not configured to allow external references", e.getMessage());
	}
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:17,代码来源:FhirResourceDaoDstu3ExternalReferenceTest.java


示例7: getOrganizationById

import org.hl7.fhir.dstu3.model.Organization; //导入依赖的package包/类
@Read()
public Organization getOrganizationById(@IdParam IdType organisationId) {
    Organization organisation = organisationDao.read(ctx, organisationId);

    if ( organisation == null) {
        throw OperationOutcomeFactory.buildOperationOutcomeException(
                new ResourceNotFoundException("No Organization/" + organisationId.getIdPart()),
                OperationOutcome.IssueSeverity.ERROR, OperationOutcome.IssueType.NOTFOUND);
    }
    return organisation;
}
 
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:12,代码来源:OrganizationProvider.java


示例8: testOrganisationTransform

import org.hl7.fhir.dstu3.model.Organization; //导入依赖的package包/类
@Test
public void testOrganisationTransform(){

    OrganisationEntity organisationEntity = new OrganisationEntityBuilder().build();
    Organization organisation = transformer.transform(organisationEntity);

    assertThat(organisation, not(nullValue()));
    assertThat(organisation.getId(), equalTo((new Long(OrganisationEntityBuilder.DEFAULT_ID)).toString()));
}
 
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:10,代码来源:OrganisationEntityToFHIROrganizationTransformerTest.java


示例9: setOrganizationProvider

import org.hl7.fhir.dstu3.model.Organization; //导入依赖的package包/类
private Organization setOrganizationProvider(Set<OrganizationalProvider> orgProviders) {
    Organization sourceOrganizationResource = new Organization();

    orgProviders.forEach((OrganizationalProvider organizationalProvider) ->
    {
        sourceOrganizationResource.setId(new IdType(organizationalProvider.getNpi()));
        sourceOrganizationResource.addIdentifier().setSystem(fhirProperties.getNpi().getSystem()).setValue(organizationalProvider.getNpi());
        sourceOrganizationResource.setName(organizationalProvider.getOrgName());
        sourceOrganizationResource.addAddress().addLine(organizationalProvider.getFirstLinePracticeLocationAddress())
                .setCity(organizationalProvider.getPracticeLocationAddressCityName())
                .setState(organizationalProvider.getPracticeLocationAddressStateName())
                .setPostalCode(organizationalProvider.getPracticeLocationAddressPostalCode());
    });
    return sourceOrganizationResource;
}
 
开发者ID:bhits,项目名称:pcm-api,代码行数:16,代码来源:FhirConsentServiceImpl.java


示例10: getSenderOrganizationAdapterTarget

import org.hl7.fhir.dstu3.model.Organization; //导入依赖的package包/类
public qicoreorganizationAdapter getSenderOrganizationAdapterTarget()
{
   if (adaptedClass.getSender().getResource() instanceof org.hl7.fhir.dstu3.model.Organization)
   {
      qicoreorganizationAdapter profiledType = new qicoreorganizationAdapter();
      profiledType
            .setAdaptee((org.hl7.fhir.dstu3.model.Organization) adaptedClass
                  .getSender().getResource());
      return profiledType;
   }
   else
   {
      return null;
   }
}
 
开发者ID:cqframework,项目名称:qicore_model,代码行数:16,代码来源:qicorecommunicationAdapter.java


示例11: getRecipientOrganizationTarget

import org.hl7.fhir.dstu3.model.Organization; //导入依赖的package包/类
public List<Organization> getRecipientOrganizationTarget() {
	List<org.hl7.fhir.dstu3.model.Organization> items = new java.util.ArrayList<>();
	List<org.hl7.fhir.dstu3.model.Resource> resources = adaptedClass
			.getRecipientTarget();
	for (org.hl7.fhir.dstu3.model.Resource resource : resources) {
		items.add((org.hl7.fhir.dstu3.model.Organization) resource);
	}
	return items;
}
 
开发者ID:cqframework,项目名称:qicore_model,代码行数:10,代码来源:qicorecommunicationAdapter.java


示例12: getManufacturerAdapterTarget

import org.hl7.fhir.dstu3.model.Organization; //导入依赖的package包/类
public qicoreorganizationAdapter getManufacturerAdapterTarget()
{
   if (adaptedClass.getManufacturer().getResource() instanceof org.hl7.fhir.dstu3.model.Organization)
   {
      qicoreorganizationAdapter profiledType = new qicoreorganizationAdapter();
      profiledType
            .setAdaptee((org.hl7.fhir.dstu3.model.Organization) adaptedClass
                  .getManufacturer().getResource());
      return profiledType;
   }
   else
   {
      return null;
   }
}
 
开发者ID:cqframework,项目名称:qicore_model,代码行数:16,代码来源:qicoremedicationAdapter.java


示例13: getServiceProviderAdapterTarget

import org.hl7.fhir.dstu3.model.Organization; //导入依赖的package包/类
public qicoreorganizationAdapter getServiceProviderAdapterTarget()
{
   if (adaptedClass.getServiceProvider().getResource() instanceof org.hl7.fhir.dstu3.model.Organization)
   {
      qicoreorganizationAdapter profiledType = new qicoreorganizationAdapter();
      profiledType
            .setAdaptee((org.hl7.fhir.dstu3.model.Organization) adaptedClass
                  .getServiceProvider().getResource());
      return profiledType;
   }
   else
   {
      return null;
   }
}
 
开发者ID:cqframework,项目名称:qicore_model,代码行数:16,代码来源:qicoreencounterAdapter.java


示例14: getPerformerOrganizationAdapterTarget

import org.hl7.fhir.dstu3.model.Organization; //导入依赖的package包/类
public qicoreorganizationAdapter getPerformerOrganizationAdapterTarget()
{
   if (adaptedClass.getPerformer().getResource() instanceof org.hl7.fhir.dstu3.model.Organization)
   {
      qicoreorganizationAdapter profiledType = new qicoreorganizationAdapter();
      profiledType
            .setAdaptee((org.hl7.fhir.dstu3.model.Organization) adaptedClass
                  .getPerformer().getResource());
      return profiledType;
   }
   else
   {
      return null;
   }
}
 
开发者ID:cqframework,项目名称:qicore_model,代码行数:16,代码来源:qicoreprocedurerequestAdapter.java


示例15: getRequesterOrganizationAdapterTarget

import org.hl7.fhir.dstu3.model.Organization; //导入依赖的package包/类
public qicoreorganizationAdapter getRequesterOrganizationAdapterTarget()
{
   if (adaptedClass.getRequester().getResource() instanceof org.hl7.fhir.dstu3.model.Organization)
   {
      qicoreorganizationAdapter profiledType = new qicoreorganizationAdapter();
      profiledType
            .setAdaptee((org.hl7.fhir.dstu3.model.Organization) adaptedClass
                  .getRequester().getResource());
      return profiledType;
   }
   else
   {
      return null;
   }
}
 
开发者ID:cqframework,项目名称:qicore_model,代码行数:16,代码来源:qicorereferralrequestAdapter.java


示例16: getManagingOrganizationAdapterTarget

import org.hl7.fhir.dstu3.model.Organization; //导入依赖的package包/类
public org.cqf.qicore.dstu3.qicoreorganizationAdapter getManagingOrganizationAdapterTarget()
{
   if (adaptedClass.getManagingOrganization().getResource() instanceof org.hl7.fhir.dstu3.model.Organization)
   {
      org.cqf.qicore.dstu3.qicoreorganizationAdapter profiledType = new org.cqf.qicore.dstu3.qicoreorganizationAdapter();
      profiledType
              .setAdaptee((org.hl7.fhir.dstu3.model.Organization) adaptedClass
                      .getManagingOrganization().getResource());
      return profiledType;
   }
   else
   {
      return null;
   }
}
 
开发者ID:cqframework,项目名称:qicore_model,代码行数:16,代码来源:qicorepatientAdapter.java


示例17: getGeneralPractitionerOrganizationTarget

import org.hl7.fhir.dstu3.model.Organization; //导入依赖的package包/类
public List<Organization> getGeneralPractitionerOrganizationTarget() {
   List<org.hl7.fhir.dstu3.model.Organization> items = new java.util.ArrayList<>();
   List<org.hl7.fhir.dstu3.model.Resource> resources = adaptedClass
           .getGeneralPractitionerTarget();
   for (org.hl7.fhir.dstu3.model.Resource resource : resources) {
      items.add((org.hl7.fhir.dstu3.model.Organization) resource);
   }
   return items;
}
 
开发者ID:cqframework,项目名称:qicore_model,代码行数:10,代码来源:qicorepatientAdapter.java


示例18: getSubjectOrganizationAdapterTarget

import org.hl7.fhir.dstu3.model.Organization; //导入依赖的package包/类
public qicoreorganizationAdapter getSubjectOrganizationAdapterTarget()
{
   if (adaptedClass.getSubject().getResource() instanceof org.hl7.fhir.dstu3.model.Organization)
   {
      qicoreorganizationAdapter profiledType = new qicoreorganizationAdapter();
      profiledType
            .setAdaptee((org.hl7.fhir.dstu3.model.Organization) adaptedClass
                  .getSubject().getResource());
      return profiledType;
   }
   else
   {
      return null;
   }
}
 
开发者ID:cqframework,项目名称:qicore_model,代码行数:16,代码来源:qicoregoalAdapter.java


示例19: getManagingOrganizationAdapterTarget

import org.hl7.fhir.dstu3.model.Organization; //导入依赖的package包/类
public qicoreorganizationAdapter getManagingOrganizationAdapterTarget()
{
   if (adaptedClass.getManagingOrganization().getResource() instanceof org.hl7.fhir.dstu3.model.Organization)
   {
      qicoreorganizationAdapter profiledType = new qicoreorganizationAdapter();
      profiledType
            .setAdaptee((org.hl7.fhir.dstu3.model.Organization) adaptedClass
                  .getManagingOrganization().getResource());
      return profiledType;
   }
   else
   {
      return null;
   }
}
 
开发者ID:cqframework,项目名称:qicore_model,代码行数:16,代码来源:qicorelocationAdapter.java


示例20: getPartOfAdapterTarget

import org.hl7.fhir.dstu3.model.Organization; //导入依赖的package包/类
public qicoreorganizationAdapter getPartOfAdapterTarget()
{
   if (adaptedClass.getPartOf().getResource() instanceof org.hl7.fhir.dstu3.model.Organization)
   {
      qicoreorganizationAdapter profiledType = new qicoreorganizationAdapter();
      profiledType
            .setAdaptee((org.hl7.fhir.dstu3.model.Organization) adaptedClass
                  .getPartOf().getResource());
      return profiledType;
   }
   else
   {
      return null;
   }
}
 
开发者ID:cqframework,项目名称:qicore_model,代码行数:16,代码来源:qicoreorganizationAdapter.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java OAuthGetTemporaryToken类代码示例发布时间:2022-05-23
下一篇:
Java WebMergedContextConfiguration类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap