SearchWithPagination Example

The SearchWithPagination process illustrates how the results of a search can be displayed on as many pages as required by using a FHIR resource.

For more information about searching for a FHIR resource, see Search for Resource.

SearchWithPagination Process

The SearchWithPagination process is illustrated here.

Process Definition

The process performs the following operations:
  1. The Timer activity starts the process.
  2. The ForEach activity runs four times to create 16 Patient resources.
  3. The CreatePatient activities are used to create four Patient FHIR resources with the same family name and different given names.
  4. The Repeat activity executes the SearchForResource activity until there is no output generated by the nextUrlPage activity.
  5. The SearchForResource activity searches the Patient information by the parameter family (name).
  6. The outer Iterate activity iterates the pages returned by the Repeat activity.
  7. The inner Iterate activity iterates the patients contained in the current page of outer Iterate Activity.
  8. The DeletePatient activity removes the current Patient of the inner Iterate activity.
  9. After the process executes successfully, a Success message is written to the Console. Select Window > Show Console in TIBCO Business Studio to view the log messages.

Process Output

Select the desired activity and click the Output tab.

  1. The CreatePatient activity output displays the ID of the Patient Resource that was created.
  2. The SearchForResource returns data matching the requested search by family (name).
  3. The Repeat activity returns all the pages of patient records.
  4. The DeletePatient activity output displays the ID of the Patient Resource that was deleted.