8.2Partition Mapping Operations

 

Several operations exist that can be used to manage the existence of partitions. These operations are supplied by a plain provider called PartitionManagementProvider.

Before a partition can be used, it must be registered using these methods.

8.2.1Creating a Partition

 

The $partition-management-create-partition operation can be used to create a new partition. This operation takes the following parameters:

Name Type Cardinality Description
id Integer 1..1 The numeric ID for the partition. This value can be any integer, positive or negative or zero. It must not be a value that has already been used.
name Code 1..1 A code (string) to assign to the partition.
description String 0..1 An optional description for the partition.

Example

Note that once multitenancy is enabled, all requests to the FHIR server must contain a tenant. These operations are no exception. If you fail to include a tenant identifier in the request, an error will be returned.

An HTTP POST to the following URL would be used to invoke this operation. Notice that we use the DEFAULT partition, as it always exists by default. http://example.com/DEFAULT/$partition-management-create-partition

The following request body could be used:

{
  "resourceType": "Parameters",
  "parameter": [ {
    "name": "id",
    "valueInteger": 123
  }, {
    "name": "name",
    "valueCode": "PARTITION-123"
  }, {
    "name": "description",
    "valueString": "a description"
  } ]
}

8.2.2Updating a Partition

 

The $partition-management-update-partition operation can be used to update an existing partition. This operation takes the following parameters:

Name Type Cardinality Description
id Integer 1..1 The numeric ID for the partition to update. This ID must already exist.
name Code 1..1 A code (string) to assign to the partition. Note that it is acceptable to change the name of a partition, but this should be done with caution since partition names may be referenced by URLs, caches, etc.
description String 0..1 An optional description for the partition.

Example

An HTTP POST to the following URL would be used to invoke this operation: http://example.com/DEFAULT/$partition-management-update-partition

The following request body could be used:

{
  "resourceType": "Parameters",
  "parameter": [ {
    "name": "id",
    "valueInteger": 123
  }, {
    "name": "name",
    "valueCode": "PARTITION-123"
  }, {
    "name": "description",
    "valueString": "a description"
  } ]
}

8.2.3Deleting a Partition

 

The $partition-management-delete-partition operation can be used to delete an existing partition. This operation takes the following parameters:

Name Type Cardinality Description
id Integer 1..1 The numeric ID for the partition to update. This ID must already exist.

Example

An HTTP POST to the following URL would be used to invoke this operation: http://example.com/DEFAULT/$partition-management-delete-partition

The following request body could be used:

{
  "resourceType": "Parameters",
  "parameter": [ {
    "name": "id",
    "valueInteger": 123
  } ]
}

8.2.4Reading a Partition

 

The $partition-management-read-partition operation can be used to read an existing partition. This operation takes the following parameters:

Name Type Cardinality Description
id Integer 1..1 The numeric ID for the partition to update. This ID must already exist.

Example

An HTTP POST to the following URL would be used to invoke this operation: http://example.com/DEFAULT/$partition-management-read-partition

The following request body could be used:

{
  "resourceType": "Parameters",
  "parameter": [ {
    "name": "id",
    "valueInteger": 123
  } ]
}

8.2.5Listing all Partitions

 

The $partition-management-list-partitions operation can be used to list all existing partitions.

Example

An HTTP POST to the following URL would be used to invoke this operation: http://example.com/DEFAULT/$partition-management-list-partitions

This operation returns a Parameters resource that looks like the following:

{
    "resourceType": "Parameters",
    "parameter": [ {
       "name": "partition",
       "part": [ {
          "name": "id",
          "valueInteger": 1
        }, {
          "name": "name",
          "valueCode": "PARTITION-1"
        }, {
          "name": "description",
          "valueString": "a description1"
        } ]
      }, {
       "name": "partition",
       "part": [ {
          "name": "id",
          "valueInteger": 2
       }, {
          "name": "name",
          "valueCode": "PARTITION-2"
       }, {
          "name": "description",
          "valueString": "a description2"
       } ]
    } ]
}