@Test public void createReference() { final Resource resource = new Patient(); resource.setIdElement( (IdType) new IdType().setParts( "http: final Reference result = (Reference) utils.createReference( resource ); Assert.assertNull( result.getResource() ); Assert.assertEquals( "Patient/4711", resource.getIdElement().toUnqualifiedVersionless().toString() ); }
@Nonnull @Override public IBaseReference createReference( @Nonnull IBaseResource resource ) { if ( resource.getIdElement().isEmpty() || resource.getIdElement().isLocal() ) { return new Reference( (Resource) resource ); } return new Reference( resource.getIdElement().toUnqualifiedVersionless() ); }
R4FhirResourceDhisToFhirTransformerUtils extends AbstractFhirResourceDhisToFhirTransformerUtils { @Nonnull @Override public IBaseReference createReference( @Nonnull IBaseResource resource ) { if ( resource.getIdElement().isEmpty() || resource.getIdElement().isLocal() ) { return new Reference( (Resource) resource ); } return new Reference( resource.getIdElement().toUnqualifiedVersionless() ); } }
R4FhirResourceDhisToFhirTransformerUtils extends AbstractFhirResourceDhisToFhirTransformerUtils { @Nonnull @Override public IBaseReference createReference( @Nonnull IBaseResource resource ) { if ( resource.getIdElement().isEmpty() || resource.getIdElement().isLocal() ) { return new Reference( (Resource) resource ); } return new Reference( resource.getIdElement().toUnqualifiedVersionless() ); } R4FhirResourceDhisToFhirTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext ); }
R4FhirResourceDhisToFhirTransformerUtils extends AbstractFhirResourceDhisToFhirTransformerUtils { @Nonnull @Override public IBaseReference createReference( @Nonnull IBaseResource resource ) { if ( resource.getIdElement().isEmpty() || resource.getIdElement().isLocal() ) { return new Reference( (Resource) resource ); } return new Reference( resource.getIdElement().toUnqualifiedVersionless() ); } R4FhirResourceDhisToFhirTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext ); @Nonnull @Override Set<FhirVersion> getFhirVersions(); @Nonnull @Override IBaseResource createResource( @Nonnull String resourceType ); @Nonnull @Override IBaseBundle createBundle( @Nonnull List<IBaseResource> result ); @Nonnull @Override ICompositeType createCodeableConcept(); @Nonnull @Override IBaseReference createReference( @Nonnull IBaseResource resource ); @Nonnull @Override IBaseElement createType( @Nonnull String fhirType ); @Override boolean containsString( @Nonnull List<? extends IPrimitiveType<String>> stringList, @Nullable String value ); @Override boolean equalsDeep( @Nonnull IBase base1, @Nonnull IBase base2 ); }
R4FhirResourceDhisToFhirTransformerUtils extends AbstractFhirResourceDhisToFhirTransformerUtils { @Nonnull @Override public IBaseReference createReference( @Nonnull IBaseResource resource ) { if ( resource.getIdElement().isEmpty() || resource.getIdElement().isLocal() ) { return new Reference( (Resource) resource ); } return new Reference( resource.getIdElement().toUnqualifiedVersionless() ); } R4FhirResourceDhisToFhirTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext ); @Nonnull @Override Set<FhirVersion> getFhirVersions(); @Nonnull @Override IBaseResource createResource( @Nonnull String resourceType ); @Nonnull @Override IBaseBundle createBundle( @Nonnull List<IBaseResource> result ); @Nonnull @Override ICompositeType createCodeableConcept(); @Nonnull @Override IBaseReference createReference( @Nonnull IBaseResource resource ); @Nonnull @Override IBaseElement createType( @Nonnull String fhirType ); @Override boolean containsString( @Nonnull List<? extends IPrimitiveType<String>> stringList, @Nullable String value ); @Override boolean equalsDeep( @Nonnull IBase base1, @Nonnull IBase base2 );  }