@Test public void createBundle() { final List<IBaseResource> resources = Arrays.asList( new Organization(), new Patient() ); final Bundle bundle = (Bundle) utils.createBundle( resources ); Assert.assertEquals( Bundle.BundleType.SEARCHSET, bundle.getType() ); Assert.assertEquals( 2, bundle.getEntry().size() ); }
@Nonnull @Override public IBaseBundle createBundle( @Nonnull List<IBaseResource> result ) { final Bundle bundle = new Bundle(); bundle.setId( UUID.randomUUID().toString() ); bundle.getMeta().setLastUpdated( new Date() ); bundle.setType( Bundle.BundleType.SEARCHSET ); result.forEach( r -> bundle.addEntry().setResource( (Resource) r ) ); return bundle; }
Dstu3FhirResourceDhisToFhirTransformerUtils extends AbstractFhirResourceDhisToFhirTransformerUtils { @Nonnull @Override public IBaseBundle createBundle( @Nonnull List<IBaseResource> result ) { final Bundle bundle = new Bundle(); bundle.setId( UUID.randomUUID().toString() ); bundle.getMeta().setLastUpdated( new Date() ); bundle.setType( Bundle.BundleType.SEARCHSET ); result.forEach( r -> bundle.addEntry().setResource( (Resource) r ) ); return bundle; } }
Dstu3FhirResourceDhisToFhirTransformerUtils extends AbstractFhirResourceDhisToFhirTransformerUtils { @Nonnull @Override public IBaseBundle createBundle( @Nonnull List<IBaseResource> result ) { final Bundle bundle = new Bundle(); bundle.setId( UUID.randomUUID().toString() ); bundle.getMeta().setLastUpdated( new Date() ); bundle.setType( Bundle.BundleType.SEARCHSET ); result.forEach( r -> bundle.addEntry().setResource( (Resource) r ) ); return bundle; } Dstu3FhirResourceDhisToFhirTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext ); }
Dstu3FhirResourceDhisToFhirTransformerUtils extends AbstractFhirResourceDhisToFhirTransformerUtils { @Nonnull @Override public IBaseBundle createBundle( @Nonnull List<IBaseResource> result ) { final Bundle bundle = new Bundle(); bundle.setId( UUID.randomUUID().toString() ); bundle.getMeta().setLastUpdated( new Date() ); bundle.setType( Bundle.BundleType.SEARCHSET ); result.forEach( r -> bundle.addEntry().setResource( (Resource) r ) ); return bundle; } Dstu3FhirResourceDhisToFhirTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext ); @Nonnull @Override Set<FhirVersion> getFhirVersions(); @Nonnull @Override IBaseResource createResource( @Nonnull String resourceType ); @Nonnull @Override IBaseElement createType( @Nonnull String fhirType ); @Nonnull @Override IBaseBundle createBundle( @Nonnull List<IBaseResource> result ); @Nonnull @Override ICompositeType createCodeableConcept(); @Nonnull @Override IBaseReference createReference( @Nonnull IBaseResource resource ); @Override boolean containsString( @Nonnull List<? extends IPrimitiveType<String>> stringList, @Nullable String value ); @Override boolean equalsDeep( @Nonnull IBase base1, @Nonnull IBase base2 ); }
Dstu3FhirResourceDhisToFhirTransformerUtils extends AbstractFhirResourceDhisToFhirTransformerUtils { @Nonnull @Override public IBaseBundle createBundle( @Nonnull List<IBaseResource> result ) { final Bundle bundle = new Bundle(); bundle.setId( UUID.randomUUID().toString() ); bundle.getMeta().setLastUpdated( new Date() ); bundle.setType( Bundle.BundleType.SEARCHSET ); result.forEach( r -> bundle.addEntry().setResource( (Resource) r ) ); return bundle; } Dstu3FhirResourceDhisToFhirTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext ); @Nonnull @Override Set<FhirVersion> getFhirVersions(); @Nonnull @Override IBaseResource createResource( @Nonnull String resourceType ); @Nonnull @Override IBaseElement createType( @Nonnull String fhirType ); @Nonnull @Override IBaseBundle createBundle( @Nonnull List<IBaseResource> result ); @Nonnull @Override ICompositeType createCodeableConcept(); @Nonnull @Override IBaseReference createReference( @Nonnull IBaseResource resource ); @Override boolean containsString( @Nonnull List<? extends IPrimitiveType<String>> stringList, @Nullable String value ); @Override boolean equalsDeep( @Nonnull IBase base1, @Nonnull IBase base2 );  }