Skip to content

Commit

Permalink
issue #2694 addressed review comments. Fixed links pointing to old ma…
Browse files Browse the repository at this point in the history
…ster branch

Signed-off-by: Robin Arnold <robin.arnold@ibm.com>
  • Loading branch information
punktilious committed Jan 28, 2022
1 parent 6ea86ae commit 126bad3
Show file tree
Hide file tree
Showing 13 changed files with 92 additions and 36 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ e.g.

We have tried to make it as easy as possible to make contributions. This
applies to how we handle the legal aspects of contribution. We use the
same approach - the [Developer's Certificate of Origin 1.1 (DCO)](https://github.com/hyperledger/fabric/blob/master/docs/source/DCO1.1.txt) - that the Linux® Kernel [community](https://elinux.org/Developer_Certificate_Of_Origin)
same approach - the [Developer's Certificate of Origin 1.1 (DCO)](https://github.com/hyperledger/fabric/blob/main/docs/source/DCO1.1.txt) - that the Linux® Kernel [community](https://elinux.org/Developer_Certificate_Of_Origin)
uses to manage code contributions.

We simply ask that when submitting a patch for review, the developer
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/Conformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ System operations are invoked at `[base]/$[operation]`
|---------|-----------------|-----|
| [$convert](https://hl7.org/fhir/R4/resource-operation-convert.html) | Takes a resource in one form and returns it in another | Converts between JSON and XML but *not* between FHIR versions |
| [$export](https://hl7.org/fhir/uv/bulkdata/STU1/OperationDefinition-export.html) | Export data from the server | exports to an S3-compatible data store; see the [user guide](https://ibm.github.io/FHIR/guides/FHIRServerUsersGuide#4101-bulk-data-export) for config info |
| [$import](https://github.com/smart-on-fhir/bulk-import/blob/master/import.md) | Import FHIR Resources from a source| see the [user guide](https://ibm.github.io/FHIR/guides/FHIRServerUsersGuide#4101-bulk-data-export) for config info. This implementation is based on the proposed operation.|
| [$import](https://github.com/smart-on-fhir/bulk-import/blob/main/import.md) | Import FHIR Resources from a source| see the [user guide](https://ibm.github.io/FHIR/guides/FHIRServerUsersGuide#4101-bulk-data-export) for config info. This implementation is based on the proposed operation.|
| [$healthcheck](https://github.com/IBM/FHIR/blob/main/operation/fhir-operation-healthcheck/src/main/resources/healthcheck.json) | Check the health of the server | Checks for a valid connection to the database |

### Type operations
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/guides/DB2OnCloudSetup.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ Now that you've created the database and credentials, use the `fhir-persistence-

4. save the tenantKey from the `allocate-tenant` step above; this is needed to configure the IBM FHIR Server datasource in the next step

For more information on using the fhir-persistence-schema cli jar, see https://github.com/IBM/FHIR/tree/main/fhir-persistence-schema/README.md.
For more information on using the fhir-persistence-schema cli jar, see https://github.com/IBM/FHIR/tree/main/fhir-persistence-schema/docs/SchemaToolUsageGuide.md.

### **Configuring an IBM FHIR Server datasource**

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/guides/FHIRBulkOperations.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ curl -k -u "fhiruser:change-password" -H "Content-Type: application/fhir+json" \

## Import Operation: $import

The `$import` operation is a system-level operation invoked at `[base]/$import`. The Import Operation uses a custom crafted OperationDefinition [link](https://github.com/IBM/FHIR/blob/main/operation/fhir-operation-bulkdata/src/main/resources/import.json), which follows the proposal from [Smart-on-FHIR: import.md](https://github.com/smart-on-fhir/bulk-import/blob/master/import.md).
The `$import` operation is a system-level operation invoked at `[base]/$import`. The Import Operation uses a custom crafted OperationDefinition [link](https://github.com/IBM/FHIR/blob/main/operation/fhir-operation-bulkdata/src/main/resources/import.json), which follows the proposal from [Smart-on-FHIR: import.md](https://github.com/smart-on-fhir/bulk-import/blob/main/import.md).

### **$import: Create a Bulk Data Request**
To create an import request, the IBM FHIR Server requires the body fields of the request object to be a FHIR Resource `Parameters` JSON Object. The request must be posted to the server using `POST`. Each input url in the request is limited to a single resource type.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/guides/FHIRServerUsersGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -1257,7 +1257,7 @@ It is also possible to configure the persistence properties for a specific tenan
database hostname or database schema name.
## 4.10 Bulk data operations
The IBM FHIR Server implements bulk data export according to the [HL7 FHIR BulkDataAccess IG: STU1](http://hl7.org/fhir/uv/bulkdata/STU1/export/index.html), and bulk data import is implemented according to the [Proposal for $import Operation](https://github.com/smart-on-fhir/bulk-import/blob/master/import.md).
The IBM FHIR Server implements bulk data export according to the [HL7 FHIR BulkDataAccess IG: STU1](http://hl7.org/fhir/uv/bulkdata/STU1/export/index.html), and bulk data import is implemented according to the [Proposal for $import Operation](https://github.com/smart-on-fhir/bulk-import/blob/main/import.md).
There are 2 modules involved:
Expand Down
2 changes: 1 addition & 1 deletion fhir-bucket/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ Note that the --scan-local-dir [path-name] option must still be provided.
|password | The user password for connecting to the database|
|sslConnection | true or anything else, true triggers JDBC to use ssl, an example --prop sslConnection=true |

A sample properties file can be found at https://github.com/IBM/FHIR/blob/master/fhir-persistence-schema/db2.properties
A sample properties file can be found at https://github.com/IBM/FHIR/blob/main/fhir-persistence-schema/db2.properties

*COS Properties*

Expand Down
4 changes: 2 additions & 2 deletions fhir-install/src/main/docker/ibm-fhir-bucket-tool/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The image wraps the IBM FHIR Server Bucket Tool which wraps the module - `fhir-b
************
# **License**

The IBM FHIR Server - Bucket Tool is licensed under the Apache 2.0 license. Full license text is available at [LICENSE](https://github.com/IBM/FHIR/blob/master/LICENSE).
The IBM FHIR Server - Bucket Tool is licensed under the Apache 2.0 license. Full license text is available at [LICENSE](https://github.com/IBM/FHIR/blob/main/LICENSE).

FHIR® is the registered trademark of HL7 and is used with the permission of HL7. Use of the FHIR trademark does not constitute endorsement of this product by HL7.
IBM and the IBM logo are trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on [https://ibm.com/trademark](https://ibm.com/trademark).
IBM and the IBM logo are trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on [https://ibm.com/trademark](https://ibm.com/trademark).
4 changes: 2 additions & 2 deletions fhir-install/src/main/docker/ibm-fhir-schematool/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ The following is read from the properties file:
| sslrootcert | For Postgres, you must set as /opt/schematool/workarea/db.cert |
| db.cert | For Postgres, you must set as a base64 encoding of the certificate |

Further, any property supported by the [fhir-persistence-schema](https://github.com/IBM/FHIR/blob/master/fhir-persistence-schema/README.md) module is put into the file and mounted to the system.
Further, any property supported by the [fhir-persistence-schema](https://github.com/IBM/FHIR/blob/main/fhir-persistence-schema/README.md) module is put into the file and mounted to the system.

## Configuration file - persistence.json
The configuration file is as follows in the examples configuration.
Expand Down Expand Up @@ -205,7 +205,7 @@ docker run ibmcom/ibm-fhir-schematool:latest --tool.behavior=onboard --list-tena
************
# **License**

The IBM FHIR Server - Schema Tool is licensed under the Apache 2.0 license. Full license text is available at [LICENSE](https://github.com/IBM/FHIR/blob/master/LICENSE).
The IBM FHIR Server - Schema Tool is licensed under the Apache 2.0 license. Full license text is available at [LICENSE](https://github.com/IBM/FHIR/blob/main/LICENSE).

FHIR® is the registered trademark of HL7 and is used with the permission of HL7. Use of the FHIR trademark does not constitute endorsement of this product by HL7.
IBM and the IBM logo are trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on [https://ibm.com/trademark](https://ibm.com/trademark).
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The image wraps the IBM FHIR Server Term Graph Loader tool.
************
# **License**

The IBM FHIR Server - Term Graph Loader Tool is licensed under the Apache 2.0 license. Full license text is available at [LICENSE](https://github.com/IBM/FHIR/blob/master/LICENSE).
The IBM FHIR Server - Term Graph Loader Tool is licensed under the Apache 2.0 license. Full license text is available at [LICENSE](https://github.com/IBM/FHIR/blob/main/LICENSE).

FHIR® is the registered trademark of HL7 and is used with the permission of HL7. Use of the FHIR trademark does not constitute endorsement of this product by HL7.
IBM and the IBM logo are trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on [https://ibm.com/trademark](https://ibm.com/trademark).
IBM and the IBM logo are trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on [https://ibm.com/trademark](https://ibm.com/trademark).
59 changes: 56 additions & 3 deletions fhir-persistence-schema/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,61 @@ The executable command line interface (cli) version of this module can be downlo

The following guides contain detailed descriptions on usage, design and the multi-tenant variant used with Db2:

* [Schema Deployment and Upgrade Guide](https://github.com/IBM/FHIR/tree/master/fhir-persistence-schema/docs/SchemaToolUsageGuide.md)
* [Schema Design](https://github.com/IBM/FHIR/tree/master/fhir-persistence-schema/docs/SchemaDesign.md)
* [Db2 Multi-tenancy](https://github.com/IBM/FHIR/tree/master/fhir-persistence-schema/docs/DB2MultiTenancy.md)
* [Schema Deployment and Upgrade Guide](https://github.com/IBM/FHIR/tree/main/fhir-persistence-schema/docs/SchemaToolUsageGuide.md)
* [Schema Design](https://github.com/IBM/FHIR/tree/main/fhir-persistence-schema/docs/SchemaDesign.md)
* [Db2 Multi-tenancy](https://github.com/IBM/FHIR/tree/main/fhir-persistence-schema/docs/DB2MultiTenancy.md)

---------
## TL;DR

1. Create a properties file containing your database connection information:

```
$ cat fhirdb.properties
db.host=localhost
db.port=5432
db.database=fhirdb
user=postgres
password=change-password
```

2. Run the schema tool CLI to create the target schema (for example `fhirdata`). Skip this step if a DBA has already created a schema for you.

``` shell
java -jar ./fhir-persistence-schema-${VERSION}-cli.jar \
--db-type postgresql \
--prop-file fhirdb.properties \
--schema-name fhirdata \
--create-schemas
```

Note: Replace `${VERSION}` with the version of the jar you're using or use the wildcard `*` to match any version.

3. Run the schema tool CLI again to create the tables and indexes in the `fhirdata` schema. We recommend following the least-privilege access model, so the IBM FHIR Server should connect using a non-admin user. Use the `--grant-to` option to grant the correct privileges to the non-admin user created for the IBM FHIR Server (the user `fhirserver` in the following example):

``` shell
java -jar ./fhir-persistence-schema-${VERSION}-cli.jar \
--db-type postgresql \
--prop-file fhirdb.properties \
--schema-name fhirdata \
--update-schema \
--grant-to fhirserver \
--pool-size 1
```


4. To upgrade the schema for a new release, run the schema tool CLI again. The tool handles version tracking and will apply all the necessary changes to roll forward to the latest version:

``` shell
java -jar ./fhir-persistence-schema-${VERSION}-cli.jar \
--db-type postgresql \
--prop-file fhirdb.properties \
--schema-name fhirdata \
--update-schema \
--grant-to fhirserver \
--pool-size 1
```

For details on configuring TLS and using other databases and options, read the full [Schema Deployment and Upgrade Guide](https://github.com/IBM/FHIR/tree/main/fhir-persistence-schema/docs/SchemaToolUsageGuide.md).

FHIR® is the registered trademark of HL7 and is used with the permission of HL7.
4 changes: 2 additions & 2 deletions fhir-persistence-schema/docs/DB2MultiTenancy.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ The `FHIR_ADMIN.SV_TENANT_ID` session variable is used in a row permission objec
The variable privileges (grants) are updated one time, and applied to `FHIRSERVER` user. The `FHIRSERVER` gets only read access to this variable. To set the value of the variable, `FHIRSERVER` must call `FHIR_ADMIN.SET_TENANT` as described in the next section.
`FHIR_ADMIN.SET_TENANT` is created in the FHIR_ADMIN schema. If updates are made to the `set_tenant.sql`, the `FhirSchemaGenerator.buildAdminSchema`'s, do not change the version number. All procedures are applied as CREATE OR REPLACE, and so the new procedure text will simply overwrite the current definition, or create it if it does not exist at the time. The schema utility tool has a special option which only updates the procedures, which is useful for development. See the [schema utility tool](https://github.com/IBM/FHIR/tree/master/fhir-persistence-schema/README.md) guide for more information.
`FHIR_ADMIN.SET_TENANT` is created in the FHIR_ADMIN schema. If updates are made to the `set_tenant.sql`, the `FhirSchemaGenerator.buildAdminSchema`'s, do not change the version number. All procedures are applied as CREATE OR REPLACE, and so the new procedure text will simply overwrite the current definition, or create it if it does not exist at the time. The schema utility tool has a special option which only updates the procedures, which is useful for development. See the [schema utility tool](https://github.com/IBM/FHIR/tree/main/fhir-persistence-schema/docs/SchemaToolUsageGuide.md) guide for more information.

The SET_TENANT procedure is defined in the PhysicalDataModel as follows:

Expand Down Expand Up @@ -368,7 +368,7 @@ The isolated data supports tenant independent query plan caches, scaling and dis

**Table: Resources**

Each resource is contains a RESOURCE and LOGICAL RESOURCE table. `xx_LOGICAL_RESOURCES` has one record per logical resource. `xx_RESOURCES` has one record for each version of each logical resource.
Each resource type has its own RESOURCE and LOGICAL RESOURCE tables. `xx_LOGICAL_RESOURCES` has one record per logical resource. `xx_RESOURCES` has one record for each version of each logical resource.

For example, VISIONPRESCRIPTION has:

Expand Down
Loading

0 comments on commit 126bad3

Please sign in to comment.